Skip to content

fix(benchmarks): restore effectful-list workload honesty and enable React Compiler in spa-navigation - #1205

Closed
jonkwheeler wants to merge 2 commits into
mainfrom
fix/bench-harness-honesty
Closed

jonkwheeler wants to merge 2 commits into
mainfrom
fix/bench-harness-honesty

Conversation

@jonkwheeler

@jonkwheeler jonkwheeler commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Part of #1202. Split from #1188.

Summary

  • benchmarks/effectful-list: restores workload honesty across all nine fixtures — every Row body now re-invokes on update_nodeps via a real tick prop, and a window.__renders.row invocation gate asserts the exact per-op count on the five VDOM targets.
  • benchmarks/spa-navigation/react: enables React Compiler, so the suite's React column measures what it claims to measure.
  • Lockfile-hash-derived generated output (packages/*/audit/react-parity.json, eval corpus manifest) regenerated via pnpm sync.

Why

  • The effectful-list suite's update_nodeps op bumped an unrelated parent state and relied on each fixture re-rendering rows on principle. Two dishonesty holes resulted: the tick state never reached Row as a prop, so a memoized/cached row could legitimately skip all 1,000 bodies and post a ~µs "win" that measured no work; and nothing counted row-body invocations, so the harness could not distinguish "fast re-render" from "skipped render".
  • The spa-navigation/react fixture is documented as the React-19-with-Compiler column, but its Vite config never applied the plugin — the published React medians were uncompiled React.
  • The parity audit JSONs and the eval manifest embed sha256(pnpm-lock.yaml); the new dev-deps changed the hash, so they must be regenerated in the same PR or their CI checks go stale.

Changes

  • benchmarks/effectful-list/contract.mjs — expect.renders per-op counts added (mount_1k/update_nodeps/update_deps/remount = 1000, clear = 0; remove_100_scattered deliberately ungated — an equal-props skip on the 900 survivors is legitimate divergence, not fraud); VDOM_TARGETS set exported.
  • benchmarks/effectful-list/run.mjs — gateCheck folds the __renders assertion into the existing per-op gate; a declared VDOM target missing the probe fails every op (fixture defect, not an exemption); aggregate failure still exits 1 with BENCH_JSON.failed.
  • benchmarks/effectful-list/{react,preact,inferno,octane-jsx,octane-tsrx}/ — Row installs window.__renders.row++ as its first statement; tick threaded through App → Row as a real prop; fx.js resets the probe via __resetFx; ops.js passes tick on update_nodeps.
  • benchmarks/effectful-list/{solid,ripple,vue-vapor,svelte}/src/ops.js — tick threaded for workload parity (fine-grained targets stay uninstrumented by design — they never re-invoke row bodies).
  • benchmarks/effectful-list/README.md — gate table gains the __renders.row column and the load-bearing-gate rationale.
  • benchmarks/spa-navigation/react/{vite.config.js,package.json} — reactCompiler() from benchmarks/react-compiler.mjs (the same helper memo-wall/react-compiler uses) plus babel-plugin-react-compiler + @rolldown/plugin-babel dev-deps; README documents the correction.
  • pnpm-lock.yaml — the two new dev-deps.
  • Generated (pnpm sync output, 88 files): 87 × packages/*/audit/react-parity.json lockfile-hash records + packages/octane-evals/datasets/train/user-apps-v1/manifest.jsonl. Regenerated, not hand-edited.

Validation

  • pnpm bench:spa-navigation:typecheck — pass (fixture typechecks with the compiler plugin present).
  • effectful-list bounded run: TARGETS='[{"name":"octane-tsrx","url":"http://localhost:5201/"},{"name":"react","url":"http://localhost:5203/"}]' node run.mjs 3 against vite preview builds — all six ops pass both the __fx and __renders gates on both targets; exit 0.
  • __renders gate failure path: TARGETS='[{"name":"react","url":"http://localhost:5204/"}]' node run.mjs 1 (VDOM name pointed at the uninstrumented solid server) — every op reports GATE FAIL: renders: window.__renders probe missing on a declared VDOM target, exit 1, BENCH_JSON carries failed + fxGate: fail.
  • pnpm format:files / pnpm format:files:check on touched paths — clean.
  • pnpm sync after commits — worktree clean.
  • pnpm format:check, pnpm typecheck, pnpm test — deferred to CI per repo convention (same as perf(runtime): beat React 19 + Compiler across the timing benchmark portfolio #1188).

Risk / follow-ups

  • Benchmark-fixture and generated-file changes only; no published-package behavior changes (no changeset).
  • Published spa-navigation React medians predate the compiler fix; the README now flags them as the uncompiled baseline until a fresh run replaces them.
  • Other spa-navigation/effectful-list targets are unchanged and unmeasured here; the full 9-target run remains available via node benchmarks/bench.mjs effectful-list.

Provenance

  • An agent produced this diff (agent-authored)

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
Benchmark fixtures, harness gates, and generated audit metadata only; no published runtime package behavior changes.

Overview
effectful-list gains honest VDOM workload measurement: parent tick is threaded into every Row as a real prop (so update_nodeps cannot bail via equal props or element cache), and VDOM fixtures increment window.__renders.row as each row body’s first statement. The harness contract and run.mjs add a row-invocation gate (VDOM_TARGETS, expect.renders) alongside the existing __fx gate; missing probes fail all ops on declared VDOM targets. Fine-grained targets stay uninstrumented; remove_100_scattered remains ungated for survivor skips.

spa-navigation/react now applies reactCompiler() from benchmarks/react-compiler.mjs (plus Babel compiler dev-deps) so the documented React-19-with-Compiler column matches the build; README notes prior medians were uncompiled.

Lockfile-driven packages/*/audit/react-parity.json hash updates accompany the new dev-dependencies.

Reviewed by Cursor Bugbot for commit 8d8fec6. 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 fix PR: bug fix labels Sep 21, 2026
@jonkwheeler
jonkwheeler marked this pull request as ready for review September 21, 2026 13:54
@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Suggested review order for the #1188 split (tracking: #1202):

  1. fix(benchmarks): restore effectful-list workload honesty and enable React Compiler in spa-navigation #1205 — fixtures/harness honesty; everything downstream is measured against the baselines it fixes
  2. ci(benchmarks): recommit bundle budgets to measured main reality #1207 — budgets + guards re-measured on main; gives the perf PRs headroom to land green
  3. feat(compiler): admit host-only conditional item bodies to forBlock PURE #1213 — forBlock PURE, compiler-only; smallest and most contained
  4. feat(octane): $$stable — compiler-proven props-snapshot bailout for components #1214 — $$stable, compiler+runtime; introduces blockBailUnsafe (the shared hazard veto)
  5. perf(octane): signal-instance identity + dormant-owner fast paths #1216 — signal identity + dormant paths; moderate runtime diff
  6. perf(octane): changed-commit write path — sources plan, fused scan, journal replay #1215 — write path; largest diff, easiest once feat(octane): $$stable — compiler-proven props-snapshot bailout for components #1214 and perf(octane): signal-instance identity + dormant-owner fast paths #1216's machinery is familiar

Wave 2 (#1213–#1216) is any-order for merging — this sequence front-loads the concepts later diffs build on.

@trueadm

trueadm commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

This PR is stale, please re-create PR given the new repo agent constraints and rules.

@trueadm trueadm closed this Oct 7, 2026
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.

2 participants