Skip to content

test: cover buffered backlog responsiveness in Chromium - #1877

Merged
trueadm merged 30 commits into
octanejs:mainfrom
openai-oss-forks:codex/scheduler-browser-backlogs
Oct 8, 2026
Merged

trueadm merged 30 commits into
octanejs:mainfrom
openai-oss-forks:codex/scheduler-browser-backlogs

Conversation

@domgan-oai

@domgan-oai domgan-oai commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add production Chromium coverage for buffered query and derived streams, ready Action backlogs, and many simultaneously ready independent hydration islands. The first trusted keystroke releases the backlog, so the measurement cannot accidentally start after a long microtask checkpoint has already finished.

This addresses priority 4 in #1864. It builds on #1875 and the scheduler already landed in #1873. The #1875 producer changes remain in the diff until that parent merges; the browser-specific changes add tests and measurements without new runtime behavior.

Validation

  • Production minified builds for Octane and React, plus server-rendered island markup.
  • Local semantic smoke at f1560aae0, after integrating main 90a57d820 and the native/transition capability fix: all five cases pass, preserving all 100 query/derived/Action values, 60 adopted island buttons, controlled draft, and the equivalent React Action workload. This is fixture validation, not browser responsiveness evidence.
  • Changed TypeScript fixture diagnostics: zero; formatting and git diff --check pass.
  • Independent read-only review of workload equivalence, observation boundaries, and complexity.
  • Previous-head Chromium CI (e201e0464) passes, including the backlog cases; every other check, including the separate size gate, also passed. Browser run
  • Full local workspace gates: pnpm sync was attempted but stops at unavailable typescript-native/package.json. Local interactive browser execution remains blocked by managed Chrome's DevTools policy; Chromium CI provides the browser evidence.

The shared browser runner builds production code, applies 6× CPU throttling, and asserts trusted input, exact draft/focus/caret, complete ordered publications/Action state threading, final DOM, retained island nodes, and live hydrated handlers. Deliberately prolonged stream/island cases require a later keystroke before the work is exhausted. Fast Action completion is allowed.

Event Timing is installed before startup and must be supported. The report takes the maximum duration per nonzero interaction ID, retains the first interaction, reports input/observed interaction counts, and uses null for an empty sample at Chromium's 16 ms floor. Total completion covers source termination and the final DOM commit. No absolute millisecond threshold gates CI.

Run node benchmarks/scheduler-responsiveness/browser-backlogs.mjs for one excluded warmup and five samples, or pass a baseline checkout and --quick for one sample. The equivalent Action/input fixture runs in React. CI retains benchmarks/results/scheduler-backlogs.json in its browser work-results artifact.

Current-head CI

CI at f1560aae0 is running. The previous head e201e0464 passed every check in its completed run. This head inherits #1875's reviewed integration with the newly landed #1888: native readers and transitions work in either initialization order, while pending cues keep their previous-state commit. The parent passes 171 focused development tests and 30 production-mode tests; all five browser-fixture semantic smoke cases pass here.

The shared native-capture tests now synchronize with actual capture entry. The repeated-draft-save test waits for the loaded draft route before editing again; this covers repeated saves after navigation readiness, not edits made during navigation.

#1891's producer budgets are on main; #1887 covers #1888. The exact #1875 and #1877 byte artifacts are identical and need 18 additional ceiling adjustments, proposed separately in #1901. This PR raises no budgets; current-head runtime checks run independently while the size gates await those budget dependencies and the final downward ratchet.

Risk / follow-ups

The fairness canaries pass on the recorded CI run; its timings are one sample, not a comparative performance verdict. The fixtures use public component APIs with explicit hook slots and the native reader ABI; they do not measure compiler output quality. Stream subscribers and island activations include 2 ms of synthetic CPU work. Island markup and modules are ready locally, so network loading and input replay inside an inactive island are outside this measurement. Event Timing is reported for the driven interactions, not as a page-level INP score.

Provenance

  • An agent produced this diff (agent-authored)

Codex task · host com-79386


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
Adds benchmarks and browser tests only; no production runtime or scheduler behavior changes in this diff.

Overview
Adds Chromium Playwright coverage for scheduler backlog responsiveness under 6× CPU throttling, using production-minified Octane (and a React baseline for the actions scenario).

A shared harness (browser-backlogs.mjs) serves esbuild bundles, starts work from the first trusted keystroke (so measurement isn’t skewed by prior microtasks), and records completion time plus optional Event Timing stats. Fixtures exercise query streams, derived signals, Action backlogs in startTransition, and 60 independent hydration islands, with assertions on trusted input, ordered values, DOM/focus, and island adoption.

Vitest runs the suite in heavy browser integration and writes benchmarks/results/scheduler-backlogs.json; CI now uploads that file with the other js-framework benchmark artifacts. The same module can be run locally via CLI for multi-sample benchmarks.

Reviewed by Cursor Bugbot for commit 4d46fd9. 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 test PR: tests only labels Oct 8, 2026
@domgan-oai
domgan-oai marked this pull request as ready for review October 8, 2026 00:49
@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark report

  • ❌ bundle-size: 9 value(s) exceed their committed budget
  • ❌ bundle-reachability: 26 value(s) exceed their committed budget
  • 🔴 bundle-size: 39 value(s) increased within budget
  • 🔴 bundle-reachability: 47 value(s) increased within budget

Compares 90a57d820, the merge commit's first parent with fefb80fd3 on the same runner. A byte value over its committed budget or any increase in a js-framework work counter fails this check. Wall time is a report: base and head samples alternate in one browser, and an operation is called slower or faster only when the 95% confidence interval of its ratio excludes ±3%. Workflow run

js-framework: 1k/10k row operations

All 20 timed operations (20 without a verdict)
target operation base ms head ms head/base 95% CI
octane-tsrx run 2.692 2.683 −1.7% −3.8% … +0.0% ⚪ within noise
octane-tsrx replace 5.708 5.392 −1.8% −3.7% … +1.9% ⚪ within noise
octane-tsrx add 2.625 2.450 −3.6% −5.9% … ±0.0% ⚪ within noise
octane-tsrx update 0.130 0.132 +0.1% −2.9% … +2.8% ⚪ within noise
octane-tsrx select 0.006 0.006 −2.7% −3.8% … −0.3% ⚪ within noise
octane-tsrx swap 0.038 0.037 +0.7% −3.3% … +2.5% ⚪ within noise
octane-tsrx remove 0.018 0.017 −1.6% −4.3% … −0.3% ⚪ within noise
octane-tsrx runlots 31.925 32.650 −3.2% −5.6% … −0.1% ⚪ within noise
octane-tsrx select_lots 0.006 0.006 −2.4% −4.8% … −0.4% ⚪ within noise
octane-tsrx clear 39.508 39.883 −2.6% −4.0% … +2.1% ⚪ within noise
octane-jsx run 4.167 4.292 −0.0% −3.4% … +0.0% ⚪ within noise
octane-jsx replace 7.583 7.792 +0.0% −1.9% … +4.1% ⚪ within noise
octane-jsx add 3.958 3.867 −2.5% −5.1% … +0.0% ⚪ within noise
octane-jsx update 0.309 0.336 +1.0% −4.5% … +4.5% ⚪ within noise
octane-jsx select 0.198 0.212 +0.5% −2.7% … +5.3% ⚪ within noise
octane-jsx swap 0.409 0.398 −1.8% −5.6% … +2.0% ⚪ within noise
octane-jsx remove 0.281 0.272 −0.6% −9.6% … +2.7% ⚪ within noise
octane-jsx runlots 39.375 38.892 +0.1% −2.4% … +4.0% ⚪ within noise
octane-jsx select_lots 2.338 2.421 −0.3% −7.9% … +7.5% ⚪ within noise
octane-jsx clear 47.317 45.958 +1.3% +0.3% … +3.1% ⚪ within noise

All 64 work counters are unchanged.

Application bundle size (bytes)

❌ 9 value(s) exceed their committed budget. Reduce the growth, or raise the budget in a separate pull request that names the bytes and the reason (CONTRIBUTING.md, "Size budgets").

target metric head budget over
octane-tsrx chat_fw_gzip 36,807 36,791 +16
octane-tsrx chat_js_gzip 39,522 39,506 +16
octane-tsrx weather_js_brotli 44,467 44,466 +1
octane-tsrx bindings_fw_raw 341,240 339,858 +1,382
octane-tsrx bindings_fw_gzip 109,367 109,005 +362
octane-tsrx bindings_fw_brotli 94,998 94,788 +210
octane-tsrx bindings_js_raw 688,878 687,496 +1,382
octane-tsrx bindings_js_gzip 225,032 224,671 +361
octane-tsrx bindings_js_brotli 191,233 190,989 +244
target metric base head Δ
octane-tsrx js_raw 113,131 113,173 +42 (+0.0%) 🔴
octane-tsrx js_gzip 36,879 36,908 +29 (+0.1%) 🔴
octane-tsrx js_brotli 32,590 32,685 +95 (+0.3%) 🔴
octane-tsrx app_gzip 2,335 2,334 −1 (−0.0%) 🟢
octane-tsrx fw_raw 106,185 106,227 +42 (+0.0%) 🔴
octane-tsrx fw_gzip 34,544 34,574 +30 (+0.1%) 🔴
octane-tsrx fw_brotli 30,558 30,653 +95 (+0.3%) 🔴
octane-tsrx todo_js_raw 121,538 121,580 +42 (+0.0%) 🔴
octane-tsrx todo_js_gzip 39,674 39,704 +30 (+0.1%) 🔴
octane-tsrx todo_js_brotli 34,923 34,956 +33 (+0.1%) 🔴
octane-tsrx todo_app_gzip 2,221 2,219 −2 (−0.1%) 🟢
octane-tsrx todo_app_brotli 1,886 1,879 −7 (−0.4%) 🟢
octane-tsrx todo_fw_raw 116,920 116,962 +42 (+0.0%) 🔴
octane-tsrx todo_fw_gzip 37,453 37,485 +32 (+0.1%) 🔴
octane-tsrx todo_fw_brotli 33,037 33,077 +40 (+0.1%) 🔴
octane-tsrx chat_js_raw 120,287 120,329 +42 (+0.0%) 🔴
octane-tsrx chat_js_gzip 39,512 39,522 +10 (+0.0%) 🔴
octane-tsrx chat_js_brotli 34,858 34,879 +21 (+0.1%) 🔴
octane-tsrx chat_app_gzip 2,714 2,715 +1 (+0.0%) 🔴
octane-tsrx chat_app_brotli 2,386 2,388 +2 (+0.1%) 🔴
octane-tsrx chat_fw_raw 114,522 114,564 +42 (+0.0%) 🔴
octane-tsrx chat_fw_gzip 36,798 36,807 +9 (+0.0%) 🔴
octane-tsrx chat_fw_brotli 32,472 32,491 +19 (+0.1%) 🔴
octane-tsrx weather_js_raw 156,842 156,883 +41 (+0.0%) 🔴
octane-tsrx weather_js_gzip 50,886 50,924 +38 (+0.1%) 🔴
octane-tsrx weather_js_brotli 44,407 44,467 +60 (+0.1%) 🔴
octane-tsrx weather_app_gzip 7,871 7,873 +2 (+0.0%) 🔴
octane-tsrx weather_app_brotli 6,663 6,675 +12 (+0.2%) 🔴
octane-tsrx weather_fw_raw 134,688 134,729 +41 (+0.0%) 🔴
octane-tsrx weather_fw_gzip 43,015 43,051 +36 (+0.1%) 🔴
octane-tsrx weather_fw_brotli 37,744 37,792 +48 (+0.1%) 🔴
octane-tsrx bindings_js_raw 688,832 688,878 +46 (+0.0%) 🔴
octane-tsrx bindings_js_gzip 225,006 225,032 +26 (+0.0%) 🔴
octane-tsrx bindings_js_brotli 191,175 191,233 +58 (+0.0%) 🔴
octane-tsrx bindings_app_gzip 115,667 115,665 −2 (−0.0%) 🟢
octane-tsrx bindings_app_brotli 96,214 96,235 +21 (+0.0%) 🔴
octane-tsrx bindings_fw_raw 341,194 341,240 +46 (+0.0%) 🔴
octane-tsrx bindings_fw_gzip 109,339 109,367 +28 (+0.0%) 🔴
octane-tsrx bindings_fw_brotli 94,961 94,998 +37 (+0.0%) 🔴
octane-tsrx full_fw_raw 568,620 568,708 +88 (+0.0%) 🔴
octane-tsrx full_fw_gzip 171,214 171,256 +42 (+0.0%) 🔴
octane-tsrx full_fw_brotli 143,953 143,986 +33 (+0.0%) 🔴
octane-jsx js_raw 187,729 187,770 +41 (+0.0%) 🔴
octane-jsx js_gzip 59,529 59,562 +33 (+0.1%) 🔴
octane-jsx js_brotli 51,727 51,752 +25 (+0.0%) 🔴
octane-jsx app_gzip 2,856 2,857 +1 (+0.0%) 🔴
octane-jsx app_brotli 2,408 2,404 −4 (−0.2%) 🟢
octane-jsx fw_raw 179,464 179,505 +41 (+0.0%) 🔴
octane-jsx fw_gzip 56,673 56,705 +32 (+0.1%) 🔴
octane-jsx fw_brotli 49,319 49,348 +29 (+0.1%) 🔴
octane-jsx full_fw_raw 568,620 568,708 +88 (+0.0%) 🔴
octane-jsx full_fw_gzip 171,214 171,256 +42 (+0.0%) 🔴
octane-jsx full_fw_brotli 143,953 143,986 +33 (+0.0%) 🔴

7 other measured values are unchanged.

Public-import reachability bundles (bytes)

❌ 26 value(s) exceed their committed budget. Reduce the growth, or raise the budget in a separate pull request that names the bytes and the reason (CONTRIBUTING.md, "Size budgets").

target metric head budget over
root-static brotli 45,596 45,579 +17
hydrate-root gzip 44,219 44,196 +23
hydrate-frame raw 366,104 365,796 +308
hydrate-frame gzip 113,537 113,469 +68
suspense-transition raw 141,591 140,222 +1,369
suspense-transition gzip 44,768 44,401 +367
suspense-transition brotli 39,293 39,132 +161
binding-base-ui-vite raw 199,790 198,414 +1,376
binding-base-ui-vite gzip 62,781 62,427 +354
binding-base-ui-vite brotli 54,502 54,383 +119
binding-base-ui-esbuild raw 215,315 213,931 +1,384
binding-base-ui-esbuild gzip 69,747 69,369 +378
binding-base-ui-esbuild brotli 60,479 60,247 +232
binding-radix-vite raw 201,825 200,448 +1,377
binding-radix-vite gzip 63,366 63,043 +323
binding-radix-vite brotli 55,095 54,923 +172
binding-radix-esbuild raw 217,139 215,755 +1,384
binding-radix-esbuild gzip 70,298 69,893 +405
binding-radix-esbuild brotli 61,053 60,813 +240
binding-mantine-hooks-vite gzip 28,398 28,396 +2
binding-apollo-client-vite raw 342,242 340,859 +1,383
binding-apollo-client-vite gzip 105,073 104,741 +332
binding-apollo-client-vite brotli 91,665 91,544 +121
binding-apollo-client-esbuild raw 365,458 364,070 +1,388
binding-apollo-client-esbuild gzip 116,087 115,728 +359
binding-apollo-client-esbuild brotli 101,330 101,084 +246
target metric base head Δ
cli-spa-starter raw 102,179 102,223 +44 (+0.0%) 🔴
cli-spa-starter gzip 33,980 34,024 +44 (+0.1%) 🔴
cli-spa-starter brotli 29,877 29,963 +86 (+0.3%) 🔴
root-static-specialized raw 72,693 72,734 +41 (+0.1%) 🔴
root-static-specialized gzip 23,820 23,853 +33 (+0.1%) 🔴
root-static-specialized brotli 21,295 21,303 +8 (+0.0%) 🔴
root-chained-jsx raw 74,571 74,612 +41 (+0.1%) 🔴
root-chained-jsx gzip 24,322 24,354 +32 (+0.1%) 🔴
root-chained-jsx brotli 21,732 21,762 +30 (+0.1%) 🔴
root-static raw 165,545 165,587 +42 (+0.0%) 🔴
root-static gzip 52,270 52,300 +30 (+0.1%) 🔴
root-static brotli 45,520 45,596 +76 (+0.2%) 🔴
root-static-local raw 72,692 72,733 +41 (+0.1%) 🔴
root-static-local gzip 23,802 23,839 +37 (+0.2%) 🔴
root-static-local brotli 21,290 21,299 +9 (+0.0%) 🔴
root-callback-local raw 74,597 74,638 +41 (+0.1%) 🔴
root-callback-local gzip 24,332 24,358 +26 (+0.1%) 🔴
root-callback-local brotli 21,750 21,772 +22 (+0.1%) 🔴
hooks-state raw 84,414 84,455 +41 (+0.0%) 🔴
hooks-state gzip 27,786 27,811 +25 (+0.1%) 🔴
hooks-state brotli 24,725 24,764 +39 (+0.2%) 🔴
prop-attributes raw 84,668 84,709 +41 (+0.0%) 🔴
prop-attributes gzip 27,782 27,809 +27 (+0.1%) 🔴
prop-attributes brotli 24,753 24,805 +52 (+0.2%) 🔴
context raw 96,621 96,662 +41 (+0.0%) 🔴
context gzip 31,475 31,508 +33 (+0.1%) 🔴
context brotli 27,955 27,922 −33 (−0.1%) 🟢
hydrate-root raw 138,068 138,109 +41 (+0.0%) 🔴
hydrate-root gzip 44,176 44,219 +43 (+0.1%) 🔴
hydrate-root brotli 38,631 38,634 +3 (+0.0%) 🔴
deferred-hydration raw 221,365 221,406 +41 (+0.0%) 🔴
deferred-hydration gzip 69,679 69,735 +56 (+0.1%) 🔴
deferred-hydration brotli 60,118 60,119 +1 (+0.0%) 🔴
hydrate-frame raw 364,520 366,104 +1,584 (+0.4%) 🔴
hydrate-frame gzip 112,947 113,537 +590 (+0.5%) 🔴
hydrate-frame brotli 96,534 97,070 +536 (+0.6%) 🔴
suspense-transition raw 141,550 141,591 +41 (+0.0%) 🔴
suspense-transition gzip 44,727 44,768 +41 (+0.1%) 🔴
suspense-transition brotli 39,252 39,293 +41 (+0.1%) 🔴
component-owned-effects raw 77,056 77,097 +41 (+0.1%) 🔴
component-owned-effects gzip 25,152 25,196 +44 (+0.2%) 🔴
component-owned-effects brotli 22,483 22,496 +13 (+0.1%) 🔴
binding-hooks raw 82,913 82,955 +42 (+0.1%) 🔴
binding-hooks gzip 27,417 27,453 +36 (+0.1%) 🔴
binding-hooks brotli 24,498 24,533 +35 (+0.1%) 🔴
binding-base-ui-vite raw 199,748 199,790 +42 (+0.0%) 🔴
binding-base-ui-vite gzip 62,770 62,781 +11 (+0.0%) 🔴
binding-base-ui-vite brotli 54,452 54,502 +50 (+0.1%) 🔴
binding-base-ui-esbuild raw 215,268 215,315 +47 (+0.0%) 🔴
binding-base-ui-esbuild gzip 69,720 69,747 +27 (+0.0%) 🔴
binding-base-ui-esbuild brotli 60,516 60,479 −37 (−0.1%) 🟢
binding-radix-vite raw 201,779 201,825 +46 (+0.0%) 🔴
binding-radix-vite gzip 63,341 63,366 +25 (+0.0%) 🔴
binding-radix-vite brotli 54,997 55,095 +98 (+0.2%) 🔴
binding-radix-esbuild raw 217,092 217,139 +47 (+0.0%) 🔴
binding-radix-esbuild gzip 70,262 70,298 +36 (+0.1%) 🔴
binding-radix-esbuild brotli 61,037 61,053 +16 (+0.0%) 🔴
binding-mantine-hooks-vite raw 86,471 86,512 +41 (+0.0%) 🔴
binding-mantine-hooks-vite gzip 28,391 28,398 +7 (+0.0%) 🔴
binding-mantine-hooks-vite brotli 25,276 25,296 +20 (+0.1%) 🔴
binding-mantine-hooks-esbuild raw 90,840 90,885 +45 (+0.0%) 🔴
binding-mantine-hooks-esbuild gzip 30,510 30,543 +33 (+0.1%) 🔴
binding-mantine-hooks-esbuild brotli 27,152 27,233 +81 (+0.3%) 🔴
binding-apollo-client-vite raw 342,199 342,242 +43 (+0.0%) 🔴
binding-apollo-client-vite gzip 105,054 105,073 +19 (+0.0%) 🔴
binding-apollo-client-vite brotli 91,622 91,665 +43 (+0.0%) 🔴
binding-apollo-client-esbuild raw 365,411 365,458 +47 (+0.0%) 🔴
binding-apollo-client-esbuild gzip 116,033 116,087 +54 (+0.0%) 🔴
binding-apollo-client-esbuild brotli 101,228 101,330 +102 (+0.1%) 🔴
binding-usehooks-ts-vite raw 87,237 87,282 +45 (+0.1%) 🔴
binding-usehooks-ts-vite gzip 28,594 28,640 +46 (+0.2%) 🔴
binding-usehooks-ts-vite brotli 25,536 25,505 −31 (−0.1%) 🟢
binding-usehooks-ts-esbuild raw 91,608 91,653 +45 (+0.0%) 🔴
binding-usehooks-ts-esbuild gzip 30,750 30,786 +36 (+0.1%) 🔴
binding-usehooks-ts-esbuild brotli 27,384 27,421 +37 (+0.1%) 🔴

36 other measured values are unchanged.

…am-signal-renders

# Conflicts:
#	.agents/skills/performance-audit/references/scheduling.md
#	.claude/skills/performance-audit/references/scheduling.md
#	.cursor/skills/performance-audit/references/scheduling.md
#	.gemini/skills/performance-audit/references/scheduling.md
#	.github/skills/performance-audit/references/scheduling.md
#	.rulesync/skills/performance-audit/references/scheduling.md
#	benchmarks/scheduler-responsiveness/README.md
…ler-browser-backlogs

# Conflicts:
#	benchmarks/scheduler-responsiveness/README.md
…am-signal-renders

# Conflicts:
#	benchmarks/bundle-size/app-budgets.json

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.

Reviewed by Cursor Bugbot for commit f1560aa. Configure here.

Comment thread packages/octane/src/runtime.ts Resolved
@trueadm
trueadm merged commit abe9b42 into octanejs:main Oct 8, 2026
1 of 3 checks passed
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 test PR: tests only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants