Prove indexed conservation and current tips before retiring packs - #58
Merged
Conversation
Capture manifest/token/refs per CAS attempt, validate current indexes, and merge input/output OIDs with O(pack-count) cursors. Refuse lost unreachable objects or uncovered current tips before claiming a retirement log slot. Cost: no extra store reads with valid warm indexes; cold/bad indexes add GETs (HEAD for unknown sizes), at most four concurrent downloads. Adds full local ref capture and streaming index scan per seal attempt. No pack materialization or LIST. Validated with just ci (38 e2e), 19 serial simulations, 166 TLC cases and real-index refusal/recovery regression. Candidate push/import raw-boundary gates remain required.
This was referenced Sep 12, 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.
Stack, merge in order: #52 → #53 → #54 → #55 → #56 → #57 → #58.
Each PR targets the preceding branch; #52 targets
main.Final pack retirement previously trusted the producer's conservation assertion. The seal now captures manifest, CAS token and current refs together on every attempt, validates the exact current indexes, and rejects either a lost indexed input object or an uncovered current tip before claiming a retirement log entry. A streaming merge uses one cursor per pack instead of an object-sized set; progress is narrated.
The regression uses real Git pack indexes. Plausible already-committed output descriptors cannot hide a lost unreachable input object, and a checkpointed ref introduced after the plan must be covered by the resulting inventory. Refusals leave inputs live; a conserving seal and exact recovery still succeed.
Stack step 7, based on #57. This closes the independent indexed-conservation/current-tip check at seal. It does not complete candidate push/import raw-boundary admission, producer quarantine, adversarial CAS-race twins, seal-evidence cooldown, or backend/client/scale qualification. The full stack remains draft.
Store cost: warm valid indexes add no store requests; missing/corrupt indexes require GETs (HEAD only when old descriptor sizes are unknown), with four downloads in flight. Each attempt adds a local full-ref capture and streaming index scan. No pack materialization or bucket LIST. No constant-time or zero-extra-read claim.
Local validation on the updated stack (2026-09-12):
just ci: passed, including 38 active end-to-end tests, 19 serial fault simulations, and standalone CLI/server smoke. The new simulation/smoke recipes also passed on Add conserving staged pack lifecycle and verified multi-pack bitmaps #54, their first stack layer.just spec-full: all 169 cases passed, with exact mutation/witness verdicts, classifier self-tests and SANY. All three larger reference arms completed; logs intarget/test-logs/spec-full-20260912-194501.QHyjqa. No Rust refinement or production-scale proof is claimed.git diff --checkpassed. Stack ancestry and predecessor bases are preserved.GitHub CI passed on all seven current stack heads, independently checked after local validation. Tip
f3998bc: https://github.com/tobi/walgit/actions/runs/34715949051 . The stack remains draft for the implementation and qualification gaps above.