Skip to content

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

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

refactor(nitro): use nitro v3 functionRules workflow routes#1575
RihanArfan wants to merge 12 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: d7d9685

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 Apr 28, 2026 11:05pm
example-nextjs-workflow-webpack Ready Ready Preview, Comment Apr 28, 2026 11:05pm
example-workflow Ready Ready Preview, Comment Apr 28, 2026 11:05pm
workbench-astro-workflow Ready Ready Preview, Comment Apr 28, 2026 11:05pm
workbench-express-workflow Ready Ready Preview, Comment Apr 28, 2026 11:05pm
workbench-fastify-workflow Ready Ready Preview, Comment Apr 28, 2026 11:05pm
workbench-hono-workflow Ready Ready Preview, Comment Apr 28, 2026 11:05pm
workbench-nitro-workflow Ready Ready Preview, Comment Apr 28, 2026 11:05pm
workbench-nuxt-workflow Ready Ready Preview, Comment Apr 28, 2026 11:05pm
workbench-sveltekit-workflow Ready Ready Preview, Comment Apr 28, 2026 11:05pm
workbench-vite-workflow Error Error Apr 28, 2026 11:05pm
workflow-docs Ready Ready Preview, Comment, Open in v0 Apr 28, 2026 11:05pm
workflow-swc-playground Ready Ready Preview, Comment Apr 28, 2026 11:05pm
workflow-web Ready Ready Preview, Comment Apr 28, 2026 11:05pm

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.037s (-13.0% 🟢) 1.005s (~) 0.968s 10 1.00x
💻 Local Express 0.042s (-5.2% 🟢) 1.006s (~) 0.964s 10 1.12x
💻 Local Next.js (Turbopack) 0.048s 1.005s 0.957s 10 1.28x
🐘 Postgres Nitro 0.059s (-37.8% 🟢) 1.011s (-3.1%) 0.952s 10 1.58x
🐘 Postgres Express 0.061s (+5.7% 🔺) 1.010s (~) 0.948s 10 1.63x
🐘 Postgres Next.js (Turbopack) 0.063s 1.010s 0.948s 10 1.67x
workflow with 1 step

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 1.120s 2.007s 0.887s 10 1.00x
💻 Local Nitro 1.126s (~) 2.005s (~) 0.879s 10 1.01x
💻 Local Express 1.136s (+0.9%) 2.007s (~) 0.871s 10 1.01x
🐘 Postgres Next.js (Turbopack) 1.144s 2.012s 0.868s 10 1.02x
🐘 Postgres Express 1.144s (~) 2.011s (~) 0.867s 10 1.02x
🐘 Postgres Nitro 1.149s (+0.8%) 2.011s (~) 0.862s 10 1.03x
workflow with 10 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 10.780s 11.024s 0.243s 3 1.00x
🐘 Postgres Next.js (Turbopack) 10.866s 11.018s 0.152s 3 1.01x
🐘 Postgres Express 10.879s (-0.8%) 11.019s (~) 0.140s 3 1.01x
🐘 Postgres Nitro 10.891s (~) 11.022s (~) 0.131s 3 1.01x
💻 Local Nitro 10.926s (~) 11.024s (~) 0.098s 3 1.01x
💻 Local Express 10.940s (~) 11.025s (~) 0.086s 3 1.01x
workflow with 25 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 14.535s 15.025s 0.490s 4 1.00x
🐘 Postgres Express 14.560s (~) 15.021s (~) 0.461s 4 1.00x
🐘 Postgres Nitro 14.614s (~) 15.024s (~) 0.410s 4 1.01x
💻 Local Next.js (Turbopack) 14.644s 15.029s 0.385s 4 1.01x
💻 Local Nitro 14.959s (-0.7%) 15.029s (-6.2% 🟢) 0.071s 4 1.03x
💻 Local Express 15.069s (+0.7%) 16.033s (+6.7% 🔺) 0.963s 4 1.04x
workflow with 50 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 13.916s 14.167s 0.251s 7 1.00x
🐘 Postgres Express 14.015s (~) 14.307s (-2.0%) 0.292s 7 1.01x
🐘 Postgres Nitro 14.067s (+0.7%) 14.742s (+3.0%) 0.676s 7 1.01x
💻 Local Next.js (Turbopack) 16.090s 16.863s 0.773s 6 1.16x
💻 Local Nitro 16.371s (-2.5%) 17.030s (~) 0.659s 6 1.18x
💻 Local Express 16.966s (+2.2%) 17.199s (+1.0%) 0.233s 6 1.22x
Promise.all with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 1.220s 2.008s 0.788s 15 1.00x
🐘 Postgres Express 1.251s (-0.8%) 2.010s (~) 0.759s 15 1.03x
🐘 Postgres Nitro 1.273s (~) 2.010s (~) 0.738s 15 1.04x
💻 Local Nitro 1.451s (-11.0% 🟢) 2.005s (-3.3%) 0.554s 15 1.19x
💻 Local Next.js (Turbopack) 1.496s 2.005s 0.509s 15 1.23x
💻 Local Express 1.574s (+5.7% 🔺) 2.006s (~) 0.432s 15 1.29x
Promise.all with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 2.340s (-0.9%) 3.008s (~) 0.668s 10 1.00x
🐘 Postgres Nitro 2.355s (~) 3.011s (~) 0.656s 10 1.01x
🐘 Postgres Next.js (Turbopack) 2.402s 3.011s 0.609s 10 1.03x
💻 Local Nitro 2.770s (-11.9% 🟢) 3.008s (-22.6% 🟢) 0.238s 10 1.18x
💻 Local Next.js (Turbopack) 2.949s 3.565s 0.616s 9 1.26x
💻 Local Express 3.136s (+6.2% 🔺) 3.885s (+12.5% 🔺) 0.749s 8 1.34x
Promise.all with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 3.466s (-0.6%) 4.013s (~) 0.547s 8 1.00x
🐘 Postgres Nitro 3.467s (~) 4.010s (~) 0.542s 8 1.00x
🐘 Postgres Next.js (Turbopack) 3.691s 4.011s 0.320s 8 1.06x
💻 Local Nitro 7.301s (-12.6% 🟢) 8.022s (-11.1% 🟢) 0.721s 4 2.11x
💻 Local Next.js (Turbopack) 7.782s 8.017s 0.235s 4 2.25x
💻 Local Express 8.402s (+0.8%) 9.025s (~) 0.623s 4 2.42x
Promise.race with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 1.231s 2.010s 0.779s 15 1.00x
🐘 Postgres Nitro 1.255s (~) 2.009s (~) 0.753s 15 1.02x
🐘 Postgres Express 1.260s (~) 2.008s (~) 0.748s 15 1.02x
💻 Local Next.js (Turbopack) 1.488s 2.006s 0.519s 15 1.21x
💻 Local Nitro 1.510s (-19.1% 🟢) 2.006s (-14.3% 🟢) 0.496s 15 1.23x
💻 Local Express 1.555s (-17.9% 🟢) 2.007s (-15.1% 🟢) 0.452s 15 1.26x
Promise.race with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 2.334s (~) 3.010s (~) 0.676s 10 1.00x
🐘 Postgres Express 2.348s (~) 3.010s (~) 0.662s 10 1.01x
🐘 Postgres Next.js (Turbopack) 2.382s 3.012s 0.629s 10 1.02x
💻 Local Nitro 2.923s (-4.6%) 3.342s (-14.0% 🟢) 0.419s 9 1.25x
💻 Local Next.js (Turbopack) 3.010s 3.676s 0.666s 9 1.29x
💻 Local Express 3.248s (+3.7%) 4.010s (+6.6% 🔺) 0.762s 8 1.39x
Promise.race with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 3.494s (~) 4.013s (~) 0.518s 8 1.00x
🐘 Postgres Nitro 3.513s (+0.9%) 4.011s (~) 0.497s 8 1.01x
🐘 Postgres Next.js (Turbopack) 3.660s 4.013s 0.353s 8 1.05x
💻 Local Next.js (Turbopack) 7.445s 8.021s 0.576s 4 2.13x
💻 Local Nitro 7.912s (-13.5% 🟢) 8.523s (-15.0% 🟢) 0.611s 4 2.26x
💻 Local Express 9.218s (+4.7%) 9.777s (+5.4% 🔺) 0.559s 4 2.64x
workflow with 10 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 0.797s 1.006s 0.209s 60 1.00x
🐘 Postgres Nitro 0.829s (+1.0%) 1.007s (~) 0.178s 60 1.04x
🐘 Postgres Express 0.842s (~) 1.041s (+1.7%) 0.199s 58 1.06x
💻 Local Next.js (Turbopack) 0.865s 1.021s 0.156s 59 1.09x
💻 Local Nitro 1.001s (+2.1%) 1.505s (+37.6% 🔺) 0.504s 40 1.26x
💻 Local Express 1.045s (+6.2% 🔺) 2.007s (+86.5% 🔺) 0.962s 30 1.31x
workflow with 25 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.916s (-0.6%) 2.101s (~) 0.184s 43 1.00x
🐘 Postgres Express 1.953s (-1.2%) 2.257s (~) 0.304s 40 1.02x
🐘 Postgres Next.js (Turbopack) 1.976s 2.124s 0.148s 43 1.03x
💻 Local Next.js (Turbopack) 2.669s 3.008s 0.339s 30 1.39x
💻 Local Nitro 3.020s (~) 3.548s (-5.6% 🟢) 0.528s 26 1.58x
💻 Local Express 3.210s (+6.4% 🔺) 4.011s (+11.9% 🔺) 0.801s 23 1.68x
workflow with 50 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 3.892s (-2.5%) 4.111s (-5.9% 🟢) 0.219s 30 1.00x
🐘 Postgres Nitro 3.958s (-3.5%) 4.251s (-7.7% 🟢) 0.293s 29 1.02x
🐘 Postgres Next.js (Turbopack) 3.974s 4.332s 0.358s 28 1.02x
💻 Local Next.js (Turbopack) 8.652s 9.018s 0.366s 14 2.22x
💻 Local Nitro 8.934s (-3.9%) 9.325s (-6.9% 🟢) 0.390s 13 2.30x
💻 Local Express 9.457s (+2.7%) 10.020s (~) 0.563s 12 2.43x
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.248s 1.007s 0.759s 60 1.00x
🐘 Postgres Nitro 0.282s (-0.6%) 1.007s (~) 0.726s 60 1.13x
🐘 Postgres Express 0.289s (+2.3%) 1.008s (~) 0.719s 60 1.16x
💻 Local Next.js (Turbopack) 0.564s 1.004s 0.441s 60 2.27x
💻 Local Nitro 0.593s (-1.9%) 1.021s (~) 0.428s 59 2.39x
💻 Local Express 0.627s (+11.9% 🔺) 1.022s (+1.8%) 0.395s 59 2.52x
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.494s 1.007s 0.513s 90 1.00x
🐘 Postgres Express 0.503s (-1.3%) 1.006s (~) 0.503s 90 1.02x
🐘 Postgres Nitro 0.504s (+1.5%) 1.007s (~) 0.503s 90 1.02x
💻 Local Nitro 2.385s (-6.0% 🟢) 3.009s (~) 0.624s 30 4.82x
💻 Local Express 2.635s (+4.8%) 3.009s (~) 0.374s 30 5.33x
💻 Local Next.js (Turbopack) 2.638s 3.008s 0.370s 30 5.34x
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.787s 1.007s 0.220s 120 1.00x
🐘 Postgres Express 0.808s (-1.3%) 1.009s (-0.9%) 0.201s 119 1.03x
🐘 Postgres Nitro 0.829s (+5.0%) 1.018s (+1.0%) 0.188s 118 1.05x
💻 Local Nitro 10.507s (-6.1% 🟢) 11.029s (-5.4% 🟢) 0.522s 11 13.35x
💻 Local Next.js (Turbopack) 10.977s 11.666s 0.689s 11 13.95x
💻 Local Express 11.415s (+2.0%) 12.030s (+0.8%) 0.615s 10 14.50x
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.172s 1.003s 0.012s 1.018s 0.845s 10 1.00x
💻 Local Nitro 0.206s (-3.7%) 1.004s (~) 0.010s (-17.6% 🟢) 1.016s (~) 0.810s 10 1.19x
💻 Local Express 0.215s (+8.0% 🔺) 1.005s (~) 0.012s (~) 1.019s (~) 0.804s 10 1.25x
🐘 Postgres Next.js (Turbopack) 0.218s 1.000s 0.001s 1.009s 0.792s 10 1.26x
🐘 Postgres Express 0.220s (+7.2% 🔺) 0.997s (~) 0.001s (-12.5% 🟢) 1.011s (~) 0.791s 10 1.27x
🐘 Postgres Nitro 0.221s (+7.7% 🔺) 0.993s (-0.6%) 0.002s (~) 1.010s (~) 0.789s 10 1.28x
stream pipeline with 5 transform steps (1MB)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 0.617s (-2.1%) 1.005s (~) 0.006s (+63.7% 🔺) 1.024s (~) 0.407s 59 1.00x
🐘 Postgres Nitro 0.625s (~) 1.005s (~) 0.011s (+177.5% 🔺) 1.030s (+0.7%) 0.405s 59 1.01x
🐘 Postgres Next.js (Turbopack) 0.627s 1.009s 0.003s 1.025s 0.398s 59 1.02x
💻 Local Next.js (Turbopack) 0.674s 1.012s 0.010s 1.024s 0.351s 59 1.09x
💻 Local Nitro 0.760s (-9.4% 🟢) 1.012s (~) 0.008s (-10.8% 🟢) 1.022s (-8.4% 🟢) 0.262s 59 1.23x
💻 Local Express 0.785s (+3.6%) 1.031s (~) 0.010s (+9.5% 🔺) 1.044s (~) 0.259s 58 1.27x
10 parallel streams (1MB each)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 0.922s 1.177s 0.000s 1.184s 0.262s 51 1.00x
🐘 Postgres Express 0.935s (-2.7%) 1.197s (-6.4% 🟢) 0.000s (-100.0% 🟢) 1.208s (-7.5% 🟢) 0.272s 50 1.01x
🐘 Postgres Nitro 0.974s (+0.6%) 1.273s (+2.0%) 0.000s (+53.2% 🔺) 1.285s (+2.2%) 0.310s 47 1.06x
💻 Local Nitro 1.223s (~) 2.021s (~) 0.000s (+333.3% 🔺) 2.023s (~) 0.800s 30 1.33x
💻 Local Next.js (Turbopack) 1.271s 2.020s 0.000s 2.023s 0.752s 30 1.38x
💻 Local Express 1.302s (+6.3% 🔺) 2.023s (~) 0.001s (+80.0% 🔺) 2.025s (~) 0.723s 30 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 🥇 Express 1.747s (-1.4%) 2.067s (-5.1% 🟢) 0.000s (+Infinity% 🔺) 2.107s (-4.2%) 0.360s 29 1.00x
🐘 Postgres Nitro 1.784s (~) 2.140s (~) 0.000s (~) 2.153s (-1.0%) 0.369s 28 1.02x
🐘 Postgres Next.js (Turbopack) 1.858s 2.182s 0.000s 2.189s 0.331s 28 1.06x
💻 Local Nitro 3.381s (~) 4.034s (~) 0.001s (+12.5% 🔺) 4.037s (~) 0.656s 15 1.94x
💻 Local Next.js (Turbopack) 3.720s 4.389s 0.001s 4.393s 0.672s 14 2.13x
💻 Local Express 3.722s (+7.3% 🔺) 4.168s (+3.3%) 0.000s (-50.0% 🟢) 4.171s (+3.3%) 0.449s 15 2.13x

Summary

Fastest Framework by World

Winner determined by most benchmark wins

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

Winner determined by most benchmark wins

Framework 🥇 Fastest World Wins
Express 🐘 Postgres 18/21
Next.js (Turbopack) 🐘 Postgres 17/21
Nitro 🐘 Postgres 18/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 882 8 60 950
❌ 💻 Local Development 875 90 80 1045
✅ 📦 Local Production 965 0 80 1045
✅ 🐘 Local Postgres 965 0 80 1045
✅ 📋 Other 267 0 18 285
Total 3954 98 318 4370

❌ Failed Tests

▲ Vercel Production (8 failed)

express (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

fastify (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

hono (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

nitro (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 Development (90 failed)

fastify-stable (89 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_01KQB58V74TGVHXGV72J8ABJ1Z
  • addTenWorkflow | wrun_01KQB58V74TGVHXGV72J8ABJ1Z
  • promiseAllWorkflow | wrun_01KQB591TWAXG2TSW047BFYS01
  • promiseRaceWorkflow | wrun_01KQB596AT47242HYX379W6Y0C
  • promiseAnyWorkflow | wrun_01KQB59B21AZFM2G1XCE1VX24G
  • readableStreamWorkflow | wrun_01KQB59D71GY50ZSF30APJR24X
  • hookWorkflow | wrun_01KQB59R60FN8Y4QVEEJJJWFAK
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KQB5A373J7V38WP6NKFHN4AZ
  • webhookWorkflow | wrun_01KQB5AC4Y5AATKA6VWDB2YRPA
  • webhook route with invalid token
  • sleepingWorkflow | wrun_01KQB5AGZAW9EWC7Z3AC9DXTHC
  • parallelSleepWorkflow | wrun_01KQB5AX7HB19RD9DZ11AQPNJF
  • nullByteWorkflow | wrun_01KQB5B0EXJWY4HB7RT8FDPZF4
  • workflowAndStepMetadataWorkflow | wrun_01KQB5B3RWPGH5B1KSBKC89BJ7
  • 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_01KQB5DD2Y31RT15Y5ERGPKWGC
  • fetchWorkflow | wrun_01KQB5DV78CH1BAXVXVNDXPFYT
  • promiseRaceStressTestWorkflow | wrun_01KQB5DYH79NT9N8KJ6H6BPE4Y
  • 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_01KQB5HE13HFGYQ714N5JRHS9H
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KQB5J2974VQ2DY33YH2SQZVC
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KQB5JQ8EQBYCFBNHXM0GDBNT
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KQB5KAZXNE6213G8EBDNZ42K
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KQB5KKWG5ARWXMGMX6XCY9N1
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KQB5KSF403BM2TF8FW2AZ2SQ
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KQB5KVHPQ7X4GWVY9X7M5VBR
  • runClassSerializationWorkflow - Run instances serialize across workflow/step boundaries | wrun_01KQB5M6NBMD3KSWAQW5112S13
  • startFromWorkflow - calling start() directly inside a workflow function with hook communication | wrun_01KQB5MJJTF78PRGY898S07D7R
  • fibonacciWorkflow - recursive workflow composition via start() | wrun_01KQB5MNDR6HF41YA794GE4GM8
  • 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_01KQB5N416GGA1TKJ5CG4JJ9QF
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KQB5N9BP4DTCTS8D9Q065XNT
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KQB5NG03WNJZPFCEHKPPTN9A
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KQB5NPN5Z2N02PQ76TR36216
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KQB5NX9S0H01EW5GA98TF8B9
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KQB5P3TKVT65ZK82MJ022249
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KQB5PAQX60MDZHJK0QY1VYS6
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KQB5PNR05J14QKZG2EWWPCRS
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KQB5PXJHVVJKE2NQD1YKRAP7
  • cancelRun - cancelling a running workflow | wrun_01KQB5Q4EE5SKA85KE9N3D2PWZ
  • cancelRun via CLI - cancelling a running workflow | wrun_01KQB5QDS6M6Z8V0TGFQ9G34PF
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KQB5QT243DWR7AKDG46VC3KD
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KQB5REC3663AXX1XQ7YJ2Z79
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KQB5RRR05PG22V1N547ECAKS
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KQB5RZWSBJTX0D95885H9GC8
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KQB5S1YG525PKKH5JA6DHH9J
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KQB5S40J8FW0Y56HTFP2N8GJ
  • getterStepWorkflow - getter functions with "use step" directive | wrun_01KQB5S76JR3R7QHQ5X1GJBPE7
  • distributedAbortController - manual abort triggers signal | wrun_01KQB5SDR8TDY064S7ZCM740CN
  • distributedAbortController - TTL expiration triggers signal | wrun_01KQB5SKB72T5E6BD74A5844VJ
  • distributedAbortController - reconnect to existing controller | wrun_01KQB5SQVTRYXH1XK0TXVD0G2S

vite-stable (1 failed):

  • stepDirectCallWorkflow - calling step functions directly outside workflow context

Details by Category

❌ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 88 0 7
✅ example 88 0 7
❌ express 86 2 7
❌ fastify 86 2 7
❌ hono 86 2 7
✅ nextjs-turbopack 93 0 2
✅ nextjs-webpack 93 0 2
❌ nitro 86 2 7
✅ nuxt 88 0 7
✅ sveltekit 88 0 7
❌ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 89 0 6
✅ express-stable 89 0 6
❌ fastify-stable 0 89 6
✅ hono-stable 89 0 6
✅ nextjs-turbopack-canary 76 0 19
✅ nextjs-turbopack-stable 95 0 0
✅ nextjs-webpack-canary 76 0 19
✅ nextjs-webpack-stable 95 0 0
✅ nitro-stable 89 0 6
✅ sveltekit-stable 89 0 6
❌ vite-stable 88 1 6
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 89 0 6
✅ express-stable 89 0 6
✅ fastify-stable 89 0 6
✅ hono-stable 89 0 6
✅ nextjs-turbopack-canary 76 0 19
✅ nextjs-turbopack-stable 95 0 0
✅ nextjs-webpack-canary 76 0 19
✅ nextjs-webpack-stable 95 0 0
✅ nitro-stable 89 0 6
✅ nuxt-stable 89 0 6
✅ sveltekit-stable 89 0 6
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 89 0 6
✅ express-stable 89 0 6
✅ fastify-stable 89 0 6
✅ hono-stable 89 0 6
✅ nextjs-turbopack-canary 76 0 19
✅ nextjs-turbopack-stable 95 0 0
✅ nextjs-webpack-canary 76 0 19
✅ nextjs-webpack-stable 95 0 0
✅ nitro-stable 89 0 6
✅ nuxt-stable 89 0 6
✅ sveltekit-stable 89 0 6
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 89 0 6
✅ e2e-local-postgres-nest-stable 89 0 6
✅ e2e-local-prod-nest-stable 89 0 6

📋 View full workflow run


Some E2E test jobs failed:

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

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
const source = nitro.options.virtual['#workflow/steps.mjs'];
expect(source).toContain('fromWebHandler');
});
});
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: Note

Test coverage gap on the new v3 Vercel deploy paths

The added unit tests only cover isNitroV2 detection. None of the new v3 Vercel deploy plumbing is tested:

  • functionRules keys/values are correctly populated (step/flow/webhook entries, runtime conditional, triggers)
  • nitro.options.sourcemap = true is set
  • noExternals mutation behaves correctly (and doesn't crash on true/false/missing — see blocking comment)
  • The workflowSourcemapLoaderPlugin produces a { code, map } shape when fed an esbuild-style inline sourcemap and falls through cleanly otherwise

Most of these are pure stub-driven assertions and would be cheap to add.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed

* 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.

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