Repository navigation
Description
Part of #4426. Found in the first independent review of PR #4490, which fixes #4486 and #4487. Line numbers refer to that PR's head 6c7256f8c.
Context
Two paths next to the one fixed for #4486 still stop or refuse the whole turn for a failure in one checkout:
capture.policyreads checkout-local.gitignoreentries beforeattachBrainCheckoutsruns (begin,packages/ui-server/src/brain/turn-journal.ts:835). A non-regular or oversized.gitignorein one checkout refuses every writable workspace turn.releaseWorktree(packages/ui-server/src/brain/turn-journal.ts:936-950) calls the turn-wide stop callback when the endpoint capture of one managed worktree fails.
Both behave the same on main.
Scope
Apply the proportionate containment rule to both paths, or record in code why narrower containment can't be enforced.
Acceptance criteria
- A bad
.gitignorein one checkout restricts only that checkout, with a durable cause. Sibling checkouts and notes keep their coverage, and the turn is admitted. - A failed release capture for a managed worktree keeps the partial receipt and isolates that worktree. Otherwise, the code and a test state that stopping the turn is required.
- Each change answers the guard checklist.
Out of scope
Checkout discovery (#4492) and failed-checkout masks (#4491).
Notes for the implementer
Both paths behave the same on main (begin and releaseWorktree in packages/ui-server/src/brain/turn-journal.ts), but the per-checkout restriction they should reuse is introduced by PR #4490. The guard checklist is in docs/decisions/proportionate-containment.md#checklist-for-a-new-or-changed-guard.
Verification
Failing-first unit tests in packages/ui-server/tests/turn-journal.test.ts for a non-regular and an oversized .gitignore in one checkout, and for a failed endpoint capture of one managed worktree; a mutation receipt for each; bun run check:pr --base origin/main; recorded independent review (core package).
Contract impact
None expected. If journal detail or a refusal message shape changes, follow docs/integration-contract.md.
Blocked by #4486
2026-11-23 triage at main 356fa7d: citations still hold at PR #4490 head c1f7103a1; added exclusions, verification, contract impact and the dependency on #4486 (the restriction to reuse); type: bug replaced by type: fix.
Activity
schlessera commentedon Nov 23, 2026
Unblocked: #4486 is closed, so
scripts/sync-project.tsis removing theblockedlabel.