#14: de-flake baseline generate is deterministic#30
Merged
Conversation
Replace the two live baselineGenerate runs (which spawn eslint and can return different violation sets under CI load via the fail-soft path) with a direct saveBaseline call over a stubbed violation set in two insertion orders. Asserts byte-identical serialization — exactly what the test name claims — with no multi-process spawns. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Nq6xHU6JtSNpYWhMYjXB15
devill
marked this pull request as ready for review
June 17, 2026 14:37
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 #14.
Root cause
The test ran two full
baselineGeneratepasses, each spawning eslint. The wrap layer is fail-soft — a slow/failed spawn under CI load surfaces as zero violations — so the two passes could record different violation sets and thebyte-identicalassertion failed intermittently (Linux/CI only).Fix (locked decision — option a)
Assert serialization determinism over a fixed/injected violation set: drive
saveBaselinedirectly with stubbed violations in two different insertion orders and assert the written files are byte-identical. This verifies exactly what the test name claims — deterministic serialization (thesortedEntriessort instore.ts) — with no live multi-process spawns.No distinct coverage is lost: entry population, per-file recording, and merge-with-existing behaviour remain covered by the sibling tests in the same describe block. Ran the new test 5× — green every time.
Atomic commits
#14: de-flake baseline determinism test with a fixed violation setGates
pnpm build,pnpm lint— cleanpnpm test— 385 passed🤖 Generated with Claude Code
Generated by Claude Code