Closes review findings on the Slices 2-4 work so Slice 5 can build on a sound resolver contract.
Resolver primitives
resolveOutcome decides retry-within-budget vs terminal; removed the no-op isTerminalClassification.
WORK_STATUS_FOR_OUTCOME preserves the real terminal Work status instead of collapsing everything back to ready.
Lifecycle: completed is terminal, cancelled reopens only to ready, invalid reopenings removed.
Execution
finishAttempt replaces completeAttempt: auto-retries within the kit budget and settles Work at the real classification (Succeeded->completed, PermanentFailure/BudgetExhausted->failed, NeedsInput->needs-input, Blocked->blocked).
startSimulatedExecution validates sliceId against the approved Design and advances slice status.
retrySimulatedExecution is now an explicit, guarded restart.
reconcileExpiredAttempts is bounded; crons.ts sweeps every 30s.
Planning
saveDefinition/saveDesign reject revision during execution.
Closes review findings on the Slices 2-4 work so Slice 5 can build on a sound resolver contract.
## Resolver primitives
- `resolveOutcome` decides retry-within-budget vs terminal; removed the no-op `isTerminalClassification`.
- `WORK_STATUS_FOR_OUTCOME` preserves the real terminal Work status instead of collapsing everything back to `ready`.
- Lifecycle: `completed` is terminal, `cancelled` reopens only to `ready`, invalid reopenings removed.
## Execution
- `finishAttempt` replaces `completeAttempt`: auto-retries within the kit budget and settles Work at the real classification (`Succeeded`->`completed`, `PermanentFailure`/`BudgetExhausted`->`failed`, `NeedsInput`->`needs-input`, `Blocked`->`blocked`).
- `startSimulatedExecution` validates `sliceId` against the approved Design and advances slice status.
- `retrySimulatedExecution` is now an explicit, guarded restart.
- `reconcileExpiredAttempts` is bounded; `crons.ts` sweeps every 30s.
## Planning
- `saveDefinition`/`saveDesign` reject revision during execution.
- `submitQuestion` persists durable questions; design revision invalidates approvals.
## Verification
Primitives 69 tests (+4); backend 22 tests (+10). Root typecheck, web+agents build, and Ultracite gate pass.
Addresses review findings before Slice 5 sandbox work.
Resolver primitives:
- resolveOutcome maps an attempt outcome to retry-or-terminal; removed the
no-op isTerminalClassification.
- WORK_STATUS_FOR_OUTCOME preserves real terminal Work status instead of
collapsing everything back to ready.
- Lifecycle: completed is terminal, cancelled reopens only to ready, and the
invalid awaiting-design-approval -> awaiting-definition-approval reopening
is gone.
Execution (workExecution.ts):
- finishAttempt replaces completeAttempt: auto-retries within the kit budget
and settles Work at the real classification (Succeeded->completed,
PermanentFailure/BudgetExhausted->failed, NeedsInput->needs-input,
Blocked->blocked). No Work stays silently runnable after a failure.
- startSimulatedExecution validates sliceId against the current approved
Design (foreign ids rejected; defaults to the first slice) and advances
slice status running -> completed/ready.
- retrySimulatedExecution is now an explicit user restart with a retryable-
state guard, not the automatic resolver path.
- reconcileExpiredAttempts is bounded: a dead lease terminates as Blocked,
resumes within budget or settles the Run/Work so nothing runs forever.
- crons.ts runs the reconciler every 30s, string-referenced so it does not
depend on the stale codegen.
Planning (workPlanning.ts):
- saveDefinition/saveDesign reject revision while a Run is executing.
- submitQuestion validates and persists a durable workQuestions row instead
of discarding planner questions.
- Design revision invalidates active design approvals.
Verification: primitives 69 tests (+4), backend 22 tests (+10) covering
retry/cancel/failure/restart, slice validation, reconciliation, the
revision guard, and question persistence. Root typecheck, web+agents build,
and the configured Ultracite gate (53 files) all pass.
package.json: the recurring check gate now covers workExecution, workPlanning,
crons, resolver, and work-lifecycle.
puter
merged commit 0e32c35515 into master2026-07-27 18:39:09 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes review findings on the Slices 2-4 work so Slice 5 can build on a sound resolver contract.
Resolver primitives
resolveOutcomedecides retry-within-budget vs terminal; removed the no-opisTerminalClassification.WORK_STATUS_FOR_OUTCOMEpreserves the real terminal Work status instead of collapsing everything back toready.completedis terminal,cancelledreopens only toready, invalid reopenings removed.Execution
finishAttemptreplacescompleteAttempt: auto-retries within the kit budget and settles Work at the real classification (Succeeded->completed,PermanentFailure/BudgetExhausted->failed,NeedsInput->needs-input,Blocked->blocked).startSimulatedExecutionvalidatessliceIdagainst the approved Design and advances slice status.retrySimulatedExecutionis now an explicit, guarded restart.reconcileExpiredAttemptsis bounded;crons.tssweeps every 30s.Planning
saveDefinition/saveDesignreject revision during execution.submitQuestionpersists durable questions; design revision invalidates approvals.Verification
Primitives 69 tests (+4); backend 22 tests (+10). Root typecheck, web+agents build, and Ultracite gate pass.