Skip to content

ci(bench): re-set every byte budget to measured + 32 bytes - #1638

Merged
trueadm merged 8 commits into
mainfrom
claude/nostalgic-panini-95a776
Oct 3, 2026
Merged

trueadm merged 8 commits into
mainfrom
claude/nostalgic-panini-95a776

Conversation

@trueadm

@trueadm trueadm commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

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:

  • every public-import reachability scenario in minimal-budgets.json (35 scenarios);
  • every complete Octane application in app-budgets.json (rows, todo, chat, weather) and jsx-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"):

  1. This PR: re-set budgets.
  2. Enforce every budget in PR CI, and forbid budget raises inside feature PRs.
  3. PR bench: an exact work-counter gate, paired timing, and a first-parent base.
  4. Weekly ratio-guard triage.
  5. Typecheck every published package.

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)

budget (gzip) old budget new budget change
reachability capture-only 4,000 4,420 +420
reachability behavior-root-vite 4,544 4,572 +28
reachability behavior-root-esbuild 4,688 4,704 +16
reachability cli-spa-starter 44,672 38,839 -5,833
reachability root-static-specialized 25,504 25,568 +64
reachability root-chained-jsx 27,904 27,877 -27
reachability root-static 64,032 64,670 +638
reachability root-static-local 36,480 25,555 -10,925
reachability hooks-state 37,712 29,570 -8,142
reachability prop-attributes 31,920 31,727 -193
reachability context 37,824 36,089 -1,735
reachability hydrate-root 48,096 54,948 +6,852
reachability deferred-hydration 67,264 74,796 +7,532
reachability suspense-transition 52,672 52,990 +318
reachability server-hooks 480 361 -119
reachability server-render 18,912 22,463 +3,551
reachability component-owned-effects 36,928 26,854 -10,074
reachability binding-vanilla 444 456 +12
reachability binding-hooks 38,128 29,323 -8,805
reachability binding-base-ui-vite 67,680 68,244 +564
reachability binding-base-ui-esbuild 67,680 68,202 +522
reachability binding-aria-vite 3,200 3,088 -112
reachability binding-aria-esbuild 3,472 3,363 -109
reachability binding-motion-vite 22,944 22,951 +7
reachability binding-motion-esbuild 23,088 23,110 +22
reachability binding-radix-vite 68,288 68,784 +496
reachability binding-radix-esbuild 68,288 68,776 +488
reachability binding-floating-ui-vite 4,464 4,484 +20
reachability binding-floating-ui-esbuild 4,624 4,634 +10
reachability binding-mantine-hooks-vite 37,296 31,904 -5,392
reachability binding-mantine-hooks-esbuild 37,376 32,046 -5,330
reachability binding-apollo-client-vite 110,592 112,330 +1,738
reachability binding-apollo-client-esbuild 113,664 114,525 +861
reachability binding-usehooks-ts-vite 37,280 32,143 -5,137
reachability binding-usehooks-ts-esbuild 37,360 32,283 -5,077
app rows/total 41,824 41,388 -436
app rows/framework 39,168 38,826 -342
app rows/app 2,688 2,594 -94
app todo/total 46,304 46,473 +169
app todo/framework 43,712 43,996 +284
app todo/app 2,624 2,508 -116
app chat/total 46,240 46,372 +132
app chat/framework 43,136 43,394 +258
app chat/app 3,104 3,010 -94
app weather/total 62,944 57,795 -5,149
app weather/framework 53,472 48,786 -4,686
app weather/app 9,504 9,066 -438
jsx rows/total 71,872 72,489 +617
jsx rows/framework 68,800 69,553 +753
jsx rows/app 3,104 2,967 -137

Validation

Risk / follow-ups

  • Expected CI failures on other PRs. Once the enforcement PR lands, any open PR that adds more than 32 B to a bundle fails. It must shrink the growth, or have the raise land first in its own PR.
  • Merging other PRs first. If another PR lands before this one and grows a bundle, re-measure with run-minimal.mjs / run.mjs and update this PR.
  • Cross-session. Sessions already lowering root-chained-jsx and context should rebase onto these values.

Provenance

  • An agent produced this diff (agent-authored)

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with 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), and jsx-budgets.json to 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.

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]>
@vercel

vercel Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated
octane-website Skipped Skipped Oct 3, 2026 1:26pm UTC
octane-website-mcp Skipped Skipped Oct 3, 2026 1:26pm UTC

Request Review

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark report

  • 🟡 js-framework: 1 timed operation(s) slower beyond ±3%

Compares 9985bee6a, the merge commit's first parent with 8c6c6ed88 on the same runner. A byte value over its committed budget or any increase in a js-framework work counter fails this check. Wall time is a report: base and head samples alternate in one browser, and an operation is called slower or faster only when the 95% confidence interval of its ratio excludes ±3%. Workflow run

js-framework: 1k/10k row operations

target operation base ms head ms head/base 95% CI
octane-tsrx select_lots 0.005 0.006 +10.1% +8.9% … +11.0% 🟡 slower
All 20 timed operations (19 without a verdict)
target operation base ms head ms head/base 95% CI
octane-tsrx run 2.725 2.692 ±0.0% −3.0% … +3.3% ⚪ within noise
octane-tsrx replace 5.233 5.558 +2.7% +0.0% … +5.4% ⚪ within noise
octane-tsrx add 2.333 2.325 ±0.0% −2.0% … ±0.0% ⚪ within noise
octane-tsrx update 0.120 0.122 +1.6% +0.3% … +2.2% ⚪ within noise
octane-tsrx select 0.005 0.005 −0.6% −1.1% … +0.3% ⚪ within noise
octane-tsrx swap 0.034 0.034 +0.9% +0.3% … +2.1% ⚪ within noise
octane-tsrx remove 0.015 0.015 ±0.0% −0.8% … +1.2% ⚪ within noise
octane-tsrx runlots 23.725 21.725 −5.4% −11.9% … −2.2% ⚪ within noise
octane-tsrx select_lots 0.005 0.006 +10.1% +8.9% … +11.0% 🟡 slower
octane-tsrx clear 42.767 43.267 +1.2% −1.4% … +3.5% ⚪ within noise
octane-jsx run 3.308 3.425 −1.4% −2.8% … +0.0% ⚪ within noise
octane-jsx replace 6.000 6.050 +0.7% ±0.0% … +1.6% ⚪ within noise
octane-jsx add 3.133 3.167 ±0.0% −2.6% … +3.0% ⚪ within noise
octane-jsx update 0.261 0.253 +1.2% −0.6% … +2.0% ⚪ within noise
octane-jsx select 0.131 0.133 −1.1% −2.2% … −0.3% ⚪ within noise
octane-jsx swap 0.226 0.226 −0.8% −1.6% … −0.0% ⚪ within noise
octane-jsx remove 0.174 0.174 +0.0% −0.6% … +1.7% ⚪ within noise
octane-jsx runlots 28.417 28.400 −0.7% −3.2% … +1.8% ⚪ within noise
octane-jsx select_lots 1.546 1.486 −3.5% −5.9% … −0.7% ⚪ within noise
octane-jsx clear 43.067 47.367 +4.6% +1.4% … +7.9% ⚪ within noise

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]>
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp October 3, 2026 07:48 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website October 3, 2026 07:48 Inactive

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

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.

Comment thread benchmarks/bundle-size/app-budgets.json Resolved
# Conflicts:
#	benchmarks/bundle-size/minimal-budgets.json
trueadm added a commit that referenced this pull request Oct 3, 2026
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]>
trueadm and others added 2 commits October 3, 2026 12:05
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]>
trueadm added a commit that referenced this pull request Oct 3, 2026
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]>
trueadm and others added 2 commits October 3, 2026 12:13
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]>
@vercel
vercel Bot temporarily deployed to Preview – octane-website October 3, 2026 13:26 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp October 3, 2026 13:26 Inactive
@trueadm
trueadm merged commit 8fddced into main Oct 3, 2026
56 of 59 checks passed
@trueadm
trueadm deleted the claude/nostalgic-panini-95a776 branch October 3, 2026 16:21
trueadm added a commit that referenced this pull request Oct 3, 2026
… 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]>
trueadm added a commit that referenced this pull request Oct 3, 2026
#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]>

This branch was previously deployed

2 inactive deployments
Preview – octane-website — 904e204b Deployed Oct 3, 2026 by vercel[bot]
Preview – octane-website-mcp — 904e204b Deployed Oct 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-authored Diff or issue body substantially produced by an AI agent ci PR: CI or build pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant