Make extraction products reusable without run bundles

This commit is contained in:
2026-11-30 13:54:04 +00:00
parent 95e297e917
commit 2ca09e2a00
4 changed files with 34 additions and 81 deletions

View File

@@ -217,14 +217,6 @@ func (extractStage) Run(ctx context.Context, env *Env, m *manifest.Manifest) (re
ExternalProvenance: &artifactmodel.ExternalProvenance{System: "notarius", PipelineID: report.Pipeline, ArtifactID: lane.LaneID},
})
}
retentionPath := artifacts.SessionRunNotariusRetentionPath(paths, runID)
retention, err := json.Marshal(map[string]any{"role": "session_durable", "bundle_root": bundle})
if err != nil {
return nil, err
}
if err := fileops.WriteFileAtomic(retentionPath, append(retention, '\n'), fileops.WorkspaceFileMode); err != nil {
return nil, fmt.Errorf("extract: record bundle retention: %w", err)
}
completion := map[string]any{"pipeline": report.Pipeline, "artifact_count": report.ArtifactCount, "output_directory": bundle}
if report.DebugDirectory != "" {
completion["debug_directory"] = report.DebugDirectory
@@ -235,7 +227,6 @@ func (extractStage) Run(ctx context.Context, env *Env, m *manifest.Manifest) (re
}
metadata := map[string]any{
"stage": "extract", "notarius_enabled": true, "bundle_root": bundle,
"bundle_retention_role": "session_durable", "retention_path": retentionPath,
"diagnostic_path": logPath, "narratio_run_id": runID,
"configuration_fingerprint": fingerprint, "direct_input": input.Metadata(),
"reference_count": len(references.Identities), "references": extractReferenceMetadata(references.Identities),