docs(rules): sub-case 4 empirical anchor — fresh-worktree gitdir-prune (2026-05-23)#4709
Merged
Merged
Conversation
…ree gitdir-prune mode Adds a second-class symptom to sub-case 4 (pruned-sidetick race) in .claude/rules/claim-acquire-before-worktree-work.md based on this session's autonomous-loop cold-boot empirical evidence under Lior 3-proc / 337-worktree saturation: - Attempt 1 (02:09Z): worktree-add returned exit 0 with full file-extraction; worktree directory populated on disk; .git pointer correct; gitdir target at .git/worktrees/<name>/ absent; rev-parse HEAD failed "not a git repository: (null)" - Attempt 2 (02:20Z): clean success under identical conditions ~11min later; tree=54 status=0 no lock Refines prior "no working mitigation today" stance: the prune race is timing-dependent (non-deterministic under same conditions), so single-retry-after-orphan-cleanup is substrate-honest at forced-#6 decomposition; repeated retries remain forbidden per peer-WIP contamination risk. Adds operational guidance: - Freshness guard MUST distinguish command-failed from empty-output (the existing ls-tree + status guard misses this mode) - Pre-guard step: explicit git rev-parse HEAD; abandon on failure - Orphan cleanup (rm -rf wt-path + git branch -D) is mandatory before retry Composes with holding-without-named-dependency forced-#6 (this edit IS the forced-#6 substantive substrate this tick), the saturation-ceiling composite operational discipline, and the codeql-no-source-on-docs-only-pr-is-broken-commit-canary rule (distinct corruption class; this is metadata-prune vs commit-tree corruption). Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cb83efcaba
ℹ️ 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".
5 tasks
AceHack
added a commit
that referenced
this pull request
May 23, 2026
* fix(rules): reconcile sub-case 4 retry policy — default ABANDON + narrow forced-#6 exception (addresses PR #4709 P2 thread) 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 <noreply@anthropic.com> * fix(rules): address Copilot P0 — continuation line starting with + parses as nested list (MD004/ul-style) 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 <wt-path>" began with "+ git branch -D <branch>)". 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 <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
This was referenced May 23, 2026
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.
Forced-#6 substrate landing per
holding-without-named-dependency-is-standing-by-failure.mdcounter-with-escalation.Summary
Adds second-class symptom anchor to sub-case 4 (pruned-sidetick race) in
claim-acquire-before-worktree-work.mdbased on autonomous-loop cold-boot empirical evidence under Lior 3-proc / 337-worktree saturation 2026-05-23T02:09Z–02:20Z.Failure mode (attempt 1 at 02:09Z)
git worktree add -b <branch> <path> origin/mainreturned exit 0; full file-extraction (Updating files: 100% (6127/6127), done.); HEAD-confirmation message<path>fully populated (44+ entries, readable vials).gitpointer correct (gitdir: <repo>/.git/worktrees/<name>)<repo>/.git/worktrees/<name>/absent post-creationgit -C <wt> rev-parse HEAD→fatal: not a git repository: (null)Refinement (attempt 2 at 02:20Z)
Clean success under identical saturation ~11min later (Lior 3 procs both attempts; wt 337 both attempts; GraphQL Normal tier both attempts). This refines prior "no working mitigation today" stance: race is timing-dependent, not condition-dependent. Single-retry-after-orphan-cleanup is substrate-honest at forced-#6 decomposition; repeated retries remain forbidden per peer-WIP contamination risk.
Operational guidance added
git rev-parse HEAD; abandon on failurerm -rf <wt-path>+git branch -D <branch>) mandatory before retryComposes with
holding-without-named-dependency-is-standing-by-failure.md— this edit IS the forced-Round 30 — threat-model elevation (nation-state + supply-chain) #6 substantive substrate; counter resetscodeql-no-source-on-docs-only-pr-is-broken-commit-canary.md— distinct corruption class (metadata-prune vs commit-tree corruption)Test plan
🤖 Generated with Claude Code