Repository navigation
perf: avoid implicit SSR descriptor key serialization - #1032
Merged
domgan-oai merged 1 commit intoSep 10, 2026
Merged
Conversation
domgan-oai
marked this pull request as ready for review
September 10, 2026 14:03
Closed
68 of 84 tasks
14 of 21 tasks
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
Why
The server counterpart to #1030 still serialized every top-level unkeyed position into a JSON string and then encoded it for async identity. The existing async encoder has a distinct numeric namespace, so these positions can enter it directly. This continues the open de-opt list item in #981.
Changes
"0", interleaved requests, and streaming reveals in both dev and production test projects. A deliberate omission of the nested-path guard made the regression fail in both projects before restoration.Validation
pnpm format:files:checkon changed filespnpm typecheck:files packages/octane/src/runtime.server.ts packages/octane/tests/ssr-deopt-list-identity.test.tspnpm exec tsgo --noEmit -p packages/octane/tsconfig.jsonpnpm changeset:checkpnpm exec vitest run --project octane --project octane-prod packages/octane/tests/ssr-deopt-list-identity.test.ts --silent=passed-only(8/8)pnpm exec vitest run --project octane --project octane-prod --silent=passed-only(17,631 passed, 14 expected failures, three unrelated 5-second timeouts while two broad runners competed)83d216ef73c364b89da459c53f83f27150878ba4cd004a65c5c036db567dd980(64,921 bytes, 1,001 rows); implicit JSON key serializations 1,000 → 0, explicit key control 1 → 1.Risk / follow-ups
The change only affects the server's implicit top-level descriptor identities. Explicit and nested key encoding, list closures, and keyed component slot coercion remain open under #981. In four paired production-bundle A–B–B–A cycles, candidate/baseline median ratios were 0.901, 0.827, 0.938, and 0.972; absolute latency varied with concurrent machine work, so these are directional rather than a precise throughput claim.
Provenance
agent-authored)Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Medium Risk
Changes server async child-list identity for descriptor SSR; behavior is narrow (top-level unkeyed only) but correctness across retries, concurrency, and streaming is security-adjacent for output isolation.
Overview
Top-level unkeyed server descriptor children now use a numeric positional identity in
scopedSsrDeoptKeyinstead of wrapping each index inJSON.stringify, while explicit keys and nested wrapper paths still use the JSON-scoped identity shape.Regression coverage adds SSR list scenarios across suspense retries (changing list shape), implicit vs explicit
"0"keys, concurrent prerenders, and streaming reveals. An opt-inunkeyed-work.mjsbenchmark gate (1,001-row fixture) asserts unchanged HTML/CSS and counts implicit positional serializations (1000 → 0 on the candidate).Reviewed by Cursor Bugbot for commit 043c3cd. Bugbot is set up for automated code reviews on this repo. Configure here.