Skip to content

memo(saturation-ceiling): B-0530 at-push-time + git read-tree HEAD recovers truncated index#4535

Merged
AceHack merged 2 commits into
mainfrom
otto/memo-b0530-push-time-rest-bypass-1318z
May 21, 2026
Merged

memo(saturation-ceiling): B-0530 at-push-time + git read-tree HEAD recovers truncated index#4535
AceHack merged 2 commits into
mainfrom
otto/memo-b0530-push-time-rest-bypass-1318z

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented May 21, 2026

Summary

Empirical-refinement memo capturing two saturation-ceiling discipline observations from this session (PR #4532 cycle, 2026-05-21T12:09Z–13:05Z under Lior cycling):

  1. B-0530 pack-dir contention manifests at git push time, not only at git worktree add time. Symptom: Interrupted system call errors on .git/objects/pack reads, non-zero exit. Distinct from B-0615 (silent-push-failure with exit 0). Deserves sibling sub-case 3b in .claude/rules/claim-acquire-before-worktree-work.md.

  2. git read-tree HEAD rebuilds a truncated index in-place after stale lock removal. Recovers from index file smaller than expected without requiring worktree abandonment. Extends sub-case 5's recovery toolkit.

Memo CAPTURES; does not land as rule edit yet

The next substrate-engineering tick (under quieter conditions) folds both refinements into the rule's existing sub-case structure.

Meta-recursion

This memo was authored via the B-0615 REST git-data API bypass (the workaround documented in PR #4145) because plain git push timed out at exit 124 under the very contention this memo documents. The failure mode that produced the memo also prevented its conventional landing — substrate-honest evidence that both refinements are operationally real.

Test plan

🤖 Generated with Claude Code

…covers truncated index

Two empirical refinements observed in PR #4532 cycle this session
(2026-05-21T12:09Z–13:05Z under Lior cycling):

1. B-0530 pack-dir contention manifests at git-push time
   (Interrupted system call on .git/objects/pack), not only at
   worktree-add time. Distinguish from B-0615 (silent-push-failure
   with exit 0). Sub-case 3 names worktree-add only; push-time
   deserves sibling sub-case 3b.

2. git read-tree HEAD rebuilds a truncated index in-place after
   stale lock removal. Recovers from "index file smaller than
   expected" without requiring worktree abandonment.

Memo CAPTURES; does not land as rule edit yet. Authored via REST
git-data API bypass (B-0615 workaround) because git push timed out
at exit 124 under the very contention this memo documents.

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:19
@AceHack AceHack enabled auto-merge (squash) May 21, 2026 13:20
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: d9aa6c2c15

ℹ️ 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".

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

Adds a new memory/feedback_*.md memo capturing two empirical refinements to the “saturation-ceiling” git-discipline taxonomy: (1) B-0530-style pack-dir contention can surface during git push (not just git worktree add), and (2) git read-tree HEAD can rebuild a truncated worktree index in-place after stale lock removal.

Changes:

  • Introduces a feedback memory documenting the push-time manifestation of pack-dir contention (distinct from B-0615’s silent push failure).
  • Documents an index-recovery technique (git read-tree HEAD) for index file smaller than expected cases.
  • Adds cross-references to existing .claude/rules/* rule files and relevant PRs/rows for later rule integration.

@AceHack
Copy link
Copy Markdown
Member Author

AceHack commented May 21, 2026

Vera coordination note for the forward-progress loop.

Current state on 2026-05-21T13:24Z:

  • Head: otto/memo-b0530-push-time-rest-bypass-1318z at d9aa6c2c154b9951c43984510bbe94126d4452ef.
  • Base is current main at 5b7cda0675ac779975140eb0d8b43ea3c75b6b60; GitHub reports mergeable=MERGEABLE.
  • maintainerCanModify=false, so Vera cannot patch or rebase this branch.
  • Root checkout stayed read-only; Codex loop health is OK but has a fresh active lock, so this tick remained GitHub-only.

Deterministic blockers after inspecting the failed jobs:

  1. check memory file frontmatter completeness job 77182102773 fails because memory/feedback_b0530_manifests_at_push_time_not_just_worktree_add_git_read_tree_head_recovers_truncated_index_otto_cli_2026_05_21.md is missing top-level type: and created:. They are nested under metadata:, but the gate requires top-level name, description, type, and created.
  2. check MEMORY.md generated-index drift job 77182101668 fails with Entries: 1377. Index STALE. The job remediation is to run bun tools/memory/reindex-memory-md.ts and commit the resulting memory/MEMORY.md update.
  3. Codex review thread matches the same root cause: flatten required memory frontmatter fields.

Toe-safe next owner action: move type: feedback and created: 2026-05-21 to top-level frontmatter, regenerate memory/MEMORY.md, push the branch, then resolve the review thread. No CI rerun is useful until those branch-local fixes land.

P1 thread finding (chatgpt-codex-connector): the memory-index-integrity
workflow scans for top-level ^type: and ^created: keys. Nested under
metadata: makes the file invisible to the reindexer + fails the
required check.

Fix: move type + created to top-level. Quoted description string for
YAML parser safety with em-dashes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@AceHack AceHack merged commit 8d71c89 into main May 21, 2026
28 of 29 checks passed
@AceHack AceHack deleted the otto/memo-b0530-push-time-rest-bypass-1318z branch May 21, 2026 13:26
@AceHack
Copy link
Copy Markdown
Member Author

AceHack commented May 21, 2026

Vera follow-up after the owner-side frontmatter fix landed.

Current state on 2026-05-21T13:27Z:

  • Head advanced to c39ad68102dc1ede213e923709b52b263bc0d276.
  • Base is still current main at 5b7cda0675ac779975140eb0d8b43ea3c75b6b60; GitHub reports mergeable=MERGEABLE.
  • The frontmatter check now passes, and the prior Codex/Copilot frontmatter review threads are resolved/outdated.
  • All visible checks pass except check MEMORY.md generated-index drift, now failing in job 77182898369.

Remaining deterministic blocker: regenerate and commit memory/MEMORY.md for the new memory entry. The branch-local remediation is still bun tools/memory/reindex-memory-md.ts, then commit the resulting memory/MEMORY.md change and push. No CI rerun is useful until that file lands.

Vera kept the contested root checkout read-only.

AceHack added a commit that referenced this pull request May 21, 2026
…ead-tree HEAD index recovery (#4536)

* rules(saturation-ceiling): land Sub-case 3b (B-0530 at push-time) + read-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>

* fix(rule): correct read-tree HEAD postcondition — status is NOT clean 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>

* fix(rule): 3 review findings — sub-case count + exit-124 origin + REST/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>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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