Repository navigation
Parity: shard the determinism check per fixture - #5
Merged
Merged
Conversation
…out; coverage counts checked
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This PR only restructures the private parity test harness into per-fixture shards, preserving the existing determinism assertions and adding coverage checks. Its runtime effects are limited to CI test scheduling, timeouts, and capture handling; no shipped or customer-facing behavior changes. You can add or adjust custom eligibility rules. Learn more. |
thejackshelton
added a commit
that referenced
this pull request
Sep 29, 2026
thejackshelton
added a commit
that referenced
this pull request
Sep 29, 2026
This was referenced Sep 29, 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.
Shards the parity determinism check (S5 (c)) into one test per fixture, with no loss of coverage.
Why. The single determinism test compiled every fixture twice, in both environments, with shuffled order-free lists, all inside vitest's fixed 120 s timeout. On an idle machine it already took about 101 s. Under load it timed out in almost every full
pnpm testrun, and every PR that adds fixtures pushes it closer to the limit. It also couldn't run alone under-t determinism, because it relied on captures made by earlier tests.What changed (only
packages/parity/test/parity.test.ts):determinism (S5 (c))is now a block with one test per fixture (195), grouped by fixture group. Each test's timeout is 30 s per environment it runs in. That is about 9× the slowest measured shard.What passed:
pnpm typecheckpnpm test: 74 files, 1703/1703pnpm exec vitest run packages/parity/test/parity.test.ts -t determinism: 197 passed on its ownThe shards sum to 133 s; the slowest is 5.0 s.
A planted fault confirms the check still works. I made
compileFixturereversetree-ordered-sheets' style order on every second call. Only that fixture's shard failed, on a digest mismatch, and the coverage test reported 194/195. The fault was then reverted.Changed checks:
🤖 Generated with Claude Code
Note
Shard parity determinism tests per fixture
Replaces the single aggregate determinism test in parity.test.ts with one test per fixture, grouped via the
FIXTURE_GROUPSregistry. Each test uses a timeout scaled to its environment count and runs the existing repeated, shuffled, and lane comparisons.Macroscope summarized 325ddb3.