Propagate cancellation and preserve resumable state

This commit is contained in:
2026-11-20 05:53:49 +00:00
parent a6c6f1e4ab
commit c7a5ff316d
21 changed files with 356 additions and 27 deletions

View File

@@ -37,6 +37,9 @@ type invocationRuntime struct {
}
func prepareInvocation(ctx context.Context, cfg *config.Config, plan BoundedPlan, opts RunOptions, dependencies invocationDependencies) (*invocationRuntime, error) {
if err := ctx.Err(); err != nil {
return nil, err
}
var prerequisiteStore manifest.Store
if opts.Env != nil {
prerequisiteStore = opts.Env.ManifestStore
@@ -125,6 +128,9 @@ func prepareInvocation(ctx context.Context, cfg *config.Config, plan BoundedPlan
}
func prepareInvocationLayout(runtime *invocationRuntime) error {
if err := runtime.ctx.Err(); err != nil {
return err
}
paths, err := runtime.artifactStore.EnsureLayoutFor(runtime.identity.Campaign, runtime.identity.SessionID)
if err != nil {
return fmt.Errorf("prepare workdir: %w", err)