Repository navigation
fix(octane): isolate SSR signals for opaque keyed rows - #1252
Merged
domgan-oai merged 2 commits intoSep 22, 2026
Merged
Conversation
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
Distinct object-keyed rows currently reuse the first row's component-local signal during SSR, producing
first, firstinstead offirst, second. Preserve raw object, function, and symbol identity in structural signal keys without calling user key coercion. Primitive-key encoding and mapped-list key normalization retain their existing behavior.Opaque identities use a namespace for each structural call site and initial list positions, so deferred hydration and reverse-order streaming reveals agree with the client. Request retry aliases retain pending queries when keys are recreated. Request completion and root unmount release the added bookkeeping; async continuations outside a render pass do not allocate request-owned identities.
Fixes #1249.
Validation
git diff --check, andpnpm syncpassed.ea311f539, including all test/parity shards, full types/lint, Chromium and website integration, examples, package validation, and compatibility lanes. Cursor Bugbot passed with no findings.Risk / follow-ups
Matched production public-entry builds add 257 gzip bytes to the ordinary client and 212 bytes to SSR. Scalar/structural bindings, signal-engine, compiled-state, and bootstrap sizes are unchanged. Paired timing samples have substantial variance, so they establish no speed improvement or regression. Opaque wire identities are scoped to one response/root and do not promise a canonical identity across independent requests with different traversal orders. The focused hydration regressions use jsdom; the full Chromium integration lane also passed in CI.
Provenance
agent-authored)Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Medium Risk
Changes how structural signal instance keys are derived for lists on SSR and hydration; incorrect scoping could mis-join controls or leak ids across requests/roots.
Overview
Fixes keyed SSR lists where distinct object, function, and symbol reconciliation keys incorrectly shared one component-local signal (e.g. duplicated row values). Signal structural keys now use opaque identity tokens with namespace-scoped numeric ids (seeded from list position and async identity), instead of coercing keys via
String(value)/ userSymbol.toPrimitive.The same opaque-key path is applied on client and server (
runtime.ts,runtime.server.ts): list arms recordposition, request/root state holds id allocators, and that bookkeeping is cleared when a render request or root unmounts. SSR only materializes request-owned structural instance keys while a render pass is active.Benchmarks and hydration/SSR tests are tightened so object keys that throw on coercion stay at zero coercions, real handles stay unique per row within a response, and new cases cover reorder, deferred hydration, query retries, streaming reveal order, and async boundaries.
Reviewed by Cursor Bugbot for commit ea311f5. Bugbot is set up for automated code reviews on this repo. Configure here.