Implement fleet topology epidemiology tracker and strain plague map.
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
Adds epidemiology package, auth epidemiology_fix push, strain-based 3D map, and Vitest coverage.
This commit is contained in:
32
server/internal/ai/seer_memory_test.go
Normal file
32
server/internal/ai/seer_memory_test.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package ai
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestExtractSeerNote(t *testing.T) {
|
||||
resp := `{"commands":[{"type":"noop","args":{}}]}
|
||||
SEER_NOTE: dns_txt lane succeeded on 10.0.1.0/24 after wsl exhaustion.`
|
||||
note, ok := ExtractSeerNote(resp)
|
||||
if !ok || note == "" {
|
||||
t.Fatalf("expected note, got ok=%v note=%q", ok, note)
|
||||
}
|
||||
if !strings.Contains(note, "dns_txt") {
|
||||
t.Fatalf("unexpected note: %q", note)
|
||||
}
|
||||
}
|
||||
|
||||
func TestAugmentUserPromptWithNotes(t *testing.T) {
|
||||
got := AugmentUserPromptWithNotes("Agent: id=abc", "- prior note")
|
||||
if !strings.Contains(got, "Seer notes") || !strings.Contains(got, "Agent: id=abc") {
|
||||
t.Fatalf("augmented prompt: %s", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestAugmentUserPromptEmptyNotes(t *testing.T) {
|
||||
base := "Agent: id=abc"
|
||||
if AugmentUserPromptWithNotes(base, "") != base {
|
||||
t.Fatal("expected unchanged prompt")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user