Add strict raw-log salvage workflow#31
Merged
Merged
Conversation
frahlg
marked this pull request as ready for review
July 21, 2026 16:13
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.
What changed
ftw salvage <damaged-store> <absent-target>with versionedftwdb-salvage-v1JSONactive.wlogthrough a no-follow source directory descriptor under a shared lockSafety contract
Salvage requires a valid FTWDB-v1 database header. Every frame or transaction fault after that header yields a verified
partialresult and exit code 0. Header, open, lock, source-race, check, or publication errors use exit code 1 and publish no target when rollback succeeds.The scanner never searches for another
WBATmarker. It cannot recover valid frames after the first damaged frame. A complete final frame with a bad CRC counts as damage. CRC32 detects accidental changes; it does not provide authentication.An existing target, including an empty directory or dangling symlink, remains unchanged.
Validation
cargo fmt --all -- --checkcargo clippy --all-targets --all-features --locked --offline -- -D warningscargo test --all-targets --all-features --locked --offlinecargo test --doc --all-features --locked --offline9ff1a95bENOSPC9ff1a95b, and the clean raw-log SHA-256Physical target-board and SD-card power cuts remain a release gate.