Files
AetherForge/server/internal/ai/seer_memory_test.go
AetherForge f0fe34698c
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Implement fleet topology epidemiology tracker and strain plague map.
Adds epidemiology package, auth epidemiology_fix push, strain-based 3D map, and Vitest coverage.
2026-06-07 09:20:12 -07:00

33 lines
841 B
Go

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")
}
}