Repository navigation
Conversation
|
Vercel Agent finished reviewing your changes. Vercel Agent's latest review does not approve this pull request under the repository's review policy. ExplanationHuman review requested from @unstubbable and @timneutkens: the merge-base policy strongly escalates response-status changes at packages/next/src/build/templates/app-page-runtime.ts:2322–2329. No blocking defects found; reviewed all changed files and reproduced the status correction using the extracted base and head logic, including PPR on and off. End-to-end verification remains unavailable because dependencies and framework build outputs are absent. Review steps (1m 16s)Preparing the workspace 16.3s |
Tests PassedCommit: d4874b8 |
Summary
Stacked on #101703, the adopted #101628 plus test cases for stored 404 and redirect statuses.
When Proxy rewrites with a status to a page that redirected at build time,
next startanswered the router's RSC request with 200. For RSC requests to a stored redirect, the runtime sets the status to 200 because the payload carries the redirect, and that also replaced the status Proxy had set. The client then followed the redirect without seeing the Proxy status.The 200 now only replaces the redirect status that the runtime applied from the stored entry. With a Proxy status, the RSC response keeps it, the router falls back to a document load, and the page still redirects. Without one, the response is still 200 and the client redirects without a document load.
This matches Vercel, where the CDN applies a non-200 Proxy status to RSC responses too.
Verification
<Link prefetch={false}>and record the status of the router's RSC request:{ status: 410 }: 410, and the browser still ends on the redirect target. Without this change it gets 200 innext start, with Cache Components off and on.pnpm test-start-turbowith Cache Components off and on, andpnpm test-dev-turbo: pass.pnpm test-deployagainstvtest314-next-e2e-tests: passes, so Vercel sends 410 for the rewritten request and 200 without the rewrite.