From 608d775f70854017895e398ef25d8731e07300d8 Mon Sep 17 00:00:00 2001 From: Aaron Stainback Date: Fri, 22 May 2026 22:29:16 -0400 Subject: [PATCH 1/2] =?UTF-8?q?fix(rules):=20reconcile=20sub-case=204=20re?= =?UTF-8?q?try=20policy=20=E2=80=94=20default=20ABANDON=20+=20narrow=20for?= =?UTF-8?q?ced-#6=20exception=20(addresses=20PR=20#4709=20P2=20thread)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Codex P2 review on PR #4709 flagged a contradiction between three statements in .claude/rules/claim-acquire-before-worktree-work.md: 1. The new 2026-05-23 "Non-deterministic under same conditions" paragraph authorizes single-retry-after-orphan-cleanup 2. The existing "no working mitigation today" line said no mitigation exists at all 3. The composite operational discipline step 7 said ABANDON when sub-case 4 is hit Operational ambiguity: some agents would retry, others would abort. Reconciliation makes the policy unambiguous: - Default = ABANDON when sub-case 4 fires (preserved as authoritative in the composite discipline; preserved in the sub-case 4 mitigation block reframed as "no STRUCTURAL mitigation today") - Narrow exception = single-retry-after-orphan-cleanup, AUTHORIZED ONLY at forced-#6 decomposition per holding-without-named-dependency counter, for sub-case 4 specifically (not sub-case 3), one retry only, and ABANDON applies absolutely if retry also fails - The exception does NOT generalize to brief-ack #1-#5 (other pre-empt artifact shapes are available there; default ABANDON is correct) - The exception does NOT generalize to sub-case 3 (pack-dir contention has no analogous timing-dependence evidence) Both edits cross-reference each other so future-Otto reading either location sees the full policy. Co-Authored-By: Claude --- .../claim-acquire-before-worktree-work.md | 35 ++++++++++++++----- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/.claude/rules/claim-acquire-before-worktree-work.md b/.claude/rules/claim-acquire-before-worktree-work.md index fa14c43c5..dc7c65f90 100644 --- a/.claude/rules/claim-acquire-before-worktree-work.md +++ b/.claude/rules/claim-acquire-before-worktree-work.md @@ -341,11 +341,18 @@ was listed in `git worktree list` BUT the directory had been pruned between the list snapshot and the borrow attempt. `git -C` returned "cannot change to ... No such file or directory". -**Mitigation (no working mitigation today)**: requires a worktree-pool -primitive — pre-allocated isolated sideticks per Otto identity, owned and -refreshed by each identity, not subject to peer-prune. Composes with the -`claim acquire` discipline at worktree-allocation scope. Substrate-engineer -candidate; not yet a backlog row. +**Mitigation (default = ABANDON; narrow exception at forced-#6 below)**: +no structural mitigation exists today — the durable fix requires a +worktree-pool primitive (pre-allocated isolated sideticks per Otto +identity, owned and refreshed by each identity, not subject to peer-prune; +composes with the `claim acquire` discipline at worktree-allocation scope; +substrate-engineer candidate, not yet a backlog row). Until the pool ships, +the default operational response when sub-case 4 fires is ABANDON the +shard write (per the composite discipline below). The narrow exception +authorized by the 2026-05-23 anchor (single-retry-after-orphan-cleanup at +forced-#6 decomposition only) is described in the "Non-deterministic +under same conditions" paragraph below; it does NOT generalize to other +contexts. **Second-class symptom — fresh-worktree gitdir-prune race** (2026-05-23T02:09Z–02:20Z empirical anchor): a related variant of sub-case 4 was observed at autonomous-loop cold-boot under Lior 3-proc / 337-worktree saturation. The mode is distinct from the borrow-on-listed-sidetick mode above: @@ -385,9 +392,21 @@ during peer cascade) needs to ship a shard / substrate edit: 6. Use `gh pr create --head ` with explicit head ref (per [`zeta-expected-branch.md`](zeta-expected-branch.md) companion defense) 7. If sub-cases 3 or 4 are hit and the attempt fails, ABANDON the shard - write — document the empirical evidence in turn output and end the - tick. Repeated retries under contention amplify the risk of peer-WIP - contamination. + write by default — document the empirical evidence in turn output and + end the tick. Repeated retries under contention amplify the risk of + peer-WIP contamination and remain forbidden. + + **Narrow exception (forced-#6 only)**: at forced-#6 decomposition per + [`holding-without-named-dependency-is-standing-by-failure.md`](holding-without-named-dependency-is-standing-by-failure.md) + counter, a **single** retry after orphan cleanup (`rm -rf ` + + `git branch -D `) is authorized for sub-case 4 specifically + (per the 2026-05-23 timing-dependent-not-condition-dependent anchor in + the sub-case 4 section above). The exception does NOT apply to + sub-case 3 (pack-dir contention has no analogous timing-dependence + evidence yet) and does NOT generalize to brief-ack #1-#5 (the default + ABANDON path is correct there because pre-empt artifacts of other + shapes are usually available). One retry only; if it also fails, + ABANDON applies absolutely. ## Composes with other rules From 8e4123038747ace4f45e86cbe3105cc954af9284 Mon Sep 17 00:00:00 2001 From: Aaron Stainback Date: Fri, 22 May 2026 22:34:41 -0400 Subject: [PATCH 2/2] =?UTF-8?q?fix(rules):=20address=20Copilot=20P0=20?= =?UTF-8?q?=E2=80=94=20continuation=20line=20starting=20with=20+=20parses?= =?UTF-8?q?=20as=20nested=20list=20(MD004/ul-style)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Copilot P0 review on PR #4710 flagged line 402 of .claude/rules/claim-acquire-before-worktree-work.md where the continuation of the parenthetical "(rm -rf " began with "+ git branch -D )". Per markdownlint MD004/ul-style guidance in .github/copilot-instructions.md, a continuation line starting with "+ " inside an indented paragraph parses as a nested unordered list item and can fail CI. Fix: reword the two-command sequence to use prose connectives ("run X then Y") instead of the "+" infix operator. Preserves semantics: still a sequenced two-command cleanup. Co-Authored-By: Claude --- .claude/rules/claim-acquire-before-worktree-work.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.claude/rules/claim-acquire-before-worktree-work.md b/.claude/rules/claim-acquire-before-worktree-work.md index dc7c65f90..3b5fb66c9 100644 --- a/.claude/rules/claim-acquire-before-worktree-work.md +++ b/.claude/rules/claim-acquire-before-worktree-work.md @@ -398,8 +398,8 @@ during peer cascade) needs to ship a shard / substrate edit: **Narrow exception (forced-#6 only)**: at forced-#6 decomposition per [`holding-without-named-dependency-is-standing-by-failure.md`](holding-without-named-dependency-is-standing-by-failure.md) - counter, a **single** retry after orphan cleanup (`rm -rf ` - + `git branch -D `) is authorized for sub-case 4 specifically + counter, a **single** retry after orphan cleanup (run `rm -rf ` + then `git branch -D `) is authorized for sub-case 4 specifically (per the 2026-05-23 timing-dependent-not-condition-dependent anchor in the sub-case 4 section above). The exception does NOT apply to sub-case 3 (pack-dir contention has no analogous timing-dependence