8000 test: v8 golden files and v7 migration checks (#391) by adityamukho · Pull Request #456 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content

test: v8 golden files and v7 migration checks (#391) - #456

Merged
adityamukho merged 5 commits into
v3from
test/391-golden-v8
Oct 6, 2026
Merged

adityamukho merged 5 commits into
v3from
test/391-golden-v8

Conversation

@adityamukho
Copy link
Copy Markdown
Collaborator

Closes #391. This is PR B of 2; PR A (#455) added the v7 corpus to main. Spec: docs/superpowers/specs/2026-10-06-golden-file-corpus-design.md.

The first commit merges main into v3 to bring in #455. The only conflicts were in the CHANGELOG, test counts and TEST_COVERAGE, and v3's text was kept with the golden-corpus entries added.

What

Finding

On v3, as on v2.x, a WAL whose entries are all already in the file stays after a checkpoint. Replay counts no new entries, so do_checkpoint returns early. The data is correct, and the next write that gets checkpointed removes the WAL. Manifests mark this shape with "stale_wal": true, and the harness does not require the WAL to be gone for them. Deleting such a WAL at checkpoint would be a small engine change. It is left out of this test PR.

Testing

  • cargo test: 1229 passed, 9 ignored.
  • Golden test: all 13 manifests pass.
  • fmt and clippy are clean, including the generator crate.

🤖 Generated with Claude Code

https://claude.ai/code/session_015GgLEs8YozJjYhwPEYgTUn

adityamukho and others added 5 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
test: golden-file compatibility corpus for format v7 (#391)
# Conflicts:
#	CHANGELOG.md
#	CLAUDE.md
#	README.md
#	docs/TEST_COVERAGE.md
The golden harness now reads as v3 (READER = 3, format 8): each v7 file
must carry a v8 meta page after its first open and give the same results
when the migrated copy is reopened, and the #371 queries skipped on v2.x
run and pass.

Adds seven v8 golden files written by the v3 branch at 23aa57c (format
frozen) through tests/golden/gen/v8: one checkpoint, seven copy-on-write
checkpoints, a crash-left v2 WAL, an already-checkpointed v2 WAL,
same-transaction multi-values, v7_multi_checkpoint migrated in place, and
long values at the size limits.

A WAL whose entries are all checkpointed already stays after a checkpoint
on v3 as on v2.x, since the checkpoint has nothing to do; manifests mark
that shape with "stale_wal": true.

Closes #391

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015GgLEs8YozJjYhwPEYgTUn
@adityamukho
adityamukho merged commit 74310ee into v3 Oct 6, 2026
18 checks passed
@adityamukho
adityamukho deleted the test/391-golden-v8 branch October 6, 2026 14:20
@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!

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