Repository navigation
feat(devtools): verify-worktree check + lane-brief prior-satisfaction section - #3501
Conversation
…faction check Problem: three orchestration failure modes from the 2026-08-01 fanout had no tooling net: (1) an isolation:worktree dispatch silently ran in the main checkout, leaving ~1700 uncommitted lines in the coordinator's live tree, caught only via a file mtime; (2) lane briefs buried recent-master churn in per-path commit crumbs, so lane polylogue-2cuv burned its budget on a bead already satisfied by a same-session merge; (3) the standing lane hazards and .agent/CONVENTIONS.md actively recommended background execution, which stalled three lanes idle-waiting on backgrounded test runs, and said nothing about the stale-worktree bd reimport hazard (polylogue-2ara). What changed: new devtools workspace verify-worktree checks a claimed lane worktree is a real linked worktree (git-dir vs git-common-dir), not the main checkout, on the expected branch, plus advisory dirty-tree and stale .beads/issues.jsonl (max updated_at vs main checkout) findings; lane-brief gains a 'Recently merged on master (footprint overlap)' section with a loud PRIOR-SATISFACTION CHECK and --recent-days, and its hazards now forbid background idle-waits and lane-side bd writes; CONVENTIONS.md scopes async execution to coordinator sessions and adds coordinator dispatch hygiene. Ref polylogue-2ara. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01P7dQJSbhvx7LSu5PW9Ns9S
Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01P7dQJSbhvx7LSu5PW9Ns9S
|
Warning Review limit reached
Next review available in: 5 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4b9ca0f420
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.
Only the rows listed above are dispositioned. Held findings remain open. |
|
Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.
Only the rows listed above are dispositioned. Held findings remain open. |
Summary
Orchestration-machinery hardening from the 2026-08-01 fanout audit: a new
devtools workspace verify-worktreecommand that catches the worktree-isolation-escape failure mode before a lane's output is trusted, alane-brief"Recently merged on master (footprint overlap)" section with an explicit PRIOR-SATISFACTION CHECK, standing-hazard updates (no background idle-waits, no lane-side bd writes), and a.agent/CONVENTIONS.mdfix that scopes background execution to coordinator sessions only.Problem
Four verified failure modes from the 2026-08-01 20-lane fanout (each re-verified against source/git, not taken from the incident narrative):
isolation: "worktree"dispatch silently ran in the main checkout and left ~1700 uncommitted lines in the coordinator's live tree; no tooling existed to verify a lane's claimed worktree (confirmed via the devtools command catalog).git switch -cinside the worktree fired the beads post-checkout JSONL import. Note:feature/devtools/worktree-import-guardis NOT this fix — its commit f51f373 is content-identical to merged PR fix(devtools): refuse to run when polylogue resolves outside the checkout #3475 (checkout_guard); the branch is superseded and deletable. Remaining polylogue-2ara scope: bd-invocation-time skip-import-if-older.devtools testruns — and.agent/CONVENTIONS.mditself recommended "long test runs ... go to background execution".Incidents 5/6 (master-red via narrow gates, repaired in #3498/#3500) are assessed in the companion memo as a process-economics tradeoff, deliberately not addressed with new tooling here.
Solution
devtools/verify_worktree.py(+ catalog entry, regenerateddocs/devtools.md): hard checks — path exists, inside a git repo, is a LINKED worktree (--absolute-git-dirvs--git-common-dir), toplevel distinct from the main checkout,--expect-branchmatch; advisory checks — uncommitted changes, stale.beads/issues.jsonl(maxupdated_atvs main checkout, string-comparable ISO-8601).--json,--strict, exit 1 on hard failure.devtools/lane_brief.py:_recent_master_commits()aggregatesgit log --since=N days origin/master -- <footprint paths>into a dedicated section headed by a PRIOR-SATISFACTION CHECK instruction; new--recent-days; hazards now forbid background idle-waits and lane-side bd writes (polylogue-2ara)..agent/CONVENTIONS.md: async execution scoped to coordinator sessions; new coordinator dispatch-hygiene bullet (run verify-worktree after every spawn).Companion memo (out-of-blast-radius recommendations, incl. sinnix doctrine edits):
.agent/scratch/2026-08-01-orchestration-audit-recommendations.md(gitignored; copy preserved in the session scratchpad).Verification
devtools test tests/unit/devtools/test_verify_worktree.py tests/unit/devtools/test_lane_brief.py—24 passed in 5.18s.devtools workspace verify-worktree <this lane's worktree> --expect-branch feature/devtools/orchestration-audit→verdict: OK;devtools workspace verify-worktree /realm/project/polylogue→[FAIL] linked_worktree ... MAIN checkout, exit 1.devtools verify --quick— exit 0 (87.3s, all 18 steps green).verify --all(no substrate code touched; testmon-affected + focused tests cover the changed surface).Anti-vacuity
The verify-worktree tests build real git repos +
git worktree addand exercise realgit rev-parsesemantics — dropping the git-dir/common-dir comparison flipstest_main_checkout_fails_isolation_check; dropping theupdated_atcomparison flipstest_stale_beads_jsonl_is_flagged. The production caller is the coordinator dispatch flow documented in.agent/CONVENTIONS.md(and exercised live in this PR's verification).test_render_markdown_prior_satisfaction_warning_lists_recent_commitsfails if the new section is dropped from_render_markdown.Ref polylogue-2ara.
🤖 Generated with Claude Code
https://claude.ai/code/session_01P7dQJSbhvx7LSu5PW9Ns9S