Add artifact provenance and stage skip outcomes

This commit is contained in:
2026-08-09 23:20:32 +00:00
parent df58595d1e
commit 951383226c
12 changed files with 1565 additions and 305 deletions

View File

@@ -110,3 +110,23 @@ func TestMarkStageSucceededClearsError(t *testing.T) {
t.Fatalf("error = %#v, want nil on success", stage.Error)
}
}
func TestMarkStageSkippedClearsEarlierOutputs(t *testing.T) {
m := New("2026-05-03", time.Date(2026, 5, 3, 10, 0, 0, 0, time.UTC))
m.MarkStageSucceeded("extract", time.Date(2026, 5, 3, 10, 1, 0, 0, time.UTC), []ArtifactRecord{
{Kind: "structured_data", SourceID: "narratio.example.characters", LocalPath: "artifacts/characters.json"},
})
m.MarkStageSkipped("extract", time.Date(2026, 5, 3, 10, 2, 0, 0, time.UTC), "integration_disabled")
stage := m.Stages["extract"]
if stage == nil {
t.Fatal("missing stage record")
}
if stage.Status != StatusSkipped {
t.Fatalf("status = %q, want %q", stage.Status, StatusSkipped)
}
if len(stage.Outputs) != 0 {
t.Fatalf("outputs = %#v, want cleared", stage.Outputs)
}
}