Repository navigation
perf(octane): render computes, commit writes — runtime size redesign (#2043) - #2044
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
octane-website-mcp | 3a2889f | Commit Preview URL Branch Preview URL |
Oct 15 2026, 11:43 AM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
octane-website | 3a2889f | Commit Preview URL Branch Preview URL |
Oct 15 2026, 11:44 AM |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
Autofix Details
Bugbot Autofix prepared a fix for 1 of the 2 issues found in the latest run.
- ✅ Fixed: Catch-only stream errors recover
Or push these changes by commenting:
@cursor push da3f9b382f
Preview (da3f9b382f)
diff --git a/packages/octane/src/compiler/compile.js b/packages/octane/src/compiler/compile.js
--- a/packages/octane/src/compiler/compile.js
+++ b/packages/octane/src/compiler/compile.js
@@ -16638,25 +16638,31 @@
// boundary registration + `<template data-oct-b>` sentinel). As React's server
// never runs an error boundary, the @catch arm is client-only: any other
// thrown error marks a @pending boundary for a client render, or rethrows.
+ // A catch-only boundary (handler but no @pending) propagates suspensions
+ // exactly like ErrorBoundary, so it never registers as a stream boundary
+ // whose later rejection would be silently recovered.
// Output is byte-identical to the old inline try/catch emit for buffered
// renders (hydration compatibility).
// `siteKey` is a stable source-position hash so a boundary keeps its identity
// across streaming passes (the runtime adds the frame path per instance).
+ const catchOnly =
+ node.handler && !node.propagateSuspense && pendFn.type === 'Literal' && pendFn.value === null;
+ const propagateSuspense = node.propagateSuspense === true || catchOnly;
const trailing = [];
// A presentation-binding view names its @try region on the boundary's own
// range; the arm suffix is appended by ssrTry once it knows what it rendered.
const bindingSite = node._octaneBindingSite
? inheritOriginLoc(b.literal(bindingMarker(node._octaneBindingSite, 'y')), node)
: null;
- if (componentNs !== null || node.propagateSuspense === true || bindingSite !== null) {
+ if (componentNs !== null || propagateSuspense || bindingSite !== null) {
trailing.push(
componentNs === null
? inheritOriginLoc(b.id('undefined'), node)
: inheritOriginLoc(b.literal(componentNs, JSON.stringify(componentNs)), node),
);
}
- if (node.propagateSuspense === true || bindingSite !== null) {
- trailing.push(inheritOriginLoc(b.literal(node.propagateSuspense === true), node));
+ if (propagateSuspense || bindingSite !== null) {
+ trailing.push(inheritOriginLoc(b.literal(propagateSuspense), node));
}
if (bindingSite !== null) trailing.push(bindingSite);
return ssrCall(You can send follow-ups to the cloud agent here.
…error model The source-order first rejection still wins over an earlier-settling later one, but the server now reports it through onError and ships the pending fallback for a client render instead of rendering the catch arm. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ode (#2043) Signal writes inside startTransition keep fork semantics on the renderer's update-queue model instead of per-transition fork frames. A node written or derived inside a transition batch keeps its committed state and at most one pending slot tagged with that batch (signals/pending.ts). Committed readers, subscriptions and DOM bindings read committed state; a render folds a ready batch's slots exactly when it folds its hook updates, and the transition's synchronous callback reads its own. An urgent write updates committed state and re-applies on top of the pending value. A batch that writes or derives a node already pending in another batch entangles with it, as hook queues do. When a batch and the batches entangled into it finish, their slots promote before the commit that presents them accepts its reads; DOM bindings present the change before public subscribers hear of it. A held batch also holds other roots that rendered its signals, so a shared signal never commits in one root alone. This deletes SignalActionFrame, the transition coordinator and candidate sources (transition-action.ts, transition-coordinator.ts, transition-candidate.ts), the renderer's native transition glue, and the DOM-binding transition markers. Pending code keeps the octane-islands placement through action-capability*.ts. A held transition unblocked by its boundary's timeout fallback now renders in the transition task, after the fallback's commit and effects. A signal transition renders in the transition task like other transition work. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ng slots A held transition keeps committed readers and DOM bindings on the old value while urgent writes commit and the transition re-applies on top of them; two transitions that write one signal commit together; a dropped render leaves no pending state behind, its private request aborts and a later transition on the same signal commits on its own. Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # packages/octane/src/runtime.ts
…or wire v2 The minimal deferred-hydration scenario hydrates a hand-copied server render. Hydration wire v2 (4ccd446) renders a Suspense boundary without a fallback, which <Hydrate> uses inside its wrapper, as one range instead of two, so the copy had one range too many. The client reported the mismatch, rendered the island on the client and dropped the click captured on the discarded button, as docs/deferred-hydration.md specifies, and the scenario read that detached button as still dormant. Recapture the HTML from renderToString(DeferredRoot), and report whether the island adopted the server button, so a stale copy shows as a non-adoption rather than as an island that never activated. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…2028) On the client a @Try without @pending is not a Suspense boundary: tryBlock sets propagateSuspense when it has no pending body, so a suspension inside it shows the nearest @pending fallback, as React's error boundaries do. On the server it caught the suspension itself and, in a stream, registered a boundary with an empty placeholder. A later throw in its content then took ssrTry's recovery path because that boundary had a stream entry, shipping a client-render instruction for it instead of passing the error on, while the buffered renderers and an error thrown before the suspension rethrew. ssrTry's propagateSuspense now defaults to pendFn === null, mirroring tryBlock. A catch-only @Try never registers, so its suspension and its errors reach the nearest Suspense boundary through the existing pending/errored paths, or the root when there is none: the shell waits, and a later error fails it. The <Hydrate> wrappers, which own their suspension, pass false explicitly, and compiled presentation-binding views keep passing their own flag. The lowered JSX ErrorBoundary no longer needs the explicit flag, so its server call drops `, undefined, true`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…on (#2028) State that a @Try with only @catch, like ErrorBoundary, is not a Suspense boundary on the server either: a suspension inside it ships the nearest Suspense fallback, or holds the shell with none above it. Covers the render-errors section, the Suspense divergence note, and the server-errors changeset. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rites its signal A transition that writes what a direct signal binding presents renders the Block that owns the binding with its batch, so the read its render records can hold the transition; the binding itself still writes only committed values. A hookless component's stand-in resolves to that owning Block. A held batch with pending signals also drops the other roots' renders of it in the same drain, so a shared signal never commits in one root alone. The renderer -free control binding no longer carries a transition marker. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s signals Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-queues # Conflicts: # packages/octane/src/runtime.ts
…ite (#2043) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…he update queues Co-Authored-By: Claude Opus 5.5 <[email protected]>
A committed list's direct-host row keeps its one root detached: commitBag self-marks the row with it (DETACHED_ROOT), and the list's log inserts it before its anchor at commit. The row needs no fragment to render into and no rehoming, so a fill does the same DOM work as before off-document rendering. Other rows still render into a run fragment. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nding world scoping Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Inside a root render, a Suspense primary's hide (HIDE) and reveal (UNHIDE) are commit ops: the hide lands after the content the render built, the reveal ahead of the content it patches, and a dropped render touches no display or text state. A changing Activity journals its visibility record, its Block's inactive flag and its suspense handler, and reveals at commit, so a dropped render leaves it as it was. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ignal bindings (#2043) Since 1dd1cd6 a direct signal attribute records into its bag in render and its commit function calls bindSignalAttribute only for a recorded value. A value equal to the committed one, including undefined, an object, a function or an unchanged handle, records nothing, so neither the helper nor the policy runs. The guard still pinned the render-time helper call on every update. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…2043) Since 1d632e8 a held transition is queued hook work that its holder retries at transition priority, so the release renders the new value with isPending's falling edge once, as React retries the transition lane (checked against React 19.2.7: hold [prev,true],[next,false]; release [next,false]). The control still expected the promotion render the queue model removed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The signal-transition queues removed every NATIVE_TRANSITION_CONSUMER registration on binding views, so nothing calls a view's drain(true), assigns a program transaction's preview, or calls a connection's, style's, projection's, read tracker's or control lease's preview(). Delete that path from dom-bindings.ts, dom-binding-program.ts and their signal, style, projection and control leaves, with __prepareBindingSources, BindingPreparedValue, BindingControlPreview and NativeTransitionPresentation. Their notifies never carry a consumer now, so forwardNativeTransitionConsumer was an identity there and goes too. The error-code generator stops listing the deleted transition-candidate module, and the Lynx plan names the consumer tag that replaced the presentation protocol. Binding-view bundles in the bundle-boundaries suite shrink 330 to 1,180 B gzip (scalar view 3,548 -> 3,072, renderer-free binding 23,385 -> 22,810, StyleX combined 76,235 -> 75,177). Apps without binding views are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…, and drop root remainders (#2028) A hydration pass recorded where its root's content ended (rootRemainder), rescanning the root container from its first child on the first top-level clone to find an enclosing frame. Only a Hydrate island read it, through finishRoot; a hydrateRoot root keeps unmatched siblings, as React does. An island's content now adopts its server range through the component claim (beginClaim, settleClaim), and settleHydrateTail checks what its wrapper holds after the range. The pass keeps only whether its root's first top-level template has been claimed (rootClaimed), so the rescan, claimRootRemainder, protectRootAnchor and the fragment remainder go. hydrate-wrapper-range pins both fallbacks: server content inside an island's range, and after it in its wrapper. shell_ full and base_hydrate shrink 734 B raw (223 to 241 B gzip), esbuild createRoot bundles 91 B raw (39 to 51 B gzip). Cold hydration pairs flat against the previous step. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…r in one helper (#2043) componentSlotLite's resumed mount and a Provider's dialect flip each pointed their Block at a new frontier with the same six lines; openScopeFrontier holds them. The Provider renders its children through one call, restoring the end it moved in a finally. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…#2043) setAttribute wrote a hydrating select's multiple property, so a hydrating render wrote the server DOM it adopts, even when the server had rendered the same value. An adopted select now keeps its server multiple as it keeps any server attribute (keepsAttribute, which warns on a mismatch in dev), as React keeps a hydrated element's attributes. The render-write guard missed it: jsdom calls a <select>'s setters through a Proxy, whose frames it took for a non-runtime caller. It now skips the DOM implementation's frames when it names the writer. The attribute matrix checks that hydration writes no server attribute. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…, select multiple kept) into perf/runtime-size-redesign Co-Authored-By: Claude Opus 5.5 <[email protected]>
…dopts check (#2043) The hydration value wrappers were deleted (keepsAttribute among them), so the select multiple writer follows the other writers: check the adopted element, compare in development, keep the server value. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e ranges (#2028) A component's claim, a branch arm, a @for list and a prepared child list each checked what the server left after their content with their own method (settleClaim's tail, settleArmTail, settleItems, through leftover), and each named it differently. They now share settle: after a range's owner first rendered its content, server content left between the cursor and the range's close is a mismatch, and a cursor outside the range proves nothing. The outcome is unchanged: the same boundary falls back and reports once. The dev message now reads "expected the end of its content" for all of them, and a @for names its own site. The claim records its owner (claimOwner), so claimRoots no longer looks up a lite call's range, and an adopted lite stand-in already ends at its server close (endMarker), which settleClaim and a replay's cursor read. The liteRanges WeakMap and HydratedLiteRange go. adopted-component-tail adds a component whose content is its lite calls' ranges; mismatch-populated-list pins a @for and an array of children that adopt fewer items than the server rendered; the branch and component tail tests take the shared wording. shell_ full and base_hydrate shrink 267 B raw (56 to 57 B gzip), hydrateRoot bundles 263 to 344 B raw (76 to 78 B gzip); createRoot and client-only rows are flat to 3 B smaller. Cold hydration pairs flat against the previous step. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
This PR is too large for Bugbot to review. It changes 46,994 lines and 3,490,628 characters. Split the change into smaller pull requests to get a review. |
…de-opt tail check into hydration (#2028) A text hole whose value adopts the Text node that leads its range (settleTextRange) checked what the server rendered after it with its own wording; it now settles the rest of the range as every adopted range does, and an only-child text host's tail (htext) takes the same "expected the end of its content" wording. A de-opt host's server child that no client child adopted is checked by the hydration capability with the missing-child case (missingDeoptChild, now deoptMismatch), so client-only bundles that do not fold hydration away no longer carry it. Outcomes are unchanged: the same boundary falls back and reports once. An element hole and a de-opt host keep naming the element whose content ended ("the end of <p>"), which is what a parser-repaired nesting reads as (ssr-invalid-nesting). mismatch-unadoptable-range pins an element and a text value, in a hole and in a return slot, where the server rendered more after them; deopt-children-mismatch pins de-opt children that are more or fewer than the server's, in dev and prod compiles. shell_ full and base_hydrate shrink 73 B raw (43 to 44 B gzip), hydrateRoot bundles 29 to 73 B raw (11 to 44 B gzip), and the esbuild createRoot bundles 59 B raw (30 to 32 B gzip); Vite client-only rows are flat. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… instead of wrapping it (#2028) A root's slot that found no server range at its anchor or the cursor accepted its two unframed forms, nothing and a string's bare text, and otherwise wrapped a returned component's first server node in a range of its own (wrapUnframedRoot) for it to adopt. Octane's server renders every root value but those two in a range (serverComponentOutput), in a plain root, a Hydrate island or a Suspense boundary alike, and no Octane-rendered markup across the octane and SSR projects reached the wrapper: only markup from another server does. That markup now fails like any other that does not match the client render: the root renders on the client and reports one recoverable error. The check moves into the hydration capability (rootSlot), reads the cursor directly, and unframedRoot and wrapUnframedRoot go. A Hydrate wrapper without its server range is a mismatch, so its check stops counting as a probe too. The probe gate's roots family falls from 129 to 104, the passthrough root and its lists, which own no server range above their owner; its budget follows, and its family lists lose the sites earlier steps deleted. root-unframed-component pins both: the range Octane's server renders a root's returned component in, which hydration adopts, and markup without one, which the root renders on the client. shell_ full and base_hydrate shrink 399 to 401 B raw (117 to 125 B gzip), nohydrate and base 63 to 68 B raw (28 to 39 B gzip); hydrateRoot bundles 34 to 395 B raw; createRoot bundles 77 to 80 B raw on Vite and 356 to 357 B raw (73 to 104 B gzip) on esbuild. Cold hydration pairs flat against the previous step. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…n server HTML (#2028) Both hydration tests prefixed React's SSR markup with Octane's protocol comment and expected the root to adopt it, which only the unframed component-root wrapper allowed: Octane's server renders an icon root's returned component in a range of its own. Since 1d5fcf0 such markup renders on the client, so the tests now hydrate renderToString's output, and assert separately that its elements are React's SVG. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s hydrateRoot does (#2028) renderToString(<App />), and every other server renderer given an element, rendered the element as a value its root returns (renderEntryValue), which frames the component in a range of its own. hydrateRoot(container, <App />) unwraps an element whose type is a component into the root's body and props, as it does App itself, so the client root has no such range: the server's HTML did not match, and the root rendered on the client with a recoverable error. Which roots broke depended on how the client adopts a root's output: on main, a root that returns a component, fragment, Suspense boundary or template; on this branch, one that renders a template or host elements. Each server renderer now reads its entry through renderEntry: a component element renders as that component's root, with the props its descriptor renders it with (descriptorProps, shared with ssrComponentDescriptor), and any other value as before. The two entry forms produce the same HTML, and either hydrates through either hydrateRoot form. root-entry-forms pins every pairing of renderToString and renderToReadableStream, each given App or <App />, with hydrateRoot given App or <App />, for a root that returns host JSX, a template, a component, a fragment, text, null, a Suspense boundary or its children, in dev and prod compiles: 48 of its 256 cases fail before this change, and 80 on main. Client bundles are unchanged; the server bundle shrinks 74 B raw. Co-Authored-By: Claude Opus 5.5 <[email protected]>
parseTemplate takes main's template-context parse without the deleted DOMStage view, and the tanstack-start document test keeps main's compiled and transport modes plus the hydration version mark. Co-Authored-By: Claude Opus 5.5 <[email protected]>
next is the runtime-redesign working branch (#2043); release and publish stay on main. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…d check (#2028) A scoped component descriptor's children getter resolves deferred children, so reading it first ran them in the parent's scope before the component entered. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…arity evidence hashes (#2028) The <!--3--> root mark (b979105) changed renderToString/prerender output and the files several React parity manifests pin by hash. Update the external pack canaries and the Bun preload integration to expect the mark, as the Node register-hook test already does, refresh the stale evidence sha256 entries in the base-ui, markdown and textarea-autosize parity manifests, and format protocol-version.test.ts. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Benchmark report
Compares js-framework: 1k/10k row operations
All 20 timed operations (9 without a verdict)
Work counters (an increase fails this check):
37 other measured values are unchanged. Application bundle size (bytes)
2 other measured values are unchanged. Public-import reachability bundles (bytes)
24 other measured values are unchanged. |
…ydrationFallback (#2028) 5a263f7 removed finishRoot; a root whose hydration fails now discards its unclaimed server content and client-renders it through installHydrationFallback, which the conformance test the entry cites still pins. Regenerate docs/redact-adversarial-audit.md. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* perf(octane): render computes, commit writes — runtime size redesign (#2043) (#2044) * test(octane): convert the parallel use() error-order test to React's error model The source-order first rejection still wins over an earlier-settling later one, but the server now reports it through onError and ships the pending fallback for a client render instead of rendering the catch arm. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): keep transition signal writes in one pending slot per node (#2043) Signal writes inside startTransition keep fork semantics on the renderer's update-queue model instead of per-transition fork frames. A node written or derived inside a transition batch keeps its committed state and at most one pending slot tagged with that batch (signals/pending.ts). Committed readers, subscriptions and DOM bindings read committed state; a render folds a ready batch's slots exactly when it folds its hook updates, and the transition's synchronous callback reads its own. An urgent write updates committed state and re-applies on top of the pending value. A batch that writes or derives a node already pending in another batch entangles with it, as hook queues do. When a batch and the batches entangled into it finish, their slots promote before the commit that presents them accepts its reads; DOM bindings present the change before public subscribers hear of it. A held batch also holds other roots that rendered its signals, so a shared signal never commits in one root alone. This deletes SignalActionFrame, the transition coordinator and candidate sources (transition-action.ts, transition-coordinator.ts, transition-candidate.ts), the renderer's native transition glue, and the DOM-binding transition markers. Pending code keeps the octane-islands placement through action-capability*.ts. A held transition unblocked by its boundary's timeout fallback now renders in the transition task, after the fallback's commit and effects. A signal transition renders in the transition task like other transition work. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(octane): pin fork semantics of transition signal writes on pending slots A held transition keeps committed readers and DOM bindings on the old value while urgent writes commit and the transition re-applies on top of them; two transitions that write one signal commit together; a dropped render leaves no pending state behind, its private request aborts and a later transition on the same signal commits on its own. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(bench): recapture the deferred-hydration fixture's server HTML for wire v2 The minimal deferred-hydration scenario hydrates a hand-copied server render. Hydration wire v2 (4ccd446964) renders a Suspense boundary without a fallback, which <Hydrate> uses inside its wrapper, as one range instead of two, so the copy had one range too many. The client reported the mismatch, rendered the island on the client and dropped the click captured on the discarded button, as docs/deferred-hydration.md specifies, and the scenario read that detached button as still dormant. Recapture the HTML from renderToString(DeferredRoot), and report whether the island adopted the server button, so a stale copy shows as a non-adoption rather than as an island that never activated. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(octane): pass suspension on from a server @try without @pending (#2028) On the client a @try without @pending is not a Suspense boundary: tryBlock sets propagateSuspense when it has no pending body, so a suspension inside it shows the nearest @pending fallback, as React's error boundaries do. On the server it caught the suspension itself and, in a stream, registered a boundary with an empty placeholder. A later throw in its content then took ssrTry's recovery path because that boundary had a stream entry, shipping a client-render instruction for it instead of passing the error on, while the buffered renderers and an error thrown before the suspension rethrew. ssrTry's propagateSuspense now defaults to pendFn === null, mirroring tryBlock. A catch-only @try never registers, so its suspension and its errors reach the nearest Suspense boundary through the existing pending/errored paths, or the root when there is none: the shell waits, and a later error fails it. The <Hydrate> wrappers, which own their suspension, pass false explicitly, and compiled presentation-binding views keep passing their own flag. The lowered JSX ErrorBoundary no longer needs the explicit flag, so its server call drops `, undefined, true`. Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(octane): a server @try without @pending does not hold a suspension (#2028) State that a @try with only @catch, like ErrorBoundary, is not a Suspense boundary on the server either: a suspension inside it ships the nearest Suspense fallback, or holds the shell with none above it. Covers the render-errors section, the Suspense divergence note, and the server-errors changeset. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(octane): render a direct binding's owner with a transition that writes its signal A transition that writes what a direct signal binding presents renders the Block that owns the binding with its batch, so the read its render records can hold the transition; the binding itself still writes only committed values. A hookless component's stand-in resolves to that owning Block. A held batch with pending signals also drops the other roots' renders of it in the same drain, so a shared signal never commits in one root alone. The renderer -free control binding no longer carries a transition marker. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(octane): pin hookless and cross-root reads of a held transition's signals Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(bench): check pending signal placement in the bundle-boundary suite (#2043) Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(octane): describe transition signal writes as pending slots on the update queues Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): place a fresh direct-host row's root at commit (#2043) A committed list's direct-host row keeps its one root detached: commitBag self-marks the row with it (DETACHED_ROOT), and the list's log inserts it before its anchor at commit. The row needs no fragment to render into and no rehoming, so a fill does the same DOM work as before off-document rendering. Other rows still render into a run fragment. Co-Authored-By: Claude Opus 5.5 <[email protected]> * refactor(octane): settle a batch's signals with its root and share pending world scoping Co-Authored-By: Claude Opus 5.5 <[email protected]> * chore: changeset size for pending signal slots Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): hide and reveal boundaries at commit (#2043) Inside a root render, a Suspense primary's hide (HIDE) and reveal (UNHIDE) are commit ops: the hide lands after the content the render built, the reveal ahead of the content it patches, and a dropped render touches no display or text state. A changing Activity journals its visibility record, its Block's inactive flag and its suspense handler, and reveals at commit, so a dropped render leaves it as it was. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(bench): count opaque attribute work against commit-time direct signal bindings (#2043) Since 1dd1cd68ab a direct signal attribute records into its bag in render and its commit function calls bindSignalAttribute only for a recorded value. A value equal to the committed one, including undefined, an object, a function or an unchanged handle, records nothing, so neither the helper nor the policy runs. The guard still pinned the render-time helper call on every update. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(bench): release a held transition in one render, as React does (#2043) Since 1d632e8490 a held transition is queued hook work that its holder retries at transition priority, so the release renders the new value with isPending's falling edge once, as React retries the transition lane (checked against React 19.2.7: hold [prev,true],[next,false]; release [next,false]). The control still expected the promotion render the queue model removed. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): delete the DOM binding transition preview (#2043) The signal-transition queues removed every NATIVE_TRANSITION_CONSUMER registration on binding views, so nothing calls a view's drain(true), assigns a program transaction's preview, or calls a connection's, style's, projection's, read tracker's or control lease's preview(). Delete that path from dom-bindings.ts, dom-binding-program.ts and their signal, style, projection and control leaves, with __prepareBindingSources, BindingPreparedValue, BindingControlPreview and NativeTransitionPresentation. Their notifies never carry a consumer now, so forwardNativeTransitionConsumer was an identity there and goes too. The error-code generator stops listing the deleted transition-candidate module, and the Lynx plan names the consumer tag that replaced the presentation protocol. Binding-view bundles in the bundle-boundaries suite shrink 330 to 1,180 B gzip (scalar view 3,548 -> 3,072, renderer-free binding 23,385 -> 22,810, StyleX combined 76,235 -> 75,177). Apps without binding views are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(bench): expect no journal snapshots from commit-time handler and style writes (#2043) Since dc409debd6 a compiled template records changed value bindings into its bag and its commit function writes them, outside any journal window. A changed handler capture no longer snapshots its native bundle (100 -> 0), and an updated inline style no longer snapshots the style attribute (Happy DOM reads 700 -> 600 for both consumers). The guards still pinned the render-time snapshots; their semantic controls are unchanged and pass. Co-Authored-By: Claude Opus 5.5 <[email protected]> * refactor(octane): read a hydrating slot's open comment through a local receiver 4ccd446964 (mountTry) and cff07abee1 (renderBranchSlot) read the slot's open comment as `(STAGED_DOM ? STAGED_DOM.view(state.start) : state.start).data`. The staged-DOM check accepts a staged receiver only around a local identifier, so it reported both reads as unclassified native operations. Hoist the slot's start into a local, as every other staged comment read does. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): resume boundaries as root renders, and mount late slots off-document (#2043) A boundary's resume or hidden retry that runs outside a render (a thenable settling) now renders as its root's render (inBoundaryRender), so its commit, not its render, writes the DOM: the fallback stays and the primary stays hidden until the reveal commits, and a retry that suspends again leaves the screen alone. Under a ViewTransition driver it still renders in place (step 3). That makes the slots a committed Block first reaches after an earlier render suspended (component, lite component, child, list, try and Activity slots) build in a frontier their commit inserts, so content lands in render order beside slots that changed in the same render. A component whose earlier render suspended still mounts its first template in place. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): checkpoint boundary windows into their render's capture (#2043) A committed boundary's transition window, and a resume's replay, no longer allocate a capture of their own inside a root render: they checkpoint the capture the render already records into. Success costs nothing, and a drop truncates the window's effects, events, refs, stores and render cleanups. Native reads, and reveals that reconnect effects against their own queues, keep a separate capture. Each root owner also reuses its commit queue across transactions rather than allocating one per render. Together these bring the transition-hooks held phase from 91 to 64 arrays a cycle. Also: catalog the frontier rehome assertion as error 346, and delete the unused returnSlotTail. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): clear a root container at commit; nested windows copy outer pending structure (#2043) A synchronous root mount queues the container's previous content as the frontier's first outgoing entry, so a render that never commits leaves it in place. A slot or list whose pending structure an outer window built is copied on a nested window's first touch, so that window's drop gives it back; a structure the window built itself is marked and left to the ops truncation. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): delegate a portal target's events from the commit that inserts it (#2043) A portal a root render builds off-document registers its event range and its target's delegated listeners from a commit op, so a dropped render attaches nothing to the target. A portal torn down before that commit gives back no share it never took. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): render a ViewTransition's batch and commit it in the native update (#2043) vtFlush runs a render-only drain: root transactions are held, not committed, so the batch builds off-document like any root render (frontiers, framed resumes, portals) and its commit lands inside the startViewTransition update, with layout after resources as before. A render that would join a held transaction commits it first; a root unmounted or replaced while the commit waited drops it, and an early presentation that changed is prepared again before any staged write lands. Planning reads the DOM the held commit will leave (vtPreview). An interruption the drain causes waits for its end, and an empty flush no longer skips running animations. Render-time writes to committed DOM that remain still stage through DOMStage during the drain, so commit-phase staging (staged root owners, rejected presentations) is gone but DOMStage itself stays for now. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(octane): run the ViewTransition files with DOM staging off (#2043) pnpm test:vt-staging-off runs the 27 ViewTransition test files with OCTANE_VT_STAGING_OFF set. The test setup turns that into a development-only global that makes vtFlush drain without DOMStage and with an inert staged commit capture, as the runtime will once both are deleted. Each render-time writer that still needs staging then fails the tests pinning the old snapshot; the writers moving to commit use it as their acceptance check. Production builds drop the switch. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(octane): gate hydration range probes by mount-path family (#2028) scripts/hydration-probe-audit.mjs runs the hydration suites with the probe audit on and sums every probe miss and fallback by the mount-path family that made it: returned values, de-opt descriptors, component calls, template roots, holes, lists, branches and root entry. It fails when a family exceeds its budget, or when a probe belongs to no family. Each step of the hydration cursor redesign takes its family to 0. The budgets start at today's counts. The reporter now reads frames V8 prints with an alias (`fn [as body]`). It had skipped them, crediting de-opt item and return-slot probes to renderBlockInner. Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(octane): render a returned value directly in its component's range (#2028) Hydration protocol 3 (P2). A component's returned value now renders inside the range that bounds the component's output, instead of in a second range of its own, and so do the values of components it returns in turn. On the server, RETURN_IN_RANGE says whether a range bounds the rendering component's output: its own frame, its returning component's range, or for an M3 call its parent's. A root's output has none, so a value the root returns keeps its range, as does a keyed returned element, which the client renders as a one-item list. The compiler marks the sole root of a `return <jsx>` body with inherit `2`, read by ssrComponent and ssrChild. On the client a return slot's first hydrating render borrows its block's range whenever the block's markers are a server pair (returnsInRange), and a returned single-root component inherits it. This replaces the special cases for an empty range, a synthetic root range and server text (isUnframedRootRange, holdsServerText), so a returned text no longer gains an inserted anchor comment. lendRange stops probing and counts as protocol, not a fallback: the returned-value family is at 0 probes. Template-root claims take 216 more misses, which the next template commit makes strict. The seed script names version 3, and a version 2 root renders on the client with error 345. The binding hydration suites' captured server HTML is recaptured. A tail mismatch in a returned value now names the call whose range holds it. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(octane): mount the storage-candidate test's input from outside the root container (#2043) 8ad7d72b39 clears a root container's previous content at the mount's commit, as React does. The test's hand-written body moved its input into the root's range only when it was disconnected, and it started inside the container, so the body left it there and the commit removed it. Start it outside, so the body mounts it into the range it renders. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): snapshot a resumed boundary once, and skip the hold lookup while nothing holds (#2043) A detached boundary render that opens its own frame snapshots the TrySlot directly instead of looking it up first. holdsUnrenderedTransition returns early while no holder exists, which restores transition-hooks held_map_gets to its 1,793 ceiling (1,920 before). Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): build Suspense and error boundary arms off-document (#2043) A root render that changes a committed boundary now builds its incoming arm in the slot's frontier (insertArmPair) instead of in place: the try body of mountTry and mountErrorBoundary, the pending arm, the restarted hidden primary, and both catch arms. Commit inserts the fragment before the boundary's end (the hidden primary before the visible fallback), so a dropped render leaves the boundary's DOM untouched. TrySlot and ErrorSlot gain `next`; beginDetachedBoundaryRender journals the boundary's range only while hydrating, which still writes in place. A Block whose first render suspended (a primary that never resolved) is never marked mounted, so its deletion ran at render and a dropped render lost its markers for good. defersRootUnmount now defers every Block an earlier render created. The for.test.ts retry case read the live document mid-render; its fresh body now renders off-document like the first attempt. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): write committed de-opt hosts at commit (#2043) A root render over committed DOM no longer patches a de-opt host as it reconciles. reconcileDeoptNode and hostElementBody resolve the descriptor record in render and queue one DeoptOrder per host: at commit it runs setHostProps against the committed DEOPT_DESC, stamps the record, and places the children's order. A committed Text's data is a record of its own. A later pass of the same render starts from the pending record, its children from `nodes` rather than the DOM, and getDeoptDesc reads the pending record. The order no longer lands at render. A replaced element (deoptItemBody, hostElementBody's tag change) builds in a frontier its commit inserts; a self-marked item's markers move to the replacement as it lands (the frontier's bound), so the keyed list's own entry, which runs first, still moves it by the node it shows. promoteSelfMarkedItem still mints its pair at render: the list splices its entry ahead of the item's, so a pair inserted at commit would not exist when the list moves it. A compiled handler's authority refresh in a root render publishes at commit (queueEventOwner). A same-component root.render from a mutation-phase callback no longer ends the commit that runs it: the commit finishes, with its effects, as React's does. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): write head elements, native styles and hostComponent at commit (#2043) A root render over committed DOM now computes these and queues the write: - headBlock keeps a committed element's next attributes and text in HeadSlot.next, applied by one commit entry per transaction. A new element is still written before it joins <head>; namespaceHead's teardown of a committed entry is a queued deletion. - nativeStyleBody, nativeProjectionBody and writeScalarNativeStyle read and resolve in render; the write and the publish of the committed value (slots[0] or the scalar binding's style) are a commit entry. - hostComponent applies props to a committed host at commit, after its children's entries, in the Scope that rendered them (commitInScope, shared with the de-opt host commit). A host that first appears under a committed Block lands from a frontier, and a render that drops forgets it. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): project a controlled select's value at commit (#2043) setSelectValue no longer projects onto the options during a root render; the commit's controlled sync (drainControlledSyncs) projects it once the options are placed, so a render that never commits leaves the selection alone. A root render always queues that sync. Writes outside a root render, such as a de-opt or hostComponent commit entry's, still project at once, and a ViewTransition drain's DOMStage still stages its render's projection until staging is deleted. Co-Authored-By: Claude Opus 5.5 <[email protected]> * refactor(octane): reconcile a host's pending de-opt order on the general path (#2043) A later pass of a root render over a host with a pending order now skips the scalar-text and fresh-host fast paths and matches against the order's nodes on the general path. Drop the $$deoptOrder prototype seeds: the reads are per changed host, not per scanned child. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(octane): test the staging driver by truthiness in setSelectValue (#2043) A `STAGED_DOM !== null` comparison kept the driver in split-shell's runtime chunk (run-minimal reachability gate). Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): queue no de-opt record for an unchanged committed host (#2043) A committed descriptor host whose props would write nothing (equal values, no controlled field to reassert) stamps its record in render, as before, and queues no commit entry; its children queue an order only when their nodes or order change. The commit places children past foreign ranges unconditionally, so the record drops its `skip` flag. hostComponent's first insert journals its slot only when the root attempt would not discard the Block whole. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): change a child slot's text at commit (#2043) A render over committed DOM no longer writes a child slot's text. New Text waits in the slot's frontier, which commit inserts after the outgoing content leaves; a markerless only-child Text appends through a frontier of its own, and its removal, a translator reset and kept server content leave at commit. A steady text change on a Text the DOM shows queues a commit write: render compares against the DOM until the transaction queued a write to that node, and every later change then queues too. A host's first component child and a pure host the slot builds land through the frontier as well, and a markerless host leaving its slot for anything but another host takes its new marker pair with it at commit. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(compiler): commit renderable holes through two cells (#2043) A template hole records its raw value and its Text into commit cells (bagHole, bagChildHole) instead of writing at render. A primitive into the hole's committed Text records only the value, which the commit function writes; anything else renders the slot now, off-document over committed DOM, and records the Text it settled on, which commit publishes with the value. A staged bag's cells are the hole's pending state, so a second render in one transaction compares against them. Holes record after the template's first bagDone, which keeps a queued bag's cells for them, and a trailing bagDone queues or commits what they recorded. Certified repeated rows mount their holes directly and call the recorder only for a change, an object, or a moved cell, so a stable row costs no extra call. Render-time text writes outside commit functions (holes the recorder writes in order, signal children, signal text scalars, commit-less templates such as presentation views) go through setRenderText, which queues the write while a render may be dropped. setText stays the commit-time writer. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): commit hosts that resolve props across sources, and raw HTML (#2043) Every host whose props resolve across sources (spreads, duplicate props, form cascades, dev customized built-ins, textareas and native-read hosts) now records its sources at render (bagRecordHost) and resolves and writes them in its commit function: setHostPropSources for a plain host, the signal binding otherwise. A native-read host still reads its winning style in render, so the render observes it. Raw-HTML ownership still resolves at render; setHTML and setScriptText write at the commit of a render that may be dropped. A direct signal binding, signal child or signal host notified while a root renders schedules its owner's render instead of writing mid-render. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(octane): restore a held ViewTransition's committed selection on a user edit (#2043) A controlled multi-select whose value resolves across writers records its target at commit (9d80f4d61d), so a user edit while the transition is held restores the committed selection rather than the one the held render asked for. Fails with DOM staging off when the host's sources resolve in render. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): adopt component calls only at the range the server framed (#2028) The server frames every component call that does not inherit its parent's range (protocol 3), so a hydrating call now adopts the range at its anchor, or, appended or as the sole hole of an arm, the one at the cursor (HydrationCapability.callOpen). Anything else is a structural mismatch that names the call site. Under a root or island attempt that defers (adoptOrDefer), the call renders on the client, detached, so an earlier suspension still wins over a later mismatch. This deletes in-place and unframed adoption: unframedRoot, renderUnframed, renderInPlace, parkAtHole, parkInPlace, takeUnclaimed, settleUnclaimed, the lite in-place paths and the inPlace*/unclaimed* cursor state. A fresh client render borrows its block's range for a returned value too, so it mints no anchor comment for it. Server and compiler changes that make the shapes agree: - A `@for`/`.map()` item whose only content is a component keeps the component's own range inside the item's (canShareSsrComponentItemRange and ssrSingleRootComponents are gone), and a `.map()` that runs another collection's `map` serializes its component items the same way, so either receiver hydrates the other's HTML. - A returned renderer descriptor at a root renders inline on the server, and an independent island's sole component keeps its frame, as the client's hydrate boundary module expects. - A keyed or configured `<Activity>` in a `.tsx` return passes its children as a children block on the server, as the client compiles them. Tests that pinned in-place adoption now assert the structural fallback: one recoverable error, the client's DOM, and a development warning that names the call site. The probe audit's components family is at 0; its misses moved to template roots (templates budget 5701 -> 5900), which commit 6 makes strict. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(octane): re-place a de-opt host's children after their own commit entries (#2043) A committed host whose children kept their nodes and order queued no order (52ca5f979a). But a child's own commit entry runs first and can move it: the docking editor's attribute write makes its custom element reparent itself into another container, and nothing put it back, so focus-restoration's "restores a focused editor moved into another container" failed (both anchor cases). The host now skips its order only when its children queued no commit entry; otherwise the order runs after them and moves the editor back with its focus and selection, as before the writes moved to commit. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): commit island fallbacks, root replacements and Hydrate disposers (#2043) Three hydration paths still wrote the visible page while a root render was being prepared, which only DOMStage hid from a ViewTransition: - An island whose activation falls back builds its client render in a frontier (fallBackOffDocument). The commit removes the server's nodes in its range and after it, inserts the client render before the range's end and gives the island's Block back its markers. A render that drops leaves the server DOM as it was. - A root render that replaces the root component mounts the new tree in a frontier, which the commit inserts after the outgoing screen before that screen's deletion. - A Hydrate boundary disposes its strategy and prefetch installers as a commit op, so a transition that suspends keeps them alive with the server DOM it keeps. An island that activates in a root render that can still drop journals the server nodes its attempt changes, as a root's hydrating attempt does, so the retry after the drop adopts the server DOM afresh. Under a staged drain DOMStage still discards them itself. pnpm test:vt-staging-off now passes all 27 files. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): delete DOMStage; a ViewTransition render writes no committed DOM (#2043) Every render-time writer now waits for its commit, so a ViewTransition's held drain needs no staging. This deletes: - src/dom-stage.ts and the STAGED_DOM stage, with every `STAGED_DOM ? STAGED_DOM.view(x) : x` receiver (908 sites) and domNode; - StagedCommitCapture: the staged owner receipts, guards, queue capture and publication, and the driver hooks that routed lifecycle work through it (stageAction, stageTeardown, stageDeactivation, projectEventBundle, projectControlled, stageDelegation, recordStageEntry, retireHostTree); - the projected signal-host binding and the staged direct-binding activation, which now run as written; - the development-only staging-off switch and `pnpm test:vt-staging-off`: it is the only mode now; - DOMStage's own adapter tests and benchmark. The deferred-layout driver keeps only what the layout phase after fonts and images needs, and its capture no longer nests. A scope host's stylesheet is injected at commit, into the document the host lands in (an iframe's). The island save journaling no longer depends on the stage (the behavior-root island case needs it either way). scripts/check-staged-dom.mjs becomes check-render-writes.mjs: every native DOM write in runtime.ts must sit in a function classified in scripts/render-writers.mjs (commit, primitive, fresh, hydration, rollback, unmount, native). Co-Authored-By: Claude Opus 5.5 <[email protected]> * chore: pnpm sync Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): adopt templates, branches, lists and holes only in the shape the server framed (#2028) The server frames every slot (protocol 3), so hydration no longer probes the server DOM for another shape it could adopt instead: - Opens. resolveOpen is the one rule for a slot's first render: the range at its anchor or, for an appended or sole slot, at the cursor. Component calls, @for lists and renderable holes use it, and anything else is a mismatch unless the slot renders in a range the client built. - Lists. A @for range must carry its item marker (`[f0`/`[f1`): a plain range is a mismatch rather than a legacy shape to inspect. A compiled list's row adopts by the compiler's static shape, one element or a range, so legacy per-row ranges around one-element rows fall back. An adopted list parks the cursor past its range, as a component does. De-opt descriptor lists keep their per-value probe (deoptItemSelfDelimits) until #2028 P4 decides it statically on both sides. - Branches. An arm whose server range holds more than the client renders is always a mismatch (settleArmTail), and a mismatch the attempt deferred is reported before any later one. The arm tail and slot-count tracking that excused the cases the cursor could not tell is gone. - Holes. An element's only text child adopts bare server text only: textFrameEnd, unframe and framesSlotContent are gone. The server now serializes a signal's text and a `.tsx` ternary only child as bare text, as the client renders them. The probe audit's templates, holes, lists and branches families are at 0. The de-opt item probe moves to descriptors (commit 3), and the unframed root return and passthrough root list probes to roots (commit 10a). Tests that pinned a legacy shape now assert the fallback, with OCTANE DIVERGENCE notes: legacy per-row pairs in for-hydrate and an empty component frame where the client renders an empty text in the React reconnecting conformance suite. The sonner hydration fixture is recaptured. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(octane): pass a React island's server error through the Octane error boundary As in React, the server never runs an error boundary: an error thrown by a React island under an Octane ErrorBoundary fails the render when no Suspense boundary is above it, and otherwise reaches onError and leaves the Suspense fallback for a client render. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): decide a descriptor item's range by its value on both sides (#2028) A descriptor list item has no range of its own exactly when it renders one host element and nothing in it needs a component's range. That rule, selfDelimits in hydration-protocol.ts, is the one the client's de-opt reconciler already used to self-mark an item on a fresh mount, and now the server's serializer and the client's hydration use it too, from the item's value. - Server: a host whose children are other hosts or arrays no longer gets a range (serverHostHasPrimitiveChildren is gone). ssrHostElement records whether its children needed a component's range, from the children value it already read, so a descriptor's fields are still read once. - Client: mountItem adopts a descriptor item bare or ranged by that rule, without probing the server DOM. An item in a range it does not need, as an older server wrote every host, is a structural mismatch. The mapped fallback's per-list probe (markerlessMappedFallback) and its deoptNode wrapper are gone: mountItem seeds every self-delimiting item's node. - deoptItemBody lends a component-bearing item's server range to its nested slot through the same borrowed-slot literal a client mount builds, so HydrationCapability.lendRange is gone. lentSlot stays: that slot's first render still has to claim the range. The probe audit's descriptors family is at 0 (lists 2114 -> 1827 as de-opt rows stop probing). The test that pinned the older marked encoding now asserts the structural fallback. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): land late boundary markers, hidden remounts and de-opt pairs at commit (#2043) - An ErrorBoundary new under committed DOM builds in a frontier, as a @try's does (freshSlotEnd). - attachResume remounts a discarded primary hidden and retries it inside one boundary render, so the arm pair and its hide land with that commit. - A self-marked de-opt item promoting to an `it` pair mints the pair off-document. Its commit inserts it around the node after the keyed list's own entry has moved it, then re-points the item's markers; the render builds against the pending pair (itemRange), which also counts as the item's shared bound for an incoming component's pair. - A markerless slot whose host a pure-host upgrade adopts lands its pair around the host at commit (landHostPair). A host it cannot adopt now renders through the slot's frontier like any other value. - The compiler's dangerCommit/formCommit bindings, and the dangerValue and formValue sources they collected, were unreachable: any spread already routes every prop through the host collector. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): hydration value writers keep server values without comparing (#2028) Commit 8 of the hydration cursor plan. An adopted element's attribute, class, style and raw HTML writers return while hydrating, and production compares nothing but stale server values (a dormant island whose captures changed), which keep their raw comparison until staleServerValues goes. Development's one-warning-per-pass comparison moves to hydration/dev-values.ts, which no production bundle includes. settleValues becomes settleTexts: production settles only the render-phase texts. A new stale-capture case pins each kept value (attribute, class, style) on its own, and that captures moving no value keep the server's element. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): fail a hydration mismatch through one entry (#2028) Every structural mismatch now throws through HydrationCapability.fail, or failAt for a slot whose call site names it, and passes every @catch and ErrorBoundary on its way to the nearest Suspense arm, Hydrate island or root, which renders on the client as before. The variants that wrapped it collapse into those two: - itemMismatch and listArmMismatch are inlined at their one call site each. - settleItems and settleArmTail share one leftover check: server content between the cursor and the close of a range its owner finished rendering. - UnclosedHydrationRange is a HydrationMismatch with error 338, so a server range without its close reaches onRecoverableError as the same error as any other mismatch. adoptOrDefer stays: a suspension earlier in React's order still keeps the server HTML ahead of a later mismatch. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): let a hydrated boundary body borrow the boundary's range (#2028) The server renders a Suspense, `@try` or ErrorBoundary boundary's content directly inside its one range (protocol 3), and the client's body now adopts that range as its own instead of inserting a `try-b` pair inside it while hydrating. armRange keeps only its presentation-binding branch, whose arm has a range of its own, and writes nothing. A dropped attempt has no markers to restore. The first arm that shows beside a body that borrows the range mints the body's own end. mountPendingBody creates it with the fallback's pair, so it lands with the fallback at commit, and hideBlockHostRange stops at the boundary's end as well, for a hide that commits before that arm lands (a held transition that times out). A catch arm replaces the body, so it needs none. Tests: hydrating a resolved boundary inserts no node (a MutationObserver pass), and an update that suspends a hydrated body, and a held transition that times out, show one visible fallback beside it, hide nothing after the boundary, and reveal the same nodes. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): compiled use() sites seed through an opt-in module (#2028) Commit 11 of the hydration cursor plan. seedOrCreate's site seeding, its factory thenables and their materialization move from HydrationCapability to hydration/use-seeds.ts, which the first compiled site a hydration pass seeds installs (SEED_SITES). A hydrating app without a compiled use() creation ships none of it, nor the public use() that the capability's factory branch kept alive. Positional seeds stay with hydration: every use(thenable), and every thenable a component renders as a child, consumes them in render order. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(vite-plugin): update the root catch and signal placement checks to the redesign - The root catch route follows React's model for server rendering errors (93bcf89132): the server ships the root's pending arm with an instruction to render it on the client, where the catch arm renders. The dev and production bodies still match once each response's stream token is normalized. - The islands placement oracle looked for transition-action.ts and transition-coordinator.ts, which 50c02aefc1 replaced with pending.ts. It now checks that module's placement. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): test an unchanged row hole once, and stage cells without fill() (#2043) js-framework select on the jsx fixture re-renders every row, staging each row's bag for its fresh handlers. Since holes commit through two cells, a stable row hole paid for an unmounted-marker test and a four-way staged check before its skip, and every stage paid for Array.prototype.fill's builtin call. - A certified row hole now tests `_o || committed !== value` first, then `_n === null ? staged : _n[cell] !== bag` (a render's own `_n` implies the bag is staged, the form bagChildHole already uses). Only a hole that passes tests its unmounted marker, which is never a value. - stageBag fills a staged bag's cells with a loop instead of fill(). Paired select on minified fixtures, per click: jsx 0.874x head (0.924x the pre-two-cell base), tsrx 0.975x head. A new prod-mode test renders keyed rows twice in one drain, moving their holes and moving them back, with and without a binding before the hole; dropping either staged branch commits the stale value. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): stage a bag's first update into a pooled cell array (#2043) A bag allocated its `next` cells on its first stage and kept them, so the first update of every newly mounted template allocated one array: the transition-hooks cycle, updater, dispatch and click phases ran one array over their limits, and urgent (two bags) two over. stageBag now takes its cells from BAG_POOL, eight spare arrays seeded at module load, sizing a pooled array to the bag and keeping it packed. While the pool is short, a commit returns an idle bag's array to it (runCommitOps after each op, bagDone after an immediate commit); bags beyond the pool keep their own, so a large list re-render makes no pool traffic. transition-hooks arrays: cycle 1793 -> 1792, updater 1793 -> 1792, dispatch 705 -> 704, click 705 -> 704, urgent 1858 -> 1856 (limits 1792, 1792, 704, 704, 1856). Removing the pool restores the overruns. Paired select per click against the previous commit: jsx 1.005x, tsrx 1.000x. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(octane): give a hydrated body its own range when it is hidden (#2028) A body that hydrated borrows its boundary's range. Commit 4 bounded it with a comment of its own end when a fallback first showed beside it, which a catch arm that later replaced the body left behind. Instead, the commit that hides the body gives it a pair of its own around its content (ownTryBodyRange), queued ahead of the hide, so the body has the shape a client mount's has from then on and its own teardown removes the pair. The pair goes before the fallback's arm when that arm landed first. A dropped render queues nothing. hideBlockHostRange and insertArmPair lose the extra parameters the separator needed. The timeout test now waits for its fallback rather than a fixed delay, and a new test checks that a catch arm replacing a hydrated body after a fallback leaves none of what the boundary showed connected (it failed on the stray comment before). Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(evals): bridge the template cell and commit helpers to graded submissions The user-app grader resolves `octane/internal/client` to a bounded bridge (tests/_client-runtime.ts). Since dc409debd6 the client compiler routes a template's per-render cells and commit functions there (bagRecord, bagRecordEvent, bagDone, bagHole, commitHole, setRenderText, setEventSlot, commitHostSources and the rest), and the bridge did not re-export them, so every graded submission failed with "bagRecord is not a function". The import-boundary suite's counter grade fails without this, and the eval corpus' Strong repair ledger rejected its valid alternatives for the same reason. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(octane): pin listeners fired by a commit's DOM patch A host whose props resolve across sources writes them at commit since 9d80f4d61d, so the spread that disables a focused input, and the attribute whose stringification probes a later write, now run in the render's commit, not its render. The listeners still run and publish their writes, and the commit goes on after them, outside any render, where authored code may write signals as React lets commit-phase code set state. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(octane): compare stream boundaries without their ids, and fake a held timeout - The production root catch check compares the dev and production bodies with each stream boundary id normalized: the id carries a per-response token and a per-process counter. - The held-transition timeout test drives the timeout with fake timers. Whether a real 0 ms timer fires inside act depended on the runtime build's task ordering, so it failed under octane-prod. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(octane): render a mapped host row's new component off-document (#2043) 533c04a6d2 left a promoted self-marked item's `it` pair pending until its commit, but an exotic map's row that turns from a host descriptor into a component rendered that component before the pending end, which is not in the document: NotFoundError (auto-memo's custom-map host row tests). Over committed DOM, mappedDeoptItemBody now renders the component in a frontier fragment between a fresh pair it inherits. The frontier's commit removes the host node, inserts the pair and its content where the node stood, after the list has moved it, and swaps the item's markers for the pair through its bound. promoteSelfMarkedItem defers only over committed DOM; a pair in fresh DOM lands at render. A structure-commit test moves a mapped host row while it becomes a component, with a probe after the list: nothing touched the DOM before commit, the host leaves, and the row moves and unmounts whole. It fails with NotFoundError on the previous code and with render-time mutations when the pair lands at render. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(octane): point three React Fizz parity cases at their React-model tests 93bcf89132 renamed the streaming tests that evidence three Fizz cases when it adopted React's model for server rendering errors, which left their ledger entries naming tests that no longer exist (react-parity:validate). The entries now name the renamed tests, and their rationales describe the client render that replaced the server catch arm. Co-Authored-By: Claude Opus 5.5 <[email protected]> * refactor(octane): one componentSlot call for a mapped item's component (#2043) itemComponentFrontier only prepares the frontier, its pair and the bound; mappedDeoptItemBody renders the component through its existing call and puts the item's node back as its range afterwards. −51 B raw on the app-shell framework bundle. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): test a released op target's bag state without typeof (#2043) Only a bag has `$`; any other commit-op target compares undefined, which is false. −22 B raw on the app-shell framework bundle. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): return pooled cells inline in the commit loop (#2043) releaseBag was a call per commit op while the pool was short: the paired js-framework work counters rose by one call per op on tsrx select and up to nine on jsx (a large list's first committed rows refill the pool). The check now runs inline in runCommitOps, and an immediate commit (fresh, unqueued or hydrating renders) keeps its bag's array. transition-hooks arrays stay at their limits (cycle 1792, updater 1792, dispatch 704, click 704, urgent 1856). Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): recover hydration at commit and delete its undo log (#2028) A hydrating render no longer writes the server DOM it adopts, so a dropped attempt has nothing to undo: - What a slot builds on the client over server DOM in a root's hydrating attempt goes through a frontier, as it does over committed DOM (usesFrontier): a hydration-created Block counts as live when its parent lies in the root's container. - A boundary the client renders instead of the server's arm queues the server content for deletion on its slot (discardServerArm), and its arm builds in the slot's frontier (insertArmPair takes the frontier a slot already has): `[$!` arms (takeNativeFreshArm), a pending streamed sentinel (claimStreamTemplate), a dehydrated boundary's client render (clientRenderDehydratedTry), and catch arms that replace an adopted body, which unmount without detaching. - A Text for an empty server text lands at commit (placeHydratedText). An only-child binding finds a pending one through PENDING_HOST_TEXTS. - A `<Hydrate>` island's fallback always builds off-document in a root render and its tail discard is an op; a root's fallback builds in its mount's frontier, whose commit removes the server nodes first. A document or `<html>` container still renders in place, since its head entries need the client's `<head>`. - A claimed head element takes the client's props at commit, and a de-opt element hydration has to build (a `<noscript>`'s children) builds with hydration suspended. - An arm attempt that is discarded, and an island attempt that is retried, drop the ops they queued (dropRootOps). A hidden Activity mounted after hydration is hidden at commit. Deleted: HydrationCapability.save/settle/rollback, speculative, undoable, saved, undo, keepChanges, saveDeoptChildren, the hydration journalRootChildren and journalText calls, and fresh tracking (freshNodes, markFresh, isFresh, inFreshRange, rebuilds, suspendFreshLiteComponent and the fresh-anchor branches): what the client builds is off-document or renders with hydration suspended. A try body that throws to its catch arm drops the texts it left to compare, since the catch arm's commit discards them. renderUpdate stays for commit 10a, which removes the hydrating updates that use it. Render-phase text that a hydrating render rewrites still writes at once. The new MutationObserver test hydrates a root and a Suspense arm whose attempts suspend: neither changes the server DOM (it saw 11 records before). The misaligned empty-text test now adopts, as React does, where it used to fall back. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): land a one-host branch arm's root at commit, without a fragment (#2043) client-hot-paths branches toggle ran 1.16x main: each `@if`/`@switch` arm swapped in over committed DOM rendered into a frontier fragment, before a sentinel it appended and removed, and its commit moved the fragment in and rehomed its Blocks: two DOM moves and a sentinel per arm. The compiler now marks arms whose only output is one template host (controlFlowArmIsSingleRoot, the direct-host row proof): ifBlock's mask gains bits 4 and 8, and switchBlock takes a root mask in its lite mask's layout. swapBranchFrontier renders such an arm into a markerless slot detached, exactly as a committed list's fresh row does (DETACHED_ROOT): commitBag self-marks the arm with its root, the slot's pending structure carries that root, and applyNext inserts it alone and then moves a sole-root ancestor's bound. A later swap of the same render drops an earlier arm's unlanded root. Paired branches browser runner against main: toggle 1.16x -> 0.95x, stable 0.85x. Tests: a swapped-in arm's probe sees no DOM change before commit, and its root lands before the slot's anchor; one drain that flips an arm and flips it back leaves no stray root (fails when the later swap keeps it). hookless-arms reads the lite bit out of the wider mask. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): reuse applied slot records; a commit ends its own host retirement (#2043) js-framework tsrx remove ran 1.068x main. Each committed slot change allocated a pending record with two arrays (listNext's members list was eager), and each commit that deleted a host queued a microtask to end that task's retirement epoch. - applySlotNext returns an applied record to SPARE_NEXTS (reset, its fragment released); slotNext and listNext take one (newSlotNext). A list's members list starts with its first run (listRun, @empty's run). - retireEventHostTree queues its end-of-task reset only outside a commit; runCommitOps resets the epoch as the outermost commit ends, by which time everything it retired has left the document. - vtPreview counts a detached arm root (SlotNext.root) as an arrival. Paired remove, minified tsrx: 0.959x the previous commit, 1.02-1.05x main. retired-event-hosts fails if a commit's retirement sets no epoch; the pooled record's root reset is covered by the branch suites, which fail when it leaks. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): reuse a list's landed run fragments (#2043) Every fresh run of rows in a committed list (and a committed list's @empty run) created a DocumentFragment, about 0.2 us of a single-row insert in the uibench tree profiles. applySlotNext now returns a list's landed, empty runs to SPARE_FRONTIERS with the record, and listRun and the @empty run take one from there, as openFrontier already does. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): retire signal nodes without rebuilding their states Owner disposal regressed against main (#2043): retiring a node went through the value-only state and lastState accessors, and could build a value-only node's ready state only to replace it, once in notifyNode and again in retireGraph. In unoptimized and baseline code those accessor calls dominated the per-node difference. retireState now settles the waiter, writes the stored state directly and releases retention, for both the retiring owner's nodes and the dependents it notifies. Each retirement also builds its error state once and shares it, instead of allocating two state objects per node; states are immutable and compared by value, and every node still presents the same ScopeDisposedError. Revocation of retained foreign values uses the same state. scoped-signals --sizes=100,1000, 12 alternated runs normalized by in-process Alien, against main 5594cb06ea: dispose geomean 0.85x (head 1.05x), the continuous cycle 1.00x (head 1.01-1.03x). The regression test pins that a dependent notified of a retirement stops retaining a foreign value, so that owner's later disposal is not a change. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): clear a retiring signal owner's observer set once retireGraph stopped every observer while iterating the owner's set, and each stop deleted that observer from the same set, so the set rehashed repeatedly as it emptied under a live iterator. The retiring owner now stops each observer without that delete and clears the set once. An observer only ever sits in its node's owner's set, and views and pending shadows share their cell's owner, so the result is the same empty set. scoped-signals --sizes=100,1000, 15 alternated runs normalized by in-process Alien, against main 5594cb06ea, with the previous commit: dispose geomean 0.79x (head 1.03x), the continuous ownership cycle 0.95x (head 1.01x), and write_sparse 0.90x / batch_write_all 0.86x keep their gains. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): compare commit bindings inline and queue a template's commit as it stages (#2043) A changed js-framework row made about 10 more calls than main: every value binding called its recorder, a handler bundle called four, and a changed bag paid stageBag, bagDone and a commitEventBundle per bundle on top of `C`. A value binding now compares with its committed slot in the template and calls bagRecord only for a change, or when an earlier render of the transaction staged the bag (`_r`), whose cells this render must rewrite. A handler bundle records through one fused call, which still runs every render so signal ownership refreshes its authority. The two hot recorders stage an idle bag inline and queue `C` there, from the commit function the bag factory now receives, so the trailing bagDone only runs for a render that commits at once. `C` writes handler slots and bundles in place unless the runtime passes `careful` (an open journal, or a dispatch in flight that holds handler snapshots). Calls per op against main 5594cb06ea: jsx update 9,655 -> 8,623 (was 19,665), select 9,159 -> 8,125, swap/remove about -1,030; tsrx update 3,477 -> 3,285 (was 4,485). Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): record handler bundles through bagRecord (#2043) The bundle recorder carried its own copy of the inline stage. A bundle now passes itself to bagRecord as its committed value and host, so the hot stage exists once: about 150 B gzip less runtime on the js-framework apps. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(octane): a bulk list clear retires its rows' signal authority (#2043) A bulk clear (the owned-parent queue and clearItems) treated a row with no hooks, effects, cleanups, children, slots or refs as inert and only marked it disposed. A row whose handlers escaped its scope token, or whose block owns a signal owner, then kept that authority: a queued bubble handler on a cleared row read signal state as live instead of retired. Both checks now also require no signal owner and no escaped token, so such a row unmounts and runScopeCleanups retires its authority. Tests: a 20-row list whose row handler clears it, in a parent the list owns and one it shares; the row's queued bubble handler must see ScopeDisposedError (both failed before). Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): retire only Blocks that can have queued work (#2043) A commit's retired set exists for drainQueue, which skips queued work at or below a Block a render deleted, and for a held ViewTransition's preview. Every deleted row joined it, so a 10k-row clear made 10k Set inserts. retiresVisibly admits a Block with pending work, an update error, hooks, effects, cleanups, children, slots or signal authority, and every Block while the ViewTransition driver is installed (a truthiness read, so applications without the driver fold it away). retireRootBlock and both bulk-clear loops skip the rest. Test: one drain whose root render deletes a stateful row while that row's own update is queued renders the row no more; it fails when nothing retires (the retired set had no such coverage before). Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): stage commit bags only in bagRecord (#2043) bagRecord now holds the only stage: it resumes a bag staged earlier in the transaction, or allocates or clears its cells and, in a render that may be dropped, queues `C`. Controlled form properties and host sources record through it with the bag as their committed value, which no value equals, so they record every render; signal bindings and holes stage through it too. stageBag, bagRecordAlways and their second copy of the queue go away. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): retire a bulk clear's rows in one loop, without a call per row (#2043) The retired-set filter called retiresVisibly once per row, so the paired js-framework clear counted 10,000 more calls (tsrx 91 -> 10,100). retireBlocks now holds the filter and the pending journal once: retireRootBlock passes one Block, and both bulk-clear paths pass their first row. Oxc js-framework tsrx: 31,567 -> 31,542 gz. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(octane): type the commit-error fixture's coerced title (#2043) Co-Authored-By: Claude Opus 5.5 <[email protected]> * Revert "perf(octane): reuse a list's landed run fragments (#2043)" This reverts commit f7bb793430. Reusing run fragments showed no measurable timing change (uibench tree insertFirst 1.006x) and cost +24 gz on the shell_ full framework and +40 on base. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): seed first-stage cell arrays instead of recycling them (#2043) The cell pool recycled committed bags' arrays through a check in every commit op, which cost +11 gz on the shell_ full framework and +55 on base (stageBag itself is absent there, so the recycling check was the cost). Eight preallocated arrays now serve the first bags a page stages, and every bag keeps the array it stages into, as before the pool. shell_: full 108,059 -> 107,993, base 55,692 -> 55,651. transition-hooks arrays stay at their limits (cycle 1792, updater 1792, dispatch 704, click 704, urgent 1856). Past the eighth first stage a bag allocates its array, as it did before the pool. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): allocate slot records again; keep one record factory (#2043) Reusing applied slot records cost +96 gz on the shell_ full framework and +91 on base, and dropping it leaves paired tsrx remove at 1.016x [0.963, 1.065] and swap at 0.996x. newSlotNext now only builds the record (slotNext and listNext share it), and applySlotNext applies it. The commit-scoped retirement reset, the lazy members list and the detached-root arrival in vtPreview stay. shell_: full 107,993 -> 107,897, base 55,651 -> 55,560. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): skip an unchanged handler's record (#2043) A native handler and a compiled handler bundle recorded through bagRecord every render, so each re-rendered row paid a call per handler even when nothing changed. The template now compares the handler itself (SameValue for bundle captures) and calls bagRecord only for a change or a resumed bag. A changed bundle passes its callback against the bag, so bagRecord learns the change without repeating the comparison. Signal authority still refreshes every render where it can move: once anything can give a handler an owner (an owner frame or environment, the signal document, module signal bindings), the template calls setEventHandler(host), which publishes only an authority that moved. That condition is a monotonic cell, signalOwnerUse, an object rather than a live binding so harnesses that destructure compiled imports still read it live. bagRecord no longer names setEventHandler, so a template without handlers does not retain the event authority code. tsrx update: 3,285 -> 3,185 calls (main 3,477). Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): commit at bagDone only a render that cannot be dropped (#2043) bagRecord already queues `C` at a render's first record whenever the render may be dropped; it now does so for a resumed bag no window queued yet too, and a hole resumes through it. bagDone is left with the renders that commit at once, which drops its copy of the queue. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(octane): trim per-node calls on the mount path (#2043) Each mounted js-framework row made several helper calls that only read a value: htext and htextSwap coerced strings, setClassName normalized a string class, htext/child/sibling went through getFirstChild/getNextSibling, createdInRootRender called isCreatedInRootRender, renderBlockInner called blockIsAncestor for a direct child, and the context epoch was read through contextEpochNow. Each now reads in place. An event bundle factory installs its b…

Summary
Why
With every feature in use (the
shell_app from #2027), Octane shipped about 122 kB gzip of framework code where React 19.3 + alien-signals ships about 70 kB. Most of the gap came from render writing to the live DOM. That forced nine separate ways to hide or undo those writes: the root journal, deferred teardown, row parking, reveal windows, off-screen capture, held-transition replay, hide/resume,DOMStage, and the signals transition coordinator. Render now never writes committed DOM, so they are going away.Changes so far
@catchandErrorBoundarynever run on the server. An errored Suspense boundary ships its fallback marked for a client render.@trywithout@pendinghands both suspension and errors to the enclosing Suspense boundary.next.C(bag), writes the changed slots. It runs immediately for renders that cannot be dropped; otherwise it is queued on the root transaction'sopsand run at commit.applied/next: branches, components, return values, keyed lists (LIS at commit), de-opt hosts, portals, head,hostComponent, and Suspense/error-boundary arms.tests/_render-write-guard.tswraps every DOM mutator in theoctane,octane-prod,octane-signals*andoctane-profileprojects and fails a test that writes connected DOM while a render is open (classified by runtime state, never the stack). Its allowlist is empty.preload/preinit/…), which insert at call time as React DOM does.startViewTransitionupdate.DOMStageand all 908STAGED_DOMchecks are deleted.SignalActionFrame, the coordinator and the candidates are deleted.<!--3-->version mark; a missing or different version renders on the client (error 348).<Hydrate>island whose props changed before it activated hydrates first, then updates (React's model)..snapshot()read seeds nothing instead of throwing.HydrationMismatchto the nearest boundary, keeping React's "earlier suspension wins" rule.hydration/dev-values.ts).use()seeds (hydration/use-seeds.ts).pnpm render-writes:check. Every DOM-writing function inruntime.tsmust be classified with a reason.Size so far (
shell_app, framework gzip, against main 2d2bac4)Measured at 7c75e5d; the other variants are re-measured at the final size pass.
Roadmap (#2043)
childSlotdriversnextvalues (templates, spreads, signal bindings, text holes, host sources)applied/nextstructure and boundary arms at commitDOMStagedeletedselfDelimits;[$…];use()seedsruntime.tsinto concept modules (tool ready; applied last)Validation
pnpm format:checkpnpm typecheck, at the DOMStage deletion commitpnpm test(repo-wide)octane+octane-prod+octane-signals*+ website-unit with the render-write guard on: 1,725 files, 48,190 tests at 1dc430f151 browser ViewTransition tests in real Chromium; signals projects; binding hydration and SSR suites
run-minimal,run-hydration-free,render-writes:check,error-codes:check, hydration probe auditEnd-to-end, locally:
Bun, OpenTUI native and Valdi were not run locally.
js-framework against main, paired: jsx update 0.72×, select 0.78×, remove 0.77×, select_lots 0.77×; tsrx update 0.80×; @if/@switch toggle 0.95×; signal dispose 0.79×, cycle 0.95×
js-framework work counters (
pair.mjs --work-onlyagainst main): all 40 calls/DOM counters at or below main (jsx update 8,611 vs 9,655; tsrx add 24,083 vs 33,080; tsrx swap 2,091 = main)transition-hooks ratio guards: pass, limits unchanged
perf-review: pending on the final diffconcise-code: pending on the final diffRisk / follow-ups
<Hydrate>island hydrates with its server captures first, then updates.mapreceiver rendered keeps rendering through its callback until it unmounts.setRenderText,setRenderStyle, a bag factory or a layout effect).Provenance
agent-authored)🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.Note
High Risk
Rewrites the client renderer commit model, hydration wire protocol, SSR error semantics, and transition/signal scheduling—intentional breaking changes require matched server/client deploys and may affect apps relying on server catch arms or old hydration HTML.
Overview
Render computes and commit writes for the Octane client: updates record into binding bags and compiler-generated commit functions apply DOM changes at commit time, so dropped transitions and held renders never touch the live tree. Structure (lists, branches, de-opt hosts, boundaries) builds off-document with
applied/nextslots and commits together with template writes.Removes the root journal’s staged-DOM path (
DOMStage,STAGED_DOM), the signals transition coordinator/Action frame, and binding transition previews—ViewTransitions and signal writes now follow the same held-commit and React-style update queues asuseState(including entangled transitions and urgent rebasing).Hydration protocol v3 flattens comment ranges, adopts by structure (mismatches client-render with recoverable errors, including version #345), and tightens server HTML; related docs, pinned SSR fixtures, and server error handling align with React (no server
@catch/ErrorBoundary, Suspense fallbacks marked for client render).Signals and bundles: value-only cells, profiling-only inspection, lazy signal-child detection,
pending.tswith renderer for transitions; new reachability fixture for plaincreateElementtrees;pnpm render-writes:checkreplacesstaged-dom:check.Reviewed by Cursor Bugbot for commit 026917e. Bugbot is set up for automated code reviews on this repo. Configure here.