Repository navigation
test: golden-file compatibility corpus for format v7 (#391) - #455
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015GgLEs8YozJjYhwPEYgTUn
Adds tests/golden/: six v7 files written by minigraf 2.0.3 (one checkpoint, several checkpoints, indexes rebuilt on open, a crash-left WAL, an already-checkpointed WAL, same-transaction multi-values), each with a JSON manifest of its CRC32, tx_count and hand-written expected query results. tests/golden_corpus_test.rs opens a copy of every file and checks its manifest after open, after a checkpoint and reopen, and after one more write. Queries v2.x is known to get wrong (#371) carry min_reader = 3. The generator is a standalone crate pinned to minigraf =2.0.3, outside the workspace. Golden files are never regenerated, only added: a new golden-corpus job in policy.yml fails a PR that modifies one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015GgLEs8YozJjYhwPEYgTUn
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This was referenced Oct 6, 2026
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.
Part of #391 (PR A of 2; PR B adds the v3 migration checks and the v8 corpus on
v3). Spec:docs/superpowers/specs/2026-10-06-golden-file-corpus-design.md.What
tests/golden/: six v7 files written by minigraf 2.0.3 from crates.io, each with a JSON manifest (CRC32,tx_count, expected rows written by hand from the recipe):v7_basicv7_multi_checkpointv7_index_rebuiltindex_checksum, opened once by 2.0.3, which rebuilt the indexes (bug: after a kill during an active run the EAVT index silently loses most entities' entries while AEVT stays intact — entity-bound lookups return [] and no rebuild path exists #370 path)v7_pending_walv7_stale_walv7_multivaluemin_reader: 3tests/golden_corpus_test.rs: for each manifest, checks the CRC, then opens a tempdir copy and checkstx_countand every query after open, after checkpoint + reopen, and after one more write + reopen. It collects all failures before asserting. A second test checks that every golden file has a manifest.tests/golden/gen/v7/: standalone generator crate pinned tominigraf = "=2.0.3"with a committedCargo.lock, excluded from the workspace. It records how the files were made and refuses to overwrite them.policy.yml→golden-corpus: on PRs, fails if anytests/golden/*.graph/*.walis modified, deleted or renamed.tests/golden/README.md, CONTRIBUTING (Golden Files), CHANGELOG Unreleased, TEST_COVERAGE, test count 1221.Findings while generating
PersistentFactStorage'sDropsaves dirty facts even underwal_checkpoint_threshold(usize::MAX), leaving an already-checkpointed WAL. That is howv7_stale_walwas made.v7_pending_walusesmem::forgetto get a real crash-shaped WAL.Testing
cargo test: 1213 passed, 8 ignored.🤖 Generated with Claude Code
https://claude.ai/code/session_015GgLEs8YozJjYhwPEYgTUn