Skip to content

fix(build): validate generated CDN warm path params - #3047

Closed
james-elicx wants to merge 1 commit into
codex/rsc-prewarm-terminal-responsesfrom
codex/rsc-prewarm-static-params-validation
Closed

fix(build): validate generated CDN warm path params#3047
james-elicx wants to merge 1 commit into
codex/rsc-prewarm-terminal-responsesfrom
codex/rsc-prewarm-static-params-validation

Conversation

@james-elicx

Copy link
Copy Markdown
Member

Summary

  • reject malformed getStaticPaths entries before they can invent or collapse CDN warm keys
  • validate App generateStaticParams string-versus-array parameter shapes against the route pattern
  • surface invalid generator return shapes during CDN path discovery instead of silently treating them as an empty result

Next.js reference

The validation mirrors packages/next/src/build/static-paths/pages.ts: entry keys are limited to params/locale, ordinary params are strings, catch-all params are string arrays, and query-bearing string entries cannot be silently normalized into another path.

Scope

This validation is used by build-discovered CDN warm paths. The existing non-discovery prerender fallback for malformed App generator values is preserved.

Validation

  • 54 focused discovery/endpoint tests passed
  • targeted format, lint, and type checks passed

@pkg-pr-new

pkg-pr-new Bot commented Aug 22, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@vinext/cloudflare@3047
npm i https://pkg.pr.new/create-vinext-app@3047
npm i https://pkg.pr.new/@vinext/types@3047
npm i https://pkg.pr.new/vinext@3047

commit: 34d2ecc

@github-actions

Copy link
Copy Markdown
Contributor
Example Preview Production Original
app-router-cloudflare preview production
pages-router-cloudflare preview production
app-router-playground preview production original
realworld-api-rest preview production
nextra-docs-template preview production
benchmarks preview production
hackernews preview production original
workers-cache preview production
web preview production

@github-actions

Copy link
Copy Markdown
Contributor

Performance benchmarks

Compared 34d2ecc against base fa424bc using alternating same-runner rounds. Next.js was unchanged and skipped.

0 improved · 0 regressed · 6 within ±1.5%

Scenario Framework Baseline Current Change
Client bundle size (gzip) vinext 142.2 KB 142.2 KB ⚫ 0.0%
Client entry size (gzip) vinext 129.5 KB 129.5 KB ⚫ -0.0%
Dev server cold start vinext 3.13 s 3.10 s ⚫ -1.0%
Production build time vinext 3.57 s 3.59 s ⚫ +0.5%
RSC entry closure size (gzip) vinext 116.0 KB 116.1 KB ⚫ +0.1%
Server bundle size (gzip) vinext 197.5 KB 197.6 KB ⚫ +0.1%

View detailed results and traces

🟢 improvement · 🔴 regression · ⚫ change below 1.5% · paired base/head

@james-elicx

Copy link
Copy Markdown
Member Author

Superseded by consolidated PR #3057. No commits were dropped or rewritten: #3057 now contains this exact linear commit as part of #3047#3057. Closing only the redundant draft PR.

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