Repository navigation
fix(repair): build ledger trees with --missing for remote-known objects - #714
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.
Second (root-cause) fix for the apply/close pipeline outage. #712's recovery ladder fired in prod ("Recovering 1 unavailable Git object(s)") but the publish still failed — arbitrary blob SHAs are not reliably fetchable from GitHub, so no fetch strategy can materialize the missing objects.
Root cause: the immutable-ledger tree rebuild reuses unchanged entries from the fetched remote branch tree; a shallow/partial state checkout may not hold those blobs locally, and plain
git mktreerefuses trees referencing absent objects — even though the push never needs to send them (the remote already has them, by definition).Changes (src/repair/git-publish.ts):
git mktree --missing. Safety: entries we add or modify are batch-verified locally viacat-file --batch-check(cached per source commit) and fail closed with a named error if absent — only remote-known unchanged entries may be locally missing.reconciliationChangesOverlap(the checkpoint-phase path that threw in run 29724509329) now applies on merge-base exit 1 unconditionally, not only for shallow checkouts; other fatal git errors still throw.Validation: build/lint/format green; git-publish suite 44/45 — the one failure is the documented CI-token-only server-merge fixture (fails identically on pristine main locally; passes on CI). Autoreview clean ("patch is correct", 0.9).