Repository navigation
perf: initialize optional SSR identity in component frames - #1152
Merged
domgan-oai merged 5 commits intoSep 19, 2026
Merged
domgan-oai merged 5 commits into
domgan-oai merged 5 commits into
Conversation
domgan-oai
marked this pull request as ready for review
September 19, 2026 18:52
This was referenced Sep 19, 2026
8 of 9 tasks
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
Potential signal bindings currently append their lazy identity recipe to an already-created SSR component frame. Initialize those optional fields, including the eventual identity cache, in the initial frame shape instead. Frames without signal capability keep their existing nine-field shape.
Why
In the matched Node 24 V8 consumer, the old frame needed a separate property backing array both before and after the first real handle. The candidate keeps the recipe and cached identity in object slots. Late activation, keyed instance identity, list keys, namespace handling, and restoration of the ambient server context retain their existing behavior.
Refs #1130 (SSR frame allocations; this does not remove context restoration envelopes).
Validation
Original owning matrix: 241 SSR and signal behavior cases across development, production, and Strong compilation.
pnpm ci:workflow:test(216 passing after the runtime main refresh), including the new frame-work guard.Scoped TSRX typecheck, scoped formatting, and
pnpm sync.Four broken variants rejected: old post-construction recipe writes, unreserved identity cache, lost parent identity, and lost list identity.
Matched stock SSR and streaming output; 15 public production closures verified.
Signed main refresh
826169cbfa8004b680b3999a3e29913d45e852a5includes landed split-Hydrate and fixed-style fixes plus the latest streaming-SSR documentation. The documentation update changes no Octane runtime/compiler source, package or lockfile. Full current-head GitHub CI passes all 26/26 jobs (run 35466087525); current-head Bugbot passes with no unresolved review threads. Refreshed local checks pass: 30 public SSR identity/style cases, 216 workflow guards, scoped types/format, sync and diff checks, with no generated drift.Risk / follow-ups
This is an allocation change, with no reliable CPU speed claim. All 13 client/engine/native/binding closures are byte-identical. Ordinary SSR grows by 28 raw / 10 gzip / 15 Brotli bytes; the actual used SSR consumer grows by 26 raw / 28 gzip / 0 Brotli bytes. The V8 layout evidence is specific to the pinned Node 24 runtime; the deterministic guard checks initial fields and later writes. Restoration envelopes remain allocated because a descendant can activate signals during the pass.
Provenance
agent-authored)Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Medium Risk
Touches core server SSR frame allocation for signal-capable modules; behavior is guarded by extensive tests but allocation layout changes can affect V8-specific performance and edge cases around late identity materialization.
Overview
SSR component frames now bake optional signal-identity recipe fields (
signalParentKey,signalInvocationSite,signalListKeys,signalKey) and a reservedsignalInstanceKeycache slot into the initial frame object whenSERVER_SIGNAL_BINDINGS_POTENTIALapplies, instead of assigning those properties after the nine-field frame is created. Ordinary frames without signal capability stay at the nine-field shape.A new scoped-signals guard (
ssr-component-frames.test.mjs) compiles matched SSR workloads in dev and production, instruments the server runtime to count recipe writes and frame widths, and asserts zero post-construction recipe assignments, correct 9 vs 14 field shapes, unchanged HTML, and safe restoration of a pre-existingglobalThis.__serverFrameWorkdescriptor. CI workflow tests and benchmark README document the gate; an octane patch changeset records the release note.Reviewed by Cursor Bugbot for commit 826169c. Bugbot is set up for automated code reviews on this repo. Configure here.