Skip to content

fix: recover the template-call-memo, transition-hooks, signal-favoring and SSR metadata ratio guards - #1591

Merged
trueadm merged 5 commits into
mainfrom
fix/bench-ratio-guards
Oct 2, 2026
Merged

trueadm merged 5 commits into
mainfrom
fix/bench-ratio-guards

Conversation

@trueadm

@trueadm trueadm commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Four ratio suites breached deterministic guards on main. The weekly Bench job never reported them, because it has failed before its --ratios step since late August. Each breach was bisected over the suite's own output, with every old checkout running on its own installed dependencies. Five are framework regressions and are fixed in the owning code. Two are harness problems, corrected and documented in the suite READMEs. After the fix, every suite's --ratios run passes.

Suite Breach on main First bad commit Disposition
template-call-memo stable_reads/stable_logs 512 (max 0), insert_reads 9.25, snapshot_reads 9.5, reorder_reads 18 0df8be7 (#1265) Compiler fix
ssr-final-metadata encoded_units 58.6 (max 52.5), identity_key_encodings 5.02 (max 4.02) 5ead1ff (#1069) SSR runtime fix
transition-hooks cycle/updater/click runtime functions, click_runtime_objects 257 5ead1ff (#1069); 8a45222 (#1068) Runtime fix; one-time work-model allowance
signal-favoring bump_shallow 33.8× (max 5.5), plus 30 failing work.mjs gates 5ead1ff (#1069), twice Compiler + runtime fix; timing-harness fix

Why and changes

template-call-memo (#1265). #1265 keeps keyed @for rows live when they read mutable globals. console is a host global, so a Strong-mode row containing console.log('row', item.id) lost DEP-PURE and re-ran every render. docs/differences-from-react.md documents that diagnostic calls do not disqualify reuse. The ambient-read check now ignores the global console receiver of a statement-position console.method(…) call. Every console operation returns undefined, and the call's arguments still count as row reads. A module binding named console keeps the row live.

ssr-final-metadata (#1069). ssrComponentDescriptor started passing the descriptor key to ssrComponent for signal instance keys. ssrComponent then also appended |@component-key:, although ssrChildValue's child-key membrane already encodes the same key inside the same list item scope. ssrChildValue now passes identityScoped: 'key', which skips only that duplicate segment. Signal instance keys still receive the key, and ssrDescriptorPart, which has no enclosing key membrane, keeps the segment. The counts return to the audited 514 encodings and 6,712 units.

transition-hooks (#1069, #1068). Per-site attribution maps each creation event through the source map to its runtime.ts line. It found:

  • runTransition allocated a setNativeCandidateResolver(() => …) closure per transition, plus a lazily registered Action resolver closure. Both are now module functions; the transition resolver reads ACTIVE_TRANSITION_ACTION_BATCH, which is that transition's batch while it is installed.
  • fireEventSlot allocated an invoke closure per delegated handler. The body is now invokeEventSlot, and a callback is created only when the handler enters another signal owner.
  • perf: reduce remaining DOM and event overhead #1068 moved delegated-dispatch state off the native Event into a lifetime frame pool. Its first frame is a one-time allocation, so click_runtime_objects gets a one-time allowance of 1 in the work model. Its per-cycle budget of 4 is unchanged.

The suite's cycle/updater/click breaches are not the #833 root-transaction cost that #1583 attributes in hook-memo: every cycle here is a hook update.

signal-favoring (#1069).

  • TSX: component descriptors became _$createElementFromConfig(site, C, props). The static-fragment fold (perf: lower proven JSX components through compiled renderers #619) still matched only _$createElement(C, props), so every private static link fell back to a full component slot plus a descriptor child slot. The proof now matches the new descriptor, and reads the body-call record that fix(octane): defer JSX returned by direct calls of named functions #1378 later split out. All 90 lite slots are restored.
  • TSRX: a module-wide ctx.signalBindingsUsed flag flips on any prop-bound attribute, after which identifier holes compile to bindSignalChild. For a primitive, that always went through childSlot. bindSignalChild now keeps textHoleUpdate's fast path for an ordinary marker-bounded hole. The token is the last primitive (never an object). A changed primitive is one setText, and an unchanged one does nothing. Pending blocks, raw-HTML hosts, implicit bindings, and non-text modes still take childSlot.
  • Harness: each bump sample timed 50 bumps. A TSRX bump costs about 0.5 µs, under one tick of Chromium's 100 µs clock, so the ratio's denominator was quantized to 0 or 1 tick. It swung 5–12× on identical code. Bump samples are now calibrated to at least 20 ms. With the same runner and identical batch sizes on the same machine, the pre-feat: add async signals and streaming SSR #1069 commit 1ed5d2ab9 measures 14.66–15.26×, and this branch 13.23–13.26×. The 5.5 ceiling was below the true pre-regression ratio, so it moves to 18. The feat: add async signals and streaming SSR #1069 regression (~72×) still breaches it widely.

Bisect evidence

Old checkouts used git worktree add --detach plus pnpm install --frozen-lockfile --prefer-offline --filter …, since oxc-tsrx → @tsrx/oxc and other dependency changes prevent reusing current dependencies.

  • template-call-memo: git bisect run from 42256eb (guard landed, strong stable_logs 0) to 18fbcb0 → 0df8be7. Its parent compiles LoggedRows' forBlock with flags 30, and 0df8be7 with 26 (DEP-PURE bit cleared).
  • ssr-final-metadata: from 733c98d (52.44 units/row, 4.016 encodings/row) → 5ead1ff (58.58, 5.016). A caller trace shows the new ssrComponent string-key encoding per row.
  • transition-hooks: from 0705d6c (guards set). click_runtime_objects first fails at 8a45222 (256 → 257). The function counters are still clean at fe1b2b7, and a second bisect gives 5ead1ff (cycle 128 → 193, updater 64 → 128, click 0 → 64).
  • signal-favoring: compiled-output features of both twins from e98b29e (2026-09-14 baseline). TSRX bindSignalChild and TSX lite slots 90 → 0 both start at 5ead1ff, with parent 1ed5d2a clean. The TSX deferRecord wrapper comes from df0a086 (fix(octane): defer JSX returned by direct calls of named functions #1378), a correctness change whose body-call path renders the same descriptors.

Validation

  • node benchmarks/bench.mjs --ratios <suite> on the final head (rebased on 0b0e10f, which includes fix(compiler): restore the hook-memo ratio guards and gate Lynx bench fixtures in PR CI #1583): template-call-memo 13/13, transition-hooks 42/42, ssr-final-metadata 15/15, signal-favoring 2/2 plus all deterministic work gates (counts identical to the 2026-09-14 baseline; full nine-target runs measured 14.19× and 13.45×), and hook-memo 24/24 alongside fix(compiler): restore the hook-memo ratio guards and gate Lynx bench fixtures in PR CI #1583
  • Regression tests, each seen failing first:
    • for-item-purity.test.ts: Strong console diagnostic rows keep PURE/DEP-PURE. Controls: a module let in the arguments, a module let console, and compatibility mode. The positive cases fail before the fix; the module-binding control fails when its guard is removed.
    • direct-signal-bindings.test.ts: a signal-capable text hole beside siblings updates in place (same Text node, exactly one characterData mutation, none when unchanged) through boolean, element, signal-handle and primitive values. It fails for a never-write and an always-write fast path, and passes on main's runtime, so it pins preserved behavior.
    • direct-signal-bindings.test.ts: a text hole skipped by a pending pass (an earlier hole updates the component's own state mid-render) is written by the repeated pass. Bugbot found this; it showed stale n:at before the fix.
  • Existing behavioral coverage, checked against deliberate breaks:
    • signals-action-lifecycle.test.ts (octane-signals) fails 5 cases when the transition resolver returns no candidate.
    • event-signal-owner.test.ts fails when the owner-switch branch skips runWithSignalOwner.
  • Targeted files: for-item-purity, jsx-context-children (octane + octane-prod; its prod fixture now folds twice, main folds zero times), returned-jsx-direct-calls/switch-fold/try-fold (octane + octane-prod), ssr-deopt-list-identity, ssr-async-identity-*, hydration/direct-signal-bindings, hydration/mismatch-*, compiler/ssr-tsx-children, compiler/component-tag-names, same-file-void-root, universal-renderer, event-signal-owner, signals-action-lifecycle
  • pnpm typecheck:files on the changed TypeScript files; pnpm format:files on every changed file
  • pnpm test, pnpm typecheck, pnpm format:check (not run in full locally; left to CI)

Risk / follow-ups

  • The restored JSX fold removes one synthesized level from the client signal instance-key chain. A same-runner SSR→hydrate experiment found that JSX client chains already diverge from the server's, which never creates levels for synthesized _frag renderers. That is true on main without this PR. The fold moves the client toward the server shape. That parity gap is filed separately.
  • PR CI runs none of these ratio suites, which is how they regressed unseen. The four Node-only deterministic suites here take about 30 s each and would be cheap PR-CI candidates. fix(compiler): restore the hook-memo ratio guards and gate Lynx bench fixtures in PR CI #1583 (merged) unblocks the weekly job's pre-ratio steps.
  • The bindSignalChild fast path applies to plain marker-bounded holes only. Only-child, binding-marker and ownsHost holes keep their existing paths.
  • Byte cost, measured on the current head against main with run-minimal.mjs:
    • Bundles without bindSignalChild grow by about 14 raw bytes for invokeEventSlot (root-chained-jsx 86,001 / 28,540 / 25,331 against main's feat(islands): renderer-free island activation and islands-only routes #1582 ceiling of 86,016 / 28,544 / 25,344; all PR-gated budgets pass).
    • Bundles that reach bindSignalChild (root-static, the base-ui/radix/apollo bindings, the JSX app) grow by about 357 raw / 89 gzip bytes. That is the restored primitive text fast path, which feat: add async signals and streaming SSR #1069 had replaced with a full childSlot per text update in every signal-capable module.
    • The bot's benchmark report predates the reshape and trim, so it shows +23 raw everywhere and about +390 in those bundles.

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. Autofix is disabled.


Note

Medium Risk
Touches compiler fold proofs, SSR async-identity encoding, signal child reconciliation, and transition/event dispatch—high-impact paths, but changes are targeted regression fixes with dedicated tests and deterministic suite gates.

Overview
Restores several ratio-suite guards that broke on main after async-signals work (#1069), plus related compiler, client runtime, SSR, and benchmark harness updates.

Compiler: Private static JSX components fold through the parent template again by recognizing _$createElementFromConfig(site, Component, props) (and the direct-call body record from #1378), not the old two-argument _$createElement shape. Strong-mode keyed @for rows can stay DEP-PURE when the only ambient read is a statement-position console.method(…) on the global console; argument reads still count, and a module console binding keeps the row live.

Client runtime: bindSignalChild uses the primitive text-hole fast path (unchanged value → no work; changed → one setText) for ordinary marker-bounded holes in signal-capable modules. Transitions and delegated events stop allocating a resolver/handler closure on every call—module functions read the active batch, and runWithSignalOwner only wraps handlers that enter another owner.

SSR: Keyed descriptors reached via ssrChildValue no longer double-encode the same key in async identity scope.

Benchmarks: Signal-favoring bump timing calibrates batch size to ≥20 ms per sample (fixes ratio noise from Chromium’s 100 µs clock); bump_shallow max ratio moves to 18. Transition-hooks work model allows one one-time click_runtime_objects from the delegated frame pool (#1068).

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

…g and SSR metadata ratio guards

Four ratio suites breached deterministic guards on main. Each was bisected
over the suite's own output, with every old checkout on its own installed
dependencies.

- template-call-memo (0df8be7, #1265): a Strong `@for` row calling
  `console.log` lost DEP-PURE because `console` is a host global. The
  receiver of a statement-position `console.method()` call no longer counts
  as an ambient row read; its arguments still do.
- ssr-final-metadata (5ead1ff, #1069): `ssrComponent` re-encoded a keyed
  descriptor's key that ssrChildValue's `child-key` membrane already holds.
  ssrChildValue now passes `identityScoped: 'key'`.
- transition-hooks (5ead1ff, #1069; 8a45222, #1068): runTransition's
  native candidate resolver and fireEventSlot's invoke callback no longer
  allocate a closure per transition or delegated event. The pooled event
  frame's first allocation gets a one-time work-model allowance.
- signal-favoring (5ead1ff, #1069): the JSX static-fragment fold matches
  `_$createElementFromConfig(site, C, props)` again, and bindSignalChild keeps
  textHoleUpdate's primitive fast path. Bump samples are calibrated to 20 ms
  because a TSRX bump sat under Chromium's 100 us clock floor; the dialect
  ceiling moves to 18 from same-runner measurements before #1069 and after
  this fix.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added agent-authored Diff or issue body substantially produced by an AI agent fix PR: bug fix labels Oct 2, 2026
@trueadm
trueadm marked this pull request as ready for review October 2, 2026 18:38

@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 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Pending skip poisons text token
    • Hoisted the pending-state condition into a pendingSkip variable and gated the return primitiveToken ? value : text on !pendingSkip, so a pending render no longer stores the new primitive as the token and the subsequent committed render correctly writes via setText.

Create PR

Or push these changes by commenting:

@cursor push 1b171eae50
Preview (1b171eae50)
diff --git a/packages/octane/src/runtime.ts b/packages/octane/src/runtime.ts
--- a/packages/octane/src/runtime.ts
+++ b/packages/octane/src/runtime.ts
@@ -35652,11 +35652,8 @@
 			value !== null &&
 			type !== 'object' &&
 			type !== 'function';
-		if (
-			primitiveToken &&
-			prior === null &&
-			!(CURRENT_BLOCK?.pending && !CURRENT_BLOCK.crossRenderUpdate)
-		) {
+		const pendingSkip = !!(CURRENT_BLOCK?.pending && !CURRENT_BLOCK.crossRenderUpdate);
+		if (primitiveToken && prior === null && !pendingSkip) {
 			const state = parentScope.slots[slotKey] as ChildSlot | undefined;
 			if (
 				state !== undefined &&
@@ -35686,7 +35683,7 @@
 			if (WIP_CAPTURE === null) finish(false);
 			else (WIP_CAPTURE.renderCleanups ??= []).push(finish);
 		}
-		return primitiveToken ? value : text;
+		return primitiveToken && !pendingSkip ? value : text;
 	}
 	if (prior !== null && !prior.disposed && prior.handle === value) {
 		const next = readSignalBinding(value);

You can send follow-ups to the cloud agent here.

Reviewed by Cursor Bugbot for commit 6812f00. Configure here.

Comment thread packages/octane/src/runtime.ts Resolved
@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark report

  • 🔴 bundle-size: 20 value(s) increased
  • 🔴 bundle-reachability: 47 value(s) increased

Compares 53db43656 with 58f4d76d0 on the same runner. Timing verdicts require a change beyond the combined margin of error (at least 5%) and one 0.1ms timer tick, with the fastest sample also moving beyond that margin. Workflow run

js-framework: 1k/10k row operations (ms, lower is better)

All 20 timed operations (20 within noise)
target operation base head Δ noise
octane-tsrx run 3.64 4.12 +13.2% ±48% ⚪ within noise
octane-tsrx replace 7.62 10.37 +36.1% ±77% ⚪ within noise
octane-tsrx add 3.66 3.67 +0.3% ±23% ⚪ within noise
octane-tsrx update 0.47 0.53 +12.8% ±103% ⚪ within noise
octane-tsrx select 0.17 0.20 +17.6% ±114% ⚪ within noise
octane-tsrx swap 0.50 0.42 −16.0% ±86% ⚪ within noise
octane-tsrx remove 0.40 0.48 +20.0% ±65% ⚪ within noise
octane-tsrx runlots 34.33 29.82 −13.1% ±38% ⚪ within noise
octane-tsrx select_lots 0.33 0.22 −33.3% ±43% ⚪ within noise
octane-tsrx clear 45.35 40.62 −10.4% ±36% ⚪ within noise
octane-jsx run 4.30 3.75 −12.8% ±27% ⚪ within noise
octane-jsx replace 11.89 7.06 −40.6% ±41% ⚪ within noise
octane-jsx add 4.59 3.18 −30.7% ±59% ⚪ within noise
octane-jsx update 0.85 0.47 −44.7% ±72% ⚪ within noise
octane-jsx select 0.64 0.39 −39.1% ±86% ⚪ within noise
octane-jsx swap 0.70 0.55 −21.4% ±26% ⚪ within noise
octane-jsx remove 0.81 0.59 −27.2% ±49% ⚪ within noise
octane-jsx runlots 29.98 28.95 −3.4% ±23% ⚪ within noise
octane-jsx select_lots 2.90 2.27 −21.7% ±30% ⚪ within noise
octane-jsx clear 53.99 42.78 −20.8% ±24% ⚪ within noise

Application bundle size (bytes)

target metric base head Δ
octane-tsrx js_raw 126,782 126,796 +14 (+0.0%) 🔴
octane-tsrx js_gzip 41,957 41,944 −13 (−0.0%) 🟢
octane-tsrx js_brotli 36,941 36,928 −13 (−0.0%) 🟢
octane-tsrx app_gzip 2,562 2,564 +2 (+0.1%) 🔴
octane-tsrx app_brotli 2,224 2,225 +1 (+0.0%) 🔴
octane-tsrx fw_raw 119,270 119,284 +14 (+0.0%) 🔴
octane-tsrx fw_gzip 39,395 39,380 −15 (−0.0%) 🟢
octane-tsrx fw_brotli 34,717 34,703 −14 (−0.0%) 🟢
octane-tsrx todo_js_raw 141,725 141,739 +14 (+0.0%) 🔴
octane-tsrx todo_js_gzip 46,805 46,792 −13 (−0.0%) 🟢
octane-tsrx todo_js_brotli 41,053 40,969 −84 (−0.2%) 🟢
octane-tsrx todo_app_brotli 2,124 2,117 −7 (−0.3%) 🟢
octane-tsrx todo_fw_raw 136,615 136,629 +14 (+0.0%) 🔴
octane-tsrx todo_fw_gzip 44,328 44,315 −13 (−0.0%) 🟢
octane-tsrx todo_fw_brotli 38,929 38,852 −77 (−0.2%) 🟢
octane-tsrx chat_js_raw 140,970 140,984 +14 (+0.0%) 🔴
octane-tsrx chat_js_gzip 46,780 46,766 −14 (−0.0%) 🟢
octane-tsrx chat_js_brotli 41,111 41,046 −65 (−0.2%) 🟢
octane-tsrx chat_app_brotli 2,638 2,632 −6 (−0.2%) 🟢
octane-tsrx chat_fw_raw 134,317 134,331 +14 (+0.0%) 🔴
octane-tsrx chat_fw_gzip 43,802 43,788 −14 (−0.0%) 🟢
octane-tsrx chat_fw_brotli 38,473 38,414 −59 (−0.2%) 🟢
octane-tsrx weather_js_raw 177,579 177,593 +14 (+0.0%) 🔴
octane-tsrx weather_js_gzip 58,074 58,066 −8 (−0.0%) 🟢
octane-tsrx weather_js_brotli 50,441 50,546 +105 (+0.2%) 🔴
octane-tsrx weather_app_gzip 9,045 9,044 −1 (−0.0%) 🟢
octane-tsrx weather_app_brotli 7,578 7,590 +12 (+0.2%) 🔴
octane-tsrx weather_fw_raw 150,844 150,858 +14 (+0.0%) 🔴
octane-tsrx weather_fw_gzip 49,029 49,022 −7 (−0.0%) 🟢
octane-tsrx weather_fw_brotli 42,863 42,956 +93 (+0.2%) 🔴
octane-jsx js_raw 225,675 226,031 +356 (+0.2%) 🔴
octane-jsx js_gzip 72,082 72,141 +59 (+0.1%) 🔴
octane-jsx js_brotli 62,374 62,398 +24 (+0.0%) 🔴
octane-jsx app_gzip 2,943 2,944 +1 (+0.0%) 🔴
octane-jsx app_brotli 2,506 2,502 −4 (−0.2%) 🟢
octane-jsx fw_raw 217,208 217,564 +356 (+0.2%) 🔴
octane-jsx fw_gzip 69,139 69,197 +58 (+0.1%) 🔴
octane-jsx fw_brotli 59,868 59,896 +28 (+0.0%) 🔴

7 other measured values are unchanged.

Public-import reachability bundles (bytes)

target metric base head Δ
cli-spa-starter raw 116,474 116,488 +14 (+0.0%) 🔴
cli-spa-starter gzip 39,331 39,324 −7 (−0.0%) 🟢
cli-spa-starter brotli 34,341 34,355 +14 (+0.0%) 🔴
root-static-specialized raw 77,072 77,086 +14 (+0.0%) 🔴
root-static-specialized gzip 25,589 25,585 −4 (−0.0%) 🟢
root-static-specialized brotli 22,781 22,774 −7 (−0.0%) 🟢
root-chained-jsx raw 85,987 86,001 +14 (+0.0%) 🔴
root-chained-jsx gzip 28,534 28,540 +6 (+0.0%) 🔴
root-chained-jsx brotli 25,327 25,331 +4 (+0.0%) 🔴
root-static raw 201,994 202,351 +357 (+0.2%) 🔴
root-static gzip 64,234 64,323 +89 (+0.1%) 🔴
root-static brotli 55,669 55,751 +82 (+0.1%) 🔴
root-static-local raw 77,075 77,089 +14 (+0.0%) 🔴
root-static-local gzip 25,576 25,572 −4 (−0.0%) 🟢
root-static-local brotli 22,822 22,773 −49 (−0.2%) 🟢
hooks-state raw 89,236 89,250 +14 (+0.0%) 🔴
hooks-state gzip 29,649 29,643 −6 (−0.0%) 🟢
hooks-state brotli 26,378 26,396 +18 (+0.1%) 🔴
prop-attributes raw 97,439 97,453 +14 (+0.0%) 🔴
prop-attributes gzip 32,398 32,394 −4 (−0.0%) 🟢
prop-attributes brotli 28,721 28,683 −38 (−0.1%) 🟢
context raw 110,371 110,385 +14 (+0.0%) 🔴
context gzip 36,552 36,548 −4 (−0.0%) 🟢
context brotli 32,359 32,347 −12 (−0.0%) 🟢
hydrate-root raw 165,126 165,140 +14 (+0.0%) 🔴
hydrate-root gzip 52,726 52,722 −4 (−0.0%) 🟢
hydrate-root brotli 45,882 45,900 +18 (+0.0%) 🔴
deferred-hydration raw 227,932 227,946 +14 (+0.0%) 🔴
deferred-hydration gzip 72,362 72,353 −9 (−0.0%) 🟢
deferred-hydration brotli 62,452 62,462 +10 (+0.0%) 🔴
suspense-transition raw 166,879 166,916 +37 (+0.0%) 🔴
suspense-transition gzip 53,661 53,658 −3 (−0.0%) 🟢
suspense-transition brotli 46,834 46,871 +37 (+0.1%) 🔴
server-render raw 64,838 64,842 +4 (+0.0%) 🔴
server-render gzip 22,347 22,351 +4 (+0.0%) 🔴
server-render brotli 20,126 20,120 −6 (−0.0%) 🟢
component-owned-effects raw 81,684 81,698 +14 (+0.0%) 🔴
component-owned-effects gzip 26,945 26,940 −5 (−0.0%) 🟢
component-owned-effects brotli 24,023 23,980 −43 (−0.2%) 🟢
binding-hooks raw 87,749 87,763 +14 (+0.0%) 🔴
binding-hooks gzip 29,360 29,343 −17 (−0.1%) 🟢
binding-hooks brotli 26,153 26,104 −49 (−0.2%) 🟢
binding-base-ui-vite raw 212,184 212,541 +357 (+0.2%) 🔴
binding-base-ui-vite gzip 67,842 67,904 +62 (+0.1%) 🔴
binding-base-ui-vite brotli 58,749 58,859 +110 (+0.2%) 🔴
binding-base-ui-esbuild raw 210,153 210,506 +353 (+0.2%) 🔴
binding-base-ui-esbuild gzip 67,772 67,896 +124 (+0.2%) 🔴
binding-base-ui-esbuild brotli 58,752 58,891 +139 (+0.2%) 🔴
binding-radix-vite raw 214,114 214,470 +356 (+0.2%) 🔴
binding-radix-vite gzip 68,360 68,444 +84 (+0.1%) 🔴
binding-radix-vite brotli 59,319 59,365 +46 (+0.1%) 🔴
binding-radix-esbuild raw 212,042 212,394 +352 (+0.2%) 🔴
binding-radix-esbuild gzip 68,374 68,497 +123 (+0.2%) 🔴
binding-radix-esbuild brotli 59,318 59,453 +135 (+0.2%) 🔴
binding-mantine-hooks-vite raw 98,074 98,088 +14 (+0.0%) 🔴
binding-mantine-hooks-vite gzip 32,623 32,609 −14 (−0.0%) 🟢
binding-mantine-hooks-vite brotli 28,970 28,963 −7 (−0.0%) 🟢
binding-mantine-hooks-esbuild raw 97,664 97,678 +14 (+0.0%) 🔴
binding-mantine-hooks-esbuild gzip 32,797 32,788 −9 (−0.0%) 🟢
binding-mantine-hooks-esbuild brotli 29,127 29,107 −20 (−0.1%) 🟢
binding-apollo-client-vite raw 357,236 357,594 +358 (+0.1%) 🔴
binding-apollo-client-vite gzip 111,930 112,014 +84 (+0.1%) 🔴
binding-apollo-client-vite brotli 97,593 97,791 +198 (+0.2%) 🔴
binding-apollo-client-esbuild raw 360,192 360,546 +354 (+0.1%) 🔴
binding-apollo-client-esbuild gzip 114,127 114,237 +110 (+0.1%) 🔴
binding-apollo-client-esbuild brotli 99,395 99,510 +115 (+0.1%) 🔴
binding-usehooks-ts-vite raw 98,707 98,721 +14 (+0.0%) 🔴
binding-usehooks-ts-vite gzip 32,771 32,768 −3 (−0.0%) 🟢
binding-usehooks-ts-vite brotli 29,140 29,118 −22 (−0.1%) 🟢
binding-usehooks-ts-esbuild raw 98,286 98,300 +14 (+0.0%) 🔴
binding-usehooks-ts-esbuild gzip 32,945 32,933 −12 (−0.0%) 🟢
binding-usehooks-ts-esbuild brotli 29,226 29,275 +49 (+0.2%) 🔴

33 other measured values are unchanged.

trueadm and others added 3 commits October 2, 2026 19:58
…-JSX budget

bindSignalChild returned the new primitive as its token even when the block
was already pending, so childSlot skipped the write. The repeated render then
matched that token and left the previous text in place. A skipped pass now
keeps the token unpublished; the new test drives a mid-render self-update
through an earlier hole.

invokeEventSlot is an if/else chain without the redundant bundle alias, which
brings root-chained-jsx back to its raw and gzip ceilings. Removing the
per-event closure still costs 2 brotli bytes, so that budget moves one
32-byte step to 25344.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts:
#	benchmarks/bundle-size/minimal-budgets.json
Fold the pending-pass check into the primitive-token flag and drop the
ownsHost test: only the implicit childSlot path passes ownsHost, and that
path's implicitSignal already keeps it off the fast path. Saves 36 raw and
19 gzip bytes in bundles that reach bindSignalChild.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@trueadm
trueadm merged commit 5ef4f9a into main Oct 2, 2026
31 checks passed
@trueadm
trueadm deleted the fix/bench-ratio-guards branch October 2, 2026 19:28
trueadm added a commit that referenced this pull request Oct 3, 2026
…ive (#1643)

Since #1069 a `{props.value}` hole that is its host's only child compiles to
bindSignalChild, because the value can carry a signal handle. The binding kept
the Text node as its token, so every render went through updateTextValue,
which reads nodeValue to compare. 128 unchanged updates now made 128 live
nodeValue reads where the compiled childTextHoleUpdate path made none. An
unchanged value also overwrote an outside edit to the text.

The only-child path now keeps the last written primitive as its token, like
#1591 did for marker-bounded holes. An unchanged primitive returns before any
DOM read; raw HTML still claims the host first. The token's Text node is the
host's first child. A changed primitive or a switch to a signal handle
recovers it from there. A primitive becomes the token only where that
position is proven:
- by the previous token;
- by a client mount's empty template;
- otherwise by one comparison, because hydration can keep unclaimed server
  content ahead of the node it adopted.
A staged ViewTransition render keeps the Text token.

Restores root-transactions equal_reads text-compiled to 0 (guard maxRatio 0).

Co-authored-by: Claude Opus 5.5 <[email protected]>
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 fix PR: bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant