Repository navigation
Pin the flaky spec file's baseline to its floor, not to the draw we got - #885
Merged
Merged
Conversation
`core/random/bytes_spec.rb` answers 8 or 9 on the same binary. That is documented in FOUR places in this repository, including cmd/specdelta's own comment -- which exists because that file once reported -1 between two engines differing only in a version string. The 4.0.9 re-record (#882) drew 9 and banked it. The gate then failed on the very next pull request, naming a regression that was a coin flip: passing examples: 23672 (baseline 23673, -1) -- REGRESSED (1) -- core/random/bytes_spec.rb: 8 passing, baseline 9 (-1) That is not a conformance failure. It is a ~50% flaky gate on main and on every branch, self-inflicted by recording a maximum as though it were a guarantee. A baseline row means "no run may come in below this". For an unstable file the only honest row is its LOWEST observed value: at 8 the gate is deterministic, a 9 is reported as an improvement, and a real drop to 7 is still caught. Nothing about the shrink-only property is weakened -- the floor is what the gate was always supposed to hold. BASELINE core/random/bytes_spec.rb 9 -> 8 README 23,673 -> 23,672 in all three places, named by TestReadmeConformanceCountMatchesTheBaseline rather than by hand The conformance README now carries why, so the next re-record does not put it back. The deeper gap is that `cmd/ratchet` has no notion of an unstable file at all, while `cmd/specdelta` already refuses to build a verdict on a single run (-repeat, and the UNSTABLE marking). Filed separately. Refs #799 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
core/random/bytes_spec.rbanswers 8 or 9 on the same binary. That is documented in four places in this repository already — includingcmd/specdelta's own comment, which exists because that file once reported-1between two engines differing only in a version string.The 4.0.9 re-record (#882) drew 9 and banked it. The gate failed on the very next pull request (#883, an NDArray change that cannot touch ruby/spec at all), naming a regression that was a coin flip:
That is not a conformance failure — it is a ~50 % flaky gate, on
mainand on every branch, self-inflicted by recording a maximum as though it were a guarantee.The fix
A baseline row means "no run may come in below this". For an unstable file the only honest row is its lowest observed value:
Nothing about the shrink-only property is weakened. The floor is what the gate was always meant to hold; recording 9 asserted a guarantee the interpreter does not give.
BASELINEcore/random/bytes_spec.rb9 → 8README.mdThe README figures were named by
TestReadmeConformanceCountMatchesTheBaseline, not edited by eye — the same mechanism that forced the 4.0.9 update.Why it happened, and what is still missing
The flake was written down four times and gated zero times, which is the pattern #876 and #877 were built to break — and it still caught me, one layer up: those gates watch whether a re-record loses examples, not whether the number it banks is reproducible.
cmd/specdeltaalready refuses to build a verdict on a single run (-repeat, and theUNSTABLEmarking that keeps such a file out of the regression verdict).cmd/ratchethas no notion of an unstable file at all. That asymmetry is the real gap and is filed separately; this PR stops the bleeding and records why in the conformance README, so the next re-record does not put 9 back.Refs #799
🤖 Generated with Claude Code