Repository navigation
fix(bench): count trusted pre-hydration input at window capture - #1592
Merged
Merged
Conversation
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]>
trueadm
marked this pull request as ready for review
October 2, 2026 18:48
Contributor
Benchmark report🟢 No size increases and no timing regressions outside noise. Compares js-framework: 1k/10k row operations (ms, lower is better)All 20 timed operations (20 within noise)
Application bundle size (bytes)No changes across 45 measured values. Public-import reachability bundles (bytes)No changes across 105 measured values. |
1 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
interaction()deferral no longer hides pre-hydration typing from the harness.Why
a6d7f4986c, unresolvedoctane/internal/context), fixed by fix: dev error for Context.Provider on imported contexts; revive bench lanes #1266. 09-28 = feat(universal): support @{ } code blocks at JSX child position #1313 (b9b0bc4e56, main-thread output importeduniversalBlock, whichmain-renderer.tsdid not export), fixed by fix(universal): link Lynx main-thread output by importing only used helpers #1391. fix(compiler): restore the hook-memo ratio guards and gate Lynx bench fixtures in PR CI #1583 now runs both Lynx suites on every PR. On current main every bench.yml pre-step passes locally.bench.mjs --quick --ratiosishydration-interactivity/hydration-stress: "octane-tsrx: search typing did not produce native input events". It has failed since 2026-08-17. Bisected to fix: preserve Samsung browser input, IME, and hydration compatibility #698 (2d06817b03): the harness passes at its parent6daa3809d1and fails at fix: preserve Samsung browser input, IME, and hydration compatibility #698. That PR addedinputtointeraction()'s default events. Octane's document capture stops the native event and replays an untrusted clone after the boundary hydrates, asdocs/deferred-hydration.mddocuments. The harness listened on document capture after Octane's listener, so it never saw the typing. This is a stale harness assumption, not a runtime defect.HARNESS_FAILURE_ALLOWLIST['js-framework-reorder']expired on 2026-10-01. ripple'sprepend100/insertmid100identity gate failures no longer reproduce.Changes
benchmarks/hydration-interactivity/shared.js: awindowcapture listener counts onlyisTrustedinput 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: emptyHARNESS_FAILURE_ALLOWLIST.Validation
pnpm format:check: not run repo-wide;pnpm format:files:checkpasses on the 4 changed filespnpm typecheck: not run (benchmark.js/.mjs/.mdonly)pnpm test: not run (no package source changed)node --test benchmarks/lynx-table/stages/*.test.mjs(18/18) andbenchmarks/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.benchmarks/lib/precise-work.test.mjs6/6,uibench/run.test.mjs1/1,ssr-workerd/app-workloads/verify.test.mjs17/17,BENCH_ROUNDS=1 … app-workloads/run.mjs 1exit 0,js-framework/timing.test.mjs4/4node benchmarks/bench.mjs --quick --ratios hydration-interactivity hydration-stress: exit 1 before (octane-tsrx gate), exit 0 after, all 7 targetsnode benchmarks/bench.mjs --quick --ratios js-framework-reorder: exit 0, with ripple's identity gates passing and no waivernode benchmarks/bench.mjs --quick --ratios js-framework: exit 0, no gate failures or ratio breachesRisk / follow-ups
bench.mjs --quick --ratios). Two blockers remain outside this PR's scope:lynx-bundle-size:preview main gzip 83656 exceeds 82070(absoluteNO_WORKLET_BUDGET; the IFR and exact background-raw checks after it never run).bundle-reachability: 33 ratio breaches againstminimal-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×.workflow_dispatchBench run on this head lists the complete remaining set: https://github.com/octanejs/octane/actions/runs/37049952942Provenance
agent-authored)🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith 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 defaultinputcapture.The harness now counts trusted
#hydration-inputevents onwindowcapture (before framework listeners), so deferred/replayed input neither hides nor double-counts browser typing. README correctness gates describe this observation point.bench.mjsclearsHARNESS_FAILURE_ALLOWLIST: the expiredjs-framework-reorderwaiver for ripple’s keyedprepend100/insertmid100failures 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.