Skip to content

next: stop esbuild bundling for deferred step route#992

Merged
ijjk merged 14 commits intomainfrom
codex/deferred-step-copy-no-esbuild
Feb 12, 2026
Merged

next: stop esbuild bundling for deferred step route#992
ijjk merged 14 commits intomainfrom
codex/deferred-step-copy-no-esbuild

Conversation

@ijjk
Copy link
Member

@ijjk ijjk commented Feb 10, 2026

Summary

  • stop using esbuild for deferred Next step route generation and write the step route file directly
  • copy discovered step files into a temporary folder adjacent to the generated step route and import those copied files from the route
  • update the Next loader to detect copied step files, transform them in SWC step mode, and skip socket-server discovery notifications for those files
  • preserve original source identity for copied step files via embedded metadata so IDs/module specifiers remain stable

@changeset-bot
Copy link

changeset-bot bot commented Feb 10, 2026

🦋 Changeset detected

Latest commit: 9562d84

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

This PR includes changesets to release 15 packages
Name Type
@workflow/core Patch
@workflow/next Patch
@workflow/web Patch
@workflow/builders Patch
@workflow/cli Patch
@workflow/nitro Patch
@workflow/web-shared Patch
workflow Patch
@workflow/astro Patch
@workflow/nest Patch
@workflow/rollup Patch
@workflow/sveltekit Patch
@workflow/vite Patch
@workflow/world-testing 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

@github-actions
Copy link
Contributor

github-actions bot commented Feb 10, 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 🥇 Express 0.031s (-2.2%) 1.004s (~) 0.974s 10 1.00x
💻 Local Nitro 0.032s (-9.7% 🟢) 1.005s (~) 0.973s 10 1.03x
🐘 Postgres Express 0.125s (+8.0% 🔺) 1.010s (~) 0.885s 10 4.07x
🐘 Postgres Nitro 0.469s (+357.6% 🔺) 1.021s (+1.2%) 0.553s 10 15.26x
workflow with 1 step

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 1.101s (~) 2.006s (~) 0.905s 10 1.00x
💻 Local Nitro 1.101s (+2.8%) 2.005s (~) 0.904s 10 1.00x
🐘 Postgres Nitro 2.374s (-4.5%) 3.014s (~) 0.639s 10 2.16x
🐘 Postgres Express 2.402s (-3.3%) 3.014s (~) 0.612s 10 2.18x
workflow with 10 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 10.795s (+2.4%) 11.022s (~) 0.227s 3 1.00x
💻 Local Express 10.801s (~) 11.021s (~) 0.220s 3 1.00x
🐘 Postgres Nitro 20.236s (-0.6%) 21.057s (~) 0.821s 2 1.87x
🐘 Postgres Express 20.373s (~) 21.058s (~) 0.685s 2 1.89x
workflow with 25 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 27.400s (+2.4%) 28.049s (+3.7%) 0.649s 3 1.00x
💻 Local Express 27.403s (~) 28.048s (~) 0.645s 3 1.00x
🐘 Postgres Nitro 39.294s (-21.7% 🟢) 39.598s (-22.6% 🟢) 0.305s 2 1.43x
🐘 Postgres Express 50.394s (~) 51.129s (~) 0.736s 2 1.84x
workflow with 50 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 56.928s (~) 57.095s (-1.7%) 0.167s 2 1.00x
💻 Local Nitro 56.974s (+2.6%) 57.099s (+1.8%) 0.125s 2 1.00x
🐘 Postgres Nitro 75.425s (-24.9% 🟢) 76.173s (-24.8% 🟢) 0.748s 2 1.32x
🐘 Postgres Express 100.301s (~) 101.230s (~) 0.929s 1 1.76x
Promise.all with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 1.395s (+3.8%) 2.004s (~) 0.609s 15 1.00x
💻 Local Express 1.401s (~) 2.004s (~) 0.604s 15 1.00x
🐘 Postgres Nitro 1.758s (-31.7% 🟢) 2.155s (-28.5% 🟢) 0.398s 14 1.26x
🐘 Postgres Express 2.318s (+0.9%) 3.014s (~) 0.696s 10 1.66x
Promise.all with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 2.482s (+10.8% 🔺) 3.008s (~) 0.526s 10 1.00x
💻 Local Express 2.486s (-3.7%) 3.006s (~) 0.521s 10 1.00x
🐘 Postgres Nitro 9.156s (-5.6% 🟢) 9.783s (-2.5%) 0.626s 4 3.69x
🐘 Postgres Express 9.596s (+10.2% 🔺) 10.032s (+11.1% 🔺) 0.437s 3 3.87x
Promise.all with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 7.048s (-5.6% 🟢) 7.766s (-3.2%) 0.718s 4 1.00x
💻 Local Nitro 7.112s (+13.6% 🔺) 7.774s (+10.9% 🔺) 0.662s 4 1.01x
🐘 Postgres Express 46.886s (+14.9% 🔺) 47.122s (+14.6% 🔺) 0.236s 1 6.65x
🐘 Postgres Nitro 50.629s (+15.9% 🔺) 51.111s (+15.9% 🔺) 0.482s 1 7.18x
Promise.race with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 1.404s (-4.6%) 2.005s (~) 0.601s 15 1.00x
💻 Local Nitro 1.419s (+3.9%) 2.006s (~) 0.587s 15 1.01x
🐘 Postgres Nitro 1.990s (-8.9% 🟢) 2.515s (-11.2% 🟢) 0.525s 12 1.42x
🐘 Postgres Express 2.114s (-0.8%) 3.015s (+16.1% 🔺) 0.901s 10 1.51x
Promise.race with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 2.631s (-1.5%) 3.007s (~) 0.376s 10 1.00x
💻 Local Nitro 2.667s (+6.6% 🔺) 3.007s (~) 0.340s 10 1.01x
🐘 Postgres Nitro 9.977s (-9.2% 🟢) 10.696s (-8.6% 🟢) 0.719s 3 3.79x
🐘 Postgres Express 11.813s (~) 12.365s (~) 0.552s 3 4.49x
Promise.race with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 7.466s (+6.4% 🔺) 8.021s (+6.7% 🔺) 0.555s 4 1.00x
💻 Local Express 7.581s (-3.3%) 8.022s (~) 0.441s 4 1.02x
🐘 Postgres Express 49.307s (+5.5% 🔺) 50.123s (+6.4% 🔺) 0.816s 1 6.60x
🐘 Postgres Nitro 51.327s (+2.1%) 52.108s (+2.0%) 0.781s 1 6.87x
Stream Benchmarks (includes TTFB metrics)
workflow with stream

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 0.167s (+46.0% 🔺) 1.002s (~) 0.010s (+19.0% 🔺) 1.015s (~) 0.848s 10 1.00x
💻 Local Express 0.170s (~) 1.002s (~) 0.010s (-2.0%) 1.014s (~) 0.844s 10 1.02x
🐘 Postgres Nitro 1.308s (-41.2% 🟢) 1.805s (-36.0% 🟢) 0.001s (-21.4% 🟢) 2.012s (-33.3% 🟢) 0.704s 10 7.83x
🐘 Postgres Express 2.398s (+1.5%) 2.646s (-1.3%) 0.001s (-25.0% 🟢) 3.016s (~) 0.618s 10 14.36x

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World 🥇 Fastest Framework Wins
💻 Local Express 6/12
🐘 Postgres Nitro 9/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework 🥇 Fastest World Wins
Express 💻 Local 12/12
Nitro 💻 Local 12/12
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


Some benchmark jobs failed:

  • Local: success
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

@vercel
Copy link
Contributor

vercel bot commented Feb 10, 2026

@github-actions
Copy link
Contributor

github-actions bot commented Feb 10, 2026

🧪 E2E Test Results

Some tests failed

Summary

Passed Failed Skipped Total
✅ 💻 Local Development 418 0 62 480
✅ 📦 Local Production 418 0 62 480
✅ 🐘 Local Postgres 418 0 62 480
✅ 🪟 Windows 45 0 3 48
❌ 🌍 Community Worlds 103 41 9 153
✅ 📋 Other 123 0 21 144
Total 1525 41 219 1785

❌ Failed Tests

🌍 Community Worlds (41 failed)

turso (41 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 41 0 7
✅ express-stable 41 0 7
✅ fastify-stable 41 0 7
✅ hono-stable 41 0 7
✅ nextjs-turbopack-stable 45 0 3
✅ nextjs-webpack-stable 45 0 3
✅ nitro-stable 41 0 7
✅ nuxt-stable 41 0 7
✅ sveltekit-stable 41 0 7
✅ vite-stable 41 0 7
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 41 0 7
✅ express-stable 41 0 7
✅ fastify-stable 41 0 7
✅ hono-stable 41 0 7
✅ nextjs-turbopack-stable 45 0 3
✅ nextjs-webpack-stable 45 0 3
✅ nitro-stable 41 0 7
✅ nuxt-stable 41 0 7
✅ sveltekit-stable 41 0 7
✅ vite-stable 41 0 7
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 41 0 7
✅ express-stable 41 0 7
✅ fastify-stable 41 0 7
✅ hono-stable 41 0 7
✅ nextjs-turbopack-stable 45 0 3
✅ nextjs-webpack-stable 45 0 3
✅ nitro-stable 41 0 7
✅ nuxt-stable 41 0 7
✅ sveltekit-stable 41 0 7
✅ vite-stable 41 0 7
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 45 0 3
❌ 🌍 Community Worlds
App Passed Failed Skipped
✅ mongodb-dev 3 0 0
✅ mongodb 45 0 3
✅ redis-dev 3 0 0
✅ redis 45 0 3
✅ turso-dev 3 0 0
❌ turso 4 41 3
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 41 0 7
✅ e2e-local-postgres-nest-stable 41 0 7
✅ e2e-local-prod-nest-stable 41 0 7

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: success
  • Windows: success

Check the workflow run for details.

@ijjk ijjk enabled auto-merge (squash) February 11, 2026 22:55
@ijjk ijjk disabled auto-merge February 12, 2026 00:26
@ijjk ijjk merged commit dc2dc6a into main Feb 12, 2026
65 of 80 checks passed
@ijjk ijjk deleted the codex/deferred-step-copy-no-esbuild branch February 12, 2026 00:26
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