Delete run manifest domain model

This commit is contained in:
2026-09-03 04:16:36 +00:00
parent 2d20900cbf
commit c0fbc14f2d
15 changed files with 25 additions and 595 deletions

View File

@@ -88,11 +88,6 @@ func SessionRunRootForCampaign(rootDir, campaign, sessionID, runID string) strin
return filepath.Join(SessionRunsDirForCampaign(rootDir, campaign, sessionID), runID)
}
// SessionRunManifestPathForCampaign returns the canonical run manifest path under runs/{run_id}/manifest.json.
func SessionRunManifestPathForCampaign(rootDir, campaign, sessionID, runID string) string {
return filepath.Join(SessionRunRootForCampaign(rootDir, campaign, sessionID, runID), config.PathManifestFile)
}
// SessionRunStageDirForCampaign returns the canonical stage directory under runs/{run_id}/{stage}.
func SessionRunStageDirForCampaign(rootDir, campaign, sessionID, runID, stageName string) string {
return filepath.Join(SessionRunRootForCampaign(rootDir, campaign, sessionID, runID), stageName)

View File

@@ -39,16 +39,6 @@ func TestSessionRunRootAndStageDirForCampaign(t *testing.T) {
}
}
func TestSessionRunManifestPathForCampaign(t *testing.T) {
root := "/tmp/workspace"
runID := "20260515T031522Z-a1b2c3d4"
got := SessionRunManifestPathForCampaign(root, "forsaken", "2026-04-19", runID)
want := filepath.Join(root, "work", "forsaken", "2026-04-19", "runs", runID, "manifest.json")
if got != want {
t.Fatalf("SessionRunManifestPathForCampaign() = %q, want %q", got, want)
}
}
func TestSessionNotariusPathsForCampaign(t *testing.T) {
root := "/tmp/workspace"
campaign := "forsaken"

View File

@@ -17,7 +17,8 @@ const RemoteCommitFormatVersion = 1
type RemoteArtifactType string
const (
RemoteArtifactTypeSessionManifest RemoteArtifactType = "session_manifest"
RemoteArtifactTypeSessionManifest RemoteArtifactType = "session_manifest"
// RemoteArtifactTypeRunManifest is retained solely to decode immutable existing commits; Narratio no longer emits or interprets it.
RemoteArtifactTypeRunManifest RemoteArtifactType = "run_manifest"
RemoteArtifactTypeRunFile RemoteArtifactType = "run_file"
RemoteArtifactTypePublishedOutput RemoteArtifactType = "published_output"

View File

@@ -46,6 +46,18 @@ func TestRemoteCommitDecodersRejectUnknownFields(t *testing.T) {
}
}
func TestRemoteCommitDecoderAcceptsHistoricalRunManifestArtifact(t *testing.T) {
data := []byte(`{"format_version":1,"campaign":"sample-campaign","session_id":"2026-05-03","run_id":"20260519T010203Z-a1b2c3d4","artifacts":[{"type":"run_manifest","source":"run:manifest.json","destination_key":"sample-campaign/2026-05-03/runs/20260519T010203Z-a1b2c3d4/manifest.json","sha256":"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef","size":1,"generation":"historical"}]}`)
commit, err := DecodeRemoteCommitManifest(data)
if err != nil {
t.Fatalf("DecodeRemoteCommitManifest() error = %v", err)
}
if got := commit.Artifacts[0].Type; got != RemoteArtifactTypeRunManifest {
t.Fatalf("artifact type = %q, want %q", got, RemoteArtifactTypeRunManifest)
}
}
func TestLoadCurrentStateReadsVerifiedRemoteCommit(t *testing.T) {
store := &storage.FakeBackend{}
commit := testRemoteCommit(t, "20260519T010203Z-a1b2c3d4")