Serialize restore recovery and rebase manifest paths

This commit is contained in:
2026-08-10 21:01:28 +00:00
parent 4158394dcf
commit 8375ad83f3
14 changed files with 581 additions and 78 deletions

View File

@@ -67,13 +67,6 @@ func executeStages(ctx context.Context, cfg *config.Config, stages []stage.Stage
identity.Campaign,
identity.SessionID,
)
if existing, present, err := loadManifestAtPathIfPresent(ctx, env.ManifestStore, manifestPath); err != nil {
return nil, err
} else if present {
if err := identity.validateSessionManifest(existing); err != nil {
return nil, err
}
}
if env.ArtifactStore == nil {
env.ArtifactStore = artifacts.NewLocalStore(cfg.Pipeline.Workspace.Root)
}
@@ -104,6 +97,9 @@ func executeStages(ctx context.Context, cfg *config.Config, stages []stage.Stage
if paths.ManifestPath != manifestPath {
return nil, fmt.Errorf("prepared manifest path %q does not match resolved manifest path %q", paths.ManifestPath, manifestPath)
}
if err := requireCompleteRestore(paths); err != nil {
return nil, err
}
m, present, err := loadManifestAtPathIfPresent(ctx, env.ManifestStore, manifestPath)
if err != nil {
return nil, err