fix(bench): findRunSeries/groupRunSeries respect matcher.scale#158
Merged
Conversation
The run-series matchers filtered by scenarioId + scriptName (+ adapterId) but silently ignored matcher.scale, even though H16/H17/H18 pass scale: "hypothesis". A runset mixing scales for the same scenario+script would aggregate runs across scales into one verdict. Latent today (each bench-matrix invocation is single -scale) but a real correctness footgun. Filter by scale when the matcher provides it (conditional, since H1/H6-H8 and the comparator matchers intentionally omit it). Adds a regression test: a bad dev-scale select-range-extend run no longer pollutes the hypothesis-scale H16 verdict. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Vercel preview readyPreview: https://pretable-oh0cfy24r-cacheplane.vercel.app Updated automatically by the |
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.
Summary
findRunSeriesandgroupRunSeriesinscripts/bench-matrix.mjsfiltered byscenarioId+scriptName(+adapterId) but silently ignoredmatcher.scale— even thoughevaluateH16/H17/H18passscale: "hypothesis". A runset that mixed scales for the same scenario+script would aggregate runs across scales into a single verdict.Latent today (each
bench-matrixinvocation runs a single--scale, so runs only ever carry one scale), but a real correctness footgun the moment a multi-scale runset is fed to the evaluators — and thescalematcher field reads as if it filters when it doesn't.Fix
Filter by
scalewhen the matcher provides it — conditionally, sinceH1/H6–H8and the comparator matchers intentionally omitscale:Test
New regression test: two
select-range-extendruns for the same scenario+script — a goodhypothesis-scale run (10 ms) and a baddev-scale run (120 ms). H16 must stay satisfied and reportsampleCount === 1. Before the fix, the dev run aggregated in, dragging latency over the 16 ms budget and flipping the verdict to failing.Gates
node --test scripts/__tests__/bench-matrix.test.mjs— 81 passed (incl. new guard)prettier --checkclean🤖 Generated with Claude Code