Repository navigation
F2b: connect the real lane D workspace (#87, part 1) - #92
Merged
Merged
Conversation
The real TaskWorkspace (runner/workspace.ts) clones the runner-owned repository at the recorded head into bounded task storage, runs D's link snapshot, inspection and commit, and takes the commit's bundle into the runner-owned repository (runner/runner-repository.ts) under the attempt's ref. Release removes storage and drops an unpublished commit. The user's repository is only read, for base commits. The audit reads D's manifest shape: base-ignored files are safety violations, and a retargeted declared link is allowed only with its own edit. D reports linkTargetTraversesLink for changed symlinks. The review screen and Ask read a task the runner has committed to from the runner-owned repository at the recorded head, instead of observing HEAD. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Each preparation group is recorded with its own start time, so startup recovery's start-time check matches the group it finds. - A preparation whose first spawn failed at once clears its marker. - Release removes task storage without blocking the event loop (removeTaskFilesystemsAsync). - The traversal check resolves a changed link's target without checking the joined path as a name, so a long one no longer refuses the inspection. - The review asks the Store whether the runner committed (hasRunnerCommit) instead of decoding every attempt. - Every runner directory is checked owner-only, its parent included. - real-docker also runs for review, store and history changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The traversal check reports a link on the way by status alone, so an unchanged link whose target text no manifest could carry no longer refuses the inspection. - Runner directories are checked owner-only at every level from the runner root down. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…les (review round 3) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 1, 2026
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.
Part 1 of #87. It connects F2b's per-item execution to the real lane D workspace from #90, following the decisions on #87. Part 2 (items 1–4: partial export, failed-run audit, durable findings) follows. Production wiring is #91.
What it adds
runner/runner-repository.ts<runnerRoot>/<owner>/repositories/<hash>.git, in owner-only directories.•
ensureCommitfetches a base commit from the user's repository by ID, taking no refs, tags orFETCH_HEAD.•
fetchTaskCommittakes a runner commit in only if the bundle's one ref is the commit's ID and the commit is a single commit on its base. It is kept underrefs/codeboost/attempts/<id>; a failed check removes that ref.•
dropAttemptRef.runner/workspace.tsTaskWorkspace:•
materializemakes the head available, clones the runner repo into<runnerRoot>/<owner>/attempts/<id>, and allocates task storage. It records the preparation start, every process group and the allocation ID, as startup recovery expects.•
snapshotDeclaredLinks,inspectChangesandcommitcall D.•
commitchecks the bundle and takes the commit into the runner repo.•
releaseremoves storage, then drops the commit of an attempt that did not complete.•
cleanupPreparationremoves the staging clone.runner/execution.tsTaskWorkspace.committakes the link snapshot instead ofpaths, since D commits exactly the approved manifest. Adds optionalcleanupPreparation.snapshotDeclaredLinksis typed.core/run-audit.ts•
ignored: trueis a safety violation (decision 2).•
linkTargetChangesare D's objects. Aretargetedentry passes only when the manifest lists the edit of that link; every other kind is a violation.• Malformed entries fail closed.
tree-script.ts,changes.ts)linkTargetTraversesLinkfor every changed symlink (decision 3): whether its new target, resolved one part at a time as the kernel would, passes through another link. A target outside the work tree or in.gitcounts astrue.runner/review.ts,runner/questions.tsChange from the posted decision 1
Decision 1 said the review reads "a per-task ref". It now reads the head the Store recorded, and each attempt keeps its own ref. A task ref updated around the terminal write could disagree with the Store after a crash; the Store's head cannot.
I first keyed "runner-owned" on owned ledger entries. That broke the demo,
scripts/plant.tsand several browser tests, which record owned entries on a branch in the user's repository. So the signal is a completed writable attempt that made a commit.Validation (local; first pushed head
f6da9ef, later heads in the rounds below)npm run typecheck: passes.test/runner-workspace.test.ts(added toreal-dockerand excluded fromtest): 2 of 2 pass. It runsItemExecutorwith the real workspace and a stand-in agent container:linkTargetTraversesLinkin eight cases.test/runner-repository.test.ts: 4 host-Git tests.Review rounds (
/code-review high)• A spawn that fails at once clears the preparation marker.
• Release removes storage without blocking the event loop (new D
removeTaskFilesystemsAsync).• The traversal check no longer refuses the whole inspection on a long joined path.
• The review asks the Store
hasRunnerCommitinstead of decoding every attempt.• Runner directories are owner-only.
•
real-dockerpath triggers.• Ownership is checked at every level from the runner root down.
linkTargetTraversesLinkfield, asynchronous removal, and ignored files andretargetedin publishing step 2.Each new test was checked to fail with its fix removed: the preparation marker, the long path, the anchor names, and storage removal.
Review lessons (merge gate)
recordPreparationGroupand recovery's PID-reuse check. It is now covered by the API itself.🤖 Generated with Claude Code