Keep never-prerenderable params out of self-hosted shells - #98612
Open
unstubbable wants to merge 1 commit into
Open
Keep never-prerenderable params out of self-hosted shells#98612unstubbable wants to merge 1 commit into
unstubbable wants to merge 1 commit into
Conversation
With Cache Components enabled and Partial Prefetching disabled, blocking prerenders in `next start` could cache params that no `generateStaticParams` result supplies. For `/[top]/[bottom]`, where only `top` is supplied, this included `bottom` in the static HTML and created a separate cache entry for each bottom value. Adapter deployments already enforce this rule. The legacy Vercel builder has a known limitation that the existing prerender tests explicitly exclude. #95872 established that these params must remain dynamic. #96297 later put self-hosted eligibility-based shell keys and fallback-param selection behind the `partialPrefetching` flag, alongside automatic fallback upgrades. #98512 then made resumes honor the parameter set recorded by the selected prerender. That did not create the invalid prerenders, but allowed their over-resolved params to enter Cached Navigations. The RSC test added in #98512 did not account for that known legacy-builder limitation and consequently failed in this [canary deploy run](https://github.com/vercel/next.js/actions/runs/34659100427/job/103469344769). For `next start`, shell keys and unresolved params now follow GSP eligibility even when upgrades are disabled. Cache writes, revalidation, and navigation RDC reads use the same key, including shared shells that cannot be completed further. Routes whose params are all prerenderable retain their existing keys when Partial Prefetching is disabled. Automatic upgrade triggers remain gated. The aforementioned `cached-navigations` tests now separate cold RSC navigation from initial HTML and assert eligibility independently of the observed response. Added coverage checks shell sharing, explicit revalidation, and generated optional paths. Legacy-builder failures are documented with expected-failure gates; its implementation remains unchanged.
Contributor
Tests PassedCommit: 3ff63b5 |
unstubbable
marked this pull request as ready for review
September 13, 2026 17:27
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.
With Cache Components enabled and Partial Prefetching disabled, blocking prerenders in
next startcould cache params that nogenerateStaticParamsresult supplies. For/[top]/[bottom], where onlytopis supplied, this includedbottomin the static HTML and created a separate cache entry for each bottom value.Adapter deployments already enforce this rule. The legacy Vercel builder has a known limitation that the existing prerender tests explicitly exclude.
#95872 established that these params must remain dynamic. #96297 later put self-hosted eligibility-based shell keys and fallback-param selection behind the
partialPrefetchingflag, alongside automatic fallback upgrades. #98512 then made resumes honor the parameter set recorded by the selected prerender. That did not create the invalid prerenders, but allowed their over-resolved params to enter Cached Navigations.The RSC test added in #98512 did not account for that known legacy-builder limitation and consequently failed in this canary deploy run.
For
next start, shell keys and unresolved params now follow GSP eligibility even when upgrades are disabled. Cache writes, revalidation, and navigation RDC reads use the same key, including shared shells that cannot be completed further. Routes whose params are all prerenderable retain their existing keys when Partial Prefetching is disabled. Automatic upgrade triggers remain gated.The aforementioned
cached-navigationstests now separate cold RSC navigation from initial HTML and assert eligibility independently of the observed response. Added coverage checks shell sharing, explicit revalidation, and generated optional paths. Legacy-builder failures are documented with expected-failure gates; its implementation remains unchanged.Verified by running the full deploy test matrix against this PR.