Skip to content

ci: budget native producer pacing separately - #1891

Merged
trueadm merged 3 commits into
octanejs:mainfrom
openai-oss-forks:codex/native-producer-pacing-budgets
Oct 8, 2026
Merged

trueadm merged 3 commits into
octanejs:mainfrom
openai-oss-forks:codex/native-producer-pacing-budgets

Conversation

@domgan-oai

@domgan-oai domgan-oai commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Budget the measured production cost of native producer pacing in #1875, also inherited by #1877. This PR changes only bundle budget files; the implementation remains in its own PR.

Why

Ready query and derived streams can render each buffered value in the same microtask checkpoint. #1875 coalesces native component renders using the existing task queue and shares an approximately 5 ms admission budget across producers. Every source value, graph effect, and direct binding remains observable.

The optional hydration-frame consumer retains that producer machinery and grows by 1,265 raw / 503 gzip / 409 Brotli bytes against main. The SPA starter grows by 45 raw / 53 gzip / 35 Brotli bytes; the Base UI Vite consumer grows by 42 raw / 44 gzip bytes. The implementation already reuses the landed scheduler and keeps transition-root/offscreen capabilities out of native-only consumers. A further shared-driver factory was measured and discarded because it increased bytes.

Changes

Raise only the 70 measured values that exceed existing ceilings (37 raw, 32 gzip, 1 Brotli). Each new limit is the implementation measurement plus the repository's existing 32-byte raw/gzip or 256-byte Brotli allowance. No unrelated scenario receives more headroom. The proposal also includes main a447b6db6's one-byte Base UI gzip ratchet; that commit changes no measured source, and the proposed ceilings are unchanged from the combined-head measurements.

Authoritative CI report: implementation head d47ff41d99227771c2c649e69c7a79045d3a154a, compared with main c0192ec81693463850228357e0b23caf71656f5e. All 64 js-framework work counters are unchanged. The focused producer probe preserves every value while reducing a 100-value ready query/derived workload from 101 component commits to 1; CPU-heavy concurrent work trades some extra commits for host-task opportunities. These are task-order measurements, not browser latency claims.

Every changed ceiling (bytes)
File Scenario Metric Current cap Measured Proposed cap
minimal-budgets.json cli-spa-starter raw 102165 102203 102235
minimal-budgets.json cli-spa-starter gzip 33978 34009 34041
minimal-budgets.json root-static-specialized raw 72680 72714 72746
minimal-budgets.json root-static-specialized gzip 23822 23835 23867
minimal-budgets.json root-chained-jsx raw 74558 74592 74624
minimal-budgets.json root-chained-jsx gzip 24325 24338 24370
minimal-budgets.json root-static raw 165531 165566 165598
minimal-budgets.json root-static gzip 52275 52281 52313
minimal-budgets.json root-static-local raw 72679 72713 72745
minimal-budgets.json root-static-local gzip 23804 23817 23849
minimal-budgets.json root-callback-local raw 74584 74618 74650
minimal-budgets.json root-callback-local gzip 24337 24345 24377
minimal-budgets.json hooks-state raw 84401 84435 84467
minimal-budgets.json hooks-state gzip 27786 27790 27822
minimal-budgets.json prop-attributes raw 84655 84689 84721
minimal-budgets.json prop-attributes gzip 27790 27795 27827
minimal-budgets.json context raw 96608 96642 96674
minimal-budgets.json context gzip 31494 31498 31530
minimal-budgets.json hydrate-root raw 138055 138089 138121
minimal-budgets.json deferred-hydration raw 221351 221386 221418
minimal-budgets.json deferred-hydration gzip 69686 69721 69753
minimal-budgets.json hydrate-frame raw 364506 365764 365796
minimal-budgets.json hydrate-frame gzip 112952 113437 113469
minimal-budgets.json hydrate-frame brotli 96616 96998 97254
minimal-budgets.json suspense-transition raw 140150 140190 140222
minimal-budgets.json suspense-transition gzip 44358 44369 44401
minimal-budgets.json component-owned-effects raw 77044 77077 77109
minimal-budgets.json component-owned-effects gzip 25163 25174 25206
minimal-budgets.json binding-hooks raw 82900 82935 82967
minimal-budgets.json binding-hooks gzip 27427 27439 27471
minimal-budgets.json binding-base-ui-vite raw 198341 198382 198414
minimal-budgets.json binding-base-ui-vite gzip 62383 62395 62427
minimal-budgets.json binding-base-ui-esbuild raw 213852 213899 213931
minimal-budgets.json binding-base-ui-esbuild gzip 69318 69338 69370
minimal-budgets.json binding-radix-vite raw 200371 200416 200448
minimal-budgets.json binding-radix-vite gzip 62992 63011 63043
minimal-budgets.json binding-radix-esbuild raw 215676 215723 215755
minimal-budgets.json binding-mantine-hooks-vite raw 86458 86492 86524
minimal-budgets.json binding-mantine-hooks-esbuild raw 90827 90865 90897
minimal-budgets.json binding-mantine-hooks-esbuild gzip 30509 30524 30556
minimal-budgets.json binding-apollo-client-vite raw 340784 340827 340859
minimal-budgets.json binding-apollo-client-vite gzip 104707 104709 104741
minimal-budgets.json binding-apollo-client-esbuild raw 363991 364038 364070
minimal-budgets.json binding-apollo-client-esbuild gzip 115690 115696 115728
minimal-budgets.json binding-usehooks-ts-vite raw 87224 87262 87294
minimal-budgets.json binding-usehooks-ts-vite gzip 28609 28628 28660
minimal-budgets.json binding-usehooks-ts-esbuild raw 91593 91631 91663
minimal-budgets.json binding-usehooks-ts-esbuild gzip 30750 30763 30795
app-budgets.json rows/framework raw 106170 106207 106239
app-budgets.json rows/framework gzip 34553 34559 34591
app-budgets.json rows/total raw 113116 113153 113185
app-budgets.json rows/total gzip 36888 36894 36926
app-budgets.json todo/framework raw 116906 116942 116974
app-budgets.json todo/framework gzip 37455 37469 37501
app-budgets.json todo/total raw 121524 121560 121592
app-budgets.json todo/total gzip 39675 39689 39721
app-budgets.json chat/framework raw 114508 114544 114576
app-budgets.json chat/total raw 120273 120309 120341
app-budgets.json weather/framework raw 134674 134709 134741
app-budgets.json weather/framework gzip 43022 43037 43069
app-budgets.json weather/total raw 156828 156863 156895
app-budgets.json weather/total gzip 50895 50909 50941
app-budgets.json bindings/framework raw 339780 339826 339858
app-budgets.json bindings/framework gzip 108932 108973 109005
app-budgets.json bindings/total raw 687418 687464 687496
app-budgets.json bindings/total gzip 224599 224639 224671
jsx-budgets.json rows/framework raw 179450 179485 179517
jsx-budgets.json rows/framework gzip 56681 56692 56724
jsx-budgets.json rows/total raw 187715 187750 187782
jsx-budgets.json rows/total gzip 59537 59550 59582

Validation

  • Values derived from the current implementation's CI artifacts, with each changed ceiling checked against its exact measured value and existing headroom policy.
  • node benchmarks/bundle-size/budget-raises.mjs --base a447b6db6d166f9467ece080d86aec53238092ae: budget-only change accepted.
  • git diff --check; only the three budget JSON files change.
  • perf-review: not applicable to this budget-only diff; implementation evidence is in fix: coalesce and pace ready signal producers #1875 and the linked CI report.
  • Current-head CI must verify this recalculated proposal at 417b95483. Local pnpm sync was attempted but the pinned typescript-native package is unavailable.

Risk / follow-ups

This explicitly accepts the measured byte cost. The runtime changes do not land with this PR. After this separate budget decision lands, #1875/#1877 must incorporate it and pass their own current-head CI. Budget ratchets and absolute ceiling enforcement remain unchanged.

Provenance

  • An agent produced this diff (agent-authored)

Codex task · host com-79386


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
Budget JSON-only changes with no production code; risk is accepting slightly larger allowed bundle sizes in CI.

Overview
Raises CI bundle-size ceilings in app-budgets.json, jsx-budgets.json, and minimal-budgets.json so upcoming native producer pacing work can land without failing size gates. Only limits that already exceed current caps are bumped; each new value is the measured build size plus the repo’s existing raw/gzip (+32 B) or Brotli (+256 B) headroom.

Framework/total budgets move up modestly across app scenarios (rows, todo, chat, weather, bindings) and the JSX rows benchmark. Minimal scenarios see the largest ratchet on hydrate-frame (notably Brotli); SPA starter, hydration, suspense, and several binding consumers get smaller raw/gzip increases. No runtime or benchmark harness code changes—this is a budget-only decision ahead of the implementation PRs.

Reviewed by Cursor Bugbot for commit 417b954. 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 Oct 8, 2026
@domgan-oai
domgan-oai marked this pull request as ready for review October 8, 2026 12:34
@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 a447b6db6, the merge commit's first parent with 4a6df8f22 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 2.525 2.517 −0.0% −3.8% … ±0.0% ⚪ within noise
octane-tsrx replace 5.783 5.825 ±0.0% −4.6% … +8.4% ⚪ within noise
octane-tsrx add 2.517 2.667 ±0.0% −7.5% … +3.9% ⚪ within noise
octane-tsrx update 0.125 0.124 −0.6% −4.5% … +3.3% ⚪ within noise
octane-tsrx select 0.005 0.005 −1.7% −3.8% … −0.6% ⚪ within noise
octane-tsrx swap 0.030 0.030 +1.7% +0.6% … +3.5% ⚪ within noise
octane-tsrx remove 0.014 0.014 −2.1% −3.8% … +1.0% ⚪ within noise
octane-tsrx runlots 25.500 25.425 −2.3% −4.8% … +1.5% ⚪ within noise
octane-tsrx select_lots 0.007 0.007 −0.0% −2.7% … +2.5% ⚪ within noise
octane-tsrx clear 55.233 59.300 −1.5% −3.0% … +4.5% ⚪ within noise
octane-jsx run 3.592 3.367 −1.1% −2.9% … ±0.0% ⚪ within noise
octane-jsx replace 6.692 6.750 +0.7% −5.4% … +2.3% ⚪ within noise
octane-jsx add 3.133 3.083 +2.7% −0.0% … +3.3% ⚪ within noise
octane-jsx update 0.265 0.268 +0.4% −2.0% … +2.9% ⚪ within noise
octane-jsx select 0.141 0.136 +0.3% −1.3% … +1.6% ⚪ within noise
octane-jsx swap 0.239 0.238 +0.6% −1.2% … +1.8% ⚪ within noise
octane-jsx remove 0.187 0.186 +0.3% −1.6% … +1.2% ⚪ within noise
octane-jsx runlots 30.292 30.583 +0.2% −3.4% … +2.7% ⚪ within noise
octane-jsx select_lots 1.657 1.656 −1.1% −2.9% … +4.3% ⚪ within noise
octane-jsx clear 54.333 56.075 +1.2% −0.4% … +3.6% ⚪ 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.

…er-pacing-budgets

# Conflicts:
#	benchmarks/bundle-size/jsx-budgets.json
#	benchmarks/bundle-size/minimal-budgets.json
…er-pacing-budgets

# Conflicts:
#	benchmarks/bundle-size/minimal-budgets.json
@trueadm
trueadm merged commit 2f81266 into octanejs:main Oct 8, 2026
30 checks passed
trueadm added a commit that referenced this pull request Oct 8, 2026


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