Skip to content

ci(bench): raise byte budgets for the passive-cascade update budget fix - #1689

Merged
trueadm merged 1 commit into
mainfrom
ci/budget-passive-cascade
Oct 3, 2026
Merged

trueadm merged 1 commit into
mainfrom
ci/budget-passive-cascade

Conversation

@trueadm

@trueadm trueadm commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Budget-only raise for #1688 (fix(octane): give each passive-driven commit a fresh nested-update budget). Merge this first, then #1688. CONTRIBUTING "Size budgets" keeps a raise out of the change that needs it, and budget-raises.mjs enforces that.

Why the bytes are worth it. On main, a passive effect that advances state once per commit throws "Maximum update depth exceeded" around step 50 whenever a useLayoutEffect or useLayoutSnapshot publishes one converging measurement per commit. React allows that cascade. #1688 fixes it in the scheduler:

  • Per-commit reset. The sync-callback budget gets its own chain, reset after any outermost commit with no sync-callback update since the previous one. This is React's commitRootImpl rule.
  • One-render hold. When a block exhausts its budget while passive effects wait, they are held for one render. A passive-driven cascade settles; a real loop still throws.

Why it cannot be smaller. All the new logic runs inline on the commit path. A helper that saved about 78 raw bytes made 4 extra function calls per operation, which failed the PR benchmark's exact call counters, so it was removed. No development-only code reaches production bundles.

Bytes. Every bundle grows by about 250 raw and 100 gzip bytes. For example, cli-spa-starter goes from 115,177 to 115,434 raw (+257) and 38,886 to 38,987 gzip (+101). hooks-state goes from 89,148 to 89,400 raw (+252) and 29,603 to 29,708 gzip (+105).

Each new budget is #1688's measured bytes on its head 342e28a (merged with main 16d6090), plus the usual headroom: 32 raw and gzip, 256 brotli. Only breached metrics are raised. Stale headroom elsewhere is left alone, so other open PRs keep it. The 72 raises run from +248 to +280 raw and +85 to +146 gzip, relative to the current budgets.

All 72 raised budgets
file budget old new Δ
minimal-budgets.json cli-spa-starter.raw 115,209 115,466 +257
minimal-budgets.json cli-spa-starter.gzip 38,908 39,019 +111
minimal-budgets.json root-static-specialized.raw 77,097 77,370 +273
minimal-budgets.json root-static-specialized.gzip 25,618 25,735 +117
minimal-budgets.json root-chained-jsx.raw 84,424 84,698 +274
minimal-budgets.json root-chained-jsx.gzip 27,942 28,069 +127
minimal-budgets.json root-static.raw 204,225 204,483 +258
minimal-budgets.json root-static.gzip 65,018 65,138 +120
minimal-budgets.json root-static-local.raw 77,100 77,373 +273
minimal-budgets.json root-static-local.gzip 25,601 25,724 +123
minimal-budgets.json hooks-state.raw 89,157 89,432 +275
minimal-budgets.json hooks-state.gzip 29,631 29,740 +109
minimal-budgets.json prop-attributes.raw 95,771 96,046 +275
minimal-budgets.json prop-attributes.gzip 31,772 31,857 +85
minimal-budgets.json context.raw 109,246 109,525 +279
minimal-budgets.json context.gzip 36,145 36,258 +113
minimal-budgets.json hydrate-root.raw 173,388 173,667 +279
minimal-budgets.json hydrate-root.gzip 55,005 55,151 +146
minimal-budgets.json deferred-hydration.raw 236,736 237,016 +280
minimal-budgets.json deferred-hydration.gzip 74,869 74,973 +104
minimal-budgets.json suspense-transition.raw 165,193 165,472 +279
minimal-budgets.json suspense-transition.gzip 53,053 53,167 +114
minimal-budgets.json component-owned-effects.raw 81,612 81,886 +274
minimal-budgets.json component-owned-effects.gzip 26,905 27,022 +117
minimal-budgets.json binding-hooks.raw 87,675 87,949 +274
minimal-budgets.json binding-hooks.gzip 29,366 29,469 +103
minimal-budgets.json binding-base-ui-vite.raw 214,495 214,743 +248
minimal-budgets.json binding-base-ui-vite.gzip 68,600 68,728 +128
minimal-budgets.json binding-base-ui-esbuild.raw 212,433 212,683 +250
minimal-budgets.json binding-base-ui-esbuild.gzip 68,541 68,653 +112
minimal-budgets.json binding-radix-vite.raw 216,401 216,659 +258
minimal-budgets.json binding-radix-vite.gzip 69,160 69,257 +97
minimal-budgets.json binding-radix-esbuild.raw 214,298 214,558 +260
minimal-budgets.json binding-radix-esbuild.gzip 69,109 69,249 +140
minimal-budgets.json binding-mantine-hooks-vite.raw 96,254 96,529 +275
minimal-budgets.json binding-mantine-hooks-vite.gzip 31,937 32,053 +116
minimal-budgets.json binding-mantine-hooks-esbuild.raw 95,857 96,134 +277
minimal-budgets.json binding-mantine-hooks-esbuild.gzip 32,099 32,200 +101
minimal-budgets.json binding-apollo-client-vite.raw 359,452 359,710 +258
minimal-budgets.json binding-apollo-client-vite.gzip 112,661 112,774 +113
minimal-budgets.json binding-apollo-client-esbuild.raw 362,377 362,637 +260
minimal-budgets.json binding-apollo-client-esbuild.gzip 114,874 114,995 +121
minimal-budgets.json binding-usehooks-ts-vite.raw 97,035 97,310 +275
minimal-budgets.json binding-usehooks-ts-vite.gzip 32,178 32,303 +125
minimal-budgets.json binding-usehooks-ts-esbuild.raw 96,623 96,900 +277
minimal-budgets.json binding-usehooks-ts-esbuild.gzip 32,335 32,446 +111
app-budgets.json rows.framework.raw 117,899 118,156 +257
app-budgets.json rows.framework.gzip 38,889 39,006 +117
app-budgets.json rows.total.raw 125,411 125,668 +257
app-budgets.json rows.total.gzip 41,452 41,567 +115
app-budgets.json todo.framework.raw 135,778 136,035 +257
app-budgets.json todo.framework.gzip 44,030 44,160 +130
app-budgets.json todo.framework.brotli 38,777 39,087 +310
app-budgets.json todo.total.raw 140,888 141,145 +257
app-budgets.json todo.total.gzip 46,506 46,637 +131
app-budgets.json todo.total.brotli 40,896 41,207 +311
app-budgets.json chat.framework.raw 133,355 133,612 +257
app-budgets.json chat.framework.gzip 43,458 43,595 +137
app-budgets.json chat.total.raw 140,008 140,265 +257
app-budgets.json chat.total.gzip 46,436 46,574 +138
app-budgets.json weather.framework.raw 150,307 150,564 +257
app-budgets.json weather.framework.gzip 48,838 48,979 +141
app-budgets.json weather.total.raw 176,986 177,243 +257
app-budgets.json weather.total.gzip 57,872 58,013 +141
app-budgets.json bindings.framework.raw 363,846 364,094 +248
app-budgets.json bindings.framework.gzip 119,086 119,178 +92
app-budgets.json bindings.total.raw 719,767 720,015 +248
app-budgets.json bindings.total.gzip 240,806 240,903 +97
jsx-budgets.json framework.raw 219,553 219,801 +248
jsx-budgets.json framework.gzip 69,874 69,980 +106
jsx-budgets.json total.raw 228,012 228,260 +248
jsx-budgets.json total.gzip 72,810 72,916 +106

Validation

  • pnpm format:check (repo-wide, left to CI)
  • pnpm typecheck (no code changes)
  • pnpm test (no code changes)
  • targeted checks:
    • node benchmarks/bundle-size/budget-raises.mjs --base origin/main reports "72 raise(s) in a budget-only change".
    • run-minimal.mjs --write-budgets and run.mjs --write-budgets octane-tsrx octane-jsx ran on the fix(octane): give each passive-driven commit a fresh nested-update budget #1688 head. Only the raised values were kept.
    • pnpm format:files:check on the three budget files passes, and pnpm sync produces no changes.

Risk / follow-ups

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
No production or runtime code changes—only benchmark budget JSON used by CI size checks.

Overview
Budget-only CI change that raises bundle size ceilings in app-budgets.json, jsx-budgets.json, and minimal-budgets.json so the size gate can pass after the passive-cascade nested-update fix in #1688 lands.

Across 72 metric bumps (only values that would breach), framework/total budgets go up by roughly +248–280 raw and +85–146 gzip per entry (~250/100 on typical fixtures such as cli-spa-starter and hooks-state). App-only and untouched headroom entries are left as-is. Intended merge order: this PR first, then #1688; budgets should be re-measured or lowered if that follow-up changes or is dropped.

Reviewed by Cursor Bugbot for commit 83d9228. Bugbot is set up for automated code reviews on this repo. Configure here.

Raise 72 byte budgets to the bytes #1688 measures plus the
usual headroom (32 raw/gzip, 256 brotli). #1688 gives each passive-driven
commit a fresh nested-update budget and holds passive effects for one
render when a budget runs out. That adds about 250 raw and 100 gzip bytes
of scheduler code to every bundle, all inline on the commit path so the PR
benchmark's call counters stay flat. Budgets only; no other change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@vercel
vercel Bot temporarily deployed to Preview – octane-website October 3, 2026 20:49 Inactive
@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 8:49pm UTC
octane-website-mcp Skipped Skipped Oct 3, 2026 8:49pm UTC

Request Review

@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp October 3, 2026 20:49 Inactive
@trueadm
trueadm marked this pull request as ready for review October 3, 2026 20:49
@github-actions github-actions Bot added agent-authored Diff or issue body substantially produced by an AI agent ci PR: CI or build pipeline labels Oct 3, 2026
@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 16d609094, the merge commit's first parent with d04a8eb80 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-jsx clear 43.575 47.850 +5.5% +3.5% … +8.3% 🟡 slower
All 20 timed operations (19 without a verdict)
target operation base ms head ms head/base 95% CI
octane-tsrx run 2.650 2.650 ±0.0% −0.0% … +3.2% ⚪ within noise
octane-tsrx replace 5.200 5.208 +0.0% −0.0% … +3.7% ⚪ within noise
octane-tsrx add 2.392 2.342 −0.0% −2.1% … ±0.0% ⚪ within noise
octane-tsrx update 0.126 0.126 +0.5% ±0.0% … +1.0% ⚪ within noise
octane-tsrx select 0.005 0.005 −0.2% −1.3% … +0.5% ⚪ within noise
octane-tsrx swap 0.033 0.033 −0.3% −1.1% … +0.3% ⚪ within noise
octane-tsrx remove 0.016 0.016 −1.6% −3.9% … +0.4% ⚪ within noise
octane-tsrx runlots 23.433 24.242 +3.0% −1.1% … +6.3% ⚪ within noise
octane-tsrx select_lots 0.005 0.005 −1.0% −1.1% … −0.3% ⚪ within noise
octane-tsrx clear 38.033 39.567 +2.8% +1.8% … +3.4% ⚪ within noise
octane-jsx run 3.325 3.250 −1.4% −3.0% … +2.9% ⚪ within noise
octane-jsx replace 5.817 5.875 ±0.0% −2.9% … +1.7% ⚪ within noise
octane-jsx add 3.033 2.983 −0.0% −3.2% … ±0.0% ⚪ within noise
octane-jsx update 0.232 0.234 +0.3% −0.3% … +0.7% ⚪ within noise
octane-jsx select 0.120 0.122 −1.1% −1.6% … −1.0% ⚪ within noise
octane-jsx swap 0.226 0.226 −0.8% −1.6% … +0.3% ⚪ within noise
octane-jsx remove 0.170 0.171 +0.6% −1.5% … +3.5% ⚪ within noise
octane-jsx runlots 28.367 28.350 −0.4% −2.9% … +1.1% ⚪ within noise
octane-jsx select_lots 1.494 1.550 +1.4% +0.5% … +2.9% ⚪ within noise
octane-jsx clear 43.575 47.850 +5.5% +3.5% … +8.3% 🟡 slower

All 64 work counters are unchanged.

Application bundle size (bytes)

target metric base head Δ
octane-tsrx bindings_js_gzip 240,780 240,769 −11 (−0.0%) 🟢
octane-tsrx bindings_js_brotli 205,077 204,959 −118 (−0.1%) 🟢
octane-tsrx bindings_app_gzip 121,726 121,715 −11 (−0.0%) 🟢
octane-tsrx bindings_app_brotli 101,832 101,714 −118 (−0.1%) 🟢

50 other measured values are unchanged.

Public-import reachability bundles (bytes)

No changes across 105 measured values.

@trueadm
trueadm merged commit 5228fb6 into main Oct 3, 2026
52 of 55 checks passed
@trueadm
trueadm deleted the ci/budget-passive-cascade branch October 3, 2026 21:08
trueadm added a commit that referenced this pull request Oct 4, 2026
#1690 (stacked on #1688) fits every raw and gzip budget that #1689 raised,
but measures two brotli values above main's budgets: hydrate-root 48,099
and chat/total 40,951. Raise both to that measurement plus the 256-byte
brotli headroom (48,355 and 41,207), so the budgets cover #1688 alone and
#1688 + #1690. Budgets only.

Co-authored-by: Claude Opus 5.5 <[email protected]>

This branch was previously deployed

2 inactive deployments
Preview – octane-website-mcp — 83d92283 Deployed Oct 3, 2026 by vercel[bot]
Preview – octane-website — 83d92283 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