You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(bench): apply KNOWN_REGRESSIONS baseline fallback to release publish gate, not just dev (#2129)
* fix(bench): apply KNOWN_REGRESSIONS baseline fallback to release publish gate, not just dev
The v3.16.0 release tag (2e0e94f) failed its pre-publish benchmark gate on
Full build (+42%) and 1-file rebuild (+53-83%), blocking publish. Both
metrics are already tracked as growth-driven baseline drift (#2081) and
exempted via KNOWN_REGRESSIONS entries '3.15.0:Full build' /
'3.15.0:1-file rebuild' added in #2107 - but that exemption only fired
when assertNoRegressions' `latest.version` was the literal string 'dev'
(the per-PR gate label). publish.yml's pre-publish-benchmark job labels
its measurement with the real version being published (e.g. '3.16.0'),
so the fallback never applied on the one run it mattered most for,
and the gate failed on the exact regression it was supposed to be
exempt from.
Drop the `version === 'dev'` restriction so the baseline-anchored
fallback applies to any comparison against a known-regressed baseline,
whether the latest label is 'dev' or a real release version. Adds unit
tests exercising both cases directly against assertNoRegressions.
* fix(bench): widen the negative-case test delta so it holds under BENCH_CANARY too
The 'does not exempt' test used a 3521->5000 (+42%) delta, which clears
the default 25% Full build threshold but not the 50% BENCH_CANARY
threshold - under canary mode the check would get filtered out as "not
a regression" before ever reaching the KNOWN_REGRESSIONS fallback,
making the test pass without exercising the logic it's meant to guard.
* fix(bench): decouple KNOWN_REGRESSIONS baseline-fallback tests from live production data
Greptile review: the three always-on unit tests exercising the baseline
fallback hardcoded '3.15.0:Full build' against the module-level
KNOWN_REGRESSIONS set. That entry is documented for pruning once
v3.16.0's own benchmark data lands, which would break the first two
tests (expecting .not.toThrow()) the moment that routine cleanup PR
merges.
Add an optional knownRegressions parameter to assertNoRegressions
(defaulting to the module-level KNOWN_REGRESSIONS for production use)
and have the three unit tests pass a local, test-only fixture instead,
fully decoupling them from data that is expected to change over time.
0 commit comments