Skip to content

perf(octane): render computes, commit writes — runtime size redesign (#2043) - #2044

Merged
trueadm merged 308 commits into
nextfrom
perf/runtime-size-redesign
Oct 15, 2026
Merged

trueadm merged 308 commits into
nextfrom
perf/runtime-size-redesign

Conversation

@trueadm

@trueadm trueadm commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

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

  • Server render errors follow React's model.
    • @catch and ErrorBoundary never run on the server. An errored Suspense boundary ships its fallback marked for a client render.
    • A @try without @pending hands both suspension and errors to the enclosing Suspense boundary.
    • No error details are serialized.
  • Compiled commit functions.
    • Render compares and memoizes into the block's binding bag: committed values plus a lazily allocated next.
    • A module-scope commit function per template, C(bag), writes the changed slots. It runs immediately for renders that cannot be dropped; otherwise it is queued on the root transaction's ops and run at commit.
    • Covers attributes, class, style, events, text holes, spreads, host prop sources, form controls, raw HTML and direct signal bindings.
  • Structure at commit.
    • Every slot kind keeps applied/next: branches, components, return values, keyed lists (LIS at commit), de-opt hosts, portals, head, hostComponent, and Suspense/error-boundary arms.
    • Fresh content is built off-document.
    • Deletions run at commit while the old nodes are still connected.
    • Root mounts (a document included), resumed and retried content, de-opt host upgrades, portals, Float resources, hidden-content style, Provider dialect flips and HMR swaps all land at commit.
  • No DOM writes during render, enforced.
    • A render may build DOM it owns off-document; every write to a connected or committed node lands at commit, first mount and hydration included.
    • tests/_render-write-guard.ts wraps every DOM mutator in the octane, octane-prod, octane-signals* and octane-profile projects and fails a test that writes connected DOM while a render is open (classified by runtime state, never the stack). Its allowlist is empty.
    • The one exception is resource hints (preload/preinit/…), which insert at call time as React DOM does.
    • The root journal's DOM entries (text, attribute, range and created-node undo) are deleted.
  • ViewTransition. The batch renders first and commits inside the startViewTransition update. DOMStage and all 908 STAGED_DOM checks are deleted.
  • Update queues.
    • Hook state uses batch-tagged update queues: a held transition is unprocessed updates, and transitions that update the same cell are merged.
    • Signal transitions keep fork semantics through one pending slot per producer on the same queues. SignalActionFrame, the coordinator and the candidates are deleted.
  • Hydration.
    • Wire protocol v3: a boundary's state lives on its range open, and a returned value renders in its call's range. Every hydratable root carries a <!--3--> version mark; a missing or different version renders on the client (error 348).
    • Recovery happens at commit, so hydration's undo log is gone. A suspended boundary retries alone, and a pending streamed boundary waits for its content.
    • A <Hydrate> island whose props changed before it activated hydrates first, then updates (React's model).
    • Server signal snapshots are deterministic per render, and a pending .snapshot() read seeds nothing instead of throwing.
    • Strict ranges: no probing for components, templates, branches, lists, holes or descriptors.
    • A mismatch throws HydrationMismatch to the nearest boundary, keeping React's "earlier suspension wins" rule.
    • Production keeps server attribute values; the comparison is dev-only (hydration/dev-values.ts).
    • Opt-in use() seeds (hydration/use-seeds.ts).
  • Signals thin core. Value-only writable cells and profile-only inspection. Signal-free apps fold away the signal-child code.
  • One renderer. A shared host-prop writer, and portal/signal/Context child handling installed by the feature that creates them.
  • New lint, pnpm render-writes:check. Every DOM-writing function in runtime.ts must be classified with a reason.
  • Main merged through 2d2bac4, including feat: compile Strong named render blocks without descriptors #2068 (Strong named render blocks), whose body replacement is re-expressed on the commit model.

Size so far (shell_ app, framework gzip, against main 2d2bac4)

Variant main this branch Δ
Full app 121,745 106,616 −15,129 (−12.4%)
Base (createRoot) 58,011 54,836 −3,175 (−5.5%)

Measured at 7c75e5d; the other variants are re-measured at the final size pass.

Roadmap (#2043)

  • Server errors on React's model
  • Signals thin core, phase 1; signal transitions on update queues
  • One renderer: shared prop writer and childSlot drivers
  • Commit functions with committed/next values (templates, spreads, signal bindings, text holes, host sources)
  • Per-slot applied/next structure and boundary arms at commit
  • ViewTransition applies queued commits; DOMStage deleted
  • Update queues for hooks and signals
  • Hydration (Hydration: collapse the hydration engine back into the mount path (Ripple/Svelte-style cursor), 23 kB → ~5 kB gzip #2028):
    • wire protocol v3;
    • strict calls, templates, branches, lists and holes;
    • descriptor selfDelimits;
    • boundary bodies borrow [$…];
    • mismatches fail to the nearest boundary;
    • production value writers keep server values (comparison is dev-only);
    • opt-in use() seeds
  • Hydration: recovery at commit (undo log deleted), one retry path, version mark on every root, hydration cursor read from cells
  • Delete the root journal's DOM entries
  • No DOM writes during render, with the test guard's allowlist empty
  • Hydration: fold the remaining per-construct tail checks into one close rule (in progress)
  • Split runtime.ts into concept modules (tool ready; applied last)
  • Render-time writer leftovers: late boundary markers, hidden remounts, de-opt pairs, one-host branch arms at commit
  • Perf pass: every js-framework work counter at or below main; transition-hooks guards green
  • uibench single component-row inserts (1.17–1.32× main), deferred until the hydration collapse and journal deletion land

Validation

  • pnpm format:check

  • pnpm typecheck, at the DOMStage deletion commit

  • pnpm test (repo-wide)

  • octane + octane-prod + octane-signals* + website-unit with the render-write guard on: 1,725 files, 48,190 tests at 1dc430f

  • 151 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 audit

  • End-to-end, locally:

    • website integration suite: 98 tests, including real-Chromium SSR/hydration e2e;
    • all 19 example apps;
    • Vite, Rspack and Rsbuild plugins;
    • TanStack Start/Router and app-core;
    • heavy integration.

    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-only against 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 diff

  • concise-code: pending on the final diff

Risk / follow-ups

  • Intentional behaviour changes. Each is recorded in a changeset.
    • Server catch arms are gone.
    • DOM writes become visible at commit (React timing), including custom-element callbacks and MutationObserver records.
    • Urgent updates rebase held transitions instead of discarding them.
    • Two transitions that write the same signal commit together.
    • The hydration protocol is version 3; a mismatched server/client version renders on the client.
    • A dormant <Hydrate> island hydrates with its server captures first, then updates.
    • Float resource elements insert at commit (hints still insert when called, as in React).
    • A list a custom map receiver rendered keeps rendering through its callback until it unmounts.
    • Hand-written renderer bodies must stage render-time writes (setRenderText, setRenderStyle, a bag factory or a layout effect).
    • The redesign's new error codes are 347–349 (main took 344–346).
  • Hydration adopts by structure. A tree whose DOM matches but whose hole structure differs falls back with a recoverable error.
  • This is a parallel approach to feat(octane): commit prepared DOM per scope and hydrate with one cursor #2036. The two will be compared before merging.

Provenance

  • An agent produced this diff (agent-authored)

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with 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/next slots 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 as useState (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.ts with renderer for transitions; new reachability fixture for plain createElement trees; pnpm render-writes:check replaces staged-dom:check.

Reviewed by Cursor Bugbot for commit 026917e. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions github-actions Bot added agent-authored Diff or issue body substantially produced by an AI agent perf PR: performance work labels Oct 13, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

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

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

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

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
    • The SSR compiler now emits propagateSuspense=true for catch-only @Try boundaries (handler present, no @pending), matching ErrorBoundary behavior so suspensions rethrow to the nearest Suspense boundary instead of silently registering as a stream boundary.

Create PR

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.

Comment thread packages/octane/src/runtime.ts Resolved
Comment thread packages/octane/src/runtime.server.ts Resolved
trueadm and others added 24 commits October 13, 2026 22:24
…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]>
…-queues

# Conflicts:
#	packages/octane/src/runtime.ts
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]>
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]>
trueadm and others added 8 commits October 15, 2026 07:33
…, 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]>
…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]>
@cursor

cursor Bot commented Oct 15, 2026

Copy link
Copy Markdown

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.

trueadm and others added 4 commits October 15, 2026 08:52
…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]>
trueadm and others added 2 commits October 15, 2026 11:53
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]>
@trueadm
trueadm changed the base branch from main to next October 15, 2026 10:55
@trueadm
trueadm marked this pull request as ready for review October 15, 2026 10:56
trueadm and others added 2 commits October 15, 2026 12:03
…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]>
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark report

  • 🔴 bundle-size: 61 value(s) increased
  • 🔴 bundle-reachability: 48 value(s) increased

Compares e8e155514, the merge commit's first parent with 6d57aa62b on the same runner. Any increase in a js-framework work counter fails this check; byte changes are a report. Wall time is a report: base and head samples alternate in one browser, and an operation is called slower or faster only when the 95% confidence interval of its ratio excludes ±3%. Workflow run

js-framework: 1k/10k row operations

target operation base ms head ms head/base 95% CI
octane-tsrx replace 6.500 5.650 −10.9% −14.1% … −10.2% 🟢 faster
octane-tsrx update 0.144 0.086 −40.0% −41.7% … −39.6% 🟢 faster
octane-tsrx runlots 26.683 22.117 −14.8% −18.1% … −12.0% 🟢 faster
octane-jsx replace 8.025 6.883 −13.5% −18.1% … −8.8% 🟢 faster
octane-jsx add 3.158 2.858 −7.6% −10.2% … −6.3% 🟢 faster
octane-jsx update 0.278 0.184 −34.0% −34.7% … −31.7% 🟢 faster
octane-jsx select 0.130 0.085 −34.7% −35.4% … −34.1% 🟢 faster
octane-jsx swap 0.181 0.137 −23.8% −25.4% … −21.9% 🟢 faster
octane-jsx remove 0.171 0.119 −28.3% −29.4% … −27.0% 🟢 faster
octane-jsx runlots 30.342 25.142 −17.3% −21.7% … −11.9% 🟢 faster
octane-jsx select_lots 1.722 0.964 −44.5% −46.0% … −43.4% 🟢 faster
All 20 timed operations (9 without a verdict)
target operation base ms head ms head/base 95% CI
octane-tsrx run 2.525 2.533 −1.8% −3.7% … +1.9% ⚪ within noise
octane-tsrx replace 6.500 5.650 −10.9% −14.1% … −10.2% 🟢 faster
octane-tsrx add 2.325 2.267 −4.3% −8.3% … ±0.0% ⚪ within noise
octane-tsrx update 0.144 0.086 −40.0% −41.7% … −39.6% 🟢 faster
octane-tsrx select 0.006 0.006 −3.2% −5.1% … +0.8% ⚪ within noise
octane-tsrx swap 0.017 0.018 +1.4% +0.9% … +2.9% ⚪ within noise
octane-tsrx remove 0.015 0.015 +0.9% +0.0% … +2.9% ⚪ within noise
octane-tsrx runlots 26.683 22.117 −14.8% −18.1% … −12.0% 🟢 faster
octane-tsrx select_lots 0.006 0.006 −2.5% −4.8% … −1.1% ⚪ within noise
octane-tsrx clear 42.300 42.750 +1.1% −1.3% … +3.1% ⚪ within noise
octane-jsx run 3.750 3.575 −4.9% −10.0% … ±0.0% ⚪ within noise
octane-jsx replace 8.025 6.883 −13.5% −18.1% … −8.8% 🟢 faster
octane-jsx add 3.158 2.858 −7.6% −10.2% … −6.3% 🟢 faster
octane-jsx update 0.278 0.184 −34.0% −34.7% … −31.7% 🟢 faster
octane-jsx select 0.130 0.085 −34.7% −35.4% … −34.1% 🟢 faster
octane-jsx swap 0.181 0.137 −23.8% −25.4% … −21.9% 🟢 faster
octane-jsx remove 0.171 0.119 −28.3% −29.4% … −27.0% 🟢 faster
octane-jsx runlots 30.342 25.142 −17.3% −21.7% … −11.9% 🟢 faster
octane-jsx select_lots 1.722 0.964 −44.5% −46.0% … −43.4% 🟢 faster
octane-jsx clear 51.100 49.517 −3.1% −5.6% … −1.6% ⚪ within noise

Work counters (an increase fails this check):

target metric base head Δ
octane-tsrx calls_run 25,081 18,083 −6,998 (−27.9%) 🟢
octane-tsrx dom_run 2,000 1,000 −1,000 (−50.0%) 🟢
octane-tsrx calls_replace 32,094 22,095 −9,999 (−31.2%) 🟢
octane-tsrx dom_replace 3,000 2,004 −996 (−33.2%) 🟢
octane-tsrx calls_add 33,080 24,083 −8,997 (−27.2%) 🟢
octane-tsrx dom_add 2,000 1,000 −1,000 (−50.0%) 🟢
octane-tsrx calls_update 3,477 2,975 −502 (−14.4%) 🟢
octane-tsrx calls_select 79 76 −3 (−3.8%) 🟢
octane-tsrx calls_remove 2,101 2,097 −4 (−0.2%) 🟢
octane-tsrx calls_runlots 250,078 180,079 −69,999 (−28.0%) 🟢
octane-tsrx dom_runlots 20,000 10,000 −10,000 (−50.0%) 🟢
octane-tsrx calls_select_lots 79 76 −3 (−3.8%) 🟢
octane-tsrx calls_clear 91 89 −2 (−2.2%) 🟢
octane-jsx calls_run 35,157 25,118 −10,039 (−28.6%) 🟢
octane-jsx dom_run 4,000 1,000 −3,000 (−75.0%) 🟢
octane-jsx calls_replace 42,172 29,131 −13,041 (−30.9%) 🟢
octane-jsx dom_replace 5,000 2,004 −2,996 (−59.9%) 🟢
octane-jsx calls_add 50,158 37,119 −13,039 (−26.0%) 🟢
octane-jsx dom_add 4,000 1,000 −3,000 (−75.0%) 🟢
octane-jsx calls_update 9,655 8,611 −1,044 (−10.8%) 🟢
octane-jsx calls_select 9,159 8,112 −1,047 (−11.4%) 🟢
octane-jsx calls_swap 9,167 8,125 −1,042 (−11.4%) 🟢
octane-jsx calls_remove 9,172 8,127 −1,045 (−11.4%) 🟢
octane-jsx calls_runlots 350,154 250,114 −100,040 (−28.6%) 🟢
octane-jsx dom_runlots 40,000 10,000 −30,000 (−75.0%) 🟢
octane-jsx calls_select_lots 90,159 80,112 −10,047 (−11.1%) 🟢
octane-jsx calls_clear 169 125 −44 (−26.0%) 🟢

37 other measured values are unchanged.

Application bundle size (bytes)

target metric base head Δ
octane-tsrx js_raw 87,542 93,640 +6,098 (+7.0%) 🔴
octane-tsrx js_gzip 29,181 31,542 +2,361 (+8.1%) 🔴
octane-tsrx js_brotli 26,068 28,287 +2,219 (+8.5%) 🔴
octane-tsrx app_raw 6,952 7,556 +604 (+8.7%) 🔴
octane-tsrx app_gzip 2,337 2,621 +284 (+12.2%) 🔴
octane-tsrx app_brotli 2,028 2,274 +246 (+12.1%) 🔴
octane-tsrx fw_raw 80,590 86,084 +5,494 (+6.8%) 🔴
octane-tsrx fw_gzip 26,844 28,921 +2,077 (+7.7%) 🔴
octane-tsrx fw_brotli 24,040 26,013 +1,973 (+8.2%) 🔴
octane-tsrx todo_js_raw 100,282 106,478 +6,196 (+6.2%) 🔴
octane-tsrx todo_js_gzip 33,788 36,163 +2,375 (+7.0%) 🔴
octane-tsrx todo_js_brotli 30,093 32,259 +2,166 (+7.2%) 🔴
octane-tsrx todo_app_raw 4,639 6,241 +1,602 (+34.5%) 🔴
octane-tsrx todo_app_gzip 2,234 2,781 +547 (+24.5%) 🔴
octane-tsrx todo_app_brotli 1,893 2,333 +440 (+23.2%) 🔴
octane-tsrx todo_fw_raw 95,643 100,237 +4,594 (+4.8%) 🔴
octane-tsrx todo_fw_gzip 31,554 33,382 +1,828 (+5.8%) 🔴
octane-tsrx todo_fw_brotli 28,200 29,926 +1,726 (+6.1%) 🔴
octane-tsrx chat_js_raw 99,618 105,328 +5,710 (+5.7%) 🔴
octane-tsrx chat_js_gzip 33,703 35,960 +2,257 (+6.7%) 🔴
octane-tsrx chat_js_brotli 30,060 32,108 +2,048 (+6.8%) 🔴
octane-tsrx chat_app_raw 5,777 7,141 +1,364 (+23.6%) 🔴
octane-tsrx chat_app_gzip 2,723 3,224 +501 (+18.4%) 🔴
octane-tsrx chat_app_brotli 2,400 2,810 +410 (+17.1%) 🔴
octane-tsrx chat_fw_raw 93,841 98,187 +4,346 (+4.6%) 🔴
octane-tsrx chat_fw_gzip 30,980 32,736 +1,756 (+5.7%) 🔴
octane-tsrx chat_fw_brotli 27,660 29,298 +1,638 (+5.9%) 🔴
octane-tsrx weather_js_raw 134,372 142,984 +8,612 (+6.4%) 🔴
octane-tsrx weather_js_gzip 44,572 47,540 +2,968 (+6.7%) 🔴
octane-tsrx weather_js_brotli 39,358 42,006 +2,648 (+6.7%) 🔴
octane-tsrx weather_app_raw 22,156 25,082 +2,926 (+13.2%) 🔴
octane-tsrx weather_app_gzip 7,880 8,650 +770 (+9.8%) 🔴
octane-tsrx weather_app_brotli 6,684 7,323 +639 (+9.6%) 🔴
octane-tsrx weather_fw_raw 112,216 117,902 +5,686 (+5.1%) 🔴
octane-tsrx weather_fw_gzip 36,692 38,890 +2,198 (+6.0%) 🔴
octane-tsrx weather_fw_brotli 32,674 34,683 +2,009 (+6.1%) 🔴
octane-tsrx bindings_js_raw 681,326 685,160 +3,834 (+0.6%) 🔴
octane-tsrx bindings_js_gzip 224,427 226,480 +2,053 (+0.9%) 🔴
octane-tsrx bindings_js_brotli 191,075 192,720 +1,645 (+0.9%) 🔴
octane-tsrx bindings_app_raw 347,727 354,315 +6,588 (+1.9%) 🔴
octane-tsrx bindings_app_gzip 115,660 117,001 +1,341 (+1.2%) 🔴
octane-tsrx bindings_app_brotli 96,169 97,038 +869 (+0.9%) 🔴
octane-tsrx bindings_fw_raw 333,599 330,845 −2,754 (−0.8%) 🟢
octane-tsrx bindings_fw_gzip 108,767 109,479 +712 (+0.7%) 🔴
octane-tsrx bindings_fw_brotli 94,906 95,682 +776 (+0.8%) 🔴
octane-tsrx wayfinder_js_raw 458,228 438,520 −19,708 (−4.3%) 🟢
octane-tsrx wayfinder_js_gzip 149,135 145,014 −4,121 (−2.8%) 🟢
octane-tsrx wayfinder_js_brotli 129,088 125,980 −3,108 (−2.4%) 🟢
octane-tsrx threadline_oxc_js_raw 146,324 160,675 +14,351 (+9.8%) 🔴
octane-tsrx threadline_oxc_js_gzip 49,064 53,211 +4,147 (+8.5%) 🔴
octane-tsrx threadline_oxc_js_brotli 42,995 46,589 +3,594 (+8.4%) 🔴
octane-tsrx threadline_esbuild_js_raw 173,594 178,568 +4,974 (+2.9%) 🔴
octane-tsrx threadline_esbuild_js_gzip 58,302 60,309 +2,007 (+3.4%) 🔴
octane-tsrx threadline_esbuild_js_brotli 50,889 52,732 +1,843 (+3.6%) 🔴
octane-tsrx pagecraft_oxc_js_raw 541,690 544,306 +2,616 (+0.5%) 🔴
octane-tsrx pagecraft_oxc_js_gzip 169,658 171,545 +1,887 (+1.1%) 🔴
octane-tsrx pagecraft_oxc_js_brotli 143,373 145,448 +2,075 (+1.4%) 🔴
octane-tsrx pagecraft_esbuild_js_raw 591,930 576,763 −15,167 (−2.6%) 🟢
octane-tsrx pagecraft_esbuild_js_gzip 189,098 186,893 −2,205 (−1.2%) 🟢
octane-tsrx pagecraft_esbuild_js_brotli 159,774 158,634 −1,140 (−0.7%) 🟢
octane-tsrx full_fw_raw 570,220 522,644 −47,576 (−8.3%) 🟢
octane-tsrx full_fw_gzip 172,572 163,487 −9,085 (−5.3%) 🟢
octane-tsrx full_fw_brotli 145,289 138,759 −6,530 (−4.5%) 🟢
octane-jsx js_raw 167,274 169,065 +1,791 (+1.1%) 🔴
octane-jsx js_gzip 54,270 55,422 +1,152 (+2.1%) 🔴
octane-jsx js_brotli 47,632 48,643 +1,011 (+2.1%) 🔴
octane-jsx app_raw 8,271 11,059 +2,788 (+33.7%) 🔴
octane-jsx app_gzip 2,860 3,584 +724 (+25.3%) 🔴
octane-jsx app_brotli 2,421 2,930 +509 (+21.0%) 🔴
octane-jsx fw_raw 159,003 158,006 −997 (−0.6%) 🟢
octane-jsx fw_gzip 51,410 51,838 +428 (+0.8%) 🔴
octane-jsx fw_brotli 45,211 45,713 +502 (+1.1%) 🔴
octane-jsx shell_js_raw 390,521 327,649 −62,872 (−16.1%) 🟢
octane-jsx shell_js_gzip 122,666 107,202 −15,464 (−12.6%) 🟢
octane-jsx shell_js_brotli 104,685 92,691 −11,994 (−11.5%) 🟢
octane-jsx shell_app_gzip 769 762 −7 (−0.9%) 🟢
octane-jsx shell_app_brotli 671 669 −2 (−0.3%) 🟢
octane-jsx shell_fw_raw 389,428 326,556 −62,872 (−16.1%) 🟢
octane-jsx shell_fw_gzip 121,897 106,440 −15,457 (−12.7%) 🟢
octane-jsx shell_fw_brotli 104,014 92,022 −11,992 (−11.5%) 🟢
octane-jsx shell_client_js_raw 324,872 278,563 −46,309 (−14.3%) 🟢
octane-jsx shell_client_js_gzip 101,514 90,681 −10,833 (−10.7%) 🟢
octane-jsx shell_client_js_brotli 87,565 79,044 −8,521 (−9.7%) 🟢
octane-jsx shell_client_app_gzip 768 765 −3 (−0.4%) 🟢
octane-jsx shell_client_app_brotli 666 665 −1 (−0.2%) 🟢
octane-jsx shell_client_fw_raw 323,771 277,462 −46,309 (−14.3%) 🟢
octane-jsx shell_client_fw_gzip 100,746 89,916 −10,830 (−10.7%) 🟢
octane-jsx shell_client_fw_brotli 86,899 78,379 −8,520 (−9.8%) 🟢
octane-jsx full_fw_raw 570,220 522,644 −47,576 (−8.3%) 🟢
octane-jsx full_fw_gzip 172,572 163,487 −9,085 (−5.3%) 🟢
octane-jsx full_fw_brotli 145,289 138,759 −6,530 (−4.5%) 🟢

2 other measured values are unchanged.

Public-import reachability bundles (bytes)

target metric base head Δ
capture-only raw 11,203 10,177 −1,026 (−9.2%) 🟢
capture-only gzip 4,264 3,903 −361 (−8.5%) 🟢
capture-only brotli 3,802 3,470 −332 (−8.7%) 🟢
cli-spa-starter raw 80,910 85,921 +5,011 (+6.2%) 🔴
cli-spa-starter gzip 27,848 29,744 +1,896 (+6.8%) 🔴
cli-spa-starter brotli 24,733 26,481 +1,748 (+7.1%) 🔴
root-static-specialized raw 52,955 57,198 +4,243 (+8.0%) 🔴
root-static-specialized gzip 18,041 19,560 +1,519 (+8.4%) 🔴
root-static-specialized brotli 16,362 17,725 +1,363 (+8.3%) 🔴
root-chained-jsx raw 54,290 59,340 +5,050 (+9.3%) 🔴
root-chained-jsx gzip 18,430 20,272 +1,842 (+10.0%) 🔴
root-chained-jsx brotli 16,731 18,355 +1,624 (+9.7%) 🔴
root-static raw 148,801 144,648 −4,153 (−2.8%) 🟢
root-static gzip 48,271 47,608 −663 (−1.4%) 🟢
root-static brotli 42,512 42,125 −387 (−0.9%) 🟢
root-static-local raw 52,855 57,100 +4,245 (+8.0%) 🔴
root-static-local gzip 17,987 19,495 +1,508 (+8.4%) 🔴
root-static-local brotli 16,334 17,682 +1,348 (+8.3%) 🔴
root-callback-local raw 54,671 59,757 +5,086 (+9.3%) 🔴
root-callback-local gzip 18,513 20,375 +1,862 (+10.1%) 🔴
root-callback-local brotli 16,877 18,451 +1,574 (+9.3%) 🔴
hooks-state raw 62,298 68,097 +5,799 (+9.3%) 🔴
hooks-state gzip 20,959 23,200 +2,241 (+10.7%) 🔴
hooks-state brotli 19,043 21,010 +1,967 (+10.3%) 🔴
prop-attributes raw 59,402 65,211 +5,809 (+9.8%) 🔴
prop-attributes gzip 20,086 22,353 +2,267 (+11.3%) 🔴
prop-attributes brotli 18,197 20,197 +2,000 (+11.0%) 🔴
context raw 69,744 75,215 +5,471 (+7.8%) 🔴
context gzip 23,278 25,370 +2,092 (+9.0%) 🔴
context brotli 20,997 22,910 +1,913 (+9.1%) 🔴
hydrate-root raw 108,832 96,720 −12,112 (−11.1%) 🟢
hydrate-root gzip 35,830 32,473 −3,357 (−9.4%) 🟢
hydrate-root brotli 31,767 28,956 −2,811 (−8.8%) 🟢
deferred-hydration raw 191,648 180,701 −10,947 (−5.7%) 🟢
deferred-hydration gzip 61,248 58,902 −2,346 (−3.8%) 🟢
deferred-hydration brotli 53,376 51,418 −1,958 (−3.7%) 🟢
hydrate-frame raw 340,799 340,877 +78 (+0.0%) 🔴
hydrate-frame gzip 108,298 110,091 +1,793 (+1.7%) 🔴
hydrate-frame brotli 92,984 95,149 +2,165 (+2.3%) 🔴
suspense-transition raw 123,740 119,904 −3,836 (−3.1%) 🟢
suspense-transition gzip 39,687 39,202 −485 (−1.2%) 🟢
suspense-transition brotli 35,220 34,870 −350 (−1.0%) 🟢
server-hooks raw 472 568 +96 (+20.3%) 🔴
server-hooks gzip 324 384 +60 (+18.5%) 🔴
server-hooks brotli 258 318 +60 (+23.3%) 🔴
server-render raw 64,153 62,128 −2,025 (−3.2%) 🟢
server-render gzip 22,069 21,566 −503 (−2.3%) 🟢
server-render brotli 20,001 19,574 −427 (−2.1%) 🟢
component-owned-effects raw 55,772 61,285 +5,513 (+9.9%) 🔴
component-owned-effects gzip 18,921 20,929 +2,008 (+10.6%) 🔴
component-owned-effects brotli 17,155 18,947 +1,792 (+10.4%) 🔴
descriptor-children raw – 166,310 – 🆕
descriptor-children gzip – 54,406 – 🆕
descriptor-children brotli – 47,972 – 🆕
binding-hooks raw 64,952 70,497 +5,545 (+8.5%) 🔴
binding-hooks gzip 22,121 24,166 +2,045 (+9.2%) 🔴
binding-hooks brotli 20,014 21,842 +1,828 (+9.1%) 🔴
split-shell raw 415,302 391,752 −23,550 (−5.7%) 🟢
split-shell gzip 133,039 128,364 −4,675 (−3.5%) 🟢
split-shell brotli 114,634 111,248 −3,386 (−3.0%) 🟢
split-shell-runtime raw 332,457 316,369 −16,088 (−4.8%) 🟢
split-shell-runtime gzip 105,547 102,498 −3,049 (−2.9%) 🟢
split-shell-runtime brotli 90,054 87,977 −2,077 (−2.3%) 🟢
split-shell-signals raw 74,099 65,386 −8,713 (−11.8%) 🟢
split-shell-signals gzip 23,044 20,786 −2,258 (−9.8%) 🟢
split-shell-signals brotli 20,721 18,815 −1,906 (−9.2%) 🟢
binding-base-ui-vite raw 189,928 176,828 −13,100 (−6.9%) 🟢
binding-base-ui-vite gzip 61,186 58,034 −3,152 (−5.2%) 🟢
binding-base-ui-vite brotli 53,491 51,117 −2,374 (−4.4%) 🟢
binding-base-ui-esbuild raw 217,239 198,236 −19,003 (−8.7%) 🟢
binding-base-ui-esbuild gzip 70,742 66,886 −3,856 (−5.5%) 🟢
binding-base-ui-esbuild brotli 61,446 58,754 −2,692 (−4.4%) 🟢
binding-aria-esbuild raw 8,157 8,067 −90 (−1.1%) 🟢
binding-aria-esbuild gzip 3,138 3,082 −56 (−1.8%) 🟢
binding-aria-esbuild brotli 2,807 2,756 −51 (−1.8%) 🟢
binding-radix-vite raw 190,292 176,261 −14,031 (−7.4%) 🟢
binding-radix-vite gzip 61,045 57,603 −3,442 (−5.6%) 🟢
binding-radix-vite brotli 53,469 50,734 −2,735 (−5.1%) 🟢
binding-radix-esbuild raw 217,385 197,719 −19,666 (−9.0%) 🟢
binding-radix-esbuild gzip 70,670 66,552 −4,118 (−5.8%) 🟢
binding-radix-esbuild brotli 61,480 58,410 −3,070 (−5.0%) 🟢
binding-mantine-hooks-vite raw 62,955 68,701 +5,746 (+9.1%) 🔴
binding-mantine-hooks-vite gzip 21,386 23,613 +2,227 (+10.4%) 🔴
binding-mantine-hooks-vite brotli 19,371 21,347 +1,976 (+10.2%) 🔴
binding-mantine-hooks-esbuild raw 74,674 77,606 +2,932 (+3.9%) 🔴
binding-mantine-hooks-esbuild gzip 25,961 27,500 +1,539 (+5.9%) 🔴
binding-mantine-hooks-esbuild brotli 23,280 24,849 +1,569 (+6.7%) 🔴
binding-apollo-client-vite raw 332,217 321,342 −10,875 (−3.3%) 🟢
binding-apollo-client-vite gzip 103,453 101,006 −2,447 (−2.4%) 🟢
binding-apollo-client-vite brotli 90,666 89,025 −1,641 (−1.8%) 🟢
binding-apollo-client-esbuild raw 367,534 350,072 −17,462 (−4.8%) 🟢
binding-apollo-client-esbuild gzip 117,184 113,912 −3,272 (−2.8%) 🟢
binding-apollo-client-esbuild brotli 102,299 100,101 −2,198 (−2.1%) 🟢
binding-usehooks-ts-vite raw 63,737 69,483 +5,746 (+9.0%) 🔴
binding-usehooks-ts-vite gzip 21,594 23,829 +2,235 (+10.4%) 🔴
binding-usehooks-ts-vite brotli 19,569 21,537 +1,968 (+10.1%) 🔴
binding-usehooks-ts-esbuild raw 75,442 78,376 +2,934 (+3.9%) 🔴
binding-usehooks-ts-esbuild gzip 26,191 27,715 +1,524 (+5.8%) 🔴
binding-usehooks-ts-esbuild brotli 23,553 25,059 +1,506 (+6.4%) 🔴

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]>
@trueadm
trueadm merged commit c8c0898 into next Oct 15, 2026
27 of 30 checks passed
@trueadm
trueadm deleted the perf/runtime-size-redesign branch October 15, 2026 12:12
domgan-oai added a commit that referenced this pull request Oct 17, 2026
* 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…
@trueadm trueadm mentioned this pull request Oct 19, 2026
9 of 10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-authored Diff or issue body substantially produced by an AI agent perf PR: performance work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant