Skip to content

ci(bundle-size): raise hydrate-frame budgets for unchanged adoption reads - #1863

Merged
trueadm merged 2 commits into
mainfrom
ci/adoption-release-unchanged-reads-budget
Oct 7, 2026
Merged

trueadm merged 2 commits into
mainfrom
ci/adoption-release-unchanged-reads-budget

Conversation

@trueadm

@trueadm trueadm commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This is a budget-only raise for #1862. That change lets hydration skip rendering a native signal reader a second time when its live value equals the adopted server value. Per CONTRIBUTING.md ("Size budgets"), the raise lands on its own. It changes only benchmarks/bundle-size/minimal-budgets.json.

budget old new delta
minimal-budgets.json: hydrate-frame.raw 364,918 366,064 +1,146
minimal-budgets.json: hydrate-frame.gzip 112,855 113,343 +488
minimal-budgets.json: hydrate-frame.brotli 96,725 97,053 +328

Each new value is what CI's benchmark report measured for #1862's head, plus the standard headroom (+32 raw and gzip, +256 brotli). That head is 366,032 raw, 113,311 gzip and 96,797 brotli, against main 21f911d at 364,886, 112,823 and 96,548. Local run-minimal.mjs measured the same bytes.

The values are computed against main 96c4096, which ratcheted #1858's raises back down until #1857 lands. #1857 re-lands its own raise in a budget-only change, which will stack on this one.

hydrate-frame is the only minimal scenario that hydrates with native signal reads. It is the only budget that moves: every other minimal scenario, and every app and JSX budget (run.mjs octane-tsrx octane-jsx), measures byte-identical raw. A few esbuild binding rows differ only in brotli noise.

Where the bytes go:

  • Bundles that adopt native reads only (registered from ownNativeAdoption): about 620 raw for the consumer-side move (rebaseNativeRead).
  • Signal bundles:
    • The per-channel subscriber sets and offer loop in AdoptionFrameImpl.release.
    • The live comparison unchangedLiveRead.
    • The flag that gives targeted binding reads their own channel.

Why the growth is worth it

Measured on app-frame-hydration (from #1857) with 20 interleaved pairs against origin/main at 4× CPU throttle:

scenario renders cold, head/base [95% CI] warm, head/base [95% CI]
frame-live-sections 3,078 → 1,653 (= Blocks) 0.886 [0.872–0.913] 0.873 [0.854–0.884]
frame 1,703 → 1,653 (= Blocks) 0.972 [0.943–0.995] 0.957 [0.940–1.012]

Section-level reads no longer render their whole section twice after every hydration commit. That saves about 11 ms cold and 6 ms warm per hydration, and about 680 KB of allocation.

Validation

  • node benchmarks/bundle-size/budget-raises.mjs --base origin/main reports 3 raises in a budget-only change.
  • pnpm format:check (JSON only; formatting unchanged)
  • pnpm typecheck (no source change)
  • pnpm test (left to CI)

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 CI threshold updates with no runtime or source changes; merge-order coordination with #1862 is the main operational note.

Overview
Raises only the hydrate-frame minimal bundle-size budgets in minimal-budgets.json so CI can absorb the byte growth from the upcoming hydration optimization (skip re-rendering native signal readers when the live value matches the adopted server value).

hydrate-frame: raw +1,146 (366,064), gzip +488 (113,343), brotli +328 (97,053 per diff - wait let me check diff again).

Diff says:

  • raw: 364918 -> 366064 (delta +1146)
  • gzip: 112855 -> 113343 (delta +488)
  • brotli: 96725 -> 97053 (delta +328)

Context file shows 97053 for brotli - good.

No other minimal, app, or JSX budgets change. Intended to merge before the feature PR so the ratchet passes during the budget-first window.

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

…eads

Budget-only raise for #1862. That change lets hydration skip
rendering a native signal reader again when its live value is unchanged.
hydrate-frame, the only minimal scenario that hydrates with native signal reads,
grows by +1,146 raw, +488 gzip and +249 brotli. Each value is the current budget
plus that delta, so the raise from #1858 for #1857 is kept.

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 7, 2026
@trueadm
trueadm marked this pull request as ready for review October 7, 2026 20:39
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Benchmark report

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

Compares 21f911d51, the merge commit's first parent with aa8e17d5d 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 select_lots 1.664 1.591 −6.5% −7.5% … −3.1% 🟢 faster
All 20 timed operations (19 without a verdict)
target operation base ms head ms head/base 95% CI
octane-tsrx run 5.217 5.067 ±0.0% −4.6% … +4.3% ⚪ within noise
octane-tsrx replace 13.183 13.217 +2.2% −0.8% … +5.0% ⚪ within noise
octane-tsrx add 4.258 4.317 +2.1% −2.2% … +4.7% ⚪ within noise
octane-tsrx update 0.187 0.193 −0.0% −2.4% … +1.8% ⚪ within noise
octane-tsrx select 0.010 0.010 +0.0% −1.6% … +2.3% ⚪ within noise
octane-tsrx swap 0.038 0.042 −0.7% −4.3% … +4.5% ⚪ within noise
octane-tsrx remove 0.027 0.026 +2.6% −6.9% … +6.4% ⚪ within noise
octane-tsrx runlots 35.883 36.117 +6.2% −2.1% … +17.3% ⚪ within noise
octane-tsrx select_lots 0.008 0.008 +2.9% −5.0% … +7.2% ⚪ within noise
octane-tsrx clear 81.442 82.283 +1.3% −10.9% … +7.1% ⚪ within noise
octane-jsx run 5.517 4.933 ±0.0% −20.9% … +3.1% ⚪ within noise
octane-jsx replace 14.950 14.533 −2.0% −10.5% … +6.2% ⚪ within noise
octane-jsx add 4.750 4.292 −5.1% −18.0% … +2.4% ⚪ within noise
octane-jsx update 0.657 0.599 +1.4% −12.1% … +6.6% ⚪ within noise
octane-jsx select 0.207 0.200 −2.0% −5.8% … +1.3% ⚪ within noise
octane-jsx swap 0.328 0.310 −6.4% −13.4% … +9.5% ⚪ within noise
octane-jsx remove 0.238 0.225 −4.1% −9.7% … +1.4% ⚪ within noise
octane-jsx runlots 40.442 40.025 +4.8% −5.3% … +13.6% ⚪ within noise
octane-jsx select_lots 1.664 1.591 −6.5% −7.5% … −3.1% 🟢 faster
octane-jsx clear 58.908 60.417 −2.1% −6.8% … +5.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.

…e raise

Main 96c4096 lowered hydrate-frame back to 364,918 / 112,855 / 96,725.
Recompute the raise from what CI measured for #1862's head (366,032 /
113,311 / 96,797) plus the standard headroom: 366,064 raw, 113,343 gzip
and 97,053 brotli.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@trueadm
trueadm merged commit 0867ce6 into main Oct 7, 2026
9 of 25 checks passed
@trueadm
trueadm deleted the ci/adoption-release-unchanged-reads-budget branch October 7, 2026 21:01
trueadm added a commit that referenced this pull request Oct 7, 2026
Conflicts: the 87 react-parity manifests and the user-apps-v1 manifest
record the lockfile hash, which #1860 (react-alien-signals port) changed.
pnpm sync regenerated them. The merged lockfile needs no change from
`pnpm install --lockfile-only` and still holds no TypeScript 7.0.2.

Also takes #1862 and its hydrate-frame budget raise (#1863). This branch
changes no bundled code, so its budgets stay main's.

Co-Authored-By: Claude Opus 5.5 <[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.

1 participant