Repository navigation
fix(octane): keep captured queries lazy through guarded rerenders - #1768
Merged
trueadm merged 3 commits intoOct 5, 2026
Merged
Conversation
domgan-oai
marked this pull request as ready for review
October 5, 2026 12:36
Contributor
Benchmark report
Compares js-framework: 1k/10k row operationsAll 20 timed operations (20 without a verdict)
All 64 work counters are unchanged. Application bundle size (bytes)
56 other measured values are unchanged. Public-import reachability bundles (bytes)No changes across 105 measured values. |
5 of 8 tasks
trueadm
added a commit
that referenced
this pull request
Oct 5, 2026
…#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]>
7 of 8 tasks
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Keep guarded queries lazy across unrelated renders, even when the query is captured by a derived computation. Previously, comparing captures during a re-render resolved an unopened query and started its loader. Capture comparison now checks the existing normalized scope node first; an unread query declines equality without being initialized, so opening the guard still uses the latest selection.
Adds a patch changeset and a compiled regression with two object-valued deriveds. The test changes the query selection while closed and verifies that opening starts only the current request. Existing pending-capture convergence behavior is preserved.
Validation
faa64c629: 19 neighboring cases pass on both control and integrated. The 5 dev/9 prod query regressions fail on control, and all 24 dev/28 prod integrated cases pass. Local tests used the repo compiler/runtime and cached tools. Recheck the final landed fix(octane): handle hydration mismatches like React 19 (boundary/root client-render fallback) #1784 under pinned CI before merging.pnpm format:checkpnpm typecheckpnpm testgit diff --check.pnpm run synccompleted using cached pnpm 11.25.0 with its supported version-warning mode. Project pnpm 12.9.1 was unavailable locally. Generated files had no changes.Risk / follow-ups
Full workspace and locked-toolchain CI still needed. Local scoped typecheck could not read the project (the fallback compiler does not support --runExternalCode); binding-vanilla measurement lacked a binding dependency. No full browser or deployed-app claim.
Historical main
fb404c2breached the old deferred-hydration raw cap. #1784 substantially changes that output; validate against its landed, pinned build before considering any budget increase.Provenance
agent-authored)Codex task · host
com-79386Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Medium Risk
Changes core derived/query capture comparison in the signals facade, which controls when loaders run and how redeclarations commit across renders.
Overview
Guarded
query$handles no longer start loading during unrelated rerenders when they are captured by aderived$branch that is not being read yet. Capture equality inDescriptor[SIGNAL_SAME_CAPTURE]now resolves the normalized scope and checks for an existing cell before treating a capture as the same; if the query was never read, comparison returns false without initializing the loader.When the guarded branch is first entered, the closure re-runs with the latest selection (e.g. after props change while still inactive), instead of reusing a stale capture from an earlier render.
Adds a
GuardedQueryregression (nested object-valued deriveds, tick + prop update while closed, then open) and anoctanepatch changeset.Reviewed by Cursor Bugbot for commit 3627fba. Bugbot is set up for automated code reviews on this repo. Configure here.