Skip to content

council: run task verify from the worktree root, not the host repo#592

Merged
ExtraToast merged 1 commit into
council/splitfrom
council/verify-worktree-localize
Jun 6, 2026
Merged

council: run task verify from the worktree root, not the host repo#592
ExtraToast merged 1 commit into
council/splitfrom
council/verify-worktree-localize

Conversation

@jorisjonkers-dev-agents

Copy link
Copy Markdown
Contributor

Stacked on #588 (council split) → #587#586. Merge after those.

Bug

Fan-out verify commands run via bash -lc with cwd set 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 reported verify-failed (or, worse, a stale host tree passes), and the verdict is meaningless. This actually happened on a real fan-out: every task came back verify-failed with rc 127 because the verify cd'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_verify applies it before executing. Covered by --self-test (rewrite + relative-passthrough cases).
  • consolidator.md — now states that verify runs from the root of the worker's worktree and must use repo-relative paths only (never cd /abs/...), with a right/wrong example. So new plans avoid the problem at the source, and localize_verify is the safety net for any that slip through.

Mechanics & verification

  • consolidator.md is bundled into the installer, so the kit is re-rendered and the manifest installer.sha256 updated.
  • council --self-test green (incl. localize_verify); render-agent-kit.py --check clean; *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.

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.
@jorisjonkers-dev-agents jorisjonkers-dev-agents Bot added the bug Something isn't working label Jun 6, 2026
@ExtraToast ExtraToast merged commit 54e698d into council/split Jun 6, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant