Skip to content

ci(bench): raise byte budgets for memo context through lightweight scopes - #1709

Merged
trueadm merged 1 commit into
mainfrom
ci/budget-memo-context-lite
Oct 4, 2026
Merged

trueadm merged 1 commit into
mainfrom
ci/budget-memo-context-lite

Conversation

@trueadm

@trueadm trueadm commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Budget-only raise for #1696, which fixes #1695. Merge this PR first, then merge main into #1696. CONTRIBUTING "Size budgets" keeps a raise out of the change that needs it, and budget-raises.mjs enforces that.

Why

Why the bytes are worth it. On main, a memo boundary that bails on props can strand a context consumer below it. The consumer keeps the old provider value whenever a hookless lightweight component sits between the boundary and the consumer. Two things cause it:

  • LiteBlockImpl has no memoInChain. A full Block created under a lightweight scope reads undefined from its parent, so its useContext never records the dependency on the memo ancestor.
  • refreshContextConsumers walks only Block slots and skips lightweight child scopes.

#1696 fixes both. Its regression test fails if either half is reverted.

Why it cannot be smaller. The growth is the single this.memoInChain=t.memoInChain assignment in the LiteBlockImpl constructor, which every bundle that mounts a lightweight component carries. The walk rewrite reuses forEachSubtreeChild and shrinks every bundle that reaches context refresh by about 300 raw bytes. Copying the flag at creation matches how a full Block computes it. A prototype getter would cost more bytes and add a polymorphic call to the Block constructor. Main had 4 raw bytes of headroom left on rows.framework, so the 31 bytes cannot fit.

Changes

Bytes. Each affected bundle grows by 31 raw bytes. Gzip and brotli move by single or double digits and stay within budget, except chat.framework.brotli: 38,313 → 38,342 against a budget of 38,314.

Each new budget is #1696's measured bytes plus the usual headroom: 32 raw and gzip, 256 brotli. The bytes were measured on #1696's head merged with main 77504c1, with Node 24, and they match #1696's CI report exactly. Only breached metrics are raised. Stale headroom elsewhere is left alone, so other open PRs keep it.

file budget old new Δ
minimal-budgets.json cli-spa-starter.raw 115,466 115,524 +58
minimal-budgets.json root-static-specialized.raw 77,370 77,425 +55
minimal-budgets.json root-chained-jsx.raw 84,698 84,753 +55
minimal-budgets.json root-static-local.raw 77,373 77,428 +55
minimal-budgets.json hooks-state.raw 89,432 89,488 +56
minimal-budgets.json prop-attributes.raw 96,046 96,102 +56
minimal-budgets.json hydrate-root.raw 173,667 173,725 +58
minimal-budgets.json component-owned-effects.raw 81,886 81,941 +55
minimal-budgets.json binding-hooks.raw 87,949 88,004 +55
minimal-budgets.json binding-mantine-hooks-vite.raw 96,529 96,585 +56
minimal-budgets.json binding-mantine-hooks-esbuild.raw 96,134 96,188 +54
minimal-budgets.json binding-usehooks-ts-vite.raw 97,310 97,366 +56
minimal-budgets.json binding-usehooks-ts-esbuild.raw 96,900 96,954 +54
app-budgets.json rows.framework.raw 118,156 118,215 +59
app-budgets.json rows.total.raw 125,668 125,727 +59
app-budgets.json todo.framework.raw 136,035 136,094 +59
app-budgets.json todo.total.raw 141,145 141,204 +59
app-budgets.json chat.framework.raw 133,612 133,671 +59
app-budgets.json chat.framework.brotli 38,314 38,598 +284
app-budgets.json chat.total.raw 140,265 140,324 +59

Each Δ is relative to the current budget, which already carried some unused headroom. Measured growth is +31 raw for every value.

Validation

  • node benchmarks/bundle-size/run-minimal.mjs --write-budgets and node benchmarks/bundle-size/run.mjs --write-budgets octane-tsrx octane-jsx on fix: propagate context updates through lightweight memo scopes #1696 merged with main 77504c1. Kept only the 20 raises; all lowers were discarded.
  • node benchmarks/bundle-size/budget-raises.mjs --base origin/main: 20 raises in a budget-only change.
  • pnpm sync leaves the tree clean; Prettier check on the budget files.
  • pnpm format:check, pnpm typecheck, pnpm test: not run. This PR changes only JSON budget values.

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
JSON-only threshold updates for bundle-size CI; no runtime or application code changes.

Overview
Raises bundle-size CI budgets ahead of the memo/context fix in #1696, keeping size raises in a budget-only PR per project policy.

minimal-budgets.json bumps raw limits for 13 minimal benchmarks (e.g. cli-spa-starter, hydrate-root, binding-hooks, mantine/usehooks-ts variants) by ~54–58 bytes each. app-budgets.json raises framework/total raw budgets for rows, todo, and chat, and increases chat.framework.brotli to match measured output after the ~31-byte framework growth.

Only breached metrics are updated; other headroom is unchanged so unrelated PRs keep their slack.

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

…opes

Budget-only raise for #1696, which fixes #1695. LiteBlockImpl now copies its
parent's memoInChain, adding 31 raw bytes to every bundle that mounts a
lightweight component. Each raised value is #1696's measured bytes on its head
merged with main 77504c1, plus the usual headroom.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@vercel

vercel Bot commented Oct 4, 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 4, 2026 3:36pm UTC
octane-website-mcp Skipped Skipped Oct 4, 2026 3:36pm UTC

Request Review

@vercel
vercel Bot temporarily deployed to Preview – octane-website October 4, 2026 15:36 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp October 4, 2026 15:36 Inactive
@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 4, 2026
@trueadm
trueadm marked this pull request as ready for review October 4, 2026 15:36
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Benchmark report

🟢 No budget breaches, no added work, and no timing changes beyond ±3%.

Compares 77504c160, the merge commit's first parent with 5930386c5 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.006 0.005 −8.2% −8.9% … −7.1% 🟢 faster
All 20 timed operations (19 without a verdict)
target operation base ms head ms head/base 95% CI
octane-tsrx run 2.625 2.625 ±0.0% −0.0% … +1.6% ⚪ within noise
octane-tsrx replace 5.375 5.400 −1.7% −4.8% … +3.9% ⚪ within noise
octane-tsrx add 2.283 2.333 ±0.0% −0.0% … +4.3% ⚪ within noise
octane-tsrx update 0.127 0.130 +1.0% −1.1% … +2.5% ⚪ within noise
octane-tsrx select 0.005 0.005 −0.3% −2.0% … +0.9% ⚪ within noise
octane-tsrx swap 0.036 0.035 −0.3% −2.2% … +0.7% ⚪ within noise
octane-tsrx remove 0.018 0.018 +0.4% −1.6% … +4.6% ⚪ within noise
octane-tsrx runlots 23.075 24.117 +1.9% −0.7% … +5.7% ⚪ within noise
octane-tsrx select_lots 0.006 0.005 −8.2% −8.9% … −7.1% 🟢 faster
octane-tsrx clear 40.375 39.725 −2.5% −3.2% … −0.8% ⚪ within noise
octane-jsx run 3.317 3.242 ±0.0% −2.9% … +0.0% ⚪ within noise
octane-jsx replace 5.992 5.983 ±0.0% −3.3% … +1.7% ⚪ within noise
octane-jsx add 3.000 3.050 +1.2% ±0.0% … +3.4% ⚪ within noise
octane-jsx update 0.237 0.237 +1.0% −1.0% … +3.4% ⚪ within noise
octane-jsx select 0.128 0.126 −0.0% −1.1% … +0.8% ⚪ within noise
octane-jsx swap 0.221 0.220 +1.1% −2.1% … +4.3% ⚪ within noise
octane-jsx remove 0.168 0.170 +1.8% +0.0% … +3.5% ⚪ within noise
octane-jsx runlots 26.775 27.150 −1.1% −2.8% … +2.1% ⚪ within noise
octane-jsx select_lots 1.335 1.326 +1.3% −0.9% … +2.5% ⚪ within noise
octane-jsx clear 43.692 41.083 −2.6% −5.9% … −0.7% ⚪ within noise

All 64 work counters are unchanged.

Application bundle size (bytes)

target metric base head Δ
octane-tsrx bindings_js_gzip 240,870 240,859 −11 (−0.0%) 🟢
octane-tsrx bindings_js_brotli 205,198 205,189 −9 (−0.0%) 🟢
octane-tsrx bindings_app_gzip 121,727 121,716 −11 (−0.0%) 🟢
octane-tsrx bindings_app_brotli 101,835 101,826 −9 (−0.0%) 🟢

50 other measured values are unchanged.

Public-import reachability bundles (bytes)

No changes across 105 measured values.

@trueadm
trueadm merged commit 7b15b4a into main Oct 4, 2026
55 checks passed
@trueadm
trueadm deleted the ci/budget-memo-context-lite branch October 4, 2026 15:53
trueadm added a commit that referenced this pull request Oct 4, 2026
Main took #1709, which raised the same app budgets for #1696. Re-measure
#1702 on its head da7c31d (merged with main c16fe6d), and keep
#1709's reservation for #1696 on top of measured + 32, so the two fixes
can land in either order. chat.framework.brotli no longer needs a raise.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
trueadm added a commit that referenced this pull request Oct 4, 2026
…1711)

* ci(bench): raise app byte budgets for the superseded pending arm fix

Budget-only raise for #1702, which fixes #1698. Each raised value is the
measured production bytes on #1702's head f028149 (merged with main
77504c1) plus the usual headroom: 32 raw and gzip, 256 brotli. Only
the 17 breached values move.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* ci(bench): re-measure the superseded pending arm budgets on current main

Main took #1709, which raised the same app budgets for #1696. Re-measure
#1702 on its head da7c31d (merged with main c16fe6d), and keep
#1709's reservation for #1696 on top of measured + 32, so the two fixes
can land in either order. chat.framework.brotli no longer needs a raise.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

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

This branch was previously deployed

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

Memo skips descendant context updates through lightweight component scopes

1 participant