Skip to content

docs(rules): sub-case 4 empirical anchor — fresh-worktree gitdir-prune (2026-05-23)#4709

Merged
AceHack merged 1 commit into
mainfrom
shard/sub-case-4-anchor-0220z-2026-05-23
May 23, 2026
Merged

docs(rules): sub-case 4 empirical anchor — fresh-worktree gitdir-prune (2026-05-23)#4709
AceHack merged 1 commit into
mainfrom
shard/sub-case-4-anchor-0220z-2026-05-23

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented May 23, 2026

Forced-#6 substrate landing per holding-without-named-dependency-is-standing-by-failure.md counter-with-escalation.

Summary

Adds second-class symptom anchor to sub-case 4 (pruned-sidetick race) in claim-acquire-before-worktree-work.md based 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/main returned exit 0; full file-extraction (Updating files: 100% (6127/6127), done.); HEAD-confirmation message
  • Worktree directory at <path> fully populated (44+ entries, readable via ls)
  • .git pointer correct (gitdir: <repo>/.git/worktrees/<name>)
  • BUT gitdir target at <repo>/.git/worktrees/<name>/ absent post-creation
  • git -C <wt> rev-parse HEADfatal: 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

  • Freshness guard MUST distinguish command-failed from empty-output (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 <branch>) mandatory before retry

Composes with

Test plan

  • Commit canary: parent=54 child=54 (clean; no tree corruption)
  • Authored in isolated worktree per zeta-expected-branch race-window-caveat
  • Branch pushed via explicit refspec (defensive against local-ref contamination)
  • CodeQL: docs-only PR; expect "no source code seen" but verify it's the benign mode (ls-tree count holds at 54, not collapsed to 1)

🤖 Generated with Claude Code

…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>
Copilot AI review requested due to automatic review settings May 23, 2026 02:24
@AceHack AceHack enabled auto-merge (squash) May 23, 2026 02:24
@AceHack AceHack merged commit 8514d3d into main May 23, 2026
26 of 27 checks passed
@AceHack AceHack deleted the shard/sub-case-4-anchor-0220z-2026-05-23 branch May 23, 2026 02:25
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread .claude/rules/claim-acquire-before-worktree-work.md
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>
@AceHack AceHack review requested due to automatic review settings May 23, 2026 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant