Implement retention namespace generation transitions - #78
Draft
flyingrobots wants to merge 52 commits into
Draft
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Aug 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.
Goal
Implement the accepted
keep.segment-store/v2retention and one-way migration campaign tracked by #19 without weakening Keep's exact-byte, fail-closed storage law.The affected invariant is that retention authority must be generation-checked, canonical, deterministic, bounded, and durable before any reader or writer may treat a version-2 state as admitted. This branch preserves every version-1 segment, catalog, and publication-head byte.
Plan
KEEP-CRASH-053..=073process-death evidence.Current status
This is an early Draft PR. Fresh migration now has a production filesystem adapter: it exclusively creates each fixed stage, synchronizes and hard-links it without replacement, retains byte-and-inode identity evidence, admits the version-2 namespace in order on the same filesystem and mount, reopens the complete view before the receipt, and leaves the admitted version-1 head, catalog, and segment bytes unchanged.
That adapter is intentionally a one-shot forward writer, not a restart engine. A process that opens a partial migration prefix still has no lawful continuation implementation, and the current crash matrix covers
KEEP-CRASH-001..=035, not the migration boundaries053..=073. Version 1 therefore remains the only admitted restart-safe production store.The branch contains 52 commits spanning the #19 campaign and is four commits behind
origin/main; no rebase or history rewrite has been performed.Failure modes
Validation
cargo fmt --all --checkcargo check --workspace --all-targets --all-features --lockedcargo check --workspace --all-targets --no-default-features --lockedcargo clippy --workspace --all-targets --all-features --locked -- -D warningscargo clippy --workspace --all-targets --no-default-features --locked -- -D warningscargo test --workspace --all-features --lockedcargo test --workspace --all-features --release --lockedcargo test --workspace --doc --lockedcargo +1.96.0 check --workspace --all-targets --all-features --lockedcargo xtask golden-file-worldline-checkcargo xtask conformance-checkcargo xtask source-structure-checkcargo xtask durability-crash-matrixcargo xtask documentation-refusal-checkcargo xtask documentation-integrity-checkcargo deny checkcargo auditCompatibility, recovery, performance, and security
Alternatives rejected
Open questions
Peer review is most useful on partial-prefix recovery classification, retention publication ordering, and the immutable reader-fence aperture before those irreversible protocol slices are implemented.
Closes #19 only when every unchecked Plan item and the colocated requirements ledger are complete.