Repository navigation
test(golden): add v7 golden files written by 2.0.12 (#936) - #952
Merged
Merged
Conversation
Five fixtures from the published 2.0.12 writer (basic, pending WAL, stale WAL, multi-value, append after torn-tail recovery), verify() in every corpus phase, a read-only reopen of the migrated copy, and a browser IndexedDB v7 -> v8 migration and reopen test. Closes #936. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H2a7QngaFzuCVt5umd1qoh
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
3 tasks
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.
Closes #936.
The v7 golden files were all written by 2.0.3. This adds files written by 2.0.12, the release people will upgrade from.
Generator.
tests/golden/gen/v7_2_0_12/is a separate recipe (pinsminigraf = "=2.0.12", with its own lockfile and excluded from the workspace). The 2.0.3 generator and its files are unchanged. It writes five fixtures with manifests:basic: checkpointed.pending_wal: uncheckpointed WAL, withwal_checkpoint_threshold(usize::MAX)so close doesn't checkpoint (Close-time save ignores wal_checkpoint_threshold(usize::MAX) #476).stale_wal: an already-checkpointed WAL restored next to the file (WAL whose entries are all checkpointed survives checkpoint() until the next write #457).multivalue: same-transaction multi-values (bug: same-transaction multi-valued facts read back as ONE value, differing between EAVT and AEVT; a batched retract can leave retracted values visible #371).recovered_append: a torn WAL tail, then a reopen that recovers it (durability: a commit appended after a torn WAL entry is lost on recovery #513), an append, and a second reopen. The 2.0.12 crate's append-failure hook iscfg(test), so the tear is made by truncating the last entry. The reopen step is the explicit recovery that test(golden): add v7 golden files written by v2.0.12, the last v7 writer #936's comment asks for.Checks.
golden_corpus_testnow callsverify()in every phase and also reopens the migrated c 8000 opy read-only. A new browser test (src/browser/golden_tests.rs) seeds the 2.0.12 basic and multi-value images into IndexedDB, opens them withBrowserDb(v7 → v8 migration), checks the manifest rows andverify(), confirms a v8 meta page persisted, then reopens. Native test count is unchanged (the two corpus tests cover all 18 manifests); there is one more browser test in each inventory.Upgrade smoke (one-off, not committed). On a bench machine: a database built and used by 2.0.12, left with an uncheckpointed WAL, then opened by this tree.
Local:
cargo test --test golden_corpus_testpassed (2 tests). The browser test was not run locally; it runs in CI (wasm.yml).🤖 Generated with Claude Code
https://claude.ai/code/session_01H2a7QngaFzuCVt5umd1qoh