Skip to content

fix(bench): count trusted pre-hydration input at window capture - #1592

Merged
trueadm merged 3 commits into
mainfrom
fix/weekly-bench-hydration-input-gate
Oct 2, 2026
Merged

trueadm merged 3 commits into
mainfrom
fix/weekly-bench-hydration-input-gate

Conversation

@trueadm

@trueadm trueadm commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Count the hydration benchmarks' "native input events" at window capture, and only trusted ones, so Octane's documented interaction() deferral no longer hides pre-hydration typing from the harness.
  • Remove the expired js-framework-reorder waiver for ripple. ripple 0.4.0 passes the identity gates it covered.

Why

Changes

  • benchmarks/hydration-interactivity/shared.js: a window capture listener counts only isTrusted input on #hydration-input. It sees the browser's events before any framework capture and excludes replayed clones. The post-hydration "exactly one native event per typed character" checks are unchanged and still pass.
  • benchmarks/bench.mjs: empty HARNESS_FAILURE_ALLOWLIST.
  • READMEs: document the observation point and the resolved ripple failure.

Validation

  • pnpm format:check: not run repo-wide; pnpm format:files:check passes on the 4 changed files
  • pnpm typecheck: not run (benchmark .js/.mjs/.md only)
  • pnpm test: not run (no package source changed)
  • targeted:
    • node --test benchmarks/lynx-table/stages/*.test.mjs (18/18) and benchmarks/lynx-list/*.test.mjs (5/5) on main. The same harness fails at feat(universal): support @{ } code blocks at JSX child position #1313 and feat: remove legacy Context.Provider support #1138 and passes at their parents.
    • remaining bench.yml pre-steps on main: benchmarks/lib/precise-work.test.mjs 6/6, uibench/run.test.mjs 1/1, ssr-workerd/app-workloads/verify.test.mjs 17/17, BENCH_ROUNDS=1 … app-workloads/run.mjs 1 exit 0, js-framework/timing.test.mjs 4/4
    • node benchmarks/bench.mjs --quick --ratios hydration-interactivity hydration-stress: exit 1 before (octane-tsrx gate), exit 0 after, all 7 targets
    • node benchmarks/bench.mjs --quick --ratios js-framework-reorder: exit 0, with ripple's identity gates passing and no waiver
    • node benchmarks/bench.mjs --quick --ratios js-framework: exit 0, no gate failures or ratio breaches

Risk / follow-ups

  • Benchmark harness only; no package or runtime change, so no changeset.
  • Re-checked the other suites whose harness gates failed in the last weekly run to reach the bench step (2026-08-24): controlled-form, scheduler-responsiveness, application-composition, streaming-backpressure, async-composition and bundle-reachability's harness now pass locally (bench.mjs --quick --ratios). Two blockers remain outside this PR's scope:
    • lynx-bundle-size: preview main gzip 83656 exceeds 82070 (absolute NO_WORKLET_BUDGET; the IFR and exact background-raw checks after it never run).
    • bundle-reachability: 33 ratio breaches against minimal-budgets.json, recommitted by ci(benchmarks): recommit bundle budgets to measured main reality #1207 on 2026-09-22; largest server-render 1.18–1.20×, hydrate-root 1.09–1.11×, deferred-hydration 1.07–1.09×, capture-only 1.06–1.09×.
  • A workflow_dispatch Bench run on this head lists the complete remaining set: https://github.com/octanejs/octane/actions/runs/37049952942

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
Benchmark harness and documentation only; no runtime or package code changes.

Overview
Fixes hydration-interactivity / hydration-stress correctness gates that falsely failed Octane when pre-hydration typing was stopped and replayed as untrusted clones after interaction() added default input capture.

The harness now counts trusted #hydration-input events on window capture (before framework listeners), so deferred/replayed input neither hides nor double-counts browser typing. README correctness gates describe this observation point.

bench.mjs clears HARNESS_FAILURE_ALLOWLIST: the expired js-framework-reorder waiver for ripple’s keyed prepend100 / insertmid100 failures is removed because catalog ripple 0.4.0 passes; any identity gate failure is fatal again. js-framework README notes the resolved ripple bug vs the old 0.3.x behavior.

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

The hydration-interactivity and hydration-stress gates have failed on every
weekly Bench run since 2026-08-17 with "octane-tsrx: search typing did not
produce native input events". The search-and-send sample runs inside
`<Hydrate when={interaction()}>`. Since #698 (2d06817), `interaction()`
captures `input` by default: Octane's document capture stops the native event
and replays an untrusted clone once the boundary hydrates, as
docs/deferred-hydration.md describes. The harness counted input with a
document capture listener registered after Octane's, so it never saw
pre-hydration typing. The harness passes at #698's parent and fails at #698.

Count input at window capture, ahead of any page code, and only trusted
events, so a deferred event is still observed and its replayed clone is not
counted twice. The post-hydration check of exactly one native event per typed
character still holds for every target.

Drop the js-framework-reorder waiver for ripple's interleaved keyed inserts.
It expired on 2026-10-01, and ripple 0.4.0 now passes the prepend100 and
insertmid100 identity gates.

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 fix PR: bug fix labels Oct 2, 2026
@trueadm
trueadm marked this pull request as ready for review October 2, 2026 18:48
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Benchmark report

🟢 No size increases and no timing regressions outside noise.

Compares 53db43656 with 63f697c4f 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 3.79 4.24 +11.9% ±33% ⚪ within noise
octane-tsrx replace 7.91 7.96 +0.6% ±15% ⚪ within noise
octane-tsrx add 3.76 3.90 +3.7% ±19% ⚪ within noise
octane-tsrx update 0.37 0.37 −0.0% ±35% ⚪ within noise
octane-tsrx select 0.15 0.17 +13.3% ±69% ⚪ within noise
octane-tsrx swap 0.31 0.35 +12.9% ±48% ⚪ within noise
octane-tsrx remove 0.31 0.32 +3.2% ±35% ⚪ within noise
octane-tsrx runlots 38.40 37.81 −1.5% ±36% ⚪ within noise
octane-tsrx select_lots 0.17 0.15 −11.8% ±85% ⚪ within noise
octane-tsrx clear 36.65 35.81 −2.3% ±18% ⚪ within noise
octane-jsx run 4.09 3.92 −4.2% ±12% ⚪ within noise
octane-jsx replace 8.16 7.29 −10.7% ±22% ⚪ within noise
octane-jsx add 3.62 3.44 −5.0% ±12% ⚪ within noise
octane-jsx update 0.57 0.57 ±0.0% ±57% ⚪ within noise
octane-jsx select 0.38 0.36 −5.3% ±37% ⚪ within noise
octane-jsx swap 0.67 0.61 −9.0% ±50% ⚪ within noise
octane-jsx remove 0.51 0.46 −9.8% ±32% ⚪ within noise
octane-jsx runlots 32.93 32.99 +0.2% ±11% ⚪ within noise
octane-jsx select_lots 2.78 2.79 +0.4% ±29% ⚪ within noise
octane-jsx clear 34.29 38.51 +12.3% ±27% ⚪ 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 29f7632 into main Oct 2, 2026
30 checks passed
@trueadm
trueadm deleted the fix/weekly-bench-hydration-input-gate branch October 2, 2026 19:12
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