council: run task verify from the worktree root, not the host repo#592
Merged
Merged
Conversation
Fan-out verify commands run in each task's isolated worktree, but a consolidator that emitted an absolute repo-root path (e.g. `cd /workspace/services/foo && npm test`) would silently check the host tree instead — so a correct change could be reported verify-failed while a stale host tree passed. Two fixes. localize_verify rewrites any occurrence of the repo root in a verify command to the worktree it actually runs in, so even an absolute path resolves against the worker's files; run_verify applies it before executing. The consolidator prompt now states that verify runs from the worktree root and must use repo-relative paths only (never `cd /abs/...`). The kit is re-rendered (consolidator.md is bundled into the installer) and the manifest installer sha256 updated; council --self-test covers localize_verify.
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.
Stacked on #588 (council split) → #587 → #586. Merge after those.
Bug
Fan-out
verifycommands run viabash -lcwithcwdset to each task's isolated worktree. But when the consolidator emits an absolute repo-root path — e.g.cd /workspace/services/foo && npm test— the command checks the host tree instead of the worker's worktree. A correct change can then be reportedverify-failed(or, worse, a stale host tree passes), and the verdict is meaningless. This actually happened on a real fan-out: every task came backverify-failedwith rc 127 because the verifycd'd to/workspace/...(a different checkout) instead of the worktree.Fix
localize_verify(cmd, repo_root, cwd)— pure helper that rewrites any occurrence of the repo root in a verify command to the worktree it actually runs in, so even an absolute path resolves against the worker's files.run_verifyapplies it before executing. Covered by--self-test(rewrite + relative-passthrough cases).consolidator.md— now states thatverifyruns from the root of the worker's worktree and must use repo-relative paths only (nevercd /abs/...), with a right/wrong example. So new plans avoid the problem at the source, andlocalize_verifyis the safety net for any that slip through.Mechanics & verification
consolidator.mdis bundled into the installer, so the kit is re-rendered and the manifestinstaller.sha256updated.council --self-testgreen (incl.localize_verify);render-agent-kit.py --checkclean;*AgentKitManifestTest*20/20.This is the council bug observed while fanning out the assistant-ui GitHub-App feature (#591) on codex — codex wrote correct code, but the absolute-path verify commands reported false failures. The code still merged (verify doesn't gate the commit), and the feature was verified independently.