Skip to content

ci(bench): re-baseline the Lynx inventory budgets on main - #1717

Merged
trueadm merged 1 commit into
mainfrom
ci/lynx-inventory-budgets
Oct 4, 2026
Merged

trueadm merged 1 commit into
mainfrom
ci/lynx-inventory-budgets

Conversation

@trueadm

@trueadm trueadm commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This is a stale-budget reset with attribution. It changes no code.

The weekly lynx-bundle-size suite fails in inventory.mjs:

Error: web raw 519371 exceeds frozen budget 501574.

gateBudget throws at the first breach, which hides the rest. 22 of the 32 gates are over. #765 froze inventory-budgets.json at the issue #57 candidate on 2026-08-17. Only the weekly bench runs the inventory, so nothing that merged since then met a gate. bench.mjs merges each run's exit code into harnessExit, so this failure alone fails the whole suite.

Every budget is now measured + 32 bytes on main c60eef1342, which already includes #1710. That is the repository's size-budget ratchet. The diff changes only budget values and prose:

  • inventory-budgets.json: all 32 values, plus a controlledLedger entry for the mainline drift. It follows the existing mainline through dcf94cfc8 entry.
  • README.md: states the measured + 32 rule, the calibrate switch, and that owner slices are proportional.
  • results/production-inventory.md: a re-baseline section with the measured artifacts, the per-PR attribution, and the owner-slice table. The More website #57 record stays below it.

Artifact and section budgets

gate old budget measured new budget
Web raw / gzip 501,574 / 137,369 519,371 / 144,186 519,403 / 144,218
Lynx raw / gzip 488,917 / 165,395 506,699 / 173,112 506,731 / 173,144
Lynx main raw / gzip 215,695 / 60,980 220,586 / 62,766 220,618 / 62,798
Lynx background raw / gzip 281,753 / 76,045 294,633 / 81,154 294,665 / 81,186

Where the bytes went

Rebuilding #765 (21f4dfb244) reproduces its frozen raw budgets byte for byte. I built the inventory at the ends of the 594 first-parent main commits since #765 that touch reachable paths: packages/lynx/src, packages/octane/src, packages/rspeedy-plugin-octane, the fixture, and the lockfile. I then bisected every interval whose Web, Lynx, main, or background raw total moved by more than 200 B down to a single commit, which took 68 builds. Each row below is that commit's exact production delta against its first parent, and the rows sum to the totals.

pull request Web raw Lynx raw main raw background raw Web gzip Lynx gzip
#1044 bring native hover allocations close to Solid +9,013 +9,003 0 +9,003 +2,218 +2,241
#885 serialize cross-thread transport payloads (transport-codec.ts) +6,113 +6,160 +2,819 +3,294 +2,226 +2,622
#886 make Lynx startup measurable on Native (rewrites the fixture) +2,826 +2,871 +1,404 +1,400 +1,069 +1,264
#1076 reduce repeated hook bookkeeping (hook-slot-cache.ts) +1,550 +1,572 0 +1,572 +543 +615
#1138 remove legacy Context.Provider support (context-identity.ts) +935 +862 +451 +463 +352 +325
#1086 reduce universal renderer materialization work +778 +819 0 +819 +528 +471
#816 improve Activity parity and batch hidden updates +815 +815 0 +815 +216 +224
#1665 update retained meshes faster than R3F +446 +448 0 +448 +105 +97
#1299 keep live suspense replays across scheduled renders +326 +326 0 +326 +90 +77
#1011 index cross-owner universal draft lookups +230 +230 0 +230 +76 +72
#1652 ship host bindings only to renderers that use them −6,689 −6,673 0 −6,673 −1,029 −965
584 other commits, net within 200 B per interval +1,454 +1,349 +217 +1,183 +423 +676
total, #765 → main +17,797 +17,782 +4,891 +12,880 +6,817 +7,719

All of these merged as performance or correctness work with their own justification. Nothing here is a new size tax.

Owner slices (largest deltas)

An owner slice is artifact raw × the owner's share of reachable transformed module bytes. Those module bytes still contain comments and code that minification later removes. A slice therefore also moves when another owner's share moves.

owner Web old → new Lynx old → new source
compiler-output-app 142,009 → 150,952 138,426 → 147,269 This is Rspack's concatenated background root, so it carries the runtime concatenated into it. Reachable +95,645, mostly #1044 (+24,452), #885 (+18,342), #1076, #1086, #886, #816, and #1665.
universal-runtime 78,640 → 84,862 76,655 → 82,792 universal-core.ts +58,111 reachable: #1044 +24,452, #1086 +4,062, #816 +2,505, #1665 +2,169, #1299 +1,216, #1138, and #1011. About 26 KB more comes from commits whose final delta stayed under 200 B.
protocol-transport 35,153 → 39,059 34,265 → 38,107 #885 adds transport-codec.ts (32,216 reachable). #909 adds +616.
octane-runtime-other 978 → 4,296 954 → 4,192 These are helpers the universal core now imports: hook-slot-cache (#1076), context-identity (#1138, #1266), method-dep (#1339), sub-slot (#818), runtime-tags (#1169), context-epoch (#1091), and shared-value-helpers (#1435). Most of this code moved out of universal-core.ts.
fixture-app 11,188 → 12,579 10,905 → 12,273 #886 rewrote the fixture.

The other seven owners are lowered to measured + 32. Each one's slice shrank as the shares above grew, and their reachable bytes are flat or nearly flat. The full table is in results/production-inventory.md.

Validation

  • node benchmarks/lynx-bundle-size/inventory.mjs: every gate passes (exit 0) on this branch (macOS, Node 24.18.0).
  • pnpm format:files:check benchmarks/lynx-bundle-size/
  • pnpm sync: no generated changes.
  • node benchmarks/bench.mjs lynx-bundle-size end to end: the inventory passes, but the run still exits 1 in run.mjs, the part this PR does not touch. See Risk.
  • pnpm format:check, pnpm typecheck, and pnpm test were not run locally. This change edits one JSON budget file and Markdown only.

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
Documentation and frozen benchmark budget JSON only; no application or inventory gate logic changes, though future merges can again outgrow caps until the next budget PR.

Overview
Re-baselines the weekly lynx-bundle-size inventory gates so they match current production bundle sizes on main, without changing runtime or build code.

inventory-budgets.json raises all 32 artifact, Lynx main/background section, and owner-slice raw/gzip caps to measured bytes + 32 (same ratchet as the repo size-budget policy). A new controlledLedger row records drift since #765’s frozen #57 candidate caps (~+18 KB raw Web/Lynx), distinct from pending controlled size taxes.

README.md documents that ratchet, that only the weekly bench enforces these gates, how to recalibrate via OCTANE_INVENTORY_CALIBRATE / OCTANE_INVENTORY_OUTPUT, and that owner slices shift proportionally when other owners grow.

results/production-inventory.md adds a 2026-10-04 re-baseline section with measured artifact hashes/sizes, a bisected per-PR byte attribution table (#765 → main), and updated owner-slice budgets; the older issue #57 record remains below for history.

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

The weekly lynx-bundle-size suite fails in inventory.mjs: Web raw is
519,371 against the 501,574 frozen by #765 for the issue #57 candidate,
and 22 of the 32 artifact, section, and owner gates are over. Only the
weekly bench runs the inventory, so the growth merged since #765 never
met a pull request gate.

Every budget is now the bytes measured on main c60eef1 plus 32, the
repository's size-budget ratchet. The checked report attributes the
+17,797 Web / +17,782 Lynx raw to the pull requests that spent it,
bisected over the 594 relevant main commits since #765. A new ledger
entry records the mainline drift. Budget values and prose only.

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 4, 2026
@trueadm
trueadm marked this pull request as ready for review October 4, 2026 16:37
@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 c60eef134, the merge commit's first parent with 781d57850 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 3.150 3.125 +2.9% −3.1% … +4.4% ⚪ within noise
octane-tsrx replace 5.933 6.225 +2.5% +1.5% … +9.2% ⚪ within noise
octane-tsrx add 2.642 2.675 ±0.0% ±0.0% … +1.8% ⚪ within noise
octane-tsrx update 0.128 0.127 ±0.0% −1.6% … +0.3% ⚪ within noise
octane-tsrx select 0.006 0.006 −1.1% −1.1% … −0.5% ⚪ within noise
octane-tsrx swap 0.037 0.036 +0.3% −0.6% … +1.2% ⚪ within noise
octane-tsrx remove 0.020 0.020 −0.7% −4.2% … +2.3% ⚪ within noise
octane-tsrx runlots 27.233 27.750 −1.8% −6.1% … +1.1% ⚪ within noise
octane-tsrx select_lots 0.006 0.006 −0.5% −1.1% … +0.0% ⚪ within noise
octane-tsrx clear 47.342 48.217 +4.4% +0.6% … +6.0% ⚪ within noise
octane-jsx run 3.658 3.742 +2.6% ±0.0% … +2.7% ⚪ within noise
octane-jsx replace 6.608 6.767 ±0.0% −3.0% … +2.9% ⚪ within noise
octane-jsx add 3.533 3.542 +0.0% ±0.0% … +2.9% ⚪ within noise
octane-jsx update 0.267 0.271 +0.0% −1.7% … +0.7% ⚪ within noise
octane-jsx select 0.141 0.140 +0.6% −1.1% … +1.7% ⚪ within noise
octane-jsx swap 0.249 0.252 −0.3% −2.0% … +1.4% ⚪ within noise
octane-jsx remove 0.204 0.194 −0.6% −2.4% … +0.3% ⚪ within noise
octane-jsx runlots 31.808 30.983 +2.5% −0.8% … +3.7% ⚪ within noise
octane-jsx select_lots 1.614 1.611 +1.8% +0.3% … +2.6% ⚪ within noise
octane-jsx clear 53.067 52.042 +0.1% −2.3% … +1.6% ⚪ within noise

All 64 work counters are unchanged.

Application bundle size (bytes)

target metric base head Δ
octane-tsrx bindings_js_gzip 240,871 240,859 −12 (−0.0%) 🟢
octane-tsrx bindings_js_brotli 205,103 205,092 −11 (−0.0%) 🟢
octane-tsrx bindings_app_gzip 121,728 121,716 −12 (−0.0%) 🟢
octane-tsrx bindings_app_brotli 101,740 101,729 −11 (−0.0%) 🟢

50 other measured values are unchanged.

Public-import reachability bundles (bytes)

No changes across 105 measured values.

@trueadm
trueadm merged commit 78ec832 into main Oct 4, 2026
52 of 53 checks passed
@trueadm
trueadm deleted the ci/lynx-inventory-budgets branch October 4, 2026 17:11
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