Repository navigation
test(wal): Wave 3 PR 2 — WAL crash-recovery matrix, fault-injection, fuzz targets (#209, #210, #214) - #257
Merged
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was
linked to
issues
May 16, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Wave 3 PR 2 — WAL Cluster Reliability
Closes #209, #214, #210.
Changes
tests/wal_test.rs— 9 new tests:#209 crash-recovery matrix (7 cases):
wal_recover_truncated_length_header— header truncation: discards entry, prior entries intactwal_recover_truncated_payload— payload truncation: discards entrywal_recover_bad_checksum_second_entry— bad CRC on second entry: discards from that pointwal_recover_committed_tx_crash_before_checkpoint— committed tx survives crashwal_recover_rollback_crash— crash mid-rollback: uncommitted facts not replayedwal_recover_multiple_committed_corrupt_tail— multiple committed + corrupt tail: valid entries intactwal_corrupt_tail_never_applied— junk appended after valid entries: ignored#214 lock-leak tests (2 cases):
write_lock_not_leaked_after_rollback— lock released after explicit rollbackwrite_state_clean_after_drop— lock released whenWriteTransactionis droppedsrc/storage/persistent_facts.rs— 3 unit tests infault_injection_tests(#214):save_returns_error_when_write_fails—FaultInjectingBackendtriggers write failuresave_returns_error_when_sync_fails— sync failure propagated correctlysave_error_message_is_non_empty— error messages are non-emptyfuzz/fuzz_targets/— 4 real fuzz targets replacing stubs (#210):wal_entry.rs,file_header.rs,fact_page.rs,btree_page.rsMinigraf::open()— any panic is a bugfuzz/corpus/— seed corpus for all 4 targets:wal_entry/: 2 seeds (empty, truncated)file_header/: 3 seeds (bad magic, truncated, valid v7)fact_page/: 1 seed (valid v7 2-page file)btree_page/: 1 seed (valid v7 3-page file with btree root pointer)Notes
fault_injection_testsnested inside#[cfg(all(test, not(target_arch = "wasm32")))]for correct access toFaultInjectingBackend{:?}on Uuid-containing types🤖 Generated with Claude Code