Skip to content

fix: reduce Suspense retry reveal window to 100ms - #1798

Merged
trueadm merged 1 commit into
octanejs:mainfrom
openai-oss-forks:fix/suspense-retry-100ms
Oct 5, 2026
Merged

trueadm merged 1 commit into
octanejs:mainfrom
openai-oss-forks:fix/suspense-retry-100ms

Conversation

@domgan-oai

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

Copy link
Copy Markdown
Contributor

Summary

Reduce the shared Suspense retry reveal window from 300ms to 100ms. When ready content is staged behind a visible fallback, Octane publishes it at the shorter deadline; an already-fulfilled tracked promise still reads synchronously.

Why

A fallback was being retained for as long as 300ms after its content was ready. A 100ms window retains time to coalesce closely spaced retries while reducing that deliberate delay.

Changes

  • Adjust the existing runtime constant; keep the global recent-commit budget and per-root timers.
  • Pin Octane's 100ms and React's 300ms contracts in the existing differential suite, including fast-path cutoff, nested boundaries, errors, stale retries and unmount.
  • Update streamed hydration/event replay and projected-renderer tests, document the intentional divergence, and add an Octane patch changeset.

Validation

  • pnpm format:check (targeted checks instead)
  • pnpm typecheck (targeted checks instead)
  • pnpm test (targeted checks instead)
  • targeted tests: could not run. vitest was unavailable after dependency installation failed.
  • Scoped format/typecheck and pnpm sync: blocked by local dependency setup.
  • The project's pinned pnpm 12.9.1 download returns HTTP 403 at the configured registry. A cached pnpm 11.25.0 with its supported --pm-on-fail=warn and frozen lockfile progressed but failed the active minimum-release-age check: [email protected] and [email protected] are absent from that registry's manifest. The lockfile and package policies were not changed.
  • git diff --check
  • Conformance ledger parses as valid JSON.

Risk / follow-ups

Closely spaced slow requests may reveal more intermediate fallbacks within the shorter window. This is a deliberate commit-timing policy change, not a CPU or network speed claim. Default transition holds, explicit transition timeouts, and server deadlines retain their existing behavior.

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

Medium Risk
This changes production commit timing for Suspense retries globally, which can alter perceived loading UX and timing-sensitive tests, though urgent/act bypass and transition holds limit blast radius.

Overview
Octane shortens the shared Suspense retry-only reveal window from 300ms to 100ms, so ready content behind a visible fallback can commit sooner. Already-visible transition holds and setTransitionFallbackTimeout behavior are unchanged; urgent updates and act() still bypass the delay.

The runtime constant SUSPENSE_RETRY_THROTTLE_MS is updated with comments noting React’s 300ms policy. Docs and the Suspense divergence audit now describe this as an intentional Octane difference, and the conformance ledger reflects renderer-specific deadlines.

Tests parameterize the differential Suspense timing suite on retryWindow (100 vs 300), rename the primary case, and retime streaming SSR hydration replay and universal-renderer delayed-reveal expectations to the new 100ms window.

Reviewed by Cursor Bugbot for commit dbc74fc. 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 Oct 5, 2026
@trueadm
trueadm marked this pull request as ready for review October 5, 2026 22:57
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Benchmark report

  • 🔴 bundle-size: 4 value(s) increased within budget
  • 🔴 bundle-reachability: 3 value(s) increased within budget

Compares 95090b1b7, the merge commit's first parent with f7bcfa41f 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 5.508 5.742 −3.0% −50.4% … +5.4% ⚪ within noise
octane-tsrx replace 10.883 9.725 +1.3% −2.6% … +8.3% ⚪ within noise
octane-tsrx add 3.850 4.800 ±0.0% −3.4% … +23.8% ⚪ within noise
octane-tsrx update 0.203 0.237 +4.5% −5.4% … +37.8% ⚪ within noise
octane-tsrx select 0.012 0.012 −4.9% −28.5% … +10.8% ⚪ within noise
octane-tsrx swap 0.072 0.073 +2.4% −5.2% … +7.6% ⚪ within noise
octane-tsrx remove 0.042 0.033 −7.3% −17.4% … +4.1% ⚪ within noise
octane-tsrx runlots 69.233 48.050 −0.4% −8.2% … +2.9% ⚪ within noise
octane-tsrx select_lots 0.010 0.013 +3.7% −12.5% … +12.5% ⚪ within noise
octane-tsrx clear 81.733 69.975 −3.9% −15.7% … +4.8% ⚪ within noise
octane-jsx run 9.058 10.200 −4.6% −27.8% … +58.6% ⚪ within noise
octane-jsx replace 15.533 15.683 −2.9% −23.4% … +3.5% ⚪ within noise
octane-jsx add 7.675 7.642 −0.4% −5.3% … +11.8% ⚪ within noise
octane-jsx update 0.525 0.469 +2.3% −4.6% … +10.6% ⚪ within noise
octane-jsx select 0.229 0.294 +2.9% −1.4% … +16.8% ⚪ within noise
octane-jsx swap 0.349 0.356 −9.2% −38.7% … +4.7% ⚪ within noise
octane-jsx remove 0.312 0.366 +2.4% −2.0% … +17.2% ⚪ within noise
octane-jsx runlots 50.458 52.042 +2.1% −3.8% … +44.1% ⚪ within noise
octane-jsx select_lots 2.772 3.532 +12.6% −3.6% … +33.2% ⚪ within noise
octane-jsx clear 51.283 52.742 +8.9% −1.9% … +18.5% ⚪ within noise

All 64 work counters are unchanged.

Application bundle size (bytes)

target metric base head Δ
octane-tsrx bindings_js_gzip 239,891 239,878 −13 (−0.0%) 🟢
octane-tsrx bindings_js_brotli 204,255 204,363 +108 (+0.1%) 🔴
octane-tsrx bindings_app_gzip 121,383 121,370 −13 (−0.0%) 🟢
octane-tsrx bindings_app_brotli 101,434 101,542 +108 (+0.1%) 🔴
octane-tsrx full_fw_gzip 175,485 175,484 −1 (−0.0%) 🟢
octane-tsrx full_fw_brotli 148,107 148,147 +40 (+0.0%) 🔴
octane-jsx full_fw_gzip 175,485 175,484 −1 (−0.0%) 🟢
octane-jsx full_fw_brotli 148,107 148,147 +40 (+0.0%) 🔴

52 other measured values are unchanged.

Public-import reachability bundles (bytes)

target metric base head Δ
hydrate-root brotli 47,311 47,358 +47 (+0.1%) 🔴
deferred-hydration brotli 63,943 64,012 +69 (+0.1%) 🔴
suspense-transition gzip 51,794 51,793 −1 (−0.0%) 🟢
suspense-transition brotli 45,344 45,353 +9 (+0.0%) 🔴

101 other measured values are unchanged.

@trueadm
trueadm merged commit 35c0d1b into octanejs:main Oct 5, 2026
49 of 50 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 fix PR: bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants