Repository navigation
Conversation
<!-- NEXT_JS_LLM -->
|
Vercel Agent finished reviewing your changes. Vercel Agent's latest review does not approve this pull request under the repository's review policy. ExplanationPlease have @unstubbable or @lubieowoce review: the merge-base REVIEW.md requires human escalation for public HTTP-status behavior changes, here at packages/next/src/build/templates/app-page-runtime.ts:2310–2315. No confirmed defects found after checking the rebased guard, surrounding status handling, regression fixtures, and dev expected-failure gates; isolated status-selection checks passed. Full e2e and deployment verification were unavailable because dependencies and framework build outputs are absent. Review steps (1m 3s)Preparing the workspace 14.6s |
Tests PassedCommit: 87cb7c6 |
|
Added |
# Conflicts: # packages/next/src/build/templates/app-page-runtime.ts
Adopts #101628. Closes #101628.
Fixes #101590
What?
packages/next/src/build/templates/app-page-runtime.ts: the cached entry's status is now applied only whenres.statusCode === 200, so a status set by a proxy rewrite is no longer overwritten.test/e2e/app-dir/proxy-rewrite-status: new e2e coverage for proxy rewrites that return 410 and 503 withretry-after.Why?
With Cache Components enabled, a rewrite to a prerendered page with status 410/503 returned 200 because the cached entry's 200 status replaced the proxy status.
How?
app-page-runtime.tskeeps a non-200 status that was set before the cached entry is served.retry-after. In the Cache Components variant (__NEXT_CACHE_COMPONENTS=true) it fails without the fix and passes with it; it also passes with Cache Components disabled.not-found-non-document-dynamicbecause that suite covers 404 not-found semantics, while this one covers arbitrary proxy rewrite statuses.Verification
__NEXT_CACHE_COMPONENTS=true__NEXT_CACHE_COMPONENTS=truenot-found-non-document-dynamic, Turbopack start with and without__NEXT_CACHE_COMPONENTS=true, and webpack start with__NEXT_CACHE_COMPONENTS=truepnpm test-types,pnpm lint-typescript,pnpm lint-ast-grep,pnpm lint-languagepnpm lintis currently blocked only by pre-existingcheck-unused-turbo-tasksfindings in Rust/Turbopack (no Rust/Turbopack changes in this PR); full-repo Prettier/ESLint are blocked only by pre-existing symlink fixtures on Windows.