8000 test: golden-file compatibility corpus for format v7 (#391) by adityamukho · Pull Request #455 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content

test: golden-file compatibility corpus for format v7 (#391) - #455

Merged
adityamukho merged 2 commits into
mainfrom
test/391-golden-corpus
Oct 6, 2026
Merged

adityamukho merged 2 commits into
mainfrom
test/391-golden-corpus

Conversation

@adityamukho
Copy link
Copy Markdown
Collaborator

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

Findings while generating

  • In 2.0.3, PersistentFactStorage's Drop saves dirty facts even under wal_checkpoint_threshold(usize::MAX), leaving an already-checkpointed WAL. That is how v7_stale_wal was made. v7_pending_wal uses mem::forget to get a real crash-shaped WAL.
  • On v2.x a checkpoint after opening next to an already-checkpointed WAL leaves that WAL in place, because replay counted no new entries. The data is correct, so the harness checks that the WAL is gone only on v3.

Testing

  • cargo test: 1213 passed, 8 ignored.
  • I broke one expected row and one CRC on purpose. The harness reported the CRC mismatch and each affected query in every phase.

🤖 Generated with Claude Code

https://claude.ai/code/session_015GgLEs8YozJjYhwPEYgTUn

adityamukho and others added 2 commits October 6, 2026 11:35
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
codecov Bot commented Oct 6, 2026
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@adityamukho
adityamukho merged commit ebb4e1d into main Oct 6, 2026
21 checks passed
@adityamukho
adityamukho deleted the test/391-golden-corpus branch October 6, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0