Repository navigation
D: make the runner's commit from audited task changes (#66, part 2) - #90
Merged
Merged
Conversation
commitTaskChanges runs the change inspection again in one container with both task volumes read-only, builds the commit from the same reads (base plus exactly the manifest's changes, each file stored as hashed) into a scratch object store in /tmp, and returns it as a bounded git bundle. Node keeps the bundle only when the manifest digest matches the approved one, refuses agent commits, metadata and link target changes, gitlink content and changes a tree cannot hold, and checks the commit ID against the one its inputs describe. Replaces the planned exportTaskCommit. Also: stdin input for process groups and storage scripts, recovery of leftover commit containers, neutralised issue references in F's runner commit message, and a fix for a SIGTERM race in the fake-Docker tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 1, 2026
…dex too The refusal added in review broke part 1's pinned behaviour. Every .gitattributes leaves the scratch index, and Git 2.39.1+ ignores one this large read from the index as well, so hashing does not depend on order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 20, 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 2 of #66. It adds
commitTaskChanges, the runner's commit of what the audit approved. Part 1 (#85) added the inspection it builds on.Decision change
Decision 1 on #66 planned a separate
exportTaskCommit. With the user's approval (2026-10-01), one operation now does both:git bundle.Why: the manifest digest is computed in TypeScript (
linkTargetChangescomes from the snapshot). So a container could not check the digest before writing to the metadata volume. Here, nothing is kept until Node has checked it.What it does
commitTaskChanges(storage, { base, linkSnapshot, digest, message, trailers, author, committer, imageId, maxBundleBytes })inspectTaskChanges. It prints the inspection's JSON before building anything, so the build cannot change what is checked.baseplus exactly the manifest's changes, each file stored as the inspection hashed it./tmp/objects, with the metadata's objects as alternates. Each blob must come out as the inspection's ID./tmpholds one ref,refs/heads/codeboost(TASK_COMMIT_REF). Its bundle is streamed as base64 and capped at 64 MiB.digest;Refusals (
TaskCommitRefused):retargeted(the item's own edit of the link, which the audit judges);.git, or a symlink named.gitmodules.An empty change set returns
basewith no commit. The same inputs always give the samehead.Also in this PR:
input(stdin) forrunInProcessGroupand storage scripts (docker run -i). The message and identities go in that way, per AGENTS.md.codeboost-commit-*containers.runner/execution.ts).agent-isolation.md,runner-lifecycle.md,pull-request-opening.md.Left for F (#87)
TaskWorkspace.commitneeds the identities. F must fetch the bundle into its runner-owned repository and checkTASK_COMMIT_REF==head, instead of callingexportTaskCommit.core/run-audit.tsrequireslinkTargetTraversesLink === falsefor any symlink change. D never reports that field, so every symlink change is a violation today.directoryentries. So a file replaced by a package directory, and new ignored directories such as__pycache__, go to needs human.Validation (local; first pushed head
c4ddc26, see round 6 for the current head)npm run typecheck: passes.runner commit (#66)tests: 7 of 7 pass. They cover:-opt,:(glob)xand"quoted";agent-container.test.ts(on a mid-review head): 127 pass, 1 skipped (Linux-only). One unrelated test, "releases a killed create once its settle window passes", failed under load and passed on rerun.Review rounds
-0000offset was accepted. Pack threads could exceed--pids-limit. Memory: the inspection is now printed before the build. stdin destroyed on settle, with an abort-while-writing test..gitmodulessymlink. Test gaps. Doc wording./code-review highretargetedwas refused. Issue references in the commit message. The ref name was duplicated. An unbuilt commit gave a plain error./code-review high/code-review high/code-review highreal-dockeronc4ddc26.gitattributesover 100 MB, added for round 1's order-dependence concern. That concern does not hold: Git 2.39.1+ ignores such a file read from the index too, and every.gitattributesleaves the scratch index. Part 1's test "applies no rules from a .gitattributes Git will not read" pins this, and it failed under the refusal.Review lessons (merge gate)
-0000: new rule in AGENTS.md, "Agent-controlled content": refuse inputs the tool would normalize when predicting its output.retargetedrefused, and stale lifecycle doc: one-off (contract alignment within this PR).🤖 Generated with Claude Code