Skip to content

refactor(nitro): use nitro v3 functionRules workflow routes#1575

Open
RihanArfan wants to merge 19 commits intomainfrom
feat/nitro-builder-improvement
Open

refactor(nitro): use nitro v3 functionRules workflow routes#1575
RihanArfan wants to merge 19 commits intomainfrom
feat/nitro-builder-improvement

Conversation

@RihanArfan
Copy link
Copy Markdown
Member

@RihanArfan RihanArfan commented Apr 1, 2026

Description

Currently we separately build the Workflows functions for the Vercel Build Output API when deploying a Nitro app to Vercel. This means the Workflows routes aren't part of the Nitro bundle.

This PR changes to now handle the Workflows routes as handlers within Nitro v3. Nitro v2 is untouched.

How did you test your changes?

Locally ran nitro dev in the nitro-v3 workspace and visited the API route POST /api/test-direct-step-call.

PR Checklist - Required to merge

  • 📦 pnpm changeset was run to create a changelog for this PR
    • During beta, we only use "patch" mode for changes. Don't tag minor/major versions.
    • Use pnpm changeset --empty if you are changing documentation or workbench apps
  • 🔒 DCO sign-off passes (run git commit --signoff on your commits)
  • 📝 Ping @vercel/workflow in a comment once the PR is ready, and the above checklist is complete

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 1, 2026

🦋 Changeset detected

Latest commit: d0ca3cb

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

This PR includes changesets to release 17 packages
Name Type
@workflow/builders Minor
@workflow/nitro Patch
@workflow/astro Patch
@workflow/cli Patch
@workflow/nest Patch
@workflow/next Patch
@workflow/rollup Patch
@workflow/sveltekit Patch
@workflow/vite Patch
@workflow/vitest Patch
@workflow/nuxt Patch
workflow Patch
@workflow/world-testing Patch
@workflow/ai Patch
@workflow/core Patch
@workflow/web-shared Patch
@workflow/web 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 1, 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 May 1, 2026 4:14pm
example-nextjs-workflow-webpack Ready Ready Preview, Comment May 1, 2026 4:14pm
example-workflow Ready Ready Preview, Comment May 1, 2026 4:14pm
workbench-astro-workflow Ready Ready Preview, Comment May 1, 2026 4:14pm
workbench-express-workflow Ready Ready Preview, Comment May 1, 2026 4:14pm
workbench-fastify-workflow Ready Ready Preview, Comment May 1, 2026 4:14pm
workbench-hono-workflow Ready Ready Preview, Comment May 1, 2026 4:14pm
workbench-nitro-workflow Ready Ready Preview, Comment May 1, 2026 4:14pm
workbench-nuxt-workflow Ready Ready Preview, Comment May 1, 2026 4:14pm
workbench-sveltekit-workflow Ready Ready Preview, Comment May 1, 2026 4:14pm
workbench-vite-workflow Error Error May 1, 2026 4:14pm
workflow-docs Ready Ready Preview, Comment, Open in v0 May 1, 2026 4:14pm
workflow-swc-playground Ready Ready Preview, Comment May 1, 2026 4:14pm
workflow-web Ready Ready Preview, Comment May 1, 2026 4:14pm

Comment thread packages/nitro/src/index.ts
@RihanArfan RihanArfan force-pushed the feat/nitro-builder-improvement branch from e312e97 to 3eb081a Compare April 7, 2026 10:28
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 7, 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 🥇 Nitro 0.030s (-30.4% 🟢) 1.005s (~) 0.975s 10 1.00x
💻 Local Express 0.039s (-12.6% 🟢) 1.005s (~) 0.967s 10 1.29x
💻 Local Next.js (Turbopack) 0.050s 1.005s 0.956s 10 1.66x
🐘 Postgres Nitro 0.059s (-37.5% 🟢) 1.010s (-3.2%) 0.950s 10 1.98x
🐘 Postgres Next.js (Turbopack) 0.060s 1.010s 0.951s 10 1.99x
🐘 Postgres Express 0.065s (+12.1% 🔺) 1.011s (~) 0.946s 10 2.17x
workflow with 1 step

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 1.091s (-3.6%) 2.005s (~) 0.915s 10 1.00x
💻 Local Next.js (Turbopack) 1.115s 2.005s 0.890s 10 1.02x
💻 Local Express 1.131s (+0.5%) 2.006s (~) 0.874s 10 1.04x
🐘 Postgres Next.js (Turbopack) 1.142s 2.010s 0.868s 10 1.05x
🐘 Postgres Express 1.152s (~) 2.011s (~) 0.859s 10 1.06x
🐘 Postgres Nitro 1.153s (+1.1%) 2.010s (~) 0.857s 10 1.06x
workflow with 10 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 10.613s (-3.0%) 11.022s (~) 0.409s 3 1.00x
💻 Local Next.js (Turbopack) 10.842s 11.023s 0.181s 3 1.02x
🐘 Postgres Next.js (Turbopack) 10.908s 11.023s 0.114s 3 1.03x
🐘 Postgres Nitro 10.921s (~) 11.021s (~) 0.100s 3 1.03x
💻 Local Express 10.935s (~) 11.023s (~) 0.088s 3 1.03x
🐘 Postgres Express 10.947s (~) 11.025s (~) 0.077s 3 1.03x
workflow with 25 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 14.153s (-6.0% 🟢) 15.029s (-6.2% 🟢) 0.876s 4 1.00x
🐘 Postgres Next.js (Turbopack) 14.483s 15.028s 0.544s 4 1.02x
🐘 Postgres Nitro 14.524s (~) 15.027s (~) 0.502s 4 1.03x
💻 Local Next.js (Turbopack) 14.652s 15.029s 0.378s 4 1.04x
🐘 Postgres Express 14.706s (+0.8%) 15.026s (~) 0.320s 4 1.04x
💻 Local Express 14.970s (~) 15.030s (~) 0.059s 4 1.06x
workflow with 50 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 13.786s 14.023s 0.238s 7 1.00x
🐘 Postgres Express 14.265s (+1.8%) 15.023s (+2.9%) 0.759s 6 1.03x
🐘 Postgres Nitro 14.425s (+3.3%) 15.021s (+5.0%) 0.597s 6 1.05x
💻 Local Nitro 14.691s (-12.5% 🟢) 15.028s (-11.8% 🟢) 0.337s 6 1.07x
💻 Local Next.js (Turbopack) 16.204s 17.032s 0.828s 6 1.18x
💻 Local Express 16.334s (-1.6%) 17.030s (~) 0.695s 6 1.18x
Promise.all with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 1.229s 2.010s 0.781s 15 1.00x
🐘 Postgres Nitro 1.253s (-1.7%) 2.010s (~) 0.757s 15 1.02x
🐘 Postgres Express 1.256s (~) 2.009s (~) 0.754s 15 1.02x
💻 Local Nitro 1.450s (-11.1% 🟢) 2.005s (-3.3%) 0.555s 15 1.18x
💻 Local Express 1.479s (-0.7%) 2.006s (~) 0.527s 15 1.20x
💻 Local Next.js (Turbopack) 1.540s 2.006s 0.467s 15 1.25x
Promise.all with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 2.316s (-1.9%) 3.009s (~) 0.693s 10 1.00x
🐘 Postgres Nitro 2.357s (~) 3.010s (~) 0.654s 10 1.02x
🐘 Postgres Next.js (Turbopack) 2.406s 3.011s 0.605s 10 1.04x
💻 Local Nitro 2.591s (-17.6% 🟢) 3.007s (-22.6% 🟢) 0.416s 10 1.12x
💻 Local Express 2.676s (-9.4% 🟢) 3.007s (-12.9% 🟢) 0.331s 10 1.16x
💻 Local Next.js (Turbopack) 2.944s 3.678s 0.734s 9 1.27x
Promise.all with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 3.475s (~) 4.010s (~) 0.535s 8 1.00x
🐘 Postgres Nitro 3.502s (+0.6%) 4.012s (~) 0.510s 8 1.01x
🐘 Postgres Next.js (Turbopack) 3.683s 4.011s 0.327s 8 1.06x
💻 Local Nitro 6.839s (-18.1% 🟢) 7.014s (-22.2% 🟢) 0.175s 5 1.97x
💻 Local Express 7.611s (-8.7% 🟢) 8.020s (-11.1% 🟢) 0.409s 4 2.19x
💻 Local Next.js (Turbopack) 8.254s 8.518s 0.264s 4 2.38x
Promise.race with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 1.229s 2.009s 0.780s 15 1.00x
🐘 Postgres Express 1.263s (~) 2.009s (~) 0.746s 15 1.03x
🐘 Postgres Nitro 1.274s (+1.3%) 2.009s (~) 0.735s 15 1.04x
💻 Local Nitro 1.449s (-22.3% 🟢) 2.005s (-14.3% 🟢) 0.555s 15 1.18x
💻 Local Express 1.500s (-20.8% 🟢) 2.006s (-15.2% 🟢) 0.506s 15 1.22x
💻 Local Next.js (Turbopack) 1.532s 2.006s 0.474s 15 1.25x
Promise.race with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 2.349s (~) 3.009s (~) 0.660s 10 1.00x
🐘 Postgres Next.js (Turbopack) 2.374s 3.010s 0.636s 10 1.01x
🐘 Postgres Express 2.425s (+3.6%) 3.010s (~) 0.585s 10 1.03x
💻 Local Nitro 2.677s (-12.7% 🟢) 3.007s (-22.6% 🟢) 0.330s 10 1.14x
💻 Local Express 2.893s (-7.6% 🟢) 3.108s (-17.4% 🟢) 0.215s 10 1.23x
💻 Local Next.js (Turbopack) 3.033s 3.759s 0.726s 8 1.29x
Promise.race with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 3.470s (~) 4.011s (~) 0.541s 8 1.00x
🐘 Postgres Express 3.516s (~) 4.012s (~) 0.496s 8 1.01x
🐘 Postgres Next.js (Turbopack) 3.662s 4.013s 0.351s 8 1.06x
💻 Local Nitro 7.667s (-16.1% 🟢) 8.019s (-20.0% 🟢) 0.352s 4 2.21x
💻 Local Express 7.732s (-12.1% 🟢) 8.022s (-13.5% 🟢) 0.290s 4 2.23x
💻 Local Next.js (Turbopack) 9.875s 10.357s 0.481s 3 2.85x
workflow with 10 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 0.672s (-31.5% 🟢) 1.004s (-8.2% 🟢) 0.332s 60 1.00x
🐘 Postgres Next.js (Turbopack) 0.768s 1.006s 0.238s 60 1.14x
🐘 Postgres Nitro 0.819s (~) 1.006s (~) 0.188s 60 1.22x
🐘 Postgres Express 0.820s (-2.3%) 1.041s (+1.8%) 0.221s 58 1.22x
💻 Local Next.js (Turbopack) 0.865s 1.022s 0.156s 59 1.29x
💻 Local Express 1.010s (+2.6%) 1.505s (+39.9% 🔺) 0.495s 40 1.50x
workflow with 25 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 1.920s 2.124s 0.204s 43 1.00x
🐘 Postgres Express 1.938s (-2.0%) 2.124s (-5.9% 🟢) 0.187s 43 1.01x
🐘 Postgres Nitro 2.046s (+6.1% 🔺) 2.766s (+31.7% 🔺) 0.721s 33 1.07x
💻 Local Nitro 2.200s (-27.5% 🟢) 3.007s (-20.0% 🟢) 0.807s 30 1.15x
💻 Local Next.js (Turbopack) 2.745s 3.008s 0.262s 30 1.43x
💻 Local Express 3.055s (+1.3%) 3.609s (+0.7%) 0.554s 25 1.59x
workflow with 50 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 3.795s 4.043s 0.248s 30 1.00x
🐘 Postgres Express 4.093s (+2.6%) 4.627s (+5.9% 🔺) 0.534s 26 1.08x
🐘 Postgres Nitro 4.197s (+2.3%) 5.013s (+8.9% 🔺) 0.816s 24 1.11x
💻 Local Nitro 7.234s (-22.2% 🟢) 7.952s (-20.6% 🟢) 0.718s 16 1.91x
💻 Local Next.js (Turbopack) 8.802s 9.160s 0.359s 14 2.32x
💻 Local Express 8.898s (-3.4%) 9.231s (-7.9% 🟢) 0.333s 14 2.34x
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.256s 1.007s 0.751s 60 1.00x
🐘 Postgres Express 0.279s (-1.0%) 1.007s (~) 0.728s 60 1.09x
🐘 Postgres Nitro 0.285s (+0.6%) 1.007s (~) 0.722s 60 1.11x
💻 Local Nitro 0.547s (-9.5% 🟢) 1.004s (-1.7%) 0.457s 60 2.14x
💻 Local Next.js (Turbopack) 0.547s 1.004s 0.457s 60 2.14x
💻 Local Express 0.561s (~) 1.004s (~) 0.443s 60 2.19x
workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 0.477s 1.006s 0.530s 90 1.00x
🐘 Postgres Nitro 0.497s (~) 1.007s (~) 0.509s 90 1.04x
🐘 Postgres Express 0.498s (-2.4%) 1.007s (~) 0.510s 90 1.04x
💻 Local Express 2.324s (-7.5% 🟢) 3.009s (~) 0.684s 30 4.88x
💻 Local Nitro 2.388s (-5.9% 🟢) 3.007s (~) 0.619s 30 5.01x
💻 Local Next.js (Turbopack) 2.729s 3.009s 0.280s 30 5.72x
workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 0.764s 1.006s 0.243s 120 1.00x
🐘 Postgres Express 0.789s (-3.6%) 1.008s (-0.9%) 0.219s 120 1.03x
🐘 Postgres Nitro 0.817s (+3.3%) 1.017s (+1.0%) 0.201s 118 1.07x
💻 Local Express 10.228s (-8.6% 🟢) 10.776s (-9.8% 🟢) 0.549s 12 13.40x
💻 Local Nitro 10.293s (-8.0% 🟢) 10.856s (-6.9% 🟢) 0.564s 12 13.48x
💻 Local Next.js (Turbopack) 11.004s 11.662s 0.657s 11 14.41x
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.135s (-36.7% 🟢) 1.004s (~) 0.009s (-24.0% 🟢) 1.015s (~) 0.880s 10 1.00x
💻 Local Next.js (Turbopack) 0.176s 1.003s 0.012s 1.018s 0.842s 10 1.30x
🐘 Postgres Next.js (Turbopack) 0.192s 1.001s 0.001s 1.011s 0.819s 10 1.42x
🐘 Postgres Nitro 0.204s (-0.6%) 0.998s (~) 0.001s (-20.0% 🟢) 1.011s (~) 0.807s 10 1.51x
💻 Local Express 0.205s (+3.0%) 1.004s (~) 0.010s (-18.2% 🟢) 1.016s (~) 0.810s 10 1.52x
🐘 Postgres Express 0.216s (+5.2% 🔺) 1.001s (~) 0.002s (-6.3% 🟢) 1.013s (~) 0.797s 10 1.59x
stream pipeline with 5 transform steps (1MB)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 0.606s 1.009s 0.004s 1.024s 0.418s 59 1.00x
🐘 Postgres Express 0.622s (-1.2%) 1.005s (~) 0.004s (+3.1%) 1.023s (~) 0.401s 59 1.03x
🐘 Postgres Nitro 0.627s (+0.5%) 1.006s (~) 0.004s (~) 1.022s (~) 0.395s 59 1.04x
💻 Local Nitro 0.659s (-21.4% 🟢) 1.010s (~) 0.009s (-0.8%) 1.114s (~) 0.456s 54 1.09x
💻 Local Next.js (Turbopack) 0.683s 1.029s 0.012s 1.044s 0.360s 58 1.13x
💻 Local Express 0.761s (+0.5%) 1.029s (~) 0.011s (+14.3% 🔺) 1.042s (~) 0.281s 59 1.26x
10 parallel streams (1MB each)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 0.939s 1.111s 0.000s 1.119s 0.180s 54 1.00x
🐘 Postgres Nitro 0.954s (-1.5%) 1.223s (-2.0%) 0.000s (-2.0%) 1.233s (-1.9%) 0.279s 49 1.02x
🐘 Postgres Express 0.971s (+1.0%) 1.194s (-6.6% 🟢) 0.000s (-8.0% 🟢) 1.218s (-6.7% 🟢) 0.248s 50 1.03x
💻 Local Express 1.206s (-1.6%) 2.021s (~) 0.000s (+40.0% 🔺) 2.023s (~) 0.817s 30 1.28x
💻 Local Next.js (Turbopack) 1.285s 2.021s 0.000s 2.024s 0.740s 30 1.37x
💻 Local Nitro 1.324s (+8.3% 🔺) 2.018s (~) 0.000s (+221.4% 🔺) 2.198s (+8.7% 🔺) 0.875s 28 1.41x
fan-out fan-in 10 streams (1MB each)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.744s (-2.7%) 2.068s (-3.4%) 0.000s (-3.4%) 2.079s (-4.4%) 0.336s 29 1.00x
🐘 Postgres Next.js (Turbopack) 1.798s 2.146s 0.000s 2.156s 0.358s 28 1.03x
🐘 Postgres Express 1.817s (+2.5%) 2.175s (~) 0.000s (+Infinity% 🔺) 2.190s (~) 0.373s 28 1.04x
💻 Local Express 3.348s (-3.4%) 3.972s (-1.5%) 0.001s (-37.5% 🟢) 3.974s (-1.5%) 0.626s 16 1.92x
💻 Local Nitro 3.396s (~) 4.029s (~) 0.000s (-62.5% 🟢) 4.032s (~) 0.636s 15 1.95x
💻 Local Next.js (Turbopack) 3.806s 4.389s 0.001s 4.392s 0.586s 14 2.18x

Summary

Fastest Framework by World

Winner determined by most benchmark wins

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

Winner determined by most benchmark wins

Framework 🥇 Fastest World Wins
Express 🐘 Postgres 17/21
Next.js (Turbopack) 🐘 Postgres 17/21
Nitro 🐘 Postgres 15/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 7, 2026

🧪 E2E Test Results

Some tests failed

Summary

Passed Failed Skipped Total
❌ ▲ Vercel Production 899 1 60 960
❌ 💻 Local Development 885 91 80 1056
❌ 📦 Local Production 974 2 80 1056
❌ 🐘 Local Postgres 974 2 80 1056
✅ 🪟 Windows 96 0 0 96
✅ 📋 Other 270 0 18 288
Total 4098 96 318 4512

❌ Failed Tests

▲ Vercel Production (1 failed)

nextjs-turbopack (1 failed):

  • DurableAgent e2e experimental_onStepStart (GAP) completes but callbacks are not called (GAP)
💻 Local Development (91 failed)

fastify-stable (90 failed):

  • DurableAgent e2e core basic text response
  • DurableAgent e2e core single tool call
  • DurableAgent e2e core multiple sequential tool calls
  • DurableAgent e2e core tool error recovery
  • DurableAgent e2e provider tools provider tool identity preserved across step boundaries
  • DurableAgent e2e provider tools mixed provider and function tools
  • DurableAgent e2e onStepFinish fires constructor + stream callbacks in order with step data
  • DurableAgent e2e onFinish fires constructor + stream callbacks in order with event data
  • DurableAgent e2e instructions string instructions are passed to the model
  • DurableAgent e2e timeout completes within timeout
  • DurableAgent e2e experimental_onStart (GAP) completes but callbacks are not called (GAP)
  • DurableAgent e2e experimental_onStepStart (GAP) completes but callbacks are not called (GAP)
  • DurableAgent e2e experimental_onToolCallStart (GAP) completes but callbacks are not called (GAP)
  • DurableAgent e2e experimental_onToolCallFinish (GAP) completes but callbacks are not called (GAP)
  • DurableAgent e2e prepareCall (GAP) completes but prepareCall is not applied (GAP)
  • DurableAgent e2e prepareStep on constructor agent-level prepareStep is called for each LLM step
  • DurableAgent e2e prepareStep on constructor stream-level prepareStep overrides constructor-level
  • DurableAgent e2e multimodal tool results passes through LanguageModelV3ToolResultOutput from tools
  • DurableAgent e2e tool approval (GAP) completes but needsApproval is not checked (GAP)
  • addTenWorkflow | wrun_01KQJ50K46PTZSSPG10DD4CGWA
  • addTenWorkflow | wrun_01KQJ50K46PTZSSPG10DD4CGWA
  • promiseAllWorkflow | wrun_01KQJ50T5KDWTZH8W8C1PXG6EJ
  • promiseRaceWorkflow | wrun_01KQJ50Z0MQJEHVMY769T97YAW
  • promiseAnyWorkflow | wrun_01KQJ5117Q6XXE947AJTT1D4CP
  • readableStreamWorkflow | wrun_01KQJ513FC3G266HBDZQAJV3PB
  • hookWorkflow | wrun_01KQJ51E9T39EBY9BVS4EJ8NHH
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KQJ51TA57VVMQ103N9GFNWFW
  • webhookWorkflow | wrun_01KQJ5236WH99V8QX1BD737Z67
  • webhook route with invalid token
  • sleepingWorkflow | wrun_01KQJ528GG2HQWMRGD056T0FVH
  • parallelSleepWorkflow | wrun_01KQJ52RCF1320EXN2YWDZ9Q78
  • nullByteWorkflow | wrun_01KQJ532DXC7F4E154R2ZW6ESG
  • workflowAndStepMetadataWorkflow | wrun_01KQJ534PES69TE54092P8KSPQ
  • outputStreamWorkflow no startIndex (reads all chunks)
  • outputStreamWorkflow positive startIndex (skips first chunk)
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getChunks getChunks returns same content as reading the stream
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions | wrun_01KQJ55KA2Q8AHKWPCH4W83FHP
  • utf8StreamWorkflow | wrun_01KQJ5628H525VYHA53ZP7J6YH
  • fetchWorkflow | wrun_01KQJ569H4VD661J99SG2EWDN4
  • promiseRaceStressTestWorkflow | wrun_01KQJ56CW8XA1Z7YW7TGF02197
  • 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()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • stepDirectCallWorkflow - calling step functions directly outside workflow context
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KQJ59YXWPXXH0BPPJH4SEMYH
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KQJ5AM4VQ1A066F88D0NC616
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KQJ5BAEK1B2GGQ356AGG5KGY
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KQJ5BYZGW8H5282A5N5J0N58
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KQJ5C86T2ESS15B4NPBVT0S4
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KQJ5CE84TMAS7M34B21KT9K5
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KQJ5CGE86TWK75AV9GAYPTH7
  • runClassSerializationWorkflow - Run instances serialize across workflow/step boundaries | wrun_01KQJ5CW4AXDSKSWPQV7XFZSAE
  • startFromWorkflow - calling start() directly inside a workflow function with hook communication | wrun_01KQJ5D7PVH40H658TCKNXJ8A0
  • fibonacciWorkflow - recursive workflow composition via start() | wrun_01KQJ5DAMVP5PE5B38WC4FJR6Y
  • health check endpoint (HTTP) - workflow and step endpoints respond to __health query parameter
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KQJ5DV5J5SX2HETBB9YHW7DF
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KQJ5E0WJPA5D3J7SNB3B1JVN
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KQJ5E7SEX3YRVYA8PCCH5A41
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KQJ5EEVTQJ9V3BXREE136GCV
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KQJ5EMKTHMGFY11KT9HD54FX
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KQJ5EVFQBAAWB10AKE41371B
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KQJ5F2A5C9CTN3YP3RMWX1A0
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KQJ5FDVK8M3GS5V0CE1CQMAY
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KQJ5FP263XCHAQX5SBHQK5B0
  • cancelRun - cancelling a running workflow | wrun_01KQJ5FX8J47XYMF10JSEHK3FS
  • cancelRun via CLI - cancelling a running workflow | wrun_01KQJ5G6NCM1RGPTT3S4WXRK06
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KQJ5GK8AHZKXY2YHR2BWDGFY
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KQJ5H8PGSMZ3Q646GDDRFQCF
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KQJ5HK79JX9A0P2VMVKCGHS9
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KQJ5HT86H233WTRRN4PA1NKK
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KQJ5HWGB0SER2H2D9J1SKFPR
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KQJ5HYSRX2SXWPPJS5MJ7GF0
  • getterStepWorkflow - getter functions with "use step" directive | wrun_01KQJ5J264T3X52974BCX3KGAZ
  • distributedAbortController - manual abort triggers signal | wrun_01KQJ5J8YW1AYQSR73S3XRB9KY
  • distributedAbortController - TTL expiration triggers signal | wrun_01KQJ5JFBJXF0PKV5GBRZ39B2S
  • distributedAbortController - reconnect to existing controller | wrun_01KQJ5JKZZVWMDXJ1R1ADTMPR7

vite-stable (1 failed):

  • stepDirectCallWorkflow - calling step functions directly outside workflow context
📦 Local Production (2 failed)

nuxt-stable (2 failed):

  • 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
🐘 Local Postgres (2 failed)

nuxt-stable (2 failed):

  • 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

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 93 1 2
✅ nextjs-webpack 94 0 2
✅ nitro 89 0 7
✅ nuxt 89 0 7
✅ sveltekit 89 0 7
❌ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 90 0 6
✅ express-stable 90 0 6
❌ fastify-stable 0 90 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
✅ sveltekit-stable 90 0 6
❌ vite-stable 89 1 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 88 2 6
✅ sveltekit-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 88 2 6
✅ sveltekit-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


Some E2E test jobs failed:

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

Check the workflow run for details.

Comment thread packages/nitro/src/index.ts Outdated
- Update `nitro` catalog entry from `3.0.1-alpha.1` to `^3.0.260415-beta`.
- Update workbench/nitro-v3 plugin to use `definePlugin` (the new public
  API) instead of `defineNitroPlugin` from nitro's internal runtime path,
  which is no longer exposed.
- Update README link to the promoted nitro.build URL.
…utes

Bundle workflow routes inside the Nitro server using the base builder, and
use Nitro v3 `functionRules` to configure per-route runtime/trigger config
on Vercel (previously this went through a separate `LegacyVercelBuilder`
Build Output API pass, now retained only for Nitro v2 fallback).

- `isNitroV2()` uses `nitro.meta.majorVersion` when available (with
  `routing` property as fallback for older nitropack releases).
- Adds unit tests for v2/v3 detection via `meta.majorVersion`.
- v3 deploy path registers `.well-known/workflow/v1/{step,flow,webhook}`
  handlers with their appropriate queue triggers and `maxDuration` caps.

BREAKING CHANGE: Nitro v3+ deploys to Vercel now require a nitropack that
supports the `functionRules` option on `nitro.options.vercel`. Users
still on Nitro v2 are unaffected (they continue through the legacy
`VercelBuilder` path).
…s bundler

When nitro bundles `steps.mjs` / `workflows.mjs` (which the base builder
emits with `sourcemap: inline`) into `.output/server/index.mjs`, the
bundler does not consume the inline `//# sourceMappingURL=data:...`
comments from input files by default. As a result the emitted output map
only references nitro wrappers + node_modules and error stack traces point
at the bundled output rather than the original user `.ts` sources.

Two changes together make this work:

- Enable `nitro.options.sourcemap = true` on Vercel deploys so the bundler
  emits an external `.mjs.map` alongside the server bundle.
- Add a `workflow:sourcemap-loader` plugin that intercepts files under
  `<buildDir>/workflow/*.mjs` in its `load` hook, parses the inline
  base64 sourcemap out of the trailing comment, strips the comment, and
  returns `{ code, map }` so the bundler chains the map into the final
  output.

With both in place, stack frames from step errors remap from
`.output/server/index.mjs:<N>` back to `workflows/99_e2e.ts` and
`helpers.ts` (the two assertions failing in the `E2E Vercel Prod Tests
(nitro)` CI job).

The plugin is registered via the `rollup:before` hook, which nitro fires
for all three supported bundlers (rolldown — the v3 default, rollup, and
vite). Its `load` hook returns a `SourceDescription` shape (`{ code, map }`)
that is accepted identically by rolldown and rollup.
@RihanArfan
Copy link
Copy Markdown
Member Author

@vercel/workflow

Copy link
Copy Markdown
Member

@VaguelySerious VaguelySerious left a comment

Choose a reason for hiding this comment

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

You probably know better than me whether the nits apply, so use your judgement there. Happy to approve this once the e2e tests are running again and CI is green

Copy link
Copy Markdown
Member

@VaguelySerious VaguelySerious left a comment

Choose a reason for hiding this comment

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

AI review: blocking issues found

Comment thread packages/nitro/src/index.ts
Comment thread packages/nitro/src/index.ts
Comment thread packages/nitro/src/index.ts
Comment thread packages/nitro/src/index.ts Outdated
Comment thread packages/nitro/src/index.ts Outdated
Comment thread packages/nitro/src/index.ts Outdated
Comment thread packages/nitro/src/index.test.ts
* Extra esbuild options merged into every bundle this builder produces
* (steps, intermediate workflow, final workflow wrapper, webhook).
*/
esbuildOptions?: Partial<BuildOptions>;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI Review: Nit

esbuildOptions: Partial<BuildOptions> is a broad surface for one knob

The new field accepts the full esbuild BuildOptions and is spread into four bundle calls with very different needs (steps: node/esm, workflow VM: neutral/cjs, webhook: node/esm, final wrapper: node/esm). The current spread order puts user options first so builder-required options like platform, format, bundle, plugins win — that's defensive — but the API still implies "you can pass any esbuild option" when in practice almost everything that matters is overridden.

Given the only consumer is sourcesContent: false, consider either narrowing the public type to a small allowlist or naming the field something closer to its actual purpose. Not blocking, but the surface area will be hard to take back later.

@VaguelySerious
Copy link
Copy Markdown
Member

Seems like tests are still failing, please re-ping me when they pass 👋

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.

3 participants