Snapshot load must not drop a durable tail - #13
Merged
Conversation
Length-before-CRC silent tail, torn first record + apply loss, and trailing zeros rejecting the prefix. These fail on current main.
Cap untrusted value_len before treating it as EOF, rewrite a junk first record so later apply is visible, and treat all-zero slack as a discarded tail instead of InvalidFormat.
Merged
jaredLunde
added a commit
that referenced
this pull request
Aug 16, 2026
* chore: bump to 0.7.3 — durability fixes since 0.7.2 Ship the four post-0.7.2 snapshot/watch fixes to crates.io: - #13 snapshot load must not drop a durable tail - #14 fsync parent directory after compact rename - #15 refuse watch resume at u64::MAX (no wrap to 0) - #16 mid-file NULs must not drop a CRC-valid suffix Also refresh README install snippets from 0.5 → 0.7. Co-authored-by: Jared Lunde <jared.lunde@gmail.com> * chore: sync Cargo.lock package version to 0.7.3 Co-authored-by: Jared Lunde <jared.lunde@gmail.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
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 mid-file length flip, a torn first record, or trailing NULs could lose checkpointed keys or reject a good prefix. Two commits: tests that fail on main, then the fix.
value_lenbefore treating it as EOF (bitrot used to silent-drop later records).applyis visible on reopen.InvalidFormat.git checkout HEAD~1 && cargo test --test dst_invariantsfails; HEAD passes.