Repository navigation
ci(bench): re-set every byte budget to measured + 32 bytes - #1638
Conversation
Every reachability scenario (minimal-budgets.json) and every complete Octane application (app-budgets.json, jsx-budgets.json) now has a budget of exactly its production bytes on main plus 32, for raw, gzip and brotli. Twenty-one budgets had been exceeded with no pull request failing, because pull request CI enforced only five scenarios. Others had 4-30% slack that no change could breach. As ratchets, each budget now fails on more than 32 bytes of growth once CI enforces all of them (the follow-up pull request), and a raise lands on its own with the bytes and the reason, as this one does. Measured on main 11a9da9 with Node 24. Local and CI reachability bytes matched exactly on all 105 values compared. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
Benchmark report
Compares js-framework: 1k/10k row operations
All 20 timed operations (19 without a verdict)
All 64 work counters are unchanged. Application bundle size (bytes)No changes across 45 measured values. Public-import reachability bundles (bytes)No changes across 105 measured values. |
Brotli is not monotonic in code size. #1634 removes code and shrinks raw and gzip on every reachability row, yet raises brotli on three: +120 B on binding-apollo-client-vite and +28/+18 B on the usehooks-ts rows. The two changes that cause the apollo-vite rise each move brotli by single or double digits on their own; only their combination gives +120. A measured + 32 brotli budget would fail a change that strictly removes code, and under the budget-raise rule that change would need a separate raise. Raw and gzip stay at measured + 32 and remain the growth gate. Brotli becomes measured + 256, about twice the largest swing observed, so it still catches real compressed growth without blocking reductions. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issue. You can view the agent here.
Reviewed by Cursor Bugbot for commit ad02da1. Configure here.
# Conflicts: # benchmarks/bundle-size/minimal-budgets.json
Main moved while budgets were unenforced: 70 values shrank and are lowered; 30 grew past the reset values and are raised to measured + headroom by the ratchet writer (largest: hydrate-root +88 gzip, octane-jsx rows framework +100 gzip). The same values go to the budget pull request, #1638. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main moved while budgets were unenforced: 70 values shrank and are lowered to measured + headroom; 30 grew past the reset values and are raised to measured + headroom (largest: hydrate-root +88 gzip, octane-jsx rows framework +100 gzip). Identical to the values in #1639. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main grew again while budgets were unenforced: most bundles gained 37-68 raw bytes, and the todo framework gained 34 B gzip. The ratchet writer raises the breached metrics (cli-spa-starter tripped this branch's gate by 13 raw bytes) and lowers the ones that shrank. The same values go to #1638. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main grew again while budgets were unenforced (most bundles +37-68 raw bytes, todo framework +34 B gzip). Breached metrics are raised to measured + headroom, shrunk ones lowered. Identical to the values in #1639. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… feature changes (#1639) * ci(bench): re-set every byte budget to measured + 32 bytes Every reachability scenario (minimal-budgets.json) and every complete Octane application (app-budgets.json, jsx-budgets.json) now has a budget of exactly its production bytes on main plus 32, for raw, gzip and brotli. Twenty-one budgets had been exceeded with no pull request failing, because pull request CI enforced only five scenarios. Others had 4-30% slack that no change could breach. As ratchets, each budget now fails on more than 32 bytes of growth once CI enforces all of them (the follow-up pull request), and a raise lands on its own with the bytes and the reason, as this one does. Measured on main 11a9da9 with Node 24. Local and CI reachability bytes matched exactly on all 105 values compared. Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci: enforce every byte budget on pull requests and keep raises out of feature changes PR CI now checks every committed byte budget, in one step in test shard 1/4: `run-minimal.mjs --budgets` covers all 35 public-import reachability builds, and `run.mjs --budgets octane-tsrx octane-jsx` covers every complete Octane application. Before this, PR CI enforced five scenarios. Twenty-one budgets had been exceeded on main with no pull request failing. These builds also run each scenario's executable and reachability gates, including the behavior-only and Apollo tree-shaking checks that had their own steps. - run-minimal.mjs and run.mjs gain `--write-budgets`, which records measured + 32 bytes for what they built. run.mjs also gains target selection and `--budgets`. - A new lint step, benchmarks/bundle-size/budget-raises.mjs, fails a change that raises any committed budget while also changing anything other than budget files and prose. It compares a pull request with its merge commit's first parent, and a push with the previous commit. Feature changes may lower budgets, never raise them. - bundle-size gains an Octane-only bindings application that renders Radix, Base UI, React Aria, Mantine hooks, usehooks-ts, Floating UI and Motion. The bindings ship source, so its `bindings_app_*` bytes move with compiler output for plain `.ts` binding hooks, which no other row contained. - The weekly guards cover the bindings set and the Apollo reachability scenarios, which had no guards. - CONTRIBUTING.md, the performance-audit skill and the benchmarks README document the policy and the commands. Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci(bench): give brotli budgets 256 bytes of headroom Brotli is not monotonic in code size. #1634 removes code and shrinks raw and gzip on every reachability row, yet raises brotli on three: +120 B on binding-apollo-client-vite and +28/+18 B on the usehooks-ts rows. The two changes that cause the apollo-vite rise each move brotli by single or double digits on their own; only their combination gives +120. A measured + 32 brotli budget would fail a change that strictly removes code, and under the budget-raise rule that change would need a separate raise. Raw and gzip stay at measured + 32 and remain the growth gate. Brotli becomes measured + 256, about twice the largest swing observed, so it still catches real compressed growth without blocking reductions. Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci: gate growth on raw and gzip, and give brotli budgets 256 bytes Brotli is not monotonic in code size. #1634 removes code and shrinks raw and gzip on every reachability row, yet raises brotli by up to 120 B, so a measured + 32 brotli budget would fail a pure reduction and force a raise. Budgets keep 32 bytes of headroom for raw and gzip, which remain the growth gate, and get 256 for brotli: `ratchetBudget` writes that, and the docs say which metric judges growth. The bindings application's brotli budgets move with the rest. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(bench): make --write-budgets a ratchet that raises only a breached metric `--write-budgets` set every metric to measured + headroom. After a change that saved bytes, that could lift a brotli budget, since brotli can grow when code is removed, so the change would trip the budget-raise gate it was meant to satisfy. Each metric now drops to measured + headroom when that is lower, stays where the measurement still fits, and rises only when the measurement exceeds it. A raise therefore comes only from a real breach, and the gate stays strict for all three metrics. Rewriting unchanged bytes is a no-op. Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci(bench): re-measure budgets on main bc6761f Main moved while budgets were unenforced: 70 values shrank and are lowered; 30 grew past the reset values and are raised to measured + headroom by the ratchet writer (largest: hydrate-root +88 gzip, octane-jsx rows framework +100 gzip). The same values go to the budget pull request, #1638. Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci(bench): re-measure budgets on main ac729dc Main grew again while budgets were unenforced: most bundles gained 37-68 raw bytes, and the todo framework gained 34 B gzip. The ratchet writer raises the breached metrics (cli-spa-starter tripped this branch's gate by 13 raw bytes) and lowers the ones that shrank. The same values go to #1638. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
#1664 lets a surviving value-position list row whose descriptor names the same component take the memo bail without entering its item render. memo-wall one_change_B goes from 1.30-1.41x to 0.80x React Compiler (paired, same runner). Per bailed row it drops from 48 to 26 production calls and from 8 root-journal slots to 0. The fast path itself (updateDeoptComponent) is code that bundles which already contain the descriptor renderer now carry: about +800 raw / +210-290 gzip. Compiled-only applications pay +20 raw / about +10 gzip for the shared call, which fits their budgets except weather's total gzip, whose headroom had fallen to 7 bytes. Each budget below is set to #1664's measured bytes (PR bench run 37140101926, on its merge commit with main d826c3e) plus 32 for raw and gzip and plus 256 for brotli, as #1638 set them. Only values #1664 exceeds change. Co-authored-by: Claude Opus 5.5 <[email protected]>

Summary
Re-sets every committed byte budget to the measured production bytes on main: raw and gzip to measured + 32, brotli to measured + 256 (see "Why brotli gets more headroom" below). It covers:
minimal-budgets.json(35 scenarios);app-budgets.json(rows, todo, chat, weather) andjsx-budgets.json.This change is budget values only. It is the first of a series from the 2026-10-02 review of 113 merged PRs (finding A4, "size gating is effectively off"):
Why
At measured + 32 every budget is a ratchet. The next PR enforces all of them, so more than 32 B of growth fails, and a raise has to land on its own with the bytes and the reason, as this one does.
Raising the over-budget ones accepts today's sizes as the floor. They do not excuse the growth. Their known causes are owned elsewhere:
Those PRs should lower these budgets as they land.
Why brotli gets more headroom
Brotli is not monotonic in code size. #1634 strictly removes code and shrinks raw and gzip on every reachability row, yet raises brotli on three rows: +120 B on binding-apollo-client-vite, and +28/+18 B on the usehooks-ts rows. The plain-hook session reproduced this byte for byte against CI. A measured + 32 brotli budget would fail that change and, under the raise-alone rule, force a pointless raise PR.
So raw and gzip stay the growth gate at + 32, and brotli gets + 256, about twice the largest swing observed. Brotli still catches real compressed growth.
Budgets (gzip; raw follows the same + 32 rule)
Validation
ac729dc148(includes ci(bench): gate the PR bench on exact work counters, pair its timing, and diff against the first parent #1640, whose PR bench now fails every PR on main's breached budgets until this lands); before that onbc6761f0fd, which includes perf(hydration): keep the binding-marker validator out of client-only bundles #1637, perf(compiler): shrink plain-module hook boundaries and inline memo lowering #1634 and fix(benchmarks): pair the timing samples behind waived ratio guards and re-judge them #1646, using the ratchet writer from ci: enforce every byte budget on pull requests and keep raises out of feature changes #1639. Since 11a9da9, 70 values shrank and are lowered, and 30 grew while budgets were unenforced and are raised; for example, hydrate-root is +88 B gzip. First measured on main11a9da935awithnode benchmarks/bundle-size/run-minimal.mjsandnode benchmarks/bundle-size/run.mjs octane-tsrx octane-jsx(Node 24.18).--budgetsagainst the new values.pnpm sync(no changes) andpnpm format:files:checkon the three files.pnpm format:check,pnpm typecheck,pnpm test: left to CI. JSON-only change.Risk / follow-ups
run-minimal.mjs/run.mjsand update this PR.Provenance
agent-authored)🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Low Risk
JSON-only benchmark budget updates with no runtime or build logic changes; risk is limited to CI bundle-size gate behavior once enforcement lands.
Overview
Re-baselines all committed bundle-size budgets in
minimal-budgets.json(35 reachability scenarios),app-budgets.json(rows, todo, chat, weather), andjsx-budgets.jsonto current measured production bytes on main.New ceilings follow a ratchet rule: raw and gzip = measured + 32 B, brotli = measured + 256 B (extra brotli headroom because compression size is not monotonic with source size). Many limits drop where old budgets had large slack; others rise where main had already exceeded unenforced budgets (e.g. hydrate-root, deferred-hydration, server-render, Apollo bindings).
There is no application or framework code change—only these JSON values—so follow-up CI work can treat every budget as enforceable with a small, predictable growth tolerance.
Reviewed by Cursor Bugbot for commit 904e204. Bugbot is set up for automated code reviews on this repo. Configure here.