Skip to content

fix(bench): point stale weekly gates at current compiler and runtime output - #1586

Merged
trueadm merged 2 commits into
mainfrom
fix/weekly-bench-gates
Oct 2, 2026
Merged

trueadm merged 2 commits into
mainfrom
fix/weekly-bench-gates

Conversation

@trueadm

@trueadm trueadm commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Three gates had drifted away from the code they observe. Each one is bisected to its first bad commit and fixed in the harness or test that owns it. None of them is a framework defect.

Gate First bad commit Cause Fix
node benchmarks/tsrx-component-graph/run.mjs: opaque cycle lost warm reachability 44d50db (#943) The compiler switched from Object.assign(fn, { __warm: … }) to markWarm(fn, plan). The harness counted warm plans with a regex for the old shape, so every graph counted zero. Count markWarm calls against the runtime import in the parsed output (output.mjs). The 2,400-component reachability checks hidden behind the cycle control now run and pass too.
hook-store-composition work gate: callback-nested/parent_rerenders: no composed-slot coverage 1e12db7 (#1076) Composed hook paths moved from appendSlotKey into the cached resolveHookPath, so the old probe now counts zero. appendSlotKey remains only on the use() description path. Count resolveHookPath. Add a negative control: the direct lane must not compose a path.
behavior-root.test.ts "preserves destructured props through getter reentry…" fails on Node 22 5ead1ff (#1069), which added the exact-read assertion V8 12 (Node 22) also runs excluded keys' getters while copying an object rest, which the spec forbids. A native destructure with no Octane code reads label, kind, label, kind, extra on 22.22.0 and on the 22.22.2 engines floor. Node 24 reads label, kind, extra. CI only runs tests on Node 24, so nothing caught it. Derive the oracle from one native evaluation of the authored parameter pattern. On a spec-correct engine it is still exactly label, kind, extra.

Bisect evidence:

  • Gate 1: 44d50dbc0a^ passes the current harness via OCTANE_GRAPH_ROOT, and 44d50dbc0a fails it.
  • Gate 2: with OCTANE_HOOKS_ROOT, 1e12db7d6d^ passes and counts appendSlotKey 7680 on the nested lane. 1e12db7d6d fails it.

Regression coverage (runs on every PR via ci:workflow:test)

  • benchmarks/tsrx-component-graph/output.test.mjs runs the sync-cycle and opaque-cycle controls, plus a 3-component opaque chain and a live chain, against the current compiler. With the old regex counter, both tests fail.
  • benchmarks/hook-store-composition/work-metrics.test.mjs asserts that the client runtime's resolveSlot calls the composed-slot helper the work gate counts, and that every work metric names a client runtime function. With the probe set back to appendSlotKey, it fails.
  • The behavior-root oracle still catches a real double read. With dom-binding-program.ts patched to evaluate prepareProps twice, the test fails on both Node 22.22.2 and Node 24.18.0.

Validation

  • pnpm format:check: not run repo-wide. pnpm format:files:check passes on the changed files.
  • pnpm typecheck: not run. Scoped pnpm typecheck:files reports only errors that predate this change: behavior-root lines 3479/3711 and a fixture.
  • pnpm test: not run.
  • targeted tests:
    • node benchmarks/bench.mjs --quick --ratios tsrx-component-graph hook-store-composition: all targets PASS, [ratios] PASS — no ratio guards breached, exit 0.
    • node benchmarks/tsrx-component-graph/run.mjs 1: exit 0, 6/6 PASS.
    • node benchmarks/hook-store-composition/work.mjs with the locked Playwright 1.61.1 Chromium 1228 (149.0.7827.55): PASS. The nested lane makes 2560 resolveHookPath calls, the direct lane 0.
    • vitest run packages/octane/tests/behavior-root.test.ts --project octane --project octane-prod -t "getter reentry": 4/4 pass on Node 22.22.0, 22.22.2 and 24.18.0. Before the change it failed on both Node 22 versions in both projects.
    • node --test on the two new tests, compare.test.mjs and scripts/ci-workflow.test.mjs: 76/76 pass.

Risk / follow-ups

  • The weekly bench.yml job still stops before the bench step. The latest run (2026-09-28) fails at "Test Lynx diagnostic fixture contracts": compiles and executes a main-thread component scope through the real TSRX pipeline → Build failed with 1 error. These three gates were hidden behind that step. Older runs also showed ripple/prepend100 / insertmid100 identity gates and octane-tsrx: search typing did not produce native input events, none of which this PR re-checks. A full weekly run is still needed after this merges.
  • Node 22's object-rest getter behaviour is an engine bug that affects any authored code on V8 12, not only Octane. CI runs tests only on Node 24, so other exact-read tests could still differ on the 22.22.2 floor.

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 benchmark harnesses, regression tests, and a test oracle adjustment; no production runtime or compiler behavior is modified.

Overview
Realigns three weekly/CI gates that had drifted from the compiler and runtime they observe—harness fixes only, not framework bugs.

TSrX component graph: Warm-plan checks no longer regex-match the old __warm: shape. Shared output.mjs parses compiled JS and counts markWarm imports/calls, so cycle controls and 2,400-component reachability validation work again after the compiler switch to markWarm(fn, plan).

Hook-store composition work bench: Composed-slot coverage now counts resolveHookPath instead of appendSlotKey, with metrics centralized in work-metrics.mjs, a TypeScript test that resolveSlot still calls that helper, and a direct-lane negative control (no path composition without custom hooks).

Behavior test: The destructured-props “exact read” oracle is taken from one native run of the authored object-rest parameter pattern, so the test passes on Node 22 (V8’s extra excluded-key getters) while still failing if Octane double-reads on Node 24.

Both new benchmark test modules are wired into ci:workflow:test.

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

…output

Three gates that the weekly bench job and local Node 22 runs depend on had
drifted from the code they observe.

tsrx-component-graph counted warm plans with a regex for the
`Object.assign(fn, { __warm: ... })` shape. #943 (44d50db) switched the
compiler to `markWarm(fn, plan)`, so every graph counted zero and the
opaque-cycle control failed. The harness now reads `markWarm` calls against
the runtime import from the parsed output, and a ci:workflow:test case runs
the cycle and chain controls against the current compiler on every PR.

hook-store-composition's work gate required nonzero `appendSlotKey` calls on
the nested lane. #1076 (1e12db7) moved composed hook paths into the cached
`resolveHookPath`, leaving `appendSlotKey` only on the use() description path.
The probe now counts `resolveHookPath`, the direct lane must compose nothing,
and a ci:workflow:test case keeps the probe on the helper `resolveSlot` calls.

behavior-root's destructured-props test pinned one read per getter. V8 12
(Node 22, including the 22.22.2 engines floor) also runs excluded keys'
getters while copying an object rest, with no Octane code involved. The test
now derives its oracle from one native evaluation of the authored pattern, so
an extra snapshot read by Octane still fails on every engine.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@trueadm
trueadm marked this pull request as ready for review October 2, 2026 18:01
@github-actions github-actions Bot added agent-authored Diff or issue body substantially produced by an AI agent fix PR: bug fix labels Oct 2, 2026
@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark report

  • 🟡 js-framework: 1 timed operation(s) possibly slower

Compares 97618d747 with 12bb05f45 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)

target operation base head Δ noise
octane-tsrx replace 8.12 10.39 +28.0% ±17% 🟡 slower
All 20 timed operations (19 within noise)
target operation base head Δ noise
octane-tsrx run 3.81 4.19 +10.0% ±25% ⚪ within noise
octane-tsrx replace 8.12 10.39 +28.0% ±17% 🟡 slower
octane-tsrx add 3.71 3.79 +2.2% ±22% ⚪ within noise
octane-tsrx update 0.53 0.60 +13.2% ±69% ⚪ within noise
octane-tsrx select 0.23 0.31 +34.8% ±85% ⚪ within noise
octane-tsrx swap 0.48 0.63 +31.2% ±52% ⚪ within noise
octane-tsrx remove 0.43 0.49 +14.0% ±46% ⚪ within noise
octane-tsrx runlots 32.41 35.35 +9.1% ±19% ⚪ within noise
octane-tsrx select_lots 0.26 0.30 +15.4% ±54% ⚪ within noise
octane-tsrx clear 46.31 45.62 −1.5% ±13% ⚪ within noise
octane-jsx run 4.17 3.94 −5.5% ±23% ⚪ within noise
octane-jsx replace 10.02 7.58 −24.4% ±37% ⚪ within noise
octane-jsx add 3.59 3.54 −1.4% ±21% ⚪ within noise
octane-jsx update 0.69 0.62 −10.1% ±50% ⚪ within noise
octane-jsx select 0.42 0.41 −2.4% ±31% ⚪ within noise
octane-jsx swap 0.70 0.82 +17.1% ±28% ⚪ within noise
octane-jsx remove 0.64 0.66 +3.1% ±49% ⚪ within noise
octane-jsx runlots 30.69 31.40 +2.3% ±9% ⚪ within noise
octane-jsx select_lots 2.56 2.86 +11.7% ±25% ⚪ within noise
octane-jsx clear 51.01 50.88 −0.3% ±25% ⚪ within noise

Application bundle size (bytes)

No changes across 45 measured values.

Public-import reachability bundles (bytes)

No changes across 105 measured values.

@trueadm
trueadm merged commit 7cb0bc6 into main Oct 2, 2026
30 checks passed
@trueadm
trueadm deleted the fix/weekly-bench-gates branch October 2, 2026 18:46
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 fix PR: bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant