Repository navigation
refactor: share wire protocol literals across runtimes - #1169
Merged
domgan-oai merged 8 commits intoSep 20, 2026
Merged
domgan-oai merged 8 commits into
domgan-oai merged 8 commits into
Conversation
The @for arm markers, presentation-binding comment prefixes, deferred-boundary attribute names, useId spelling, element-scoped ViewTransition stylesheet, and the cross-realm Symbol.for tags were each re-typed in two to five modules. A change on one side of a hydration boundary could diverge from the other with no test noticing. Give each one an owning module: hydration-markers.js for the payloads, attributes and useId (it stays off the dom-tables.js graph so the pre-root capture bundle can share them), dom-binding-protocol.js for the binding marker producer next to its parser, css.js for the ViewTransition stylesheet, and a new runtime-tags.js for the registry keys. octane/constants re-exports the same names and values. Payloads stay plain literals: a bundler does not constant-fold a cross-module template literal, and a derived spelling measured roughly twice the bundle cost on the pre-root capture entry. Adopting a presentation view whose range carries no view id is now rejected outright instead of compared against "[b;undefined;root".
domgan-oai
marked this pull request as ready for review
September 20, 2026 10:35
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.
Reviewed by Cursor Bugbot for commit 8cce777. Configure here.
This was referenced Sep 20, 2026
5 tasks done
8 tasks done
4 of 6 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
Share hydration attributes, marker formats, runtime registry tags,
useIdspelling, and element-scoped ViewTransition CSS between their client, server, and pre-root capture consumers. Public wire values and exports remain compatible.This carries @WebEferen's original work from #1136, preserving its commits, through a branch in
openai-oss-forks/octane. The repair incorporates current upstreammainand includes both initial and resumed independent-island attribute lookups. The landed primitive-local compiler, streamed-signal cancellation, and pending-lazy hydration fixes are preserved.Validation
1e7188eand this candidate in matched fresh processes (1 passed / 18 filtered cases per tree). Both used Node 24.13.0, macOS 26.7 arm64, Playwright 1.61.1 and WebKit 26.5 revision 2311, with unchanged 30-second locator / 60-second case deadlines. CI runs Linux x64; the initial cached-SSR timeout at the prior published head remains unlocalized. The new-head remote package-build lane subsequently passed all of its integration cases; the earlier timeout remains unlocalized.pnpm sync; source/index preservation review and zero generated drift.13e34bf45033159d855f86924d92fc003257ae1d; Cursor Bugbot passed and the feedback thread is resolved.The initial refactor at
8cce777passed 405 protocol/island/streaming/event/signal controls, 262 workflow controls, formatting for its 18 paths and scoped types for 17 paths. The feedback repair extends scope to the presentation-binding constructor and strengthens an existing regression; those broader unchanged checks were not repeated locally. Repository-wide format/type/test and packed-consumer validation remain remote CI scope. Production commits retain the configured signer and hooks; only temporary workflow Git fixtures disabled signing. Bundle and JSDOM checks do not establish CPU performance or physical-device qualification.Provenance
agent-authored)Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Medium Risk
Touches hydration markers, binding comments, useId, and Symbol.for identity across client/SSR boundaries; behavior is intended to be byte-identical, with a small runtime fix for missing presentation view ids.
Overview
Consolidates hydration wire literals that were duplicated across client, SSR, and pre-root capture into a small set of leaf modules, with
octane/constantsstill re-exporting the same public names.hydration-markers.tsnow owns block/@forcomment payloads, deferred-boundarydata-octane-hydrate-*attributes, the boundary selector, and sharedformatUseId.dom-binding-protocol.tsderives presentation-binding comment prefixes and addsbindingRootMarker/isForBindingOpenCommentso binding stamps are not re-typed inline.css.tsowns element-scoped<ViewTransition>stylesheet id/CSS. Newruntime-tags.tsis the single owner of cross-realmSymbol.forkeys (element, portal, Fragment, context, lazy, etc.).Client runtime,
runtime.server, DOM binding program, stream protocol, React compat, universal core, and hydration capture modules import these owners instead of local copies. Presentation view adoption fails fast when a view id is missing rather than comparing against a bogus[b;undefined;rootmarker.Adds
wire-protocol-single-owner.test.ts, which scanssrc(excluding verbatim compiler JS) to ensure each protocol string/symbol key is spelled in only one module.Reviewed by Cursor Bugbot for commit 13e34bf. Bugbot is set up for automated code reviews on this repo. Configure here.