(t *testing.T)
| 239 | } |
| 240 | |
| 241 | func TestLineageManager_TrackMemoryCreation(t *testing.T) { |
| 242 | lm := NewLineageManager() |
| 243 | |
| 244 | provenance := NewProvenance(SourceUserInput, "session-1") |
| 245 | |
| 246 | err := lm.TrackMemoryCreation("mem-1", provenance, nil) |
| 247 | if err != nil { |
| 248 | t.Fatalf("TrackMemoryCreation() error = %v", err) |
| 249 | } |
| 250 | |
| 251 | // Verify memory was tracked |
| 252 | metadata := lm.graph.memoryMetadata["mem-1"] |
| 253 | if metadata == nil { |
| 254 | t.Fatal("Memory not tracked in graph") |
| 255 | } |
| 256 | |
| 257 | if metadata.ID != "mem-1" { |
| 258 | t.Errorf("Memory ID = %v, want mem-1", metadata.ID) |
| 259 | } |
| 260 | |
| 261 | if len(metadata.SourceIDs) != 1 || metadata.SourceIDs[0] != "session-1" { |
| 262 | t.Errorf("SourceIDs = %v, want [session-1]", metadata.SourceIDs) |
| 263 | } |
| 264 | } |
| 265 | |
| 266 | func TestLineageManager_DeleteMemoryWithLineage(t *testing.T) { |
| 267 | lm := NewLineageManager() |
nothing calls this directly
no test coverage detected