Delete run manifest domain model
This commit is contained in:
@@ -95,35 +95,6 @@ func TestAnalyzeArtifactStateRoundTripsEveryStatusDeterministically(t *testing.T
|
||||
}
|
||||
}
|
||||
|
||||
func TestRunManifestAnalyzeArtifactStateRoundTrip(t *testing.T) {
|
||||
now := time.Date(2026, 5, 3, 10, 0, 0, 0, time.UTC)
|
||||
run := NewRun("session", "campaign", "run-123", true, []string{"analyze"}, now)
|
||||
run.Stages["analyze"] = &RunStageRecord{
|
||||
Name: "analyze",
|
||||
Action: RunStageActionRun,
|
||||
Status: StatusSucceeded,
|
||||
CreatedAt: now,
|
||||
UpdatedAt: now,
|
||||
AnalyzeStateVersion: AnalyzeStateContractVersion,
|
||||
AnalyzeArtifacts: map[string]AnalyzeArtifactRecord{
|
||||
"session_recap": currentAnalyzeArtifactRecord("session_recap", now),
|
||||
},
|
||||
}
|
||||
path := filepath.Join(t.TempDir(), "run.json")
|
||||
store := &LocalStore{}
|
||||
if err := store.SaveRun(context.Background(), path, run); err != nil {
|
||||
t.Fatalf("SaveRun() error = %v", err)
|
||||
}
|
||||
loaded, err := store.LoadRun(context.Background(), path)
|
||||
if err != nil {
|
||||
t.Fatalf("LoadRun() error = %v", err)
|
||||
}
|
||||
got := loaded.Stages["analyze"]
|
||||
if got.AnalyzeStateVersion != AnalyzeStateContractVersion || got.AnalyzeArtifacts["session_recap"].Status != AnalyzeArtifactCurrent {
|
||||
t.Fatalf("run analyze state = %#v", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestValidateAnalyzeArtifactCollectionRejectsMalformedState(t *testing.T) {
|
||||
now := time.Date(2026, 5, 3, 10, 0, 0, 0, time.UTC)
|
||||
valid := currentAnalyzeArtifactRecord("session_recap", now)
|
||||
|
||||
Reference in New Issue
Block a user