Skip to content

ci(bench): triage the weekly ratio-guard breaches so new ones show - #1641

Merged
trueadm merged 6 commits into
mainfrom
ci/weekly-ratio-triage
Oct 3, 2026
Merged

trueadm merged 6 commits into
mainfrom
ci/weekly-ratio-triage

Conversation

@trueadm

@trueadm trueadm commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Triages every failure in the weekly Bench job (node benchmarks/bench.mjs --quick --ratios) into a fix or a rebaseline, so the job can go green and a new breach shows up. This addresses review findings A4 and H6.

Fresh run on main (37082371718, 2026-10-03): 81 ratio breaches, 4 suites that wrote no numbers, 4 harness gate failures.

Category Count Resolution
Byte-budget guards (*-budget peers) 57 Cleared by the budget reset, #1638
Harness drift (suite died before reporting) 5 harnesses Fixed here; numbers flow again
Stale Lynx byte caps (2026-08-17) 1 gate Reset to measured + 32
Cross-framework byte ratios, workerd script ratio 6 Rebaselined with measured numbers
Real regressions with fix PRs open 3 guards No waiver: #1644 (ssr-final-replay try_closures), #1643 (root-transactions equal_reads), #1645 (codegen-size rebaseline to 1.30×)
lynx-render (transport gate + 2 create ratios) 2 guards + 1 suite No waiver: an owner fix traces both to #885's JSON-encoded transport (a harness encoding bug, plus mutable decoded runs skipping the dense host-batch path)
scoped-descriptor-shapes (suite throws) 1 suite Not waivable: a thrown suite failure always fails the job. An owner fix in progress re-pins the descriptor contract
Three: frame dispatch + 2 bundle ratios 3 guards No waiver: #1651 (frame_1k_subscribers was a bench artifact, now 0.81×) and #1652 (−5.2 KB gzip; ratchets to 1.034/1.024)
Other real regressions (consistent across two runs, or exact) 2 guards Dated waiver, expires 2026-10-24, each with an owner task
Noise-bound quick-mode timing 10 guards Dated waiver plus a harness-hardening task

Harness drift fixed

Each of these stopped producing numbers when runtime source it anchors on changed. That hid every guard in the suite.

  • ssr-final-replay. isStalledWave (fix(ssr): let prerender outlast a reader that rethrows a settled thenable #1409, 2026-09-29) added a second for (const { promise, key } of suspended) loop, so the exact-once anchor broke. Both loops are now counted, and suspended_visits stays at its 528 budget.
  • root-transactions/contracts. Since 2026-09-15 text and attribute journaling read (STAGED_DOM?.view(node) ?? node), so the audit's substitutions are re-anchored there.
  • signal-dom-bindings. A second native style Block allocation site (2026-09-23: a scalar style literal that later gets a structured value). Both sites are now counted; all three guards pass.
  • codegen-size. Since feat: add async signals and streaming SSR #1069 (2026-09-16) the bundled server runtime loads server/streamed-signals.js with import(). Rspack emits that as NNN.main.cjs, which the measured entry never evaluates.
  • recursive-context. The plain_context size check counted the /* @__PURE__ */ annotation on module-level createContext, plus the printer's trailing newlines, as output growth.

Rebaselined (numbers in each guard's note)

  • Rows, todo and chat total gzip versus Ripple, Solid and Svelte. Octane runtime growth from 2026-09-30 to 2026-10-02 moved them; the absolute app budgets now ratchet the bytes, so these ratios only track the gap. Example: rows/ripple 2.793× → ceiling 2.82.
  • workerd script gzip versus React: 39,593 / 65,268 = 0.607× → ceiling 0.62. The server-render reachability budget now ratchets the server runtime.
  • Lynx no-worklet caps.
    • Preview and IFR main gzip are reset to measured + 32: 83,688 and 89,362. They were 82,070 and 87,566, set 2026-08-17.
    • The background program is pinned exactly at 294,677 raw.
    • Linux CI and macOS differ by up to 2 B, so the larger value is the base.

Fixed or rebaselined in owner PRs (not waived here)

The revived harnesses exposed three regressions. Each now has an owner PR off main:

If this PR merges before those, the weekly job shows them until they land.

Waived until 2026-10-24 (each guard's waiver.reason has the numbers)

Real regressions, each with an owner task:

  • tsrx-hydrate-module-slicing compile_per_1000_boundaries: 23.9× and 19.6× against 1.5.
  • memo-wall parent_rerender_equal_A, svg-dashboard tooltip_swarm: consistent across two runs but near the timer floor.

Noise-bound in --quick (rme 40–635%, or flipping between runs), waived pending harness hardening:

  • js-framework-reorder rotateb (both sides under the 0.1 ms timer floor);
  • activity reports; ssr-workerd cold_spawn_to_first_byte;
  • spa-navigation nav_teardown / nav_mount;
  • memo-wall ctx_through_wall_B / mount / one_change_B;
  • svg-dashboard icon_swap / pan_zoom.

Mechanism

  • bench.mjs reads an optional waiver: { reason, expires } on a guard. A waived breach prints ! waived until … and does not fail; once the date passes, it fails again with its reason. The loader rejects a waiver without a reason or a valid date.
  • HARNESS_FAILURE_ALLOWLIST stays empty, and a suite that throws before writing numbers is never waivable: that would hide any crash and skip all of the suite's guards. scoped-descriptor-shapes, whose harness throws on the extra __octaneInvocationSite accessor added in feat: add async signals and streaming SSR #1069, stays red until its owner fix lands.
  • benchmarks/baselines/README.md says every breach is a fix or a rebaseline, and documents the waiver.

Validation

  • Ran on main 11a9da935a: codegen-size, ssr-final-replay, root-transactions contracts, signal-dom-bindings (--quick) and lynx-bundle-size. All write numbers, with no unwaived breach.
  • node benchmarks/bench.mjs --ratios codegen-size prints the breach plus ! waived until 2026-10-24 … and exits 0.
  • recursive-context plain_context: client and server each measure 190 ≤ 190 B. The rest of that suite (browser) runs in CI.
  • pnpm sync, pnpm format:files:check on changed files.
  • Weekly workflow on this branch: I'll dispatch gh workflow run bench.yml --ref ci/weekly-ratio-triage once ci(bench): re-set every byte budget to measured + 32 bytes #1638 is on main and merged in here. Before then, its budget guards still fail.

Risk / follow-ups

  • Waivers expire on 2026-10-24. Any guard whose fix hasn't landed makes the job red again; that is intended.
  • The owner tasks are separate sessions: three bisects, the descriptor shape, Lynx, hydrate slicing, Three, and timing-harness hardening.

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
Changes are limited to benchmark harnesses, ratio baselines, and CI exit policy; waivers are time-boxed so hidden regressions surface again after 2026-10-24.

Overview
Unblocks the weekly --quick --ratios Bench job by triaging 81 ratio breaches into harness fixes, rebaselined ceilings, dated waivers, or intentionally left failing until owner PRs land.

Runner: bench.mjs now honors optional per-guard waiver: { reason, expires }—waived breaches log ! waived until … and do not fail CI until the date passes; invalid waivers fail at load time. benchmarks/baselines/README.md documents fix-or-rebaseline policy. HARNESS_FAILURE_ALLOWLIST stays empty so suites that throw before emitting numbers remain non-waivable.

Harness drift (suites that stopped writing numbers): Re-anchors or broadens audits for ssr-final-replay (second suspended loop), root-transactions/contracts (STAGED_DOM?.view reads), signal-dom-bindings (second native style Block site), codegen-size (ignore Rspack NNN.main.cjs streamed-signals chunk), and recursive-context (plain_context byte check vs /* @__PURE__ */ / printer noise).

Guards: Rebaselines cross-framework gzip ratios, workerd script vs React, and stale Lynx byte caps; 12 guards get 2026-10-24 waivers for confirmed regressions or --quick timing noise. Remaining breaches (e.g. try_closures, equal_reads, codegen-size ratio, lynx-render, three.js frame/bundle, scoped-descriptor-shapes harness throw) stay red for separate fix PRs.

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

The weekly Bench job (`bench.mjs --quick --ratios`) was red with 81 ratio
breaches, 4 suites that wrote no numbers and 4 harness gate failures, so a new
breach was invisible. Every item is now a fix or a rebaseline.

- Harness drift, fixed. Each harness had stopped producing numbers when runtime
  source it anchors on changed:
  - ssr-final-replay: a second suspended loop since 2026-09-29.
  - root-transactions/contracts: staged-DOM text and attribute journaling since
    2026-09-15.
  - signal-dom-bindings: a second native style Block allocation site since
    2026-09-23.
  - codegen-size: the server runtime's lazy streamed-signals chunk since
    2026-09-16.
  - recursive-context: counted a pure-call annotation and trailing newlines as
    output growth.
- Rebaselined, with numbers in each note: five cross-framework bundle-size
  ratios and the workerd script-size ratio. The absolute app and server-render
  budgets are now the ratchet. Lynx's no-worklet byte caps from 2026-08-17 are
  reset to measured + 32, with the background program pinned exactly.
- Fix pending, with dated waivers that expire 2026-10-24, each with an owner
  task:
  - three exact counters the revived harnesses exposed (one extra closure per
    ssrTry, 128 live text reads per 128 unchanged compiled updates, compiled
    output at 1.295x its source);
  - Lynx create ratios and the re-entrant transport gate;
  - superlinear hydrate boundary preparation;
  - Octane Three versus R3F size and frame dispatch;
  - two timing regressions near the timer floor;
  - ten quick-mode timing guards whose samples are noise-bound;
  - the scoped descriptor shape change.
- bench.mjs supports a guard `waiver` ({ reason, expires }). A waived breach
  prints and does not fail, and fails again once the date passes.
  HARNESS_FAILURE_ALLOWLIST now also covers a suite whose harness writes no
  numbers.

The budget breaches (57) clear when the budget reset lands.

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 3, 2026
@github-actions
github-actions Bot marked this pull request as draft October 3, 2026 07:44
@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark report

  • 🔴 bundle-size: 3 value(s) increased
  • 🔴 bundle-reachability: 5 value(s) increased

Compares 11a9da935 with 54f6350d9 on the same runner. Timing verdicts require a change beyond the combined margin of error (at least 5%) and one 0.1ms timer tick, with the fastest sample also moving beyond that margin. Workflow run

js-framework: 1k/10k row operations (ms, lower is better)

All 20 timed operations (20 within noise)
target operation base head Δ noise
octane-tsrx run 4.29 4.17 −2.8% ±16% ⚪ within noise
octane-tsrx replace 8.31 8.40 +1.1% ±20% ⚪ within noise
octane-tsrx add 3.82 3.79 −0.8% ±10% ⚪ within noise
octane-tsrx update 0.42 0.46 +9.5% ±44% ⚪ within noise
octane-tsrx select 0.16 0.14 −12.5% ±63% ⚪ within noise
octane-tsrx swap 0.40 0.35 −12.5% ±45% ⚪ within noise
octane-tsrx remove 0.42 0.46 +9.5% ±35% ⚪ within noise
octane-tsrx runlots 35.12 32.78 −6.7% ±27% ⚪ within noise
octane-tsrx select_lots 0.29 0.28 −3.4% ±41% ⚪ within noise
octane-tsrx clear 48.12 48.06 −0.1% ±7% ⚪ within noise
octane-jsx run 4.10 4.31 +5.1% ±17% ⚪ within noise
octane-jsx replace 8.01 8.18 +2.1% ±19% ⚪ within noise
octane-jsx add 3.57 3.76 +5.3% ±15% ⚪ within noise
octane-jsx update 0.65 0.77 +18.5% ±43% ⚪ within noise
octane-jsx select 0.42 0.46 +9.5% ±44% ⚪ within noise
octane-jsx swap 0.69 0.76 +10.1% ±33% ⚪ within noise
octane-jsx remove 0.67 0.77 +14.9% ±38% ⚪ within noise
octane-jsx runlots 31.04 32.88 +5.9% ±7% ⚪ within noise
octane-jsx select_lots 3.71 3.32 −10.5% ±21% ⚪ within noise
octane-jsx clear 49.47 49.02 −0.9% ±6% ⚪ within noise

Application bundle size (bytes)

target metric base head Δ
octane-tsrx js_raw 126,800 125,114 −1,686 (−1.3%) 🟢
octane-tsrx js_gzip 41,987 41,329 −658 (−1.6%) 🟢
octane-tsrx js_brotli 37,029 36,477 −552 (−1.5%) 🟢
octane-tsrx app_gzip 2,563 2,562 −1 (−0.0%) 🟢
octane-tsrx app_brotli 2,222 2,223 +1 (+0.0%) 🔴
octane-tsrx fw_raw 119,288 117,602 −1,686 (−1.4%) 🟢
octane-tsrx fw_gzip 39,424 38,767 −657 (−1.7%) 🟢
octane-tsrx fw_brotli 34,807 34,254 −553 (−1.6%) 🟢
octane-tsrx todo_js_raw 142,187 140,590 −1,597 (−1.1%) 🟢
octane-tsrx todo_js_gzip 47,000 46,407 −593 (−1.3%) 🟢
octane-tsrx todo_js_brotli 41,237 40,640 −597 (−1.4%) 🟢
octane-tsrx todo_app_gzip 2,476 2,477 +1 (+0.0%) 🔴
octane-tsrx todo_app_brotli 2,120 2,119 −1 (−0.0%) 🟢
octane-tsrx todo_fw_raw 137,077 135,480 −1,597 (−1.2%) 🟢
octane-tsrx todo_fw_gzip 44,524 43,930 −594 (−1.3%) 🟢
octane-tsrx todo_fw_brotli 39,117 38,521 −596 (−1.5%) 🟢
octane-tsrx chat_js_raw 141,396 139,710 −1,686 (−1.2%) 🟢
octane-tsrx chat_js_gzip 46,944 46,321 −623 (−1.3%) 🟢
octane-tsrx chat_js_brotli 41,289 40,685 −604 (−1.5%) 🟢
octane-tsrx chat_app_gzip 2,977 2,980 +3 (+0.1%) 🔴
octane-tsrx chat_app_brotli 2,641 2,639 −2 (−0.1%) 🟢
octane-tsrx chat_fw_raw 134,743 133,057 −1,686 (−1.3%) 🟢
octane-tsrx chat_fw_gzip 43,967 43,341 −626 (−1.4%) 🟢
octane-tsrx chat_fw_brotli 38,648 38,046 −602 (−1.6%) 🟢
octane-tsrx weather_js_raw 178,362 176,675 −1,687 (−0.9%) 🟢
octane-tsrx weather_js_gzip 58,358 57,726 −632 (−1.1%) 🟢
octane-tsrx weather_js_brotli 50,823 50,277 −546 (−1.1%) 🟢
octane-tsrx weather_app_brotli 7,597 7,577 −20 (−0.3%) 🟢
octane-tsrx weather_fw_raw 151,627 149,940 −1,687 (−1.1%) 🟢
octane-tsrx weather_fw_gzip 49,314 48,682 −632 (−1.3%) 🟢
octane-tsrx weather_fw_brotli 43,226 42,700 −526 (−1.2%) 🟢

14 other measured values are unchanged.

Public-import reachability bundles (bytes)

target metric base head Δ
cli-spa-starter raw 116,492 114,806 −1,686 (−1.4%) 🟢
cli-spa-starter gzip 39,366 38,728 −638 (−1.6%) 🟢
cli-spa-starter brotli 34,383 33,897 −486 (−1.4%) 🟢
root-static-specialized raw 77,026 76,937 −89 (−0.1%) 🟢
root-static-specialized gzip 25,574 25,542 −32 (−0.1%) 🟢
root-static-specialized brotli 22,778 22,780 +2 (+0.0%) 🔴
root-chained-jsx raw 85,941 84,255 −1,686 (−2.0%) 🟢
root-chained-jsx gzip 28,529 27,849 −680 (−2.4%) 🟢
root-chained-jsx brotli 25,334 24,813 −521 (−2.1%) 🟢
root-static raw 203,008 202,919 −89 (−0.0%) 🟢
root-static gzip 64,558 64,524 −34 (−0.1%) 🟢
root-static brotli 55,969 55,915 −54 (−0.1%) 🟢
root-static-local raw 77,029 76,940 −89 (−0.1%) 🟢
root-static-local gzip 25,560 25,526 −34 (−0.1%) 🟢
root-static-local brotli 22,776 22,769 −7 (−0.0%) 🟢
hooks-state raw 89,190 89,101 −89 (−0.1%) 🟢
hooks-state gzip 29,633 29,599 −34 (−0.1%) 🟢
hooks-state brotli 26,389 26,379 −10 (−0.0%) 🟢
prop-attributes raw 97,393 95,707 −1,686 (−1.7%) 🟢
prop-attributes gzip 32,385 31,735 −650 (−2.0%) 🟢
prop-attributes brotli 28,676 28,221 −455 (−1.6%) 🟢
context raw 110,798 109,112 −1,686 (−1.5%) 🟢
context gzip 36,702 36,088 −614 (−1.7%) 🟢
context brotli 32,499 31,961 −538 (−1.7%) 🟢
hydrate-root raw 172,762 172,747 −15 (−0.0%) 🟢
hydrate-root gzip 54,761 54,767 +6 (+0.0%) 🔴
hydrate-root brotli 47,804 47,768 −36 (−0.1%) 🟢
deferred-hydration raw 236,147 236,132 −15 (−0.0%) 🟢
deferred-hydration gzip 74,660 74,662 +2 (+0.0%) 🔴
deferred-hydration brotli 64,515 64,399 −116 (−0.2%) 🟢
suspense-transition raw 166,742 165,056 −1,686 (−1.0%) 🟢
suspense-transition gzip 53,582 52,973 −609 (−1.1%) 🟢
suspense-transition brotli 46,878 46,366 −512 (−1.1%) 🟢
server-hooks raw 654 571 −83 (−12.7%) 🟢
server-hooks gzip 435 391 −44 (−10.1%) 🟢
server-hooks brotli 351 332 −19 (−5.4%) 🟢
server-render raw 65,080 64,995 −85 (−0.1%) 🟢
server-render gzip 22,439 22,412 −27 (−0.1%) 🟢
server-render brotli 20,250 20,192 −58 (−0.3%) 🟢
component-owned-effects raw 81,638 81,549 −89 (−0.1%) 🟢
component-owned-effects gzip 26,931 26,899 −32 (−0.1%) 🟢
component-owned-effects brotli 23,981 24,012 +31 (+0.1%) 🔴
binding-hooks raw 87,703 87,614 −89 (−0.1%) 🟢
binding-hooks gzip 29,336 29,308 −28 (−0.1%) 🟢
binding-hooks brotli 26,130 26,119 −11 (−0.0%) 🟢
binding-base-ui-vite raw 213,239 213,150 −89 (−0.0%) 🟢
binding-base-ui-vite gzip 68,137 68,102 −35 (−0.1%) 🟢
binding-base-ui-vite brotli 59,057 59,001 −56 (−0.1%) 🟢
binding-base-ui-esbuild raw 211,196 211,103 −93 (−0.0%) 🟢
binding-base-ui-esbuild gzip 68,119 68,081 −38 (−0.1%) 🟢
binding-base-ui-esbuild brotli 59,070 59,028 −42 (−0.1%) 🟢
binding-aria-vite raw 8,016 7,931 −85 (−1.1%) 🟢
binding-aria-vite gzip 3,092 3,056 −36 (−1.2%) 🟢
binding-aria-vite brotli 2,758 2,724 −34 (−1.2%) 🟢
binding-aria-esbuild raw 8,696 8,603 −93 (−1.1%) 🟢
binding-aria-esbuild gzip 3,363 3,331 −32 (−1.0%) 🟢
binding-aria-esbuild brotli 3,014 2,980 −34 (−1.1%) 🟢
binding-radix-vite raw 215,169 215,080 −89 (−0.0%) 🟢
binding-radix-vite gzip 68,709 68,675 −34 (−0.0%) 🟢
binding-radix-vite brotli 59,589 59,516 −73 (−0.1%) 🟢
binding-radix-esbuild raw 213,086 212,993 −93 (−0.0%) 🟢
binding-radix-esbuild gzip 68,708 68,664 −44 (−0.1%) 🟢
binding-radix-esbuild brotli 59,547 59,594 +47 (+0.1%) 🔴
binding-mantine-hooks-vite raw 98,028 96,342 −1,686 (−1.7%) 🟢
binding-mantine-hooks-vite gzip 32,600 31,961 −639 (−2.0%) 🟢
binding-mantine-hooks-vite brotli 28,917 28,413 −504 (−1.7%) 🟢
binding-mantine-hooks-esbuild raw 97,622 95,937 −1,685 (−1.7%) 🟢
binding-mantine-hooks-esbuild gzip 32,786 32,133 −653 (−2.0%) 🟢
binding-mantine-hooks-esbuild brotli 29,112 28,573 −539 (−1.9%) 🟢
binding-apollo-client-vite raw 358,254 358,165 −89 (−0.0%) 🟢
binding-apollo-client-vite gzip 112,253 112,220 −33 (−0.0%) 🟢
binding-apollo-client-vite brotli 97,970 97,948 −22 (−0.0%) 🟢
binding-apollo-client-esbuild raw 361,203 361,110 −93 (−0.0%) 🟢
binding-apollo-client-esbuild gzip 114,460 114,424 −36 (−0.0%) 🟢
binding-apollo-client-esbuild brotli 99,732 99,610 −122 (−0.1%) 🟢
binding-usehooks-ts-vite raw 98,661 96,975 −1,686 (−1.7%) 🟢
binding-usehooks-ts-vite gzip 32,764 32,127 −637 (−1.9%) 🟢
binding-usehooks-ts-vite brotli 29,090 28,613 −477 (−1.6%) 🟢
binding-usehooks-ts-esbuild raw 98,244 96,559 −1,685 (−1.7%) 🟢
binding-usehooks-ts-esbuild gzip 32,930 32,282 −648 (−2.0%) 🟢
binding-usehooks-ts-esbuild brotli 29,231 28,735 −496 (−1.7%) 🟢

24 other measured values are unchanged.

trueadm and others added 3 commits October 3, 2026 09:08
The waived guards now have owner PRs: ssr-final-replay try_closures (#1644),
root-transactions equal_reads (#1643) and codegen-size gzip compiled/source
(#1645). #1645 rebaselines the same codegen-size entry, so this branch no
longer edits it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The lynx-render transport gate failure and the create_1k/create_10k ratio
breaches both trace to #885's JSON-encoded transport and now have an owner
fix. Its branch re-notes those two guards, so this branch drops their waivers
and the suite's allowlist entry instead of editing the same entries.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…es to their owner

Waiving a suite that throws before it writes numbers would hide any crash in
that suite, not only the known shape change, and skip all of its guards. The
scoped-descriptor-shapes defect has an owner fix in progress. That fix re-pins
the harness's expected keys, so narrowing the waiver here would edit the same
assertion. HARNESS_FAILURE_ALLOWLIST is empty again, and a thrown suite failure
always fails the job. Dated waivers remain only on individual ratio guards.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
three-renderer frame_1k_subscribers and the two three-bundle-size ratios have
owner PRs (#1651, #1652) that re-note and ratchet those entries, so this branch
drops their waivers instead of editing the same entries.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@trueadm
trueadm merged commit 4778bf3 into main Oct 3, 2026
29 checks passed
@trueadm
trueadm deleted the ci/weekly-ratio-triage branch October 3, 2026 17:40
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