豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

(4/9) Reject request-only APIs in output: 'export' fallback pages#93033

Draft
feedthejim wants to merge 4 commits intofeedthejim/export-fallback-routing-reviewfrom
feedthejim/export-fallback-request-boundaries-review
Draft

(4/9) Reject request-only APIs in output: 'export' fallback pages#93033
feedthejim wants to merge 4 commits intofeedthejim/export-fallback-routing-reviewfrom
feedthejim/export-fallback-request-boundaries-review

Conversation

@feedthejim
Copy link
Copy Markdown
Contributor

@feedthejim feedthejim commented Apr 20, 2026

Context

Exported fallback pages still render at build time, so values that only exist per request cannot work there.

What This PR Does

  • errors on unresolved fallback params in Server Components
  • errors on request-only APIs like headers(), cookies(), connection(), and searchParams in export fallback rendering
  • covers both direct and suspense-wrapped cases in the export e2e fixtures

Why This Is Separate

This isolates the policy around request-derived values. Reviewers can look at that rule by itself before the next PR handles the separate question of time, randomness, and use cache.

Not In This PR

  • sync IO rules such as Date.now() and Math.random()
  • hard-load bootstrap UX
  • prefetch and hydration reuse
  • not-found recovery

Validation

  • pnpm --filter=next build
  • NEXT_SKIP_ISOLATE=1 NEXT_TEST_MODE=start pnpm testheadless test/e2e/app-dir-export/test/dynamic-fallback-server-params.test.ts test/e2e/app-dir-export/test/dynamic-fallback-server-params-suspense.test.ts test/e2e/app-dir-export/test/output-export-server-connection.test.ts test/e2e/app-dir-export/test/output-export-server-connection-suspense.test.ts test/e2e/app-dir-export/test/output-export-server-cookies.test.ts test/e2e/app-dir-export/test/output-export-server-cookies-suspense.test.ts test/e2e/app-dir-export/test/output-export-server-headers.test.ts test/e2e/app-dir-export/test/output-export-server-headers-suspense.test.ts test/e2e/app-dir-export/test/output-export-server-search-params.test.ts test/e2e/app-dir-export/test/output-export-server-search-params-suspense.test.ts

Stack

Part 4 of 9 in the output-export fallback stack.

  1. #93032 (1/9) Add the basic runtime for app-router fallbacks in output: 'export'``
  2. #93025 (2/9) Cover output: 'export' fallbacks across app-router route shapes
  3. #93026 (3/9) Prefer the most specific route for overlapping export fallbacks
  4. #93033 (4/9) Reject request-only APIs in output: 'export' fallback pages (this PR)
  5. #93027 (5/9) Define sync IO rules for output: 'export' fallback pages
  6. #93028 (6/9) Hide the export fallback bootstrap document on hard loads
  7. #93029 (7/9) Prefetch and dedupe export fallback data requests
  8. #93030 (8/9) Reuse learned export fallback paths after hydration
  9. #93031 (9/9) Use app not-found when no export fallback route matches

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 20, 2026

All broken links are now fixed, thank you!

@feedthejim feedthejim changed the title Enforce request-bound APIs for output-export fallback routes (4/9) Enforce request-bound APIs for output-export fallback routes Apr 20, 2026
@feedthejim feedthejim changed the title (4/9) Enforce request-bound APIs for output-export fallback routes (4/9) Reject request-only APIs in output: 'export' fallback pages Apr 20, 2026
@feedthejim feedthejim force-pushed the feedthejim/export-fallback-request-boundaries-review branch from 50f798b to e9cbf5d Compare April 20, 2026 04:42
@feedthejim feedthejim force-pushed the feedthejim/export-fallback-routing-review branch from 0df19c0 to ad26827 Compare April 20, 2026 20:36
@feedthejim feedthejim force-pushed the feedthejim/export-fallback-request-boundaries-review branch 2 times, most recently from fb4053d to e1fd539 Compare April 20, 2026 20:56
@feedthejim feedthejim force-pushed the feedthejim/export-fallback-routing-review branch from d836946 to 919c094 Compare April 20, 2026 23:13
@feedthejim feedthejim force-pushed the feedthejim/export-fallback-request-boundaries-review branch from 5331779 to 9fc3ed0 Compare April 20, 2026 23:13
@feedthejim feedthejim force-pushed the feedthejim/export-fallback-routing-review branch from 919c094 to 5486198 Compare April 20, 2026 23:34
@feedthejim feedthejim force-pushed the feedthejim/export-fallback-request-boundaries-review branch from 9fc3ed0 to a1349fb Compare April 20, 2026 23:34
@feedthejim feedthejim force-pushed the feedthejim/export-fallback-routing-review branch from 5486198 to a6b367f Compare April 21, 2026 04:01
@feedthejim feedthejim force-pushed the feedthejim/export-fallback-request-boundaries-review branch from a1349fb to 381fbb6 Compare April 21, 2026 04:01
@feedthejim feedthejim force-pushed the feedthejim/export-fallback-routing-review branch from a6b367f to b1a1b95 Compare April 21, 2026 04:14
@feedthejim feedthejim force-pushed the feedthejim/export-fallback-request-boundaries-review branch from 381fbb6 to 8b65b6b Compare April 21, 2026 04:14
@feedthejim feedthejim force-pushed the feedthejim/export-fallback-request-boundaries-review branch from 8b65b6b to a24b748 Compare April 21, 2026 04:22
@feedthejim feedthejim force-pushed the feedthejim/export-fallback-routing-review branch from b1a1b95 to 4f55188 Compare April 21, 2026 04:22
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