Skip to content

feat(build): support independently deployed worker stages - #3155

Merged
james-elicx merged 16 commits into
codex/cdn-v2-cloudflare-docsfrom
codex/cdn-v2-http-transport
Sep 7, 2026
Merged

feat(build): support independently deployed worker stages#3155
james-elicx merged 16 commits into
codex/cdn-v2-cloudflare-docsfrom
codex/cdn-v2-http-transport

Conversation

@james-elicx

@james-elicx james-elicx commented Sep 2, 2026

Copy link
Copy Markdown
Member

Part 16 of 16 in the staged CDN adapter stack. Depends on #3154.

Summary

  • adds optional named request/response build entries for adapters that deploy stages independently
  • proves an authenticated over-HTTP transport across separate Node processes
  • requires every admitted Vary selector to be present in the host cache identity
  • keeps cache-hit entrypoints lazy and preserves host-owned inputs/output semantics
  • colocates client, action-owner, and pregenerated-path sidecars with every array-shaped response output, including transform-only adapters such as cdnAdapter()
  • rejects CommonJS, umd, and iife outputs, which cannot load the ESM sidecars or represent independent named stage chunks

This optional layer remains last so the Cloudflare same-Worker entrypoint design does not depend on HTTP deployment support.

Validation

  • 18/18 independent HTTP transport tests
  • actual two-output App and Pages builds cover explicit stage entries and transform-only adapter output
  • 562 focused build, deploy, and Cloudflare Worker tests passed; 2 skipped
  • full vp check, Knip, and vinext/Cloudflare package builds

Review size

  • Implementation: +194 / -56 LOC
  • Tests and fixtures: +1863 / -2 LOC
  • Other (docs, config, lockfile): +0 / -0 LOC
  • 33 changed files

Measured against codex/cdn-v2-cloudflare-docs after rebasing onto main@a6931c0.

@james-elicx james-elicx changed the title codex/cdn v2 http transport feat(build): support independently deployed worker stages Sep 2, 2026
@pkg-pr-new

pkg-pr-new Bot commented Sep 2, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: b3ff95d

@github-actions

github-actions Bot commented Sep 2, 2026

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
static-export preview production
web preview production

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Performance benchmarks

Compared b3ff95d against base 8f09eb5 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.4 KB 142.4 KB ⚫ +0.0%
Client entry size (gzip) vinext 129.6 KB 129.7 KB ⚫ +0.0%
Dev server cold start vinext 3.24 s 3.22 s ⚫ -0.6%
Production build time vinext 3.39 s 3.40 s ⚫ +0.2%
RSC entry closure size (gzip) vinext 125.5 KB 125.5 KB ⚫ +0.0%
Server bundle size (gzip) vinext 216.2 KB 216.2 KB ⚫ -0.0%

View detailed results and traces

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

Comment thread tests/fixtures/multi-stage-http/http-stage-node.ts Fixed
@james-elicx
james-elicx force-pushed the codex/cdn-v2-http-transport branch from d961900 to b7a1a77 Compare September 2, 2026 12:47
@james-elicx
james-elicx force-pushed the codex/cdn-v2-http-transport branch 2 times, most recently from e7f0db1 to 80e5eea Compare September 2, 2026 14:16
@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

Please review exact head 80e5eea and complete within an 8 minute time limit.

Comment thread packages/vinext/src/index.ts Outdated
Comment thread packages/vinext/src/server/multi-stage.ts Outdated
@ask-bonk

ask-bonk Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Posted 2 actionable inline findings on exact head 80e5eea.

github run

@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

Please limit this review to 8 minutes. Review exact head b75b550.

Comment thread packages/vinext/src/index.ts
@ask-bonk

ask-bonk Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Posted 1 actionable inline finding on exact head b75b550.

github run

@james-elicx
james-elicx force-pushed the codex/cdn-v2-http-transport branch from b75b550 to 3e66fc2 Compare September 2, 2026 15:11
@james-elicx
james-elicx force-pushed the codex/cdn-v2-http-transport branch from 3e66fc2 to 61f6582 Compare September 2, 2026 15:21
@james-elicx
james-elicx force-pushed the codex/cdn-v2-http-transport branch from 61f6582 to 4567157 Compare September 2, 2026 15:27
@james-elicx
james-elicx force-pushed the codex/cdn-v2-http-transport branch from 4567157 to cdc2bdf Compare September 2, 2026 15:37
@ask-bonk

ask-bonk Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

LGTM!

github run

@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

Please review exact head 321c507 and complete within an 8 minute time limit. Report only actionable issues in this PR.

@ask-bonk

ask-bonk Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@james-elicx Bonk workflow was cancelled.

View workflow run · To retry, trigger Bonk again.

@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

Retry after the prior workflow was cancelled without a verdict. Please review exact head 321c507, complete within an 8 minute time limit, and report only actionable issues in this PR.

@ask-bonk

ask-bonk Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

LGTM!

github run

@james-elicx
james-elicx force-pushed the codex/cdn-v2-http-transport branch from 25a8900 to b3ff95d Compare September 7, 2026 10:28
@james-elicx
james-elicx marked this pull request as ready for review September 7, 2026 20:47
@james-elicx
james-elicx merged commit f0b2f7b into main Sep 7, 2026
123 of 125 checks passed
@james-elicx
james-elicx deleted the codex/cdn-v2-http-transport branch September 7, 2026 20:48
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.

2 participants