Repository navigation
fix(octane): defer unused SSR signal key serialization - #1147
Merged
domgan-oai merged 1 commit intoSep 19, 2026
Merged
domgan-oai merged 1 commit into
domgan-oai merged 1 commit into
Conversation
domgan-oai
marked this pull request as ready for review
September 19, 2026 17:13
1 task done
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
An ordinary object-keyed
@forlist with opaque text output can throw during SSR because optional signal bookkeeping coerces its reconciliation keys before any handle is read. Keep raw list/component keys in a persistent identity recipe and serialize them only when an actual handle needs its wire identity. Nested directive and mapped lists, both within one component scope and across component frames, retain separate handle values through parked discovery, hydration, native edits, reorder and cleanup.Addresses the eager SSR key serialization part of #1130 §2.1; the broader frame/envelope and bundle regressions remain open.
Validation
481819ec2: the object-key case throws, and the deterministic guard observes 200 unwanted coercions. Dropping frame list identities and dropping the outer raw-key chain each deliberately produce eight actual-handle failures, including observable value collisions. Exact source restored before final checks.pnpm sync.441a55990(run 35457399292), including all four runtime and React parity shards, Chromium/website/heavy integrations, full typecheck, lint, package validation and examples. Repository-wide tests/types were not run locally.Matched production public-entry builds use the same frozen fixtures, lockfile, Node 24.19.0, Vite 8.1.5 and esbuild 0.28.1. Client/model-engine closures are unchanged. Ordinary SSR increases from 17,728 to 17,837 gzip bytes (+109); used-native SSR from 33,472 to 33,559 (+87). This fixes correctness and unused work, with a small SSR byte cost.
Risk / follow-ups
Potential list arms still allocate one raw-key recipe. Actual reads resolve and cache the existing wire keys. These deterministic counters establish neither a wall-time speedup nor zero signal overhead. Existing budgets are unchanged.
Provenance
agent-authored)Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Medium Risk
Touches server signal instance identity for keyed lists and hydration wire keys; behavior is narrowly scoped but correctness-critical for SSR and hydration.
Overview
Fixes SSR throwing or doing unnecessary work when object-keyed
@forlists render opaque scalar output without reading signal handles.Server runtime replaces eager per-list-arm
signalIdentityKeyserialization with a lazy linked recipe (ServerSignalListKeys): list arms only record raw keys and parent context;resolveServerSignalListKeysmaterializes wire keys when a real handle needs an instance identity. Component frames keep rawsignalKeyvalues until resolution, matching prior behavior for actual-handle paths (nested lists, reorder, discovery).Tests and guards: hydration suite covers scalar keyed lists across SSR modes/streams (no
signalspayload, keys not coerced) and nested keyed lists through prerender, hydration, native input edits, and reorder; bundle-boundaries adds a production SSR guard counting zero key coercions for scalar rows vs preserved control identities when handles are used.Reviewed by Cursor Bugbot for commit 441a559. Bugbot is set up for automated code reviews on this repo. Configure here.