Skip to content

refactor(next): remove step file copy mechanism from deferred builder#1796

Merged
TooTallNate merged 6 commits intomainfrom
tootallnate/remove-step-file-copy
Apr 29, 2026
Merged

refactor(next): remove step file copy mechanism from deferred builder#1796
TooTallNate merged 6 commits intomainfrom
tootallnate/remove-step-file-copy

Conversation

@TooTallNate
Copy link
Copy Markdown
Member

Summary

Follow-up to #1686 (removing client transform mode). Step sources in the Next.js deferred builder are now imported directly into the generated step/route.js instead of being copied into __workflow_step_files__/ per-file with hashed names, metadata comments, and rewritten imports. This mirrors how serde files are already handled in the same builder.

Why this is now possible

The step file copy mechanism was introduced in dc2dc6a with two stated reasons:

  1. Force the loader to run on node_modules step sources — a file imported directly as a package specifier might be externalized or bypassed by the bundler.
  2. Control the SWC relativeFilename for deterministic step IDs — the copy carried metadata so the loader fed SWC the original relative filename.

Both concerns are now moot:

  • Serde files (which include package sources) already use direct imports and the workflow loader transforms them in step mode; the same works for step files.
  • The loader's getRelativeFilenameForSwc (including resolveWorkflowAliasRelativePath) already produces stable IDs from the original path.

Changes

  • packages/next/src/builder-deferred.ts:
    • Remove copyDiscoveredStepFiles, createResponseBuiltinsStepFile, rewriteRelativeImportsForCopiedStep, rewriteCopiedStepImportSpecifier, resolveBareCopiedStepSpecifier, getStepCopyFileName.
    • Rewrite buildStepsFunction so the step route imports originals via getImportPath (package specifier for workspace/node_modules, relative path for app files).
    • Resolve the workflow SDK's built-in response steps file via require.resolve('workflow/internal/builtins') at build time and emit one import.
    • Keep the legacy __workflow_step_files__/ directory rm on boot so upgrades leave no stale artifacts.
  • packages/next/src/loader.ts:
    • Remove all isDeferredStepCopyFilePath branches: metadata parsing, inline-sourcemap chaining, skip-transform bypass, discoveryFilePath indirection, isGeneratedWorkflowFile carve-out.
    • Loader now always uses filename for the SWC relative filename and module specifier.
  • packages/next/src/step-copy-utils.ts: deleted.
  • packages/next/package.json: drop enhanced-resolve dependency.
  • packages/core/e2e/dev.test.ts: rename supportsDeferredStepCopiesusesDeferredBuilder; assert step registration via manifest.json entries and import specifiers in the generated route, not copied file contents.

Diff stats

 packages/core/e2e/dev.test.ts         | 144 ++++-------
 packages/next/package.json            |   1 -
 packages/next/src/builder-deferred.ts | 451 ++++-------------------
 packages/next/src/loader.ts           | 105 +++----
 packages/next/src/step-copy-utils.ts  | 137 --------
 pnpm-lock.yaml                        |   3 -
 6 files changed, 160 insertions(+), 686 deletions(-)

Verification

Local verification against workbench/nextjs-turbopack:

  • pnpm build (all packages): pass
  • pnpm typecheck: pass
  • pnpm -C workbench/nextjs-turbopack build: pass; generated step/route.js contains direct imports (incl. workflow/internal/builtins, @workflow/ai/agent, workspace and app files); __workflow_step_files__/ directory not created; manifest has 27 steps / 16 workflows / 3 classes.
  • E2E (packages/core/e2e/e2e.test.ts against http://localhost:3000): 71/71 pass.
  • Dev tests (packages/core/e2e/dev.test.ts): 6/6 pass against a fresh dev server.

Step sources are now imported directly into the generated `step/route.js`
using the same `getImportPath`-based logic already used for serde files.
This is possible because the SWC plugin's client mode was merged into
step mode (#1686), so the workflow loader always runs in step mode and
transforms every file it sees, including those from packages.

Removed:
- `__workflow_step_files__/` per-file copies with hashed names, metadata
  comments, inline source maps, and bare-specifier rewriting via
  `enhanced-resolve`
- `createResponseBuiltinsStepFile`; builtins are now imported via
  `require.resolve('workflow/internal/builtins')` at build time
- `step-copy-utils.ts` and all copy-specific branches in `loader.ts`
- `enhanced-resolve` dependency

The deferred builder still removes the legacy `__workflow_step_files__/`
directory on boot so upgrades leave no stale artifacts behind.

Dev tests that inspected copied step file contents now inspect the
manifest.json entries (which list every discovered step keyed by source
path).
@TooTallNate TooTallNate requested review from a team and ijjk as code owners April 17, 2026 07:30
Copilot AI review requested due to automatic review settings April 17, 2026 07:30
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 17, 2026

🦋 Changeset detected

Latest commit: c023fef

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 17 packages
Name Type
@workflow/next Patch
workflow Patch
@workflow/ai Patch
@workflow/world-testing Patch
@workflow/core Patch
@workflow/builders Patch
@workflow/cli Patch
@workflow/nitro Patch
@workflow/vitest Patch
@workflow/web-shared Patch
@workflow/web Patch
@workflow/astro Patch
@workflow/nest Patch
@workflow/rollup Patch
@workflow/sveltekit Patch
@workflow/vite Patch
@workflow/nuxt Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview, Comment Apr 29, 2026 7:43pm
example-nextjs-workflow-webpack Ready Ready Preview, Comment Apr 29, 2026 7:43pm
example-workflow Ready Ready Preview, Comment Apr 29, 2026 7:43pm
workbench-astro-workflow Ready Ready Preview, Comment Apr 29, 2026 7:43pm
workbench-express-workflow Ready Ready Preview, Comment Apr 29, 2026 7:43pm
workbench-fastify-workflow Ready Ready Preview, Comment Apr 29, 2026 7:43pm
workbench-hono-workflow Ready Ready Preview, Comment Apr 29, 2026 7:43pm
workbench-nitro-workflow Ready Ready Preview, Comment Apr 29, 2026 7:43pm
workbench-nuxt-workflow Ready Ready Preview, Comment Apr 29, 2026 7:43pm
workbench-sveltekit-workflow Ready Ready Preview, Comment Apr 29, 2026 7:43pm
workbench-vite-workflow Ready Ready Preview, Comment Apr 29, 2026 7:43pm
workflow-docs Ready Ready Preview, Comment, Open in v0 Apr 29, 2026 7:43pm
workflow-swc-playground Ready Ready Preview, Comment Apr 29, 2026 7:43pm
workflow-web Ready Ready Preview, Comment Apr 29, 2026 7:43pm

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 17, 2026

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 0.039s 1.005s 0.966s 10 1.00x
💻 Local Express 0.042s (-4.3%) 1.006s (~) 0.963s 10 1.08x
💻 Local Nitro 0.046s (+6.7% 🔺) 1.005s (~) 0.959s 10 1.17x
🐘 Postgres Nitro 0.058s (-38.8% 🟢) 1.010s (-3.2%) 0.951s 10 1.48x
🐘 Postgres Next.js (Turbopack) 0.061s 1.011s 0.950s 10 1.55x
🐘 Postgres Express 0.063s (+7.8% 🔺) 1.009s (~) 0.947s 10 1.59x
workflow with 1 step

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 1.097s 2.006s 0.908s 10 1.00x
💻 Local Express 1.127s (~) 2.006s (~) 0.879s 10 1.03x
💻 Local Nitro 1.132s (~) 2.006s (~) 0.874s 10 1.03x
🐘 Postgres Nitro 1.146s (+0.6%) 2.010s (~) 0.863s 10 1.04x
🐘 Postgres Express 1.148s (~) 2.010s (~) 0.862s 10 1.05x
🐘 Postgres Next.js (Turbopack) 1.155s 2.011s 0.856s 10 1.05x
workflow with 10 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 10.632s 11.022s 0.390s 3 1.00x
🐘 Postgres Nitro 10.871s (~) 11.020s (~) 0.149s 3 1.02x
🐘 Postgres Next.js (Turbopack) 10.902s 11.024s 0.122s 3 1.03x
🐘 Postgres Express 10.913s (~) 11.020s (~) 0.107s 3 1.03x
💻 Local Express 10.925s (~) 11.024s (~) 0.099s 3 1.03x
💻 Local Nitro 10.944s (~) 11.023s (~) 0.078s 3 1.03x
workflow with 25 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 14.144s 15.029s 0.885s 4 1.00x
🐘 Postgres Nitro 14.454s (-1.0%) 15.026s (~) 0.572s 4 1.02x
🐘 Postgres Next.js (Turbopack) 14.536s 15.024s 0.488s 4 1.03x
🐘 Postgres Express 14.591s (~) 15.023s (~) 0.431s 4 1.03x
💻 Local Nitro 14.995s (~) 15.280s (-4.7%) 0.285s 4 1.06x
💻 Local Express 15.002s (~) 15.280s (+1.7%) 0.278s 4 1.06x
workflow with 50 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 13.878s (-0.6%) 14.020s (-2.0%) 0.142s 7 1.00x
🐘 Postgres Next.js (Turbopack) 13.962s 14.452s 0.491s 7 1.01x
🐘 Postgres Express 14.108s (+0.7%) 15.025s (+3.0%) 0.917s 6 1.02x
💻 Local Next.js (Turbopack) 15.039s 15.361s 0.322s 6 1.08x
💻 Local Nitro 16.410s (-2.2%) 17.030s (~) 0.621s 6 1.18x
💻 Local Express 16.717s (+0.7%) 17.030s (~) 0.313s 6 1.20x
Promise.all with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 1.230s 2.009s 0.779s 15 1.00x
🐘 Postgres Express 1.258s (~) 2.010s (~) 0.752s 15 1.02x
🐘 Postgres Nitro 1.272s (~) 2.011s (~) 0.738s 15 1.03x
💻 Local Next.js (Turbopack) 1.457s 2.005s 0.548s 15 1.18x
💻 Local Nitro 1.509s (-7.5% 🟢) 2.005s (-3.3%) 0.496s 15 1.23x
💻 Local Express 1.556s (+4.5%) 2.006s (~) 0.450s 15 1.27x
Promise.all with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 2.344s (~) 3.009s (~) 0.665s 10 1.00x
🐘 Postgres Express 2.358s (~) 3.010s (~) 0.652s 10 1.01x
🐘 Postgres Next.js (Turbopack) 2.412s 3.010s 0.598s 10 1.03x
💻 Local Next.js (Turbopack) 2.630s 3.007s 0.377s 10 1.12x
💻 Local Nitro 2.760s (-12.2% 🟢) 3.009s (-22.6% 🟢) 0.249s 10 1.18x
💻 Local Express 3.044s (+3.1%) 3.760s (+8.9% 🔺) 0.716s 8 1.30x
Promise.all with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 3.480s (~) 4.010s (~) 0.530s 8 1.00x
🐘 Postgres Nitro 3.491s (~) 4.011s (~) 0.520s 8 1.00x
🐘 Postgres Next.js (Turbopack) 3.642s 4.012s 0.370s 8 1.05x
💻 Local Next.js (Turbopack) 6.751s 7.213s 0.462s 5 1.94x
💻 Local Nitro 7.528s (-9.8% 🟢) 8.018s (-11.1% 🟢) 0.490s 4 2.16x
💻 Local Express 8.532s (+2.3%) 9.021s (~) 0.489s 4 2.45x
Promise.race with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 1.233s 2.009s 0.776s 15 1.00x
🐘 Postgres Express 1.261s (~) 2.008s (~) 0.747s 15 1.02x
🐘 Postgres Nitro 1.263s (~) 2.009s (~) 0.746s 15 1.02x
💻 Local Next.js (Turbopack) 1.469s 2.005s 0.536s 15 1.19x
💻 Local Express 1.554s (-18.0% 🟢) 2.006s (-15.1% 🟢) 0.452s 15 1.26x
💻 Local Nitro 1.584s (-15.1% 🟢) 2.074s (-11.4% 🟢) 0.490s 15 1.28x
Promise.race with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 2.335s (~) 3.009s (~) 0.674s 10 1.00x
🐘 Postgres Nitro 2.339s (~) 3.009s (~) 0.670s 10 1.00x
🐘 Postgres Next.js (Turbopack) 2.399s 3.010s 0.611s 10 1.03x
💻 Local Next.js (Turbopack) 2.887s 3.207s 0.320s 10 1.24x
💻 Local Nitro 2.900s (-5.4% 🟢) 3.342s (-14.0% 🟢) 0.442s 9 1.24x
💻 Local Express 2.982s (-4.8%) 3.676s (-2.3%) 0.694s 9 1.28x
Promise.race with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 3.469s (~) 4.011s (~) 0.542s 8 1.00x
🐘 Postgres Express 3.491s (~) 4.011s (~) 0.520s 8 1.01x
🐘 Postgres Next.js (Turbopack) 3.748s 4.139s 0.391s 8 1.08x
💻 Local Next.js (Turbopack) 7.760s 8.266s 0.506s 4 2.24x
💻 Local Nitro 8.584s (-6.1% 🟢) 9.272s (-7.5% 🟢) 0.688s 4 2.47x
💻 Local Express 8.764s (~) 9.021s (-2.7%) 0.258s 4 2.53x
workflow with 10 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 0.664s 1.004s 0.340s 60 1.00x
🐘 Postgres Next.js (Turbopack) 0.780s 1.006s 0.227s 60 1.17x
🐘 Postgres Nitro 0.795s (-3.1%) 1.006s (~) 0.211s 60 1.20x
🐘 Postgres Express 0.846s (+0.9%) 1.007s (-1.6%) 0.160s 60 1.27x
💻 Local Express 0.994s (+1.0%) 1.255s (+16.6% 🔺) 0.261s 48 1.50x
💻 Local Nitro 1.024s (+4.4%) 1.654s (+51.2% 🔺) 0.630s 37 1.54x
workflow with 25 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.890s (-1.9%) 2.029s (-3.4%) 0.139s 45 1.00x
🐘 Postgres Next.js (Turbopack) 1.914s 2.100s 0.186s 43 1.01x
🐘 Postgres Express 2.026s (+2.5%) 2.736s (+21.2% 🔺) 0.711s 33 1.07x
💻 Local Next.js (Turbopack) 2.180s 3.007s 0.826s 30 1.15x
💻 Local Nitro 3.022s (~) 3.648s (-2.9%) 0.627s 25 1.60x
💻 Local Express 3.029s (~) 3.608s (+0.6%) 0.579s 25 1.60x
workflow with 50 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 3.893s (-5.1% 🟢) 4.110s (-10.7% 🟢) 0.218s 30 1.00x
🐘 Postgres Next.js (Turbopack) 3.935s 4.252s 0.317s 29 1.01x
🐘 Postgres Express 4.033s (+1.1%) 4.566s (+4.5%) 0.534s 27 1.04x
💻 Local Next.js (Turbopack) 7.130s 7.827s 0.697s 16 1.83x
💻 Local Nitro 8.982s (-3.4%) 9.557s (-4.6%) 0.574s 13 2.31x
💻 Local Express 9.301s (+1.0%) 10.019s (~) 0.718s 12 2.39x
workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 0.253s 1.007s 0.754s 60 1.00x
🐘 Postgres Nitro 0.279s (-1.5%) 1.007s (~) 0.728s 60 1.10x
🐘 Postgres Express 0.287s (+1.8%) 1.007s (~) 0.720s 60 1.14x
💻 Local Next.js (Turbopack) 0.536s 1.004s 0.468s 60 2.12x
💻 Local Nitro 0.566s (-6.4% 🟢) 1.004s (-1.7%) 0.438s 60 2.24x
💻 Local Express 0.589s (+5.0% 🔺) 1.005s (~) 0.416s 60 2.33x
workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 0.496s (-2.6%) 1.007s (~) 0.510s 90 1.00x
🐘 Postgres Nitro 0.505s (+1.7%) 1.006s (~) 0.502s 90 1.02x
🐘 Postgres Next.js (Turbopack) 0.509s 1.007s 0.498s 90 1.03x
💻 Local Nitro 2.377s (-6.3% 🟢) 3.008s (~) 0.631s 30 4.79x
💻 Local Next.js (Turbopack) 2.457s 3.008s 0.550s 30 4.95x
💻 Local Express 2.718s (+8.1% 🔺) 3.181s (+5.7% 🔺) 0.464s 29 5.47x
workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 0.786s (-4.0%) 1.008s (-1.0%) 0.222s 120 1.00x
🐘 Postgres Nitro 0.791s (~) 1.007s (~) 0.217s 120 1.01x
🐘 Postgres Next.js (Turbopack) 0.807s 1.016s 0.209s 119 1.03x
💻 Local Next.js (Turbopack) 9.577s 10.023s 0.446s 12 12.18x
💻 Local Nitro 10.236s (-8.5% 🟢) 10.939s (-6.2% 🟢) 0.703s 11 13.02x
💻 Local Express 11.220s (~) 11.939s (~) 0.718s 11 14.28x
Stream Benchmarks (includes TTFB metrics)
workflow with stream

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 0.142s 1.003s 0.009s 1.015s 0.873s 10 1.00x
🐘 Postgres Nitro 0.201s (-2.0%) 0.997s (~) 0.001s (-13.3% 🟢) 1.010s (~) 0.809s 10 1.41x
💻 Local Express 0.204s (+2.5%) 1.004s (~) 0.013s (+7.4% 🔺) 1.019s (~) 0.815s 10 1.43x
🐘 Postgres Express 0.205s (~) 1.000s (~) 0.001s (-25.0% 🟢) 1.010s (~) 0.805s 10 1.44x
🐘 Postgres Next.js (Turbopack) 0.205s 1.001s 0.002s 1.010s 0.805s 10 1.44x
💻 Local Nitro 0.208s (-2.5%) 1.004s (~) 0.011s (-16.0% 🟢) 1.016s (~) 0.808s 10 1.47x
stream pipeline with 5 transform steps (1MB)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 0.572s 1.010s 0.009s 1.022s 0.449s 59 1.00x
🐘 Postgres Nitro 0.612s (-1.9%) 1.022s (+1.5%) 0.004s (-6.6% 🟢) 1.039s (+1.6%) 0.427s 58 1.07x
🐘 Postgres Next.js (Turbopack) 0.637s 1.009s 0.004s 1.023s 0.386s 59 1.11x
🐘 Postgres Express 0.644s (+2.1%) 1.005s (~) 0.013s (+230.1% 🔺) 1.033s (+0.9%) 0.389s 59 1.12x
💻 Local Nitro 0.759s (-9.5% 🟢) 1.013s (~) 0.009s (-2.5%) 1.024s (-8.3% 🟢) 0.264s 59 1.33x
💻 Local Express 0.953s (+25.8% 🔺) 1.011s (-1.7%) 0.010s (+3.8%) 1.227s (+18.0% 🔺) 0.275s 49 1.66x
10 parallel streams (1MB each)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 0.925s 1.133s 0.000s 1.149s 0.224s 53 1.00x
🐘 Postgres Express 0.940s (-2.2%) 1.170s (-8.4% 🟢) 0.000s (+260.8% 🔺) 1.189s (-9.0% 🟢) 0.249s 51 1.02x
🐘 Postgres Nitro 0.957s (-1.2%) 1.124s (-9.9% 🟢) 0.000s (+126.4% 🔺) 1.146s (-8.9% 🟢) 0.188s 53 1.03x
💻 Local Next.js (Turbopack) 1.216s 2.018s 0.000s 2.021s 0.805s 30 1.31x
💻 Local Express 1.234s (+0.8%) 2.020s (~) 0.001s (+50.0% 🔺) 2.022s (~) 0.788s 30 1.33x
💻 Local Nitro 1.392s (+13.8% 🔺) 2.020s (~) 0.000s (+185.7% 🔺) 2.201s (+8.9% 🔺) 0.809s 28 1.50x
fan-out fan-in 10 streams (1MB each)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.760s (-0.7%) 2.222s (+2.1%) 0.000s (+Infinity% 🔺) 2.231s (+1.5%) 0.471s 27 1.00x
🐘 Postgres Nitro 1.786s (~) 2.139s (~) 0.000s (~) 2.164s (~) 0.379s 28 1.01x
🐘 Postgres Next.js (Turbopack) 1.856s 2.145s 0.000s 2.151s 0.295s 28 1.05x
💻 Local Nitro 3.264s (-3.6%) 3.971s (-1.5%) 0.001s (-6.2% 🟢) 3.974s (-1.5%) 0.710s 16 1.85x
💻 Local Express 3.518s (+1.5%) 4.099s (+1.6%) 0.001s (-16.7% 🟢) 4.101s (+1.6%) 0.583s 15 2.00x
💻 Local Next.js (Turbopack) 3.664s 4.165s 0.001s 4.169s 0.504s 15 2.08x

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World 🥇 Fastest Framework Wins
💻 Local Next.js (Turbopack) 19/21
🐘 Postgres Nitro 11/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework 🥇 Fastest World Wins
Express 🐘 Postgres 18/21
Next.js (Turbopack) 🐘 Postgres 14/21
Nitro 🐘 Postgres 19/21
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 17, 2026

🧪 E2E Test Results

All tests passed

Summary

Passed Failed Skipped Total
✅ ▲ Vercel Production 989 0 67 1056
✅ 💻 Local Development 1066 0 86 1152
✅ 📦 Local Production 1066 0 86 1152
✅ 🐘 Local Postgres 1066 0 86 1152
✅ 🪟 Windows 96 0 0 96
✅ 📋 Other 270 0 18 288
Total 4553 0 343 4896

Details by Category

✅ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 89 0 7
✅ example 89 0 7
✅ express 89 0 7
✅ fastify 89 0 7
✅ hono 89 0 7
✅ nextjs-turbopack 94 0 2
✅ nextjs-webpack 94 0 2
✅ nitro 89 0 7
✅ nuxt 89 0 7
✅ sveltekit 89 0 7
✅ vite 89 0 7
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 90 0 6
✅ express-stable 90 0 6
✅ fastify-stable 90 0 6
✅ hono-stable 90 0 6
✅ nextjs-turbopack-canary 77 0 19
✅ nextjs-turbopack-stable 96 0 0
✅ nextjs-webpack-canary 77 0 19
✅ nextjs-webpack-stable 96 0 0
✅ nitro-stable 90 0 6
✅ nuxt-stable 90 0 6
✅ sveltekit-stable 90 0 6
✅ vite-stable 90 0 6
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 90 0 6
✅ express-stable 90 0 6
✅ fastify-stable 90 0 6
✅ hono-stable 90 0 6
✅ nextjs-turbopack-canary 77 0 19
✅ nextjs-turbopack-stable 96 0 0
✅ nextjs-webpack-canary 77 0 19
✅ nextjs-webpack-stable 96 0 0
✅ nitro-stable 90 0 6
✅ nuxt-stable 90 0 6
✅ sveltekit-stable 90 0 6
✅ vite-stable 90 0 6
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 90 0 6
✅ express-stable 90 0 6
✅ fastify-stable 90 0 6
✅ hono-stable 90 0 6
✅ nextjs-turbopack-canary 77 0 19
✅ nextjs-turbopack-stable 96 0 0
✅ nextjs-webpack-canary 77 0 19
✅ nextjs-webpack-stable 96 0 0
✅ nitro-stable 90 0 6
✅ nuxt-stable 90 0 6
✅ sveltekit-stable 90 0 6
✅ vite-stable 90 0 6
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 96 0 0
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 90 0 6
✅ e2e-local-postgres-nest-stable 90 0 6
✅ e2e-local-prod-nest-stable 90 0 6

📋 View full workflow run

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the Next.js deferred builder to stop copying step source files into a generated directory, instead importing step/serde sources directly from their original locations (mirroring existing serde handling) and simplifying the loader accordingly.

Changes:

  • Remove deferred step copy utilities and copy/rewrite logic; generate step/route.js with direct imports (including workflow response builtins).
  • Simplify the Next loader by removing step-copy-file special casing and always using the actual filename/module specifier inputs.
  • Update dev E2E assertions to validate manifest/route imports (rather than copied file contents) and drop the unused dependency.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/next/src/builder-deferred.ts Removes step-copy pipeline and switches step route generation to direct imports + legacy cleanup.
packages/next/src/loader.ts Deletes deferred step-copy branches and unifies transform/discovery behavior.
packages/next/src/step-copy-utils.ts Deleted (no longer needed).
packages/next/package.json Drops enhanced-resolve dependency.
pnpm-lock.yaml Removes enhanced-resolve from @workflow/next importer.
packages/core/e2e/dev.test.ts Updates dev E2E checks to assert via manifest + route import specifiers.
.changeset/remove-step-file-copy.md Adds release note for the behavioral change.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1768 to +1775
} | null {
let resolved: string;
try {
resolved = require.resolve('workflow/internal/builtins', {
paths: [this.config.workingDir],
});
} catch {
return null;
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolveResponseBuiltinsStepSource() silently returns null when workflow/internal/builtins cannot be resolved. If the app has an incompatible workflow version (or resolution differs under pnpm), this will build a step route without registering the builtin response steps, likely causing runtime failures when Request/Response builtins are invoked. Consider failing fast with a clear error (e.g., instruct to upgrade workflow) or at least logging a warning and keeping the previous in-repo fallback behavior so builtins are always present.

Suggested change
} | null {
let resolved: string;
try {
resolved = require.resolve('workflow/internal/builtins', {
paths: [this.config.workingDir],
});
} catch {
return null;
} {
let resolved: string;
try {
resolved = require.resolve('workflow/internal/builtins', {
paths: [this.config.workingDir],
});
} catch (error) {
const message =
error instanceof Error ? ` ${error.message}` : '';
throw new Error(
`Unable to resolve "workflow/internal/builtins" from working directory ` +
`"${this.config.workingDir}". Builtin Request/Response workflow steps ` +
`require a compatible "workflow" package to be installed and resolvable ` +
`from the application. Please ensure the app depends on a compatible ` +
`"workflow" version and upgrade it if necessary.${message}`
);

Copilot uses AI. Check for mistakes.
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.

4 participants