Repository navigation
fix(repair): recover unavailable state objects in ledger publish - #712
Merged
Merged
Conversation
This was referenced Jul 20, 2026
azaj01
pushed a commit
to azaj01/clawsweeper
that referenced
this pull request
Sep 21, 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.
Restores the apply/close pipeline, down since 2026-07-19 ~23:30Z.
Every "Apply default ClawSweeper closures" run failed publishing the immutable apply-proof ledger to clawsweeper-state:
fatal: entry '<hash>.json' object <sha> is unavailable— the shallow state checkout (preserved by #708) holds tree entries whose blobs were never fetched, so the ledger tree rebuild references locally-missing objects and the push dies, aborting the apply before any closes. The latest runs additionally hit an unguarded throwinggit merge-basein the prepare phase (the sibling of the site #711 guarded).Changes (src/repair/git-publish.ts):
git fetch <remote> <sha>, then--refetch, then--deepen=1, then--unshallowas last resort; rebuilds the ledger commit and retries the push. Happy path stays shallow (fix(publish): preserve shallow state fetches #708 preserved).mergeBaseWithShallowRecoveryguards the prepare/overlap/reconcile merge-base sites — shallow no-common-ancestry defers to the remote-head rebuild; genuinely unrelated histories still fail closed. Sweep-status/comment-router sites keep their exceptional throwing behavior.Validation: build/lint/format green; focused regressions 5/5; full git-publish suite 42/42 excluding the documented CI-token-only server-merge fixture (fails identically on pristine main locally; passes on CI); autoreview clean.