Reject unsupported session state before execution and restore

This commit is contained in:
2026-11-29 23:57:16 +00:00
parent 8bc3ae56cb
commit 816453b444
16 changed files with 172 additions and 49 deletions

View File

@@ -51,6 +51,11 @@ func executePlanWithDependencies(ctx context.Context, cfg *config.Config, plan B
if err != nil {
return nil, err
}
// Reject unsupported existing state before creating or normalizing layout.
// The locked initialization reads it again to protect against concurrent work.
if _, _, err := loadManifestAtPathIfPresent(ctx, &manifest.LocalStore{}, runtime.manifestPath); err != nil {
return nil, err
}
if err := prepareInvocationLayout(runtime); err != nil {
return nil, err
}