Skip to content

Keep never-prerenderable params out of self-hosted shells - #98612

Open
unstubbable wants to merge 1 commit into
canaryfrom
hl/fix-self-hosted-fallback-params
Open

Keep never-prerenderable params out of self-hosted shells#98612
unstubbable wants to merge 1 commit into
canaryfrom
hl/fix-self-hosted-fallback-params

Conversation

@unstubbable

@unstubbable unstubbable commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

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.

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.

Verified by running the full deploy test matrix against this PR.

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

github-actions Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Tests Passed

Commit: 3ff63b5

@unstubbable
unstubbable marked this pull request as ready for review September 13, 2026 17:27
@unstubbable
unstubbable requested a review from gnoff September 13, 2026 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant