Skip to content

fix(octane): abort pending queries whose owner a retried attempt replaces - #1783

Merged
trueadm merged 10 commits into
mainfrom
fix/pending-query-owner-retirement
Oct 5, 2026
Merged

trueadm merged 10 commits into
mainfrom
fix/pending-query-owner-retirement

Conversation

@trueadm

@trueadm trueadm commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fixes #1764. A pending query$ request is now aborted when its owner is replaced or removed while a <Suspense> or @try boundary is still pending. The pending outer request, surviving owners, and places the attempt has not reached keep their requests.

Root cause. When an uncommitted primary restarts with new inputs, restartUncommittedTry moves its owners into the boundary's retry cache, keyed by structural path. discardSignalRetryItem and suspended WIPs do the same. supersedeSignalRetryOwners keeps every query$ owner, because a redeclared query can re-select from new inputs. The retried attempt then claims only the paths it renders again. Nothing released entries whose position now held something else:

  • In .tsrx, a keyed child sits in a componentSlot whose path ends in prevKey. A key-only change claimed a new path and left the old key's owner cached until the boundary resolved. TSX passed only because a keyed single child goes through the list path, where trackSignalRetryListKeys prunes absent keys.
  • In the nested-removal case, the outer attempt discarded the list rows and retained the inner boundary's owners in the outer cache. The retried row rendered <b> instead, so nothing claimed or pruned them.

Changes

packages/octane/src/runtime.ts: when a scope consults a retry cache on its first render (!mounted), scopeSignalOwner records a visit. renderBlock takes the visit and prunes once that render completes or suspends:

  • Own position. If the scope's path ends in a component, child or branch slot segment (['slot', i, kind, branch, component, key]), the attempt has proven which occupant that slot holds. Retained occupants with a different kind, branch, component or key are retired. Try slots, which hold a primary beside a fallback, and list rows, which prune by key, are left alone.
  • Created slots. Each sole-occupant slot the scope created proves its current occupant, so other retained occupants under that slot index are retired. A fresh slot records its identity before it renders its occupant, so this holds even for a slot that was still rendering when the render suspended (from Bugbot review). A completed render that never created a slot index renders nothing there, so that index retires. A suspended render keeps such indices, because it may not have reached them yet.

The trie is edited fully before any owner retires, as trackSignalRetryListKeys does, so abort callbacks cannot observe a half-pruned cache. Pruning runs only for scopes in their first render. In-place retries of a hidden primary and committed scopes never prune, so a held transition's retained owners are untouched.

If the active hydration doesn't own the block, renderBlock builds it through a nested hydration.suspend(() => renderBlock(block)) call, and hands the visit to that nested render (from Bugbot review). No public-API scenario I tried reaches this path with a visit, so it has no dedicated test.

A hookless same-module component renders as a lite scope rather than a Block. Its render path takes and prunes the visit the same way (from Bugbot review).

docs/signals.md now states this in the query lifetime contract.

Validation

  • targeted tests, pnpm exec vitest run packages/octane/tests/pending-query-owner-retirement.test.ts --project octane: 30/30 pass.
    • The issue's 14 cases: key-only change for TSX, TSRX <Suspense> and @try, dev/prod × client/hydration; nested removal, dev/prod.
    • TSRX @if arm swap and component swap with a later suspending sibling.
    • Retention guards: a restarted attempt that suspends before reaching a pending query keeps it; so does a hole its owner has not reached, until the completed attempt retires it; a restarted keyed owner with the same key keeps its descendant's request; a new key aborts it.
  • On unmodified main, all 16 retirement cases fail and the 8 controls/guards pass.
  • Deliberate breaks each turn a guard red:
    • No own-position prune: 10 fail.
    • No created-slot prune: nested removal fails.
    • Absent slots retired while suspended: the unreached-request guard fails.
    • Matching chain retired too: the nested-outer and unreached guards fail.
  • pnpm typecheck:files and pnpm format:files:check on the changed files; pnpm sync is clean.
  • node benchmarks/bundle-size/run-minimal.mjs and run.mjs: +0.9–1.1 kB raw / +0.3–0.45 kB gzip per client bundle. The raises are in ci(bench): raise byte budgets for pending query owner retirement #1782 (merged), ci(bench): raise byte budgets for the pending query owner fix on top of #1761 #1793 (combined growth with fix(octane): resolve a component's signal handles from its nested @{ … } blocks #1761, merged) and ci(bench): raise byte budgets for lite-scope retry pruning in #1783 #1794 (lite-scope pruning).
  • pnpm format:check, pnpm typecheck, pnpm test: left to CI to keep local load down. No local benchmark timing run either.

Risk / follow-ups

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
Changes core Suspense retry-owner pruning and async query$ cancellation during uncommitted renders; behavior is nuanced but covered by a large targeted test matrix.

Overview
Pending query$ requests are now aborted when a retried Suspense/@try attempt replaces or removes their owner (key-only child change, @if/component swap, nested boundary removal), instead of keeping the old in-flight request until the boundary resolves.

The Octane runtime records a signal-retry visit on a scope’s first render when it claims from the boundary retry cache, then pruneSignalRetryVisit after that render finishes or suspends: it drops retry-cache occupants that no longer match what the attempt rendered at sole-occupant slots (component/child/@if/@switch), while not pruning places the attempt has not reached yet or owners that render again with the same identity. docs/signals.md and a changeset document the contract; pending-query-owner-retirement.test.ts covers TSX/TSRX/@try, hydration, and retention guards.

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

…aces

A pending Suspense or @Try boundary keeps the owners of a discarded attempt
in its retry cache until the same structural position renders again. A
retried attempt that rendered a different key, component or arm there, or
that removed the position, never released them, so their query$ requests
stayed un-aborted until the boundary resolved.

A scope's first render in a retry region now proves what the attempt renders
where it has been. Its own path retires other occupants of its parent's
component, child or branch slot, and each slot it created retires other
occupants recorded there. A completed render also retires slots it did not
create. Positions a suspended attempt has not reached keep their requests.

Fixes #1764

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

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark report

  • 🔴 bundle-size: 49 value(s) increased within budget
  • 🔴 bundle-reachability: 69 value(s) increased within budget

Compares ab4b64c84, the merge commit's first parent with 6e6a775f4 on the same runner. A byte value over its committed budget or any increase in a js-framework work counter fails this check. 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

All 20 timed operations (20 without a verdict)
target operation base ms head ms head/base 95% CI
octane-tsrx run 8.358 5.558 −15.9% −36.7% … −2.0% ⚪ within noise
octane-tsrx replace 19.217 15.683 −6.8% −27.1% … +4.1% ⚪ within noise
octane-tsrx add 7.808 7.175 −1.0% −22.3% … +3.8% ⚪ within noise
octane-tsrx update 0.329 0.349 +1.5% −12.2% … +35.0% ⚪ within noise
octane-tsrx select 0.013 0.019 +1.0% −15.0% … +87.3% ⚪ within noise
octane-tsrx swap 0.092 0.099 +1.0% −2.2% … +6.8% ⚪ within noise
octane-tsrx remove 0.058 0.046 −7.7% −20.9% … +3.6% ⚪ within noise
octane-tsrx runlots 67.917 76.483 −0.9% −4.0% … +55.6% ⚪ within noise
octane-tsrx select_lots 0.015 0.020 +3.6% −3.1% … +22.6% ⚪ within noise
octane-tsrx clear 88.850 93.858 +1.8% −5.9% … +9.6% ⚪ within noise
octane-jsx run 9.567 9.308 −3.7% −6.1% … +3.0% ⚪ within noise
octane-jsx replace 11.475 14.225 +1.7% −4.4% … +18.5% ⚪ within noise
octane-jsx add 5.542 5.475 −4.6% −8.8% … −0.0% ⚪ within noise
octane-jsx update 0.420 0.397 −5.6% −25.5% … +5.3% ⚪ within noise
octane-jsx select 0.202 0.205 −2.5% −6.1% … +1.5% ⚪ within noise
octane-jsx swap 0.405 0.386 +2.4% −6.1% … +5.3% ⚪ within noise
octane-jsx remove 0.302 0.261 −1.7% −7.5% … +2.2% ⚪ within noise
octane-jsx runlots 46.575 43.467 +0.2% −4.5% … +6.7% ⚪ within noise
octane-jsx select_lots 3.279 3.271 −5.5% −23.4% … +6.6% ⚪ within noise
octane-jsx clear 49.442 46.625 −5.4% −14.3% … +4.0% ⚪ within noise

All 64 work counters are unchanged.

Application bundle size (bytes)

target metric base head Δ
octane-tsrx js_raw 120,372 121,294 +922 (+0.8%) 🔴
octane-tsrx js_gzip 39,805 40,118 +313 (+0.8%) 🔴
octane-tsrx js_brotli 35,193 35,492 +299 (+0.8%) 🔴
octane-tsrx app_gzip 2,434 2,435 +1 (+0.0%) 🔴
octane-tsrx app_brotli 2,125 2,129 +4 (+0.2%) 🔴
octane-tsrx fw_raw 113,237 114,159 +922 (+0.8%) 🔴
octane-tsrx fw_gzip 37,371 37,683 +312 (+0.8%) 🔴
octane-tsrx fw_brotli 33,068 33,363 +295 (+0.9%) 🔴
octane-tsrx todo_js_raw 131,093 132,015 +922 (+0.7%) 🔴
octane-tsrx todo_js_gzip 43,461 43,789 +328 (+0.8%) 🔴
octane-tsrx todo_js_brotli 38,198 38,546 +348 (+0.9%) 🔴
octane-tsrx todo_app_gzip 2,332 2,330 −2 (−0.1%) 🟢
octane-tsrx todo_app_brotli 1,989 1,986 −3 (−0.2%) 🟢
octane-tsrx todo_fw_raw 126,282 127,204 +922 (+0.7%) 🔴
octane-tsrx todo_fw_gzip 41,129 41,459 +330 (+0.8%) 🔴
octane-tsrx todo_fw_brotli 36,209 36,560 +351 (+1.0%) 🔴
octane-tsrx chat_js_raw 129,732 130,654 +922 (+0.7%) 🔴
octane-tsrx chat_js_gzip 43,169 43,540 +371 (+0.9%) 🔴
octane-tsrx chat_js_brotli 38,062 38,382 +320 (+0.8%) 🔴
octane-tsrx chat_app_gzip 2,768 2,770 +2 (+0.1%) 🔴
octane-tsrx chat_app_brotli 2,451 2,459 +8 (+0.3%) 🔴
octane-tsrx chat_fw_raw 123,742 124,664 +922 (+0.7%) 🔴
octane-tsrx chat_fw_gzip 40,401 40,770 +369 (+0.9%) 🔴
octane-tsrx chat_fw_brotli 35,611 35,923 +312 (+0.9%) 🔴
octane-tsrx weather_js_raw 168,270 169,192 +922 (+0.5%) 🔴
octane-tsrx weather_js_gzip 55,446 55,732 +286 (+0.5%) 🔴
octane-tsrx weather_js_brotli 48,339 48,648 +309 (+0.6%) 🔴
octane-tsrx weather_app_gzip 8,109 8,110 +1 (+0.0%) 🔴
octane-tsrx weather_app_brotli 6,905 6,907 +2 (+0.0%) 🔴
octane-tsrx weather_fw_raw 145,532 146,454 +922 (+0.6%) 🔴
octane-tsrx weather_fw_gzip 47,337 47,622 +285 (+0.6%) 🔴
octane-tsrx weather_fw_brotli 41,434 41,741 +307 (+0.7%) 🔴
octane-tsrx bindings_js_raw 715,465 716,387 +922 (+0.1%) 🔴
octane-tsrx bindings_js_gzip 239,552 239,878 +326 (+0.1%) 🔴
octane-tsrx bindings_js_brotli 204,091 204,363 +272 (+0.1%) 🔴
octane-tsrx bindings_app_gzip 121,383 121,370 −13 (−0.0%) 🟢
octane-tsrx bindings_app_brotli 101,517 101,542 +25 (+0.0%) 🔴
octane-tsrx bindings_fw_raw 360,655 361,577 +922 (+0.3%) 🔴
octane-tsrx bindings_fw_gzip 118,169 118,508 +339 (+0.3%) 🔴
octane-tsrx bindings_fw_brotli 102,574 102,821 +247 (+0.2%) 🔴
octane-tsrx full_fw_raw 571,679 572,665 +986 (+0.2%) 🔴
octane-tsrx full_fw_gzip 175,138 175,485 +347 (+0.2%) 🔴
octane-tsrx full_fw_brotli 147,910 148,107 +197 (+0.1%) 🔴
octane-jsx js_raw 228,523 229,445 +922 (+0.4%) 🔴
octane-jsx js_gzip 73,054 73,372 +318 (+0.4%) 🔴
octane-jsx js_brotli 63,256 63,544 +288 (+0.5%) 🔴
octane-jsx app_brotli 2,499 2,497 −2 (−0.1%) 🟢
octane-jsx fw_raw 220,064 220,986 +922 (+0.4%) 🔴
octane-jsx fw_gzip 70,118 70,436 +318 (+0.5%) 🔴
octane-jsx fw_brotli 60,757 61,047 +290 (+0.5%) 🔴
octane-jsx full_fw_raw 571,679 572,665 +986 (+0.2%) 🔴
octane-jsx full_fw_gzip 175,138 175,485 +347 (+0.2%) 🔴
octane-jsx full_fw_brotli 147,910 148,107 +197 (+0.1%) 🔴

7 other measured values are unchanged.

Public-import reachability bundles (bytes)

target metric base head Δ
cli-spa-starter raw 109,106 110,028 +922 (+0.8%) 🔴
cli-spa-starter gzip 36,891 37,232 +341 (+0.9%) 🔴
cli-spa-starter brotli 32,350 32,603 +253 (+0.8%) 🔴
root-static-specialized raw 77,559 78,663 +1,104 (+1.4%) 🔴
root-static-specialized gzip 25,782 26,148 +366 (+1.4%) 🔴
root-static-specialized brotli 23,023 23,301 +278 (+1.2%) 🔴
root-chained-jsx raw 79,595 80,699 +1,104 (+1.4%) 🔴
root-chained-jsx gzip 26,329 26,693 +364 (+1.4%) 🔴
root-chained-jsx brotli 23,477 23,781 +304 (+1.3%) 🔴
root-static raw 204,746 205,668 +922 (+0.5%) 🔴
root-static gzip 65,219 65,574 +355 (+0.5%) 🔴
root-static brotli 56,538 56,860 +322 (+0.6%) 🔴
root-static-local raw 77,562 78,666 +1,104 (+1.4%) 🔴
root-static-local gzip 25,768 26,135 +367 (+1.4%) 🔴
root-static-local brotli 22,975 23,380 +405 (+1.8%) 🔴
hooks-state raw 89,622 90,726 +1,104 (+1.2%) 🔴
hooks-state gzip 29,785 30,161 +376 (+1.3%) 🔴
hooks-state brotli 26,497 26,845 +348 (+1.3%) 🔴
prop-attributes raw 90,101 91,205 +1,104 (+1.2%) 🔴
prop-attributes gzip 29,863 30,231 +368 (+1.2%) 🔴
prop-attributes brotli 26,590 26,910 +320 (+1.2%) 🔴
context raw 104,025 105,129 +1,104 (+1.1%) 🔴
context gzip 34,460 34,823 +363 (+1.1%) 🔴
context brotli 30,567 30,800 +233 (+0.8%) 🔴
hydrate-root raw 169,978 170,900 +922 (+0.5%) 🔴
hydrate-root gzip 53,876 54,203 +327 (+0.6%) 🔴
hydrate-root brotli 47,038 47,311 +273 (+0.6%) 🔴
deferred-hydration raw 233,494 234,416 +922 (+0.4%) 🔴
deferred-hydration gzip 73,817 74,141 +324 (+0.4%) 🔴
deferred-hydration brotli 63,721 63,943 +222 (+0.3%) 🔴
suspense-transition raw 160,478 161,400 +922 (+0.6%) 🔴
suspense-transition gzip 51,483 51,794 +311 (+0.6%) 🔴
suspense-transition brotli 45,187 45,344 +157 (+0.3%) 🔴
component-owned-effects raw 82,075 83,179 +1,104 (+1.3%) 🔴
component-owned-effects gzip 27,053 27,444 +391 (+1.4%) 🔴
component-owned-effects brotli 24,126 24,514 +388 (+1.6%) 🔴
binding-hooks raw 88,138 89,242 +1,104 (+1.3%) 🔴
binding-hooks gzip 29,504 29,880 +376 (+1.3%) 🔴
binding-hooks brotli 26,261 26,607 +346 (+1.3%) 🔴
binding-base-ui-vite raw 215,006 215,928 +922 (+0.4%) 🔴
binding-base-ui-vite gzip 68,800 69,127 +327 (+0.5%) 🔴
binding-base-ui-vite brotli 59,676 59,912 +236 (+0.4%) 🔴
binding-base-ui-esbuild raw 212,944 213,844 +900 (+0.4%) 🔴
binding-base-ui-esbuild gzip 68,742 69,078 +336 (+0.5%) 🔴
binding-base-ui-esbuild brotli 59,692 59,894 +202 (+0.3%) 🔴
binding-radix-vite raw 216,922 217,844 +922 (+0.4%) 🔴
binding-radix-vite gzip 69,361 69,710 +349 (+0.5%) 🔴
binding-radix-vite brotli 60,225 60,442 +217 (+0.4%) 🔴
binding-radix-esbuild raw 214,819 215,719 +900 (+0.4%) 🔴
binding-radix-esbuild gzip 69,326 69,653 +327 (+0.5%) 🔴
binding-radix-esbuild brotli 60,276 60,520 +244 (+0.4%) 🔴
binding-mantine-hooks-vite raw 91,442 92,546 +1,104 (+1.2%) 🔴
binding-mantine-hooks-vite gzip 30,339 30,726 +387 (+1.3%) 🔴
binding-mantine-hooks-vite brotli 27,008 27,382 +374 (+1.4%) 🔴
binding-mantine-hooks-esbuild raw 91,087 92,167 +1,080 (+1.2%) 🔴
binding-mantine-hooks-esbuild gzip 30,512 30,884 +372 (+1.2%) 🔴
binding-mantine-hooks-esbuild brotli 27,199 27,509 +310 (+1.1%) 🔴
binding-apollo-client-vite raw 359,973 360,895 +922 (+0.3%) 🔴
binding-apollo-client-vite gzip 112,857 113,175 +318 (+0.3%) 🔴
binding-apollo-client-vite brotli 98,552 98,885 +333 (+0.3%) 🔴
binding-apollo-client-esbuild raw 362,899 363,799 +900 (+0.2%) 🔴
binding-apollo-client-esbuild gzip 115,115 115,401 +286 (+0.2%) 🔴
binding-apollo-client-esbuild brotli 100,265 100,528 +263 (+0.3%) 🔴
binding-usehooks-ts-vite raw 92,223 93,327 +1,104 (+1.2%) 🔴
binding-usehooks-ts-vite gzip 30,595 30,966 +371 (+1.2%) 🔴
binding-usehooks-ts-vite brotli 27,260 27,566 +306 (+1.1%) 🔴
binding-usehooks-ts-esbuild raw 91,853 92,933 +1,080 (+1.2%) 🔴
binding-usehooks-ts-esbuild gzip 30,719 31,097 +378 (+1.2%) 🔴
binding-usehooks-ts-esbuild brotli 27,390 27,708 +318 (+1.2%) 🔴

36 other measured values are unchanged.

@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.

Autofix Details

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

  • ✅ Fixed: Hydration deferral drops retry prune
    • Captured the retryVisit in the hydration suspend closure and restored it to SIGNAL_RETRY_VISIT before the deferred renderBlock re-entry, so the resumed call finds and consumes the visit and pruneSignalRetryVisit runs normally.

Create PR

Or push these changes by commenting:

@cursor push de309ca5b4
Preview (de309ca5b4)
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
@@ -11104,7 +11104,11 @@
 		(!hydration.owns(block) ||
 			(block.kind === 'dynamic' && block.endMarker !== null && hydration.rebuilds(block.endMarker)))
 	) {
-		hydration.suspend(() => renderBlock(block));
+		const deferredVisit = retryVisit;
+		hydration.suspend(() => {
+			if (deferredVisit !== null) SIGNAL_RETRY_VISIT = deferredVisit;
+			renderBlock(block);
+		});
 		return;
 	}
 	const previousOwner = renderPhaseOwner;

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

Comment thread packages/octane/src/runtime.ts Resolved
trueadm and others added 2 commits October 5, 2026 14:43
renderBlock takes a fresh scope's retry visit before deciding whether the
active hydration owns the block. When it does not, the block renders through
a nested hydration.suspend(() => renderBlock(block)) call, which found no
visit and skipped pruning. Hand the visit to that nested render.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@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.

Autofix Details

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

  • ✅ Fixed: Last slot skip blocks replacement prune
    • Removed the last-slot exemption in pruneSignalRetryVisit because all slot creation paths assign identity fields (currentComp, branch, prevKey) before calling renderBlock, so the occupant is proven even when the body suspends mid-render.

Create PR

Or push these changes by commenting:

@cursor push cdfdb5424c
Preview (cdfdb5424c)
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
@@ -865,9 +865,10 @@
 // been. Its own path ends in the occupant identity of its parent's slot when
 // that segment is ['slot', index, kind, branch, component, key]; item and
 // scope segments cannot place a sole kind there. Every slot it created holds
-// this attempt's occupant, except one still rendering when it suspended. A
-// completed render that created no slot at an index renders nothing there; a
-// suspended one may not have reached it yet.
+// this attempt's occupant — identity fields (branch, currentComp, prevKey) are
+// assigned before the slot's body renders, so the occupant is proven even when
+// the body suspends mid-render. A completed render that created no slot at an
+// index renders nothing there; a suspended one may not have reached it yet.
 function pruneSignalRetryVisit(visit: SignalRetryVisit, suspended: boolean): void {
 	const { scope, cache, path } = visit;
 	const retired: SignalRendererOwnerIdentity[] = [];
@@ -880,8 +881,6 @@
 			retired,
 		);
 	const slots = signalRetryNode(cache, path, false)?.children?.get('slot')?.children;
-	const created = scope._slots;
-	const rendering = suspended ? created?.[created.length - 1] : undefined;
 	if (slots !== undefined) {
 		for (const [index, node] of slots) {
 			const slot = scope.slots[index as number];
@@ -889,7 +888,7 @@
 				if (suspended) continue;
 				slots.delete(index);
 				collectRetiredSignalRetryOwners(node, cache, retired);
-			} else if (slot !== rendering && signalRetrySoleKind(slot.__kind)) {
+			} else if (signalRetrySoleKind(slot.__kind)) {
 				collectReplacedSignalRetryOccupants(
 					node,
 					slot.forSlot != null

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

Comment thread packages/octane/src/runtime.ts Resolved
trueadm and others added 2 commits October 5, 2026 19:24
A fresh componentSlot, childSlot, ifBlock or switchBlock records its
occupant identity before it renders that occupant, and a childSlot unwraps
a thenable before it registers. Every slot a suspended first render
created therefore holds its final identity, including one still rendering,
so pruning no longer skips the last-created slot.

The added test pins the neighbouring rule: a hole the render has not
reached keeps its request until the completed attempt renders without it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@vercel

vercel Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated
octane-website Skipped Skipped Oct 5, 2026 9:10pm UTC
octane-website-mcp Skipped Skipped Oct 5, 2026 9:10pm UTC

Request Review

@vercel
vercel Bot temporarily deployed to Preview – octane-website October 5, 2026 18:33 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp October 5, 2026 18:33 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website October 5, 2026 20:46 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp October 5, 2026 20:46 Inactive
trueadm added a commit that referenced this pull request Oct 5, 2026
Budgets move by the measured esbuild-to-Oxc difference on the same
source (budget - max(0, esbuild - oxc)), so the methodology change
lowers 131 values, keeps 28, raises none, and leaves the headroom #1782
granted to #1783 in place. The baseline, ratio guards and website
summary are recomputed from the merged source.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@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: Lite scopes never prune retry owners
    • Fixed by adding retry-visit claim/prune logic to componentSlotLite (mirroring renderBlock) and changing the mounted check in scopeSignalOwner from scope.block.mounted to scope.mounted so LiteBlockImpl scopes correctly gate visit creation to first render only.

Create PR

Or push these changes by commenting:

@cursor push 1fdc657e12
Preview (1fdc657e12)
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
@@ -1181,7 +1181,7 @@
 				node.owner = undefined;
 				cache.owners.delete(owner);
 			}
-			if (path !== null && !scope.block.mounted) visit = { scope, cache, path };
+			if (path !== null && !scope.mounted) visit = { scope, cache, path };
 		}
 		if (owner === undefined || owner.documentOwner !== documentOwner) {
 			const instanceKey = resolveSignalInstanceKey(scope);
@@ -12152,18 +12152,25 @@
 	let claimed: Node | null | undefined;
 	const outerClaim =
 		adoptedOpen === null ? undefined : hydration!.beginClaim(getNextSibling(adoptedOpen));
+	let retryVisit: SignalRetryVisit | null = null;
 	try {
 		if (signalDocumentEnabled || scope.block.idState.renderOwner?.signalOwner !== undefined) {
 			// Same owner-resolution order as runWithBlockSignalOwner, but the
 			// per-mount closure only exists when the owner actually changes.
 			const owner = scopeSignalOwner(scope);
 			if (owner !== undefined) STREAMED_SIGNAL_OWNER_ACTIVATOR?.(owner);
+			if (SIGNAL_RETRY_VISIT !== null) {
+				if (SIGNAL_RETRY_VISIT.scope === scope) retryVisit = SIGNAL_RETRY_VISIT;
+				SIGNAL_RETRY_VISIT = null;
+			}
 			if (owner === undefined || currentSignalOwner() === owner) {
 				comp(props, scope, undefined);
 			} else runWithSignalOwner(owner, () => comp(props, scope, undefined));
 		} else comp(props, scope, undefined);
+		if (retryVisit !== null) pruneSignalRetryVisit(retryVisit, false);
 		if (!scope.mounted) scope.mounted = true;
 	} catch (error) {
+		if (retryVisit !== null && isSuspenseException(error)) pruneSignalRetryVisit(retryVisit, true);
 		profileDidThrow = true;
 		profileThrown = error;
 		throw error;

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

Reviewed by Cursor Bugbot for commit a0b029b. Configure here.

Comment thread packages/octane/src/runtime.ts Resolved
trueadm and others added 2 commits October 5, 2026 22:07
A hookless same-module component renders as a lite scope rather than a
Block. scopeSignalOwner recorded its retry visit, but only renderBlock took
visits, so a lite wrapper that stopped rendering a pending query$ left it in
flight until the boundary resolved. The lite path now takes its visit and
prunes once its body completes or suspends. A visit is recorded for a scope
that has not mounted, not one whose block has not.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
trueadm added a commit that referenced this pull request Oct 5, 2026
…1794)

#1783 now also prunes retry owners from a lite component's first render
(Bugbot review). Measured on main 2f88235 with #1783 merged in, that
moves seven gzip budgets past their 32-byte headroom.

Co-authored-by: Claude Opus 5.5 <[email protected]>
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp October 5, 2026 21:10 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website October 5, 2026 21:10 Inactive
@trueadm
trueadm merged commit c3c0a3b into main Oct 5, 2026
34 checks passed
@trueadm
trueadm deleted the fix/pending-query-owner-retirement branch October 5, 2026 21:58
trueadm added a commit that referenced this pull request Oct 5, 2026
#1783 landed and spent the headroom #1782/#1793/#1794 granted it. Each
budget is again main's value minus the measured esbuild-to-Oxc
difference on the merged source (131 lowered, 28 unchanged, none
raised). The baseline record, home summary and refresh note follow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
trueadm added a commit that referenced this pull request Oct 5, 2026
…er fix (#1797)

#1781 lands #1774's children signal owner and the Hydrate children fix on
top of main c3c0a3b. #1773's raises for #1774 were used up by #1783's
budgets (#1793, #1794), which were sized without #1774's code. Measured on
main + #1781: 69 values breach, all raw or gzip; brotli fits everywhere.
Each breached value goes to measured + 32; no other value moves.

Co-authored-by: Claude Opus 5.5 <[email protected]>
trueadm added a commit that referenced this pull request Oct 6, 2026
* ci(bench): measure bundle sizes with Vite 8's default minifier

The bundle-size and bundle-reachability harnesses forced Vite's
`minify: 'esbuild'`. That mode turns Rolldown's own minifier off, and with
it the dead-code elimination that removes branches guarded by a
never-written module flag, so the numbers were not what a Vite app ships.

- run.mjs builds every framework with `minify: 'oxc'` (Vite 8's default
  client minifier), still identical settings for every target.
- run-minimal.mjs builds its Vite scenarios with `'oxc'`; the esbuild
  bundler scenarios keep esbuild's `minify: true`. The async-identity
  encoder check accepts Oxc's template-literal quotes.
- Every budget is ratcheted down (144 lowered, 15 unchanged, 0 raised),
  the bundle-size baseline is re-recorded, the 18 cross-framework ratio
  guards are re-cut, and the website summary and copy follow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* ci(bench): re-measure the Oxc budgets on main with #1761 and #1782

Budgets move by the measured esbuild-to-Oxc difference on the same
source (budget - max(0, esbuild - oxc)), so the methodology change
lowers 131 values, keeps 28, raises none, and leaves the headroom #1782
granted to #1783 in place. The baseline, ratio guards and website
summary are recomputed from the merged source.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(website): compare home summary ceilings at stable precision

The smoke test rounds each summary row to 15 significant digits because
Math.log/exp can differ by one ULP between libc implementations, but it
compared the bundle-size range ends exactly. Those ends are geometric
means too: the recorded Solid ceiling was 0.9500824085923075 on macOS and
0.9500824085923076 on the Linux runner. Round them the same way.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* ci(bench): re-derive the Oxc budgets on main with #1766, #1768, #1770, #1772 and #1794

Same method as before: each budget is main's value minus the measured
esbuild-to-Oxc difference on the merged source, never raised (131
lowered, 28 unchanged). The baseline record and home summary follow the
new bytes; every ratio guard still holds with the ceilings already cut.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* ci(bench): re-derive the Oxc budgets on main with #1783

#1783 landed and spent the headroom #1782/#1793/#1794 granted it. Each
budget is again main's value minus the measured esbuild-to-Oxc
difference on the merged source (131 lowered, 28 unchanged, none
raised). The baseline record, home summary and refresh note follow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* ci(bench): re-cut the cross-framework ratio guards after #1784

With #1784's hydrating flag folded by Oxc, Octane's totals shrink 8.5-10%
instead of about 5%, so the total-gzip ceilings had grown about 6% loose.
They are re-cut at about 1.5% headroom on the merged-source measurement;
application-code ceilings are unchanged. All 72 bundle-size guards hold.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>

This branch was previously deployed

2 inactive deployments
Preview – octane-website-mcp — 1628ec44 Deployed Oct 5, 2026 by vercel[bot]
Preview – octane-website — 1628ec44 Deployed Oct 5, 2026 by vercel[bot]
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.

Pending query requests survive keyed replacement and nested boundary removal

1 participant