Conversation
prepareExecution builds the trusted execute/fix request: untrusted issue, plan fields, lessons and problem text only in escaped JSON data blocks, filled in one pass; approvedArgv only from the item's structured cmd checks that exactly match an approved argv. auditRun is a pure audit over D's change manifest (#66): safety violations first (metadata, .git, link targets, gitlinks, new or converted symlinks, unsafe targets, odd entries, oversized reports), then in-scope versus out-of-scope files for the commit step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ItemExecutor runs a task's plan items in order as execute attempts. executionDeps materializes a fresh workspace and snapshots declared links, builds the prompt with prepareExecution, and in finish() inspects changes, audits them with auditRun, and makes the runner's own commit with Plan-Item/Plan-Revision trailers. The coordinator gains an async finish step and a release step after the terminal write; settleAttempt records the owned ledger entry with completed in the same transaction. A safety violation moves the task to needs human; out-of-scope files are committed and pause it in needs amendment with a checkpoint. The workspace is D's (#66), faked here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lane F, step F2, slice F2b: per-item execution and the runner's commit step. Stacked on #60 (F1e, the top of the F1 stack). Related: #22, #66, #51.
About the diff: this branch also contains F2a's commit (
c1e2277, cherry-picked from #67), because F2b uses its prompt builder and audit. That commit drops out when #67 merges and the stack is rebased. The F2b-only change is the last commit.What this does
Implements "codeboost makes every commit" (design, "How codeboost runs a plan") against a fake D workspace. The four workspace operations are the ones proposed in #66 (
materialize,snapshotDeclaredLinks,inspectChanges,commit, plusrelease).runner/execution.ts:executionDepsis theRunnerDepsforexecuteattempts:approvedArgvfromprepareExecution(F2a).inspectChanges, thenauditRun(F2a).FinishFailure("Safety violation: …"): no commit, and the attempt fails with that diagnostic.Plan-Item: P<n>andPlan-Revision: r<k>trailers, of exactly the audited paths, matched to the audit's digest. It returns the owned ledger entry.ItemExecutor.runTaskruns the plan items in order, one attempt each:finishstep replacesvalidatefor writable attempts;FinishFailurekeeps its own diagnostic;releasestep runs after the terminal write, on every path, including endings before launch;settleAttempttakes ahistoryrecord and callsrecordHistoryinside the same transaction ascompleted, after its guards. This is the publication order in the F1 contract. A commit made in task storage but not published (a refused CAS, or a stop during finish) is discarded with the storage.Validation (head
f0957ad)npm run typecheck: passes.test/runner-execution.test.ts, using the real Store, coordinator and executor with a fake workspace and launcher:completed;Plan-Revisiontrailer;Not in this slice
prepareExecutionin fix mode.commitTaskChanges. The fake here doesn't model it.🤖 Generated with Claude Code