You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds focused production coverage for the cold and warm HTTP status of a blocking Cache Components dynamic route that calls notFound() for an unknown optional catch-all value.
The fixture also proves that a valid param omitted from generateStaticParams remains available on demand. The migration guide now links the removal of dynamicParams: false to the existing streamed status-code contract.
Why?
#95380 reported that the first invalid request returned 200 while the same route returned 404 after its fallback cache warmed. Reproduction across published canaries shows the mismatch through 16.3.0-canary.102 and stable 404 behavior starting in .103.
Merged PR #96297 is the change that corrected this for next start: fallback shells are no longer upgraded when Partial Prefetching is disabled. Its tests cover shell-upgrade gating but do not call notFound() or lock the cold and warm response statuses.
The runtime is therefore already fixed on current canary. The global-await approach in #95561 is no longer necessary and would risk changing intentional streamed response and redirect behavior.
Extends the Partial Prefetching-disabled fixture owned by #96297 with a blocking instant = false optional catch-all route:
an unknown param returns 404 with noindex before and after the first request
a valid ungenerated param returns 200 before and after the first request
The docs clarify the separate streamed contract: if notFound() is discovered after a static shell starts streaming, HTTP remains 200 and Next.js injects noindex; applications that require a hard 404 must validate before streaming, such as in proxy.
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
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.
What?
Adds focused production coverage for the cold and warm HTTP status of a blocking Cache Components dynamic route that calls
notFound()for an unknown optional catch-all value.The fixture also proves that a valid param omitted from
generateStaticParamsremains available on demand. The migration guide now links the removal ofdynamicParams: falseto the existing streamed status-code contract.Why?
#95380 reported that the first invalid request returned
200while the same route returned404after its fallback cache warmed. Reproduction across published canaries shows the mismatch through16.3.0-canary.102and stable404behavior starting in.103.Merged PR #96297 is the change that corrected this for
next start: fallback shells are no longer upgraded when Partial Prefetching is disabled. Its tests cover shell-upgrade gating but do not callnotFound()or lock the cold and warm response statuses.The runtime is therefore already fixed on current
canary. The global-await approach in #95561 is no longer necessary and would risk changing intentional streamed response and redirect behavior.Closes #95380.
How?
Extends the Partial Prefetching-disabled fixture owned by #96297 with a blocking
instant = falseoptional catch-all route:404withnoindexbefore and after the first request200before and after the first requestThe docs clarify the separate streamed contract: if
notFound()is discovered after a static shell starts streaming, HTTP remains200and Next.js injectsnoindex; applications that require a hard404must validate before streaming, such as inproxy.Verification
pnpm test-start-turbo test/e2e/app-dir/partial-fallback-shell-upgrade/partial-fallback-shell-upgrade.test.tspnpm test-start-webpack test/e2e/app-dir/partial-fallback-shell-upgrade/partial-fallback-shell-upgrade.test.tspnpm --filter=next typesBoth production bundlers pass all 9 tests.