Skip to content

ci(benchmarks): recommit bundle budgets to measured main reality - #1207

Merged
trueadm merged 1 commit into
mainfrom
ci/bundle-budgets-void-root
Sep 22, 2026
Merged

trueadm merged 1 commit into
mainfrom
ci/bundle-budgets-void-root

Conversation

@jonkwheeler

@jonkwheeler jonkwheeler commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Part of #1202. Split from #1188.

Summary

  • Re-commits the bundle-size byte ceilings (app-budgets.json, jsx-budgets.json, minimal-budgets.json) to what main actually produces today, and adds a void-root specialization verdict + gate to benchmarks/bundle-size/run.mjs.
  • Re-commits the 15 stale cross-framework bundle-size ratio guards in benchmarks/baselines/ratios.json with per-guard re-measurement notes.

Why

  • The committed budgets predate uniform runtime growth on main: packages/octane/src/runtime.ts source grew 1157028 → 1793553 bytes across 116 runtime-touching commits since the 2026-08-16 ceilings, so most ceilings were below current production output and the guards no longer reflected reality.
  • The run.mjs gate closes a reporting gap: the compiled app-mode root must emit __createVoidRoot (never the generic createRoot) from packages/octane/src/runtime.ts. All four octane-tsrx app targets report specialized on main; octane-jsx reports generic-root, which is expected — it hand-writes a user-level createRoot call — and stays informational.
  • Landing the true ceilings on main first keeps the bundle-size gate green for the runtime PRs that follow in this split.

Changes

  • benchmarks/bundle-size/run.mjs: inspects each octane target's build result for runtime.ts renderedExports, records meta.voidRoots per app set, prints the verdict, and asserts octane-tsrx is specialized (compiled apps gate; octane-jsx reports only).
  • benchmarks/bundle-size/{app,jsx,minimal}-budgets.json: ceilings re-measured under the pinned CI Node 24.19.0 on main; bumped entries carry ~3% headroom rounded up to 32-byte alignment, and entries that still pass keep their tighter committed values (per-metric — e.g. server-hooks brotli, jsx app raw/brotli, root-static-local, hooks-state, context are unchanged).
  • benchmarks/baselines/ratios.json: 15 bundle-size cross-framework guards re-committed at ceil(observed × 1.01, 2dp) with dated notes; the 45 measured-vs-budget guards (maxRatio: 1) and the passing octane-jsx/octane-tsrx, todo_app_gzip vs ripple, and weather_app_gzip vs react guards are untouched.
  • binding-aria-esbuild stays committed but unmeasurable: esbuild fails to parse packages/aria/src/stately/tokenfield/TokenFieldValue.tsx (Unexpected "enum"), a pre-existing main infrastructure issue that skips its three guards rather than failing them.

Validation

Node v24.19.0 (/Users/jonwheeler/.nvm/versions/node/v24.19.0/bin/node — the pinned CI major) on macOS:

  • node benchmarks/bundle-size/run.mjs — all four octane-tsrx targets ✓ void-root specialized; octane-jsx generic-root (expected, informational). Measured rows octane-tsrx: total gz 40594 / app gz 2581 / fw gz 38013; identical bytes on re-run (deterministic).
  • node benchmarks/bundle-size/run-minimal.mjs — all scenarios measured within committed budgets; aborts at binding-aria-esbuild on the pre-existing esbuild enum parse error (documented above). The 10 later binding scenarios were measured separately by name and pass.
  • node benchmarks/bundle-size/run-minimal.mjs --budgets root-static-local hooks-state context behavior-root — the per-PR CI command (ci.yml): PASS, exit 0.
  • node benchmarks/bundle-size/run-minimal.mjs --budgets binding-radix-vite binding-radix-esbuild binding-motion-vite binding-motion-esbuild binding-floating-ui-vite binding-floating-ui-esbuild binding-mantine-hooks-vite binding-mantine-hooks-esbuild binding-usehooks-ts-vite binding-usehooks-ts-esbuild — PASS, exit 0 (deterministic bytes).
  • node benchmarks/bench.mjs --record --ratios bundle-size (baselines redirected to a temp dir) — 63/63 runnable bundle-size guards PASS, wrote ratios.suggested.json for review (its 1.5× suggestions are intentionally looser than the committed ~1% ceilings).
  • node benchmarks/bench.mjs --quick --ratios bundle-size bundle-reachability — [ratios] checked 123/1116 guard(s) — PASS — no ratio guards breached; exits 1 on the pre-existing bundle-reachability harness gate failure (binding-aria-esbuild esbuild enum parse error, same as on main). This gate runs in the manual/weekly bench.yml, not per-PR CI.
  • pnpm format:files / pnpm format:files:check on the five touched paths — clean.
  • pnpm sync — tree stays clean.
  • pnpm format:check / pnpm typecheck / pnpm test — deferred to CI (same convention as perf(runtime): beat React 19 + Compiler across the timing benchmark portfolio #1188).

Risk / follow-ups

Provenance

  • An agent produced this diff (agent-authored)

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
Benchmark and CI guard data only; no application or runtime behavior changes beyond stricter build-time assertions in the bundle-size harness.

Overview
Re-aligns bundle-size CI with current main output after Octane runtime growth: committed byte ceilings and cross-framework ratio guards were below what production builds actually measure, so the gates were effectively stale.

benchmarks/bundle-size/{app,jsx,minimal}-budgets.json — raw/gzip/brotli ceilings are re-measured on pinned CI Node 24 (with ~3% headroom where bumped); unchanged entries stay tight where builds still pass.

benchmarks/baselines/ratios.json — 15 octane-tsrx vs Ripple/Solid/Svelte/React bundle-size maxRatio values and notes are re-committed from fresh measurements (~1% slack), replacing August-era snapshots.

benchmarks/bundle-size/run.mjs — after each Octane build, inspects packages/octane/src/runtime.ts renderedExports, records a void-root verdict in meta.voidRoots, and fails if octane-tsrx is not specialized (__createVoidRoot present, generic createRoot absent); octane-jsx may report generic-root as informational only.

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

@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 Sep 21, 2026
@jonkwheeler
jonkwheeler marked this pull request as ready for review September 21, 2026 13:54
@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Suggested review order for the #1188 split (tracking: #1202):

  1. fix(benchmarks): restore effectful-list workload honesty and enable React Compiler in spa-navigation #1205 — fixtures/harness honesty; everything downstream is measured against the baselines it fixes
  2. ci(benchmarks): recommit bundle budgets to measured main reality #1207 — budgets + guards re-measured on main; gives the perf PRs headroom to land green
  3. feat(compiler): admit host-only conditional item bodies to forBlock PURE #1213 — forBlock PURE, compiler-only; smallest and most contained
  4. feat(octane): $$stable — compiler-proven props-snapshot bailout for components #1214 — $$stable, compiler+runtime; introduces blockBailUnsafe (the shared hazard veto)
  5. perf(octane): signal-instance identity + dormant-owner fast paths #1216 — signal identity + dormant paths; moderate runtime diff
  6. perf(octane): changed-commit write path — sources plan, fused scan, journal replay #1215 — write path; largest diff, easiest once feat(octane): $$stable — compiler-proven props-snapshot bailout for components #1214 and perf(octane): signal-instance identity + dormant-owner fast paths #1216's machinery is familiar

Wave 2 (#1213–#1216) is any-order for merging — this sequence front-loads the concepts later diffs build on.

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.

2 participants