Repository navigation
fix(octane): seed nothing for a pending snapshot read instead of throwing - #2077
Merged
Merged
Conversation
…wing A server module that reads module signals installs the native read collector as it loads, and every later render in the process then collects its reads for the hydration snapshot. A render that read a pending query through snapshot(), such as an automatically streamed query, completed with a read it could not seed and threw "A completed native server read has no serializable ready value". On main 0bb503f, 28 of the 30 early-independent-intent cases throw once that collector exists, while the same page renders in a server that has loaded no such module. A snapshot renders a pending or failed state as it is, without suspending. The client resolves that state itself, or takes a stream's later delivery, so the read now contributes no seed, which is also no invented ready one. A completed value read of an unready source still throws. The signals-hydration case that pinned the throw now asserts that contract: the pending output renders with no hydration snapshot, adopts the same node, and shows the result once the query resolves. The supplemental native DOM smoke case says the same. The new streamed test loads a module-signal page, renders a pending snapshot under streamed signals, hydrates while the client is still pending, and takes the stream's result without a second fetch. Co-Authored-By: Claude Opus 5.5 <[email protected]>
trueadm
marked this pull request as ready for review
October 15, 2026 10:45
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
octane-website | ac5ddeb | Commit Preview URL Branch Preview URL |
Oct 15 2026, 11:22 AM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
octane-website-mcp | ac5ddeb | Commit Preview URL Branch Preview URL |
Oct 15 2026, 11:23 AM |
Contributor
Benchmark report🟢 No byte growth, no added work, and no timing changes beyond ±3%. Compares js-framework: 1k/10k row operationsAll 20 timed operations (20 without a verdict)
All 64 work counters are unchanged. Application bundle size (bytes)No changes across 93 measured values. Public-import reachability bundles (bytes)No changes across 120 measured values. |
6 of 7 tasks
trueadm
added a commit
that referenced
this pull request
Oct 15, 2026
* fix(octane): remove a .tsx Provider's children when they become null (#2076) * fix(octane): remove a .tsx Provider's children when they become null * fix(octane): remove CompiledContext children when they become null * fix(octane): keep CompiledContext's emptied dialect so a rolled-back transition can't duplicate its children * test(website): reload the dev /devtools warm-up once before failing Main a9dfdf7 failed the website integration suite: the dev-SSR beforeAll waited 120 s for the TanStack Devtools trigger on /devtools and skipped all 37 dev-SSR tests. The wait came with #2062 and has failed on main and two branches since, while passing locally on every cold warm-up (~3.9 s). The devtools client mounts after hydration from modules a cold dev server may only discover on that first visit, and Vite recovers with a reload a slow runner can miss. Wait 60 s, log what the first attempt saw, reload once, and fail with the page errors if the trigger still never appears. The devtools tests themselves still assert the trigger and panel on fresh loads. Co-Authored-By: Claude Opus 5.5 <[email protected]> * refactor(three): render Canvas as a Strong template (#2080) * fix(octane): seed nothing for a pending snapshot read instead of throwing (#2077) A server module that reads module signals installs the native read collector as it loads, and every later render in the process then collects its reads for the hydration snapshot. A render that read a pending query through snapshot(), such as an automatically streamed query, completed with a read it could not seed and threw "A completed native server read has no serializable ready value". On main 0bb503f, 28 of the 30 early-independent-intent cases throw once that collector exists, while the same page renders in a server that has loaded no such module. A snapshot renders a pending or failed state as it is, without suspending. The client resolves that state itself, or takes a stream's later delivery, so the read now contributes no seed, which is also no invented ready one. A completed value read of an unready source still throws. The signals-hydration case that pinned the throw now asserts that contract: the pending output renders with no hydration snapshot, adopts the same node, and shows the result once the query resolves. The supplemental native DOM smoke case says the same. The new streamed test loads a module-signal page, renders a pending snapshot under streamed signals, hydrates while the client is still pending, and takes the stream's result without a second fetch. Co-authored-by: Claude Opus 5.5 <[email protected]> * fix(octane): render a server element entry as its component's root, as hydrateRoot does (#2078) * fix(octane): render a server element entry as its component's root, as hydrateRoot does renderToString(<App />), and every other server renderer given an element, rendered the element as a value its root returns (renderEntryValue), which frames the component in a range of its own. hydrateRoot(container, <App />) unwraps an element whose type is a component into the root's body and props, as it does App itself, so the client root has no such range. When App returns a component, a fragment, a Suspense boundary or a template, or renders its children, the server's HTML did not match, and the root rendered on the client with a recoverable error. Each server renderer now reads its entry through renderEntry: a component element renders as that component's root, with the props its descriptor renders it with (descriptorProps, shared with ssrComponentDescriptor), and any other value as before. The two entry forms produce the same HTML, and either hydrates through either hydrateRoot form. root-entry-forms pins every pairing of renderToString and renderToReadableStream, each given App or <App />, with hydrateRoot given App or <App />, for a root that returns host JSX, a template, a component, a fragment, text, null, a Suspense boundary or its children, in dev and prod compiles: 80 of its 256 cases fail before this change. Client bundles are unchanged; the minified server runtime shrinks 234 B raw. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(octane): read a server descriptor's children only after the scoped check A scoped component descriptor's children getter resolves deferred children, so reading it first ran them in the parent's scope before the component entered. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> * test(website): let the generated MDX hot-update test re-write and outwait a slow runner Main 8318702 failed the website integration suite: "hot-updates generated MDX twice while preserving the surrounding interactive page" timed out waiting 20 s for an edit to reach the page. It also failed on perf/runtime-size-redesign; it passes locally every time. Until 1622fa0 the /devtools warm-up flake skipped the whole dev-SSR block, which hid it. Each edit now waits in 15 s rounds, re-writing the file between rounds in case the watcher dropped a write that followed the previous one, for up to 60 s; the test's budget grows to 180 s. The assertions are unchanged: the generated text updates, the sibling counter keeps its state, and no errors. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(octane): keep an emptied Provider's dialect, and refill it through a frontier (#2043) Clearing an emptied CompiledContext at commit dropped its hooks map, so the empty dialect was lost; it is now kept. A refill's reset opens the scope's frontier like a dialect flip, so its incoming body builds off-document. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Olzhas Alexandrov <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: domgan-oai <[email protected]>
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
.snapshot()no longer throws "A completed native server read has no serializable ready value". The read adds no entry to the hydration snapshot, and the client resolves that state itself, or takes the result a stream delivers..get()of a value that is not ready still throws, as before.Why
snapshot()read of a pending source had no ready value to serialize, so serialization threw.early-independent-intent.test.ts, as any module-signal module in the server bundle does when it loads, 28 of its 30 tests throw. Without it, all 30 pass.Changes
signals/seed-serialization.ts:serializeScopeReadreturns no seeds, instead ofundefined(which throws), for asnapshotread whose state is not ready. Every other unready read keeps throwing.tests/signals-hydration.test.ts: the case that pinned the throw now asserts the contract. The pending output renders with no hydration snapshot, hydration adopts the same node, and the node shows the result once the query resolves.tests/hydration/pending-snapshot-seed.test.ts(new): loads a module-signal page, renders a pending snapshot under streamed signals, hydrates while the client is still pending, and takes the stream's result without a second fetch.benchmarks/scoped-signals/native-dom-smoke.mjs: the matching supplemental case is reworded the same way.octane.Found while working on #2044, which carries the same fix along with collecting signal reads in every render whenever signals exist, so collection no longer depends on what the process loaded first.
Validation
Run on this branch, rebased onto main e8e1555:
pending-snapshot-seed.test.tsand the rewordedsignals-hydration.test.tscase fail on main ("no serializable ready value") and pass with the fix (octane + octane-signals).early-independent-intent.test.tswith the collector forced on (enableNativeReadCollection(1)at the top of the file, not committed): 28 of 30 fail on main, 60 of 60 pass with the fix (octane + octane-prod).hydration/pending-snapshot-seed,hydration/early-independent-intent,hydration/automatic-signal-stream,streamed-signal-cancellation,hydration/direct-signal-bindings,hydration/independent-island: 12 files, 524 tests passed. (hydration/initial-document-signalsbelongs tooctane-signals, below.)octane-signals*projects: 103 files, 1,454 tests passed.pnpm typecheckpnpm format:files:checkon the changed filespnpm format:check(repo-wide) andpnpm test(full): not run locally; left to CI.native-dom-smoke.mjs: the reworded case passes. The script still reports 14/27 overall, the same as on main; it is supplemental and not run in CI.perf-review:node scripts/perf-review-scan.mjs→ 0 candidates. The changed function,serializeScopeRead, runs once per collected read when a server render serializes its snapshot, and the new branch runs only on the path that used to throw. The module is server-only (only the server read driver imports it), so client bundles are unchanged. No findings.concise-code: src +6 −1 (runtime 0); no new exports. Alternatives rejected: skipping only when the render streams its query attempts (about +30 lines threaded through the server driver), because it would still throw for non-streamed pages that render today on the collector-less path; relaxing the check inserializeNativeSeedReadsfor any unserializable source (smaller), because it would also stop rejecting completed value reads of unready sources. Bytes: server-only module, client rows not applicable.Risk / follow-ups
snapshot()now hydrates without a seed for it, and the client reads that signal live. That is what main already does for such a page when the collector does not exist. If a server snapshot does seed other values in the same scope, a client read of this unseeded node still misses adoption on main and renders that part on the client instead of throwing on the server. perf(octane): render computes, commit writes — runtime size redesign (#2043) #2044 additionally reads such a node live during hydration.Provenance
agent-authored)Need help on this PR? Tag
@codesmith-botwith what you need.Note
Medium Risk
Changes server hydration seed serialization for pending/failed snapshot reads when native read collection is active; behavior now matches the collector-off path but shifts how unseeded nodes hydrate until follow-ups like #2044.
Overview
Server SSR no longer throws when a completed native read uses
snapshot()on a pending or failed query after the process has loaded a module that enables signal read collection. Instead of failing with "no serializable ready value",serializeScopeReadreturns an empty seed list for that snapshot read so HTML still showspending(or the current status) and nodata-octane-native-signalshydration payload is emitted for it..get()on an unready value still throws, unchanged. Hydration and streaming tests now assert the client keeps the server-rendered pending UI, then resolves via live signals or streamed frames without a second fetch. A patch changeset and the native DOM smoke benchmark mirror the new contract.Reviewed by Cursor Bugbot for commit ac5ddeb. Bugbot is set up for automated code reviews on this repo. Configure here.