Repository navigation
perf: specialize compiler-owned split Hydrate templates - #1155
Merged
domgan-oai merged 1 commit intoSep 19, 2026
Merged
domgan-oai merged 1 commit into
domgan-oai merged 1 commit into
Conversation
domgan-oai
marked this pull request as ready for review
September 19, 2026 18:59
5 of 8 tasks
4 of 5 tasks
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
Default code-split Hydrate templates without an authored fallback reuse the existing private compiled-child policy in production DOM output. The compiler now carries extraction-owned tag provenance into both the render call and its warm plan, so the public Hydrate dependency no longer retains general returned-value/descriptor rendering for this proven case.
Why
Split extraction generates its own loader and children override. The previous admission check correctly declined authored overrides but also declined these compiler-owned props. Specializing only the render call is insufficient: the generated warm plan independently references public Hydrate.
Changes
ci:workflow:test.Validation
split={false}deferred fixture remains unchanged.pnpm ci:workflow:test: 212/212 pass, including the new guards.pnpm sync, and diff checks pass with no unrelated generated changes.pnpm test,pnpm typecheck, andpnpm format:checkwere not run locally; targeted checks above were used.Evidence and reproduction:
benchmarks/scoped-signals/results/2026-09-19-split-hydrate/report.mdandbenchmarks/scoped-signals/split-hydrate-size-audit.mjs.Risk / follow-ups
This is production DOM compiler specialization of an already shipped runtime policy. Compiler-owned AST identity is private and fails closed if rewrites lose it. The real non-null empty pending body and shared preload/strategy/Suspense/error/abort/retry/adoption/transition lifetime remain. No CPU speed claim or budget-cap change; generic returned-value/descriptor graph deletion contributes to the measured savings, and prior engine/SSR tradeoffs remain in main. This does not prove full issue1118 regression recovery or cover arbitrary exported Context/opaque callers. Native checks are bounded spot-checks, not broad browser qualification.
Related to #1118. Adds a CI-wired guard relevant to #1130 §2.1 without claiming its compound checklist is complete.
Full current-head CI and Cursor Bugbot are green for
d558849ff371b77e32ffb839f799c97575c7f1a4.Provenance
agent-authored)Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Medium Risk
Compiler-only output specialization on hydration boundaries affects production bundle shape and warm-plan codegen; admission is gated but wrong classification could change hydration or pending behavior.
Overview
Production DOM compilation now routes default code-split
Hydratetemplates (no authored fallback) through the private__HydrateCompiledpath in both the render call and the warm plan, so bundles no longer pull in general publicHydratechild/descriptor rendering for that compiler-owned case. The hydrate-boundaries extraction pass records certified tag identities on the prepared AST;compile.jsconsumes that set when emitting component and warm-child calls. Authored fallbacks, spreads, overrides, shadowed tags, dev/HMR/server modes, and related cases still use the general route.Adds a patch changeset, paired bundle audit tooling and evidence (~30% gzip reduction on the matched consumer), CI-wired
split-hydrate-boundaryguards, compiler AST/source-map tests, and hydration lifecycle regressions.deferred-boundary.test.mjsnow expects compiled specialization whensplit={false}is omitted (default split). Runtime source is unchanged.Reviewed by Cursor Bugbot for commit d558849. Bugbot is set up for automated code reviews on this repo. Configure here.