Skip to content

ci(bundle-size): budget combined transition cues and native producers - #1887

Closed
trueadm wants to merge 5 commits into
mainfrom
ci/budgets-transition-cue
Closed

trueadm wants to merge 5 commits into
mainfrom
ci/budgets-transition-cue

Conversation

@trueadm

@trueadm trueadm commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Budget-only raise for the code now on main after #1888 (split transition cue), #1875 and #1877 (native producer pacing). #1888 has already merged, so main's bundle size job is red until this lands. Per CONTRIBUTING.md ("Size budgets"), the raise lands on its own.

Head 9f0e659d8a is merged with main f183be7761, which includes #1897 and #1900. It supersedes the update prepared in the contribution fork (592058e2c). That update was measured on abe9b42a54, before #1897 and #1900 trimmed about 12 to 18 raw bytes from these rows, and was never pushed here.

Values come from run-minimal.mjs --write-budgets and run.mjs --write-budgets octane-tsrx octane-jsx on f183be7761. They are raise-only: each metric is the larger of main's cap and the measurement plus headroom (32 raw/gzip, 256 brotli), so main's downward ratchets stay. Local measurement matches the CI bundle size job on f183be7761 for every row that job printed before failing: cli-spa-starter, root-static-specialized, root-chained-jsx, and root-static gzip 52,321 against a 52,313 cap.

node benchmarks/bundle-size/budget-raises.mjs --base f183be7761 reports 35 raises in a budget-only change, and no decreases:

Rows Metrics raised
suspense-transition, binding-base-ui-*, binding-radix-*, binding-apollo-client-* raw +1,383 to +1,408; gzip +362 to +443; brotli +413 to +528
bindings framework / total raw +1,397; gzip +398; brotli +497 / +520
root-static gzip +40, brotli +279
hydrate-root gzip +54
hydrate-frame raw +322, gzip +102
binding-mantine-hooks-vite gzip +34
chat framework / total gzip +56 / +57

Why

Merge order

Merge as soon as possible: main is red on bundle size without it. #1899 (ancestor cue) measures its own budget-only raise on top of this once it lands.

Validation

  • node benchmarks/bundle-size/budget-raises.mjs --base f183be7761: 35 raises in a budget-only change.
  • Local measurements match CI's bundle size output on f183be7761 where it reported them.
  • pnpm test / pnpm typecheck / pnpm format:check: JSON-only change, left to CI.
  • perf-review: not applicable (budget files only).

Provenance

  • An agent produced this diff (agent-authored)

🤖 Generated with Claude Code


Note

Low Risk
JSON-only CI threshold updates with no runtime, security, or data-path changes.

Overview
Raises bundle-size CI ceilings in app-budgets.json and minimal-budgets.json so benchmarks pass after the combined split transition-cue and native producer runtime already on main. Only metrics that exceeded prior caps are bumped (chat/bindings app budgets and many minimal scenarios: hydration, suspense transitions, and several UI-library binding bundles); caps that still fit are left as-is, using the repo’s usual raw/gzip and Brotli headroom.

No application or framework source changes—this is a budget-only alignment with measured artifact sizes.

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

Budget-only raise for the companion fix that commits a pending cue apart from
its own component's transition (#1864). Values come from run-minimal.mjs
--write-budgets and run.mjs --write-budgets octane-tsrx octane-jsx on that
branch merged with main 8444db8. Only the nine scenarios that start
transitions move, by about +1.29 kB raw and +0.31 to +0.39 kB gzip; apps that
never start a transition stay inside their existing budgets.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@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 8, 2026
@trueadm
trueadm marked this pull request as ready for review October 8, 2026 12:21
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
🔵 In progress
View logs
octane-website 9f0e659 Oct 08 2026, 03:24 PM

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark report

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

Compares f183be776, the merge commit's first parent with 179bf890c 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

All 20 timed operations (20 without a verdict)
target operation base ms head ms head/base 95% CI
octane-tsrx run 7.775 6.292 −16.0% −55.8% … −2.6% ⚪ within noise
octane-tsrx replace 16.275 15.225 −1.3% −8.4% … +4.8% ⚪ within noise
octane-tsrx add 5.233 4.908 −5.2% −15.1% … +1.4% ⚪ within noise
octane-tsrx update 0.300 0.250 −8.1% −38.4% … +0.6% ⚪ within noise
octane-tsrx select 0.014 0.012 −0.5% −7.9% … +34.0% ⚪ within noise
octane-tsrx swap 0.076 0.080 −1.4% −9.3% … +9.3% ⚪ within noise
octane-tsrx remove 0.042 0.036 −1.2% −9.6% … +1.5% ⚪ within noise
octane-tsrx runlots 81.708 50.650 −2.0% −26.3% … +1.7% ⚪ within noise
octane-tsrx select_lots 0.016 0.014 −2.1% −14.1% … +2.9% ⚪ within noise
octane-tsrx clear 102.283 94.683 −6.6% −12.5% … −1.5% ⚪ within noise
octane-jsx run 9.117 9.967 +4.0% −11.0% … +16.5% ⚪ within noise
octane-jsx replace 18.350 17.142 −9.5% −35.3% … −0.2% ⚪ within noise
octane-jsx add 7.808 8.317 +3.5% −0.4% … +11.1% ⚪ within noise
octane-jsx update 0.609 0.647 −2.6% −8.6% … +7.5% ⚪ within noise
octane-jsx select 0.320 0.314 +2.4% −6.0% … +7.7% ⚪ within noise
octane-jsx swap 0.508 0.468 −0.4% −11.7% … +13.9% ⚪ within noise
octane-jsx remove 0.331 0.398 +6.2% −0.9% … +25.3% ⚪ within noise
octane-jsx runlots 80.442 69.908 +1.7% −15.8% … +21.3% ⚪ within noise
octane-jsx select_lots 6.888 7.996 +13.3% −15.4% … +24.9% ⚪ within noise
octane-jsx clear 92.192 85.517 −4.3% −21.9% … +10.9% ⚪ within noise

All 64 work counters are unchanged.

Application bundle size (bytes)

No changes across 60 measured values.

Public-import reachability bundles (bytes)

No changes across 111 measured values.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
octane-website-mcp 1766775 Commit Preview URL

Branch Preview URL
Oct 08 2026, 01:28 PM

#1888 now also marks retained transition updates its block already rendered,
so a later split cue cannot expose a committed plain cell's base: about
+128 raw and +45 gzip on the nine transition scenarios. Values from
--write-budgets on #1888's head.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
trueadm added a commit that referenced this pull request Oct 8, 2026
Reverted with fdb2de9 before merge; the raise lands through #1887.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
trueadm added a commit that referenced this pull request Oct 8, 2026
The bundle-size gates now run in their own job (#1889), so the runtime shards
no longer need the raised budgets to run. The raise lands through #1887.

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

# Conflicts:
#	benchmarks/bundle-size/minimal-budgets.json
trueadm added a commit that referenced this pull request Oct 8, 2026
…tion (#1864) (#1888)

* fix(octane): commit the pending cue apart from its component's transition (#1864)

When the component that raises isPending also held the transition's own
update, both rendered together in the click's microtask flush: the cue showed
the new state, and the browser could not paint "pending" until the whole
transition render had finished. That is the canonical useTransition pattern
(the docs' ProjectTabs example, the playground's Sort button). React renders
isPending in an urgent lane with the previous state and the transition's
update later, in a Scheduler task.

A pending cue now never renders transition work that waits for the task. When
a transition update flushes for a block already queued for its cue
(flushTransitionActionBatch), or a cue arrives for a block whose transition is
waiting (upgradeTransitionBlock), the block is queued in both places. The
microtask drain renders only the cue (splitTransitionCue), at urgent priority
over the block's committed cells, through the exposure an urgent ancestor
already uses for a child with a queued transition, then leaves the block
pending for the transition task. Suspense holds after the cue, useOptimistic,
urgent updates during the wait (which still render the transition with them),
flushSync, act(), unmount and controlled inputs keep their behavior. A split
cue renders outside a View Transition and leaves addTransitionType types to the
transition's render.

beginUrgentTransitionRender no longer reverts a hook cell whose queue a render
already consumed, which could flash a committed transition value back, and no
longer allocates a slot index or predicate closure per call. An urgent ancestor
that already rendered a split cue spares the block's own queue entry a second
render.

Chromium Event Timing on the Sort pattern (memoized 40 ms list, 5 clicks):
main 5/5 slow clicks (40-80 ms); now 1/5 (first, cold), matching React 19.2.7.

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

* ci: temporarily carry #1887's budgets so the test shards run

Shard 1/4 fails its byte budgets until #1887 merges, and fail-fast then cancels
shards 2-4. This commit only lets those shards report; it is reverted before
merge, and the raise lands through #1887.

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

* fix(octane): keep committed plain cells out of a later split cue

FLUSHED_TRANSITION_UPDATES is retained while any block waits for the
transition task, so a block's already-rendered updates can still be listed
when a later pending cue splits on that block. Hook cells were guarded by
their consumed renderTransition, but plain cells (useDeferredValue's swap,
useLinkedState) were reverted to their pre-transition base: the cue flashed
the deferred value from before the swap.

When a block that is not queued is scheduled at transition priority, a render
has consumed every update retained for it, so queueTransitionBlock marks them
rendered and the cue's committed-cell exposure skips them. A hold that takes
the entries clears the mark, so hold and promotion behave as before.

Reported by Cursor Bugbot on #1888.

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

* ci: update the temporary #1887 budget carry for the plain-cell fix

Reverted with fdb2de9 before merge; the raise lands through #1887.

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

* test(octane): a same-component Action cue now commits before its transition's capture

#1872 pinned the old same-root order, where the Action cue and the explicit
transition state in one component rendered together in the microtask flush and
shared its native capture. The cue now renders apart from that state, as in the
separate-root case: it commits without a capture, and the state is captured when
its task renders it.

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

* ci: drop the temporary #1887 budget carry

The bundle-size gates now run in their own job (#1889), so the runtime shards
no longer need the raised budgets to run. The raise lands through #1887.

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

---------

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

# Conflicts:
#	benchmarks/bundle-size/app-budgets.json
#	benchmarks/bundle-size/jsx-budgets.json
#	benchmarks/bundle-size/minimal-budgets.json
@domgan-oai domgan-oai changed the title ci(bundle-size): raise budgets for the split transition cue (#1864) ci(bundle-size): budget combined transition cues and native producers Oct 8, 2026
trueadm added a commit that referenced this pull request Oct 8, 2026
The merge took main's budget files. Each raw and gzip row that main
(abe9b42) fits drops by exactly what this change saves against main,
measured per scenario on both trees. Brotli rows keep main's values unless the
ratchet asks for less. That gives 24 lowers and no raises.

Main measures over 35 rows after #1875 and #1888, and #1887 budgets that
growth. Those rows keep main's values here. Merging #1887 will re-lower the
ones this change also saves on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ts-transition-cue

# Conflicts:
#	benchmarks/bundle-size/app-budgets.json
#	benchmarks/bundle-size/minimal-budgets.json

@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 prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Weather Brotli ceiling not raised
    • Raised weather total brotli ceiling from 44466 to 44723 (measured 44467 + 256 brotli headroom) to match the ratchet rule applied to the other 35 ceilings in this PR.

Create PR

Or push these changes by commenting:

@cursor push 74bc8968e3
Preview (74bc8968e3)
diff --git a/benchmarks/bundle-size/app-budgets.json b/benchmarks/bundle-size/app-budgets.json
--- a/benchmarks/bundle-size/app-budgets.json
+++ b/benchmarks/bundle-size/app-budgets.json
@@ -64,7 +64,7 @@
     "total": {
       "raw": 156895,
       "gzip": 50941,
-      "brotli": 44466
+      "brotli": 44723
     }
   },
   "bindings": {

You can send follow-ups to the cloud agent here.

Reviewed by Cursor Bugbot for commit 9f0e659. Configure here.

"raw": 339858,
"gzip": 109005,
"brotli": 94788
"raw": 341255,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Weather Brotli ceiling not raised

Medium Severity

The integrated weather total brotli measurement is 44467, but the committed ceiling stays at 44466. That is the one documented breach this update does not cover, so the application budget gate fails on the pinned artifact.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 9f0e659. Configure here.

trueadm added a commit that referenced this pull request Oct 8, 2026
The merge took main's budget files (6eef1e0). Each raw and gzip row that
main fits drops by exactly what this change saves against main, measured per
scenario on both trees. Brotli rows keep main's values unless the ratchet asks
for less. That gives 37 lowers and no raises. The rows #1893 raised for #1892
keep #1892's growth. The 30 rows main exceeds until #1887 lands keep main's
values.

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

#1888 (the split transition cue) merged ahead of its budget-only raise #1887,
so main's transition-using rows exceed their ceilings. #1893 has since raised
budgets for #1892, which is still open, but measured without #1888's growth.

Raise only the 30 rows still over their ceilings on main 1e74902, to
measured + 32 raw/gzip (+ 256 brotli) from run-minimal.mjs and run.mjs
--write-budgets, and keep every other value, including #1893's pending raises:
- suspense-transition, Base UI, Radix and Apollo bindings, bindings app:
  about +1.12 to +1.15 kB raw, +0.30 to +0.37 kB gzip
- hydrate-frame +63 raw / +37 gzip; root-static brotli +279

The 62 rows #1893 raised stay above their ratchet floor until #1892 lands.
This supersedes #1887.

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

* perf(octane): copy a keyed reorder's record directly until it relinks a row

A keyed reorder records its list at the first row index it rewrites, before it
knows whether it will relink a few rows or every row. Since #1833 that record
allocated its `links` Map and a per-journal records Map up front. When the
reorder then reached the LIS path, `fullForSlotRecord` walked the chain through
the empty links Map and, for a key Map already out of chain order, built a Set
of every row to filter it.

The record now gets its links Map at its first relink (`forSlotLinks`). Until
then only index writes have run, which change neither the chain nor the key
Map, so converting it copies the list as it stands, which is the full form's
cost before #1833. The record rides in the spare slot of its own undo entry,
found again through the window's `seen` index, so `SLOT_RECORDS` is gone and the
record still lives exactly as long as its log.

- recursive-context zero-context reorder: 4 Map constructions -> 2, so
  context-cache-work.mjs passes its ceiling again (bisected to e595a13).
- js-framework reorder matrix (octane-tsrx, paired, 12 samples): rotatef,
  rotateb and displace3-8 are 22-27% faster than main and within 5% of the
  runtime before #1833; removals and inserts keep #1833's gains.
- Framework bundles are 129-137 raw bytes smaller; budgets lowered.

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

* perf(octane): look a keyed list's record up only when its window has an entry

The PR bench counted two more production calls on every js-framework
operation: journalForSlot and journalForOwnedListClear called the record
lookup, and fullForSlotRecord with no record, even for a list's first record in
a render, where there is no entry to find. Skip both when the list has no
entry. Every js-framework calls_* and dom_* counter now equals main's
(pair.mjs --work-only).

Lower the bindings app and total brotli budgets the ratchet now asks for.

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

* perf(octane): read a keyed list's record from its undo entry inline

Inline the record lookup in journalForSlot and journalForOwnedListClear. With
the helper, the bindings app's framework chunk compressed 21 gzip bytes larger
than main's, past its budget, although raw was 104 bytes smaller. Inline, it is
5 gzip bytes larger and 10 under the budget. Production calls are unchanged:
every js-framework calls_* and dom_* counter equals main's (pair.mjs
--work-only against c0192ec).

Re-measure the bundle budgets on current main. The merges took main's budget
files, and this writes 40 lowers and no raises.

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

* ci(bench): lower the budgets by this change's measured saving over #1891

The merge took main's budget files. #1891 raised 70 rows ahead of #1875,
which is still open. Each raw and gzip row now drops by exactly what this change
saves against main (2f81266), measured per scenario on both trees. A row
#1891 raised therefore keeps #1875's headroom. Brotli rows keep main's values,
and no value is raised.

Every head measurement fits its budget. The ratchet flags only the 70 rows
#1891 raised for #1875, as it does for any PR until #1875 lands.

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

* ci(bench): re-lower the budgets this change saves on after #1875 landed

The merge took main's budget files. Each raw and gzip row that main
(abe9b42) fits drops by exactly what this change saves against main,
measured per scenario on both trees. Brotli rows keep main's values unless the
ratchet asks for less. That gives 24 lowers and no raises.

Main measures over 35 rows after #1875 and #1888, and #1887 budgets that
growth. Those rows keep main's values here. Merging #1887 will re-lower the
ones this change also saves on.

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

* ci(bench): re-lower the budgets this change saves on over #1893

The merge took main's budget files (6eef1e0). Each raw and gzip row that
main fits drops by exactly what this change saves against main, measured per
scenario on both trees. Brotli rows keep main's values unless the ratchet asks
for less. That gives 37 lowers and no raises. The rows #1893 raised for #1892
keep #1892's growth. The 30 rows main exceeds until #1887 lands keep main's
values.

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

* ci(bench): re-lower the budgets this change saves on over 87d9f95

The merge took main's budget files. Main now fits every row. Each raw and gzip
row drops by exactly what this change saves against main, measured per scenario
on both trees. Brotli rows keep main's values unless the ratchet asks for less.
That gives 63 lowers and no raises. The rows #1893 raised for #1892 keep
#1892's growth.

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

* ci(bench): lower the budgets by this change's saving over main's ratchet

The merge took main's budget files. e14fbdf set every budget to main's
measured bytes plus headroom. Each raw and gzip row drops by exactly what this
change saves against main, measured per scenario on both trees. Brotli rows
keep main's values unless the ratchet asks for less. That gives 56 lowers and
no raises. Every ceiling and the ratchet hold locally, and so do the
budget-raise and hydration-free checks.

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

* ci(bench): lower the budgets by this change's saving after #1892

The merge took main's budget files (68aa481), which match main's measured
bytes. Each raw and gzip row drops by exactly what this change saves against
main, measured per scenario on both trees. Brotli rows keep main's values
unless the ratchet asks for less. That gives 54 lowers and no raises.

Locally, binding-mantine-hooks-esbuild brotli is 7 bytes over main's value,
27,265 against 27,258. Its raw and gzip bytes equal main's: esbuild assigns
different minified names in that bundle, and brotli compresses them
differently.

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

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: domgan-oai <[email protected]>
@trueadm trueadm closed this Oct 8, 2026
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