diff --git a/tools/performance/check-journey-ratchet.mjs b/tools/performance/check-journey-ratchet.mjs index c9c08d1e4..b03bd70eb 100644 --- a/tools/performance/check-journey-ratchet.mjs +++ b/tools/performance/check-journey-ratchet.mjs @@ -188,7 +188,7 @@ export function compareToBaselines({ baselines, summary, only = [] }) { result.failures.push( `${label}: ${formatNumber(measured)}${unit} exceeds ${limitText} by ${formatNumber(measured - limit)}${unit}. Bring the value back down; baselines only move down. If the growth is a deliberate trade-off, raise the baseline in ${DEFAULT_BASELINES_PATH}, make the case in the PR, and ask a maintainer to add the ${BASELINE_INCREASE_LABEL} label.` ); - } else if (measured > entry.value) { + } else if (entry.slack && measured > entry.value) { result.passed.push( `${label}: ${formatNumber(measured)}${unit} within ${limitText}; uses ${formatNumber(measured - entry.value)} of ${formatNumber(limit - entry.value)}${unit} slack.` ); diff --git a/tools/performance/check-journey-ratchet.test.mjs b/tools/performance/check-journey-ratchet.test.mjs index ea13a0ec9..dd3a44cf7 100644 --- a/tools/performance/check-journey-ratchet.test.mjs +++ b/tools/performance/check-journey-ratchet.test.mjs @@ -155,8 +155,9 @@ test('wall-clock entries fail only above value × toleranceRatio', () => { assert.deepEqual(within.failures, []); assert.match( within.passed[1], - /1,250 ms within 1,250 \(baseline 1,000 × 1\.25\)/ + /1,250 ms within 1,250 \(baseline 1,000 × 1\.25\)\.$/ ); + assert.doesNotMatch(within.passed[1], /slack/); const above = compareToBaselines({ baselines,