Repository navigation
fix: capture SQLite backups without modifying original databases - #16
Merged
Merged
Conversation
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.
Ordinary capture opened original SQLite databases through SQLite's read-only API, which can still create or change WAL shared-memory files. A closed WAL-mode database could therefore gain sidecars during capture and make a subsequent fork refuse its own source changes.
Capture now reconstructs a private database family from verified captured blobs before SQLite opens it, reusing the scoped-capture path. Guarded staging refuses symlink sidecars and verifies regular-file identity. The source database is never opened through SQLite. This preserves the quiescent-source contract; it does not promise an atomic snapshot of independently changing files.
Public CLI regressions verify unchanged closed-WAL source bytes, unchanged committed WAL families with a coherent private SQLite restore, and refusal of existing/dangling symlink sidecars without changing their targets. Prepares version 0.3.2; 0.3.1 remains unchanged.
Validation:
cargo fmt --all -- --check;cargo clippy --workspace --all-targets --locked -j 4 -- -D warnings;cargo test --workspace --locked -j 4.