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
{{ message }}
Repository navigation
Commit b987c41
Browse filesBrowse the repository at this point in the historyBrowse files
authored
chore(size): measure the minified allowance against the minified recorded with each cap (#3822)
* chore(size): measure the minified allowance against the minified recorded with each cap
Each cap records the minified size measured when it was set (capMinified
inline, { cap, minified } in floor-caps.json). Over the brotli cap, a scenario
fails when head minified exceeds the recorded size + 20 B, so growth cannot
creep across PRs; the base comparison stays as the fail-safe for a cap without
one. The warning states the headroom left. The ratchet pairs the recorded
minified with each lowered cap and otherwise only lowers it (--minified-only
records missing ones); check-floor-caps freezes a floor's recorded minified
like its cap.
Co-authored-by: Claude via Cursor <[email protected]>
* chore(size): wrap the ratchet's ledger lines at 80 columns
Co-authored-by: Claude via Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
* chore(size): seed recorded minified from CI on next @ c54fb10
Co-authored-by: Claude via Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
* chore(size): re-seed recorded minified from CI on next @ fff1615#3812, #3814 and #3811 moved minified +30 to +69 B after the first seed
(c54fb10); re-seeded from scratch at the tip, every cap unchanged.
Co-authored-by: Claude via Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
---------
Co-authored-by: Claude via Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
constvs=`no minified recorded with the cap, so judged against this PR's base: minified ${signed(baseDelta)}`;
91
+
if(headroom>=0)
48
92
return{
49
-
name,
93
+
...common,
50
94
verdict: "warn",
51
-
overBy,
52
-
minDelta,
53
-
allowance,
54
-
message: `over brotli cap by ${overBy} B, minified ${signed} — layout noise; cap will be re-based at the next ratchet`
95
+
message: `over brotli cap by ${overBy} B; ${vs} — ${headroom} B of the ${allowance} B minified allowance left`
55
96
};
56
97
return{
57
-
name,
98
+
...common,
58
99
verdict: "fail",
59
-
overBy,
60
-
minDelta,
61
-
allowance,
62
-
message: `over brotli cap by ${overBy} B, minified ${signed} (allowance ${allowance} B) — real growth: reduce it, or raise the cap in this PR with a reason (frozen floors need \`Size-Exception:\`)`
100
+
message: `over brotli cap by ${overBy} B; ${vs} — ${-headroom} B past the ${allowance} B minified allowance. ${REAL_GROWTH}`
63
101
};
64
102
}
65
103
@@ -101,6 +139,12 @@ if (process.argv[1] === fileURLToPath(import.meta.url)) {
0 commit comments