Repository navigation
Conversation
Publish per-ref source lifetime before replacing compacted frontiers. Wire repository GC, fsck and explicit history pruning to the same authenticated retention records.
This was referenced Oct 15, 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.
A catalog session can capture immutable source ranges, then lose them when ref-frontier compaction replaces those runs and repository GC collects them. Optional browse readiness does not protect ordinary catalog sessions. The new GC regression reproduces this failure on the parent revision.
Publish per-ref source-lifetime history before making a compacted frontier visible. GC follows these authenticated roots using its existing history enumeration; fsck verifies the original run proofs. Explicit history pruning advances a persistent repository generation floor and trims per-ref histories, preventing expired publishers from restoring discarded source bodies.
Stacked on #595 (base
codex/catalog-capture-lifetime). This PR contains only the source-lifetime fix and focused regression coverage. The user-owned advisor plan and the two large-file audit reports are excluded.Validation:
cargo fmt --all --checkandgit diff --checkpass. Latestorigin/main(cc2e4e25f46) is already an ancestor.Release gates still open: combined-stack 10 GiB qualification, broader explicit-pruning/concurrency/fault coverage, hosted-S3 latency, and rollout for previously compacted unreleased repositories. The completed six-case 10 GiB matrix qualifies the earlier staging/catalog revision; it is not evidence for this new change.
Evidence map for review:
crates/crab-metadata/src/capsule_protocol/source_retention.rsowns lifetime records;crates/crab-storage/src/layout.rsowns their paths.crates/crab-write/src/capsule_protocol.rscallprepare_ref_successor, which records sources before publishing the replacement ref state.crab-storage; no unconditional mutable-head writes.Is this the best fix? Publisher-owned source retention keeps catalog sessions read-only and protects original physical ranges at the replacement boundary. It avoids adding reader leases, TTLs or an eager catalog scan. Rollout/backfill and combined-source qualification remain explicit open gates; this draft is not ready to merge.
Exact-source RustFS qualification (9348511):