Skip to content

rules(saturation-ceiling): land Sub-case 3b (B-0530 at push-time) + read-tree HEAD index recovery#4536

Merged
AceHack merged 3 commits into
mainfrom
otto/rule-edit-saturation-ceiling-subcase-3b-1327z
May 21, 2026
Merged

rules(saturation-ceiling): land Sub-case 3b (B-0530 at push-time) + read-tree HEAD index recovery#4536
AceHack merged 3 commits into
mainfrom
otto/rule-edit-saturation-ceiling-subcase-3b-1327z

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented May 21, 2026

Summary

Folds the two empirical refinements captured in memo PR #4535 directly into the saturation-ceiling rule at .claude/rules/claim-acquire-before-worktree-work.md, so future Otto cold-boots inherit them via auto-load (rules auto-load at session start) instead of via memory-file pointer.

Two edits

1. New Sub-case 3b — pack-dir contention at git push time

Same B-0530 root cause class as Sub-case 3 (worktree-add time), but the symptom appears at push time (Interrupted system call on .git/objects/pack). Distinct from B-0615 (silent-push-failure with exit 0). Mitigation: REST git-data API bypass per PR #4145.

Empirical anchor: PR #4535 shipped via the bypass after git push timed out at exit 124.

2. In-place index recovery — git read-tree HEAD

Rebuilds a truncated index file (post stale-lock-removal under peer contention) without requiring worktree abandonment. Extends Sub-case 5 (peer-side destructive) recovery toolkit. Symptom: index file smaller than expected.

Empirical anchor: PR #4532 shipped after read-tree HEAD recovered an index truncated by stale-lock-removal race; previously the only recovery option was worktree abandonment.

Minimal-additive shape

Both edits extend existing sub-case structure rather than reorganizing it. Section header still accurate ("4 failure sub-cases of borrow-on-existing") because 3b is a sibling-variant of 3, not a new numbered case.

Authored via REST bypass

This rule edit was authored + pushed via the B-0615 REST git-data API bypass because git push was still hitting the very Sub-case 3b being documented (third successful use of the bypass this session).

Test plan

🤖 Generated with Claude Code

…ead-tree HEAD index recovery

Folds in the two refinements captured in the 2026-05-21 memo (PR #4535)
to the saturation-ceiling discipline directly, so future Otto cold-boots
inherit them via auto-load instead of via memory-file pointer.

Two edits:

1. New Sub-case 3b — pack-dir contention at git-push time. Same B-0530
   root cause as sub-case 3 (worktree-add time), but the symptom appears
   on push (Interrupted system call on .git/objects/pack). Distinct from
   B-0615 (silent-push-failure with exit 0). Mitigation: REST git-data
   API bypass per PR #4145. Empirical anchor: PR #4535 shipped via the
   bypass after git push timed out at exit 124.

2. In-place index recovery — git read-tree HEAD rebuilds a truncated
   index file (post stale-lock-removal under peer contention) without
   requiring worktree abandonment. Extends sub-case 5 (peer-side
   destructive) recovery toolkit. Empirical anchor: PR #4532 shipped
   after read-tree HEAD recovered an index truncated by stale-lock-
   removal race; previously only recovery option was abandonment.

Both edits are minimal-additive: they extend existing sub-case structure
rather than reorganizing it. Section header still accurate ("4 failure
sub-cases of borrow-on-existing") because 3b is a sibling-variant of 3,
not a new numbered case.

Authored + pushed via REST git-data API bypass because git push was
still hitting the very Sub-case 3b being documented.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 21, 2026 13:31
@AceHack AceHack enabled auto-merge (squash) May 21, 2026 13:31
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: 3c67d61980

ℹ️ 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 Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates Zeta’s saturation-ceiling operational rule to capture two newly observed .git/ contention recovery patterns so future cold-boots can apply them directly from the auto-loaded rule set.

Changes:

  • Add “Sub-case 3b” documenting pack-dir contention that surfaces specifically at git push time, and records the REST git-data API bypass as a working mitigation.
  • Add an in-place recovery procedure for truncated worktree index files using git read-tree HEAD.
  • Connect both additions back to existing saturation-tier guidance and empirical anchors (linked PRs/backlog rows).

Comment thread .claude/rules/claim-acquire-before-worktree-work.md
Comment thread .claude/rules/claim-acquire-before-worktree-work.md Outdated
Comment thread .claude/rules/claim-acquire-before-worktree-work.md Outdated
Comment thread .claude/rules/claim-acquire-before-worktree-work.md Outdated
AceHack and others added 2 commits May 21, 2026 09:35
… after rebuild

P2 thread finding (chatgpt-codex-connector): read-tree HEAD rewrites the
index but does NOT touch the working tree. The original wording said
"git status returns clean (empty)" after rebuild — false in the general
case + actually false in the empirical case the rule documents (the
shard file was untracked at the time).

Correction: the recovery indicator is the DISAPPEARANCE of "index file
smaller than expected" — not a clean status. Genuine working-tree-vs-
HEAD diff still reflects in status. Misreading read-tree as "should
produce clean status" is the most common way the recovery gets
misdiagnosed as failed when it actually succeeded.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…T/core budget

P1 findings from copilot-pull-request-reviewer:

1. Count of sub-cases was stale ("4 failure sub-cases of borrow-on-existing"
   + "All 4 sub-cases empirically validated") — now 5 with the addition of
   3b. Updated section header to "5 failure sub-cases" + footnote naming
   3b as the fifth empirical sub-case with a working mitigation.

2. exit 124 is from the GNU timeout wrapper (command killed by timeout
   status), NOT a native git push exit code. Clarified in Sub-case 3b
   empirical anchor that the contention was hanging git push indefinitely
   until the timeout wrapper killed it.

3. REST API calls consume the REST/core budget (5000/hr per token), NOT
   the GraphQL budget. Original text referenced "Normal-tier GraphQL
   budget" which conflated independent budget pools. Updated cost section
   to reference REST/core explicitly + clarified relationship to the
   GraphQL tier classification in refresh-world-model-poll-pr-gate.md
   (which is GraphQL-scoped, does not translate directly to REST/core).

4. Outdated thread (already-addressed in prior fix commit 510da94 on
   read-tree HEAD postcondition) resolved no-op.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 21, 2026 13:37
@AceHack AceHack merged commit 4a52e37 into main May 21, 2026
28 checks passed
@AceHack AceHack deleted the otto/rule-edit-saturation-ceiling-subcase-3b-1327z branch May 21, 2026 13:41
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

.claude/rules/claim-acquire-before-worktree-work.md:290

  • This new section says it’s a “Refinement to sub-case 5”, but the document doesn’t define a Sub-case 5 anywhere (only 1, 2, 3, 3b, 4). Either introduce an explicit “Sub-case 5” heading (and adjust the header count accordingly) or rename this to reference the correct sub-case / demote it under the sub-case it refines.
### In-place index recovery — `git read-tree HEAD`

Refinement to sub-case 5 (peer-side destructive git operation), where the
specific symptom is a **truncated index file** after stale-lock removal:

Comment on lines 156 to +169
@@ -163,8 +163,10 @@ fresh-cold-boot Otto-CLI, and peer-agent global-lock-cleanup loop), with
peer Otto cycling worktree HEAD every ~3-5 min for 9 transitions in
35 min, a fresh-cold-boot session attempting to ship a shard hit FOUR
distinct failure sub-cases of the borrow-on-existing pattern across 4
commit attempts. All 4 sub-cases empirically validated; only 2 have
working mitigations today.
commit attempts. All 4 of those sub-cases empirically validated; only 2
have working mitigations today. **A fifth sub-case (3b — pack-dir
contention at push time) was added in 2026-05-21 (PR [#4536](https://github.com/Lucent-Financial-Group/Zeta/pull/4536)) with a working mitigation
(REST git-data API bypass).**
Comment on lines +269 to +272
**Cost**: ~5-6 REST calls total per commit, consuming the **REST/core
budget** (5000/hr per token; check via `gh api rate_limit --jq
'.resources.core'`). REST/core is independent of the GraphQL budget
discussed in [`refresh-world-model-poll-pr-gate.md`](refresh-world-model-poll-pr-gate.md);
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.

2 participants