Skip to content

[nest] Add NestJS support on Vercel - #1472

Closed
VaguelySerious wants to merge 95 commits into
mainfrom
peter/nest-fix-mar-20
Closed

[nest] Add NestJS support on Vercel#1472
VaguelySerious wants to merge 95 commits into
mainfrom
peter/nest-fix-mar-20

Conversation

@VaguelySerious

@VaguelySeriousVaguelySerious commented Mar 20, 2026

Copy link
Copy Markdown
Member

Extends builder to bundle separate functions for app/flow/step routes with experimentalTriggers enabled, allowing queue callbacks when deployed to Vercel, and adds e2e tests for the Vercel environment.

Related:

@changeset-bot

changeset-botBot commented Mar 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5d7ef34

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

This PR includes changesets to release 16 packages
NameType
@workflow/nestPatch
workflowPatch
@workflow/aiPatch
@workflow/world-testingPatch
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/astroPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

vercelBot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production777367847
✅ 💻 Local Development7820142924
✅ 📦 Local Production7820142924
✅ 🐘 Local Postgres7820142924
✅ 🪟 Windows720577
❌ 🌍 Community Worlds1185621195
✅ 📋 Other198033231
Total3511595524122

❌ Failed Tests

▲ Vercel Production (3 failed)

hono (2 failed):

nuxt (1 failed):

  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMDYYDFB01BTRJWV0G6BM9Q0 | 🔍 observability
🌍 Community Worlds (56 failed)

mongodb (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMDYPNQCQF0P2A1KHX2DGAGD
  • webhookWorkflow | wrun_01KMDYQ4D90V2PW2AHJ6EPJX90
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMDYXKZ00QTQT1Z9CXMDBJ7S

redis (2 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMDYPNQCQF0P2A1KHX2DGAGD
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMDYXKZ00QTQT1Z9CXMDBJ7S

turso (51 failed):

  • addTenWorkflow | wrun_01KMDYNHM3VGEKP7NXJ9240102
  • addTenWorkflow | wrun_01KMDYNHM3VGEKP7NXJ9240102
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KMDYPV79A7BXN4DPWPCX6WWN
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KMDYNRANBQPHKC249W6THZ4P
  • promiseRaceWorkflow | wrun_01KMDYNWVBYZN8X1RV4329QN38
  • promiseAnyWorkflow | wrun_01KMDYNYZR398MDDX8Z76B1W84
  • importedStepOnlyWorkflow | wrun_01KMDYQ5H0WQAR7NSAK47CK327
  • hookWorkflow | wrun_01KMDYPBH4P5VJDNEX0W7Y3JQ3
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMDYPNQCQF0P2A1KHX2DGAGD
  • webhookWorkflow | wrun_01KMDYQ4D90V2PW2AHJ6EPJX90
  • sleepingWorkflow | wrun_01KMDYQBK6CV7NDVA59SKYGYVC
  • parallelSleepWorkflow | wrun_01KMDYQRNRVK3W4EFK37KWEZK8
  • nullByteWorkflow | wrun_01KMDYQX5F3A8B7NY0TGWNSVR7
  • workflowAndStepMetadataWorkflow | wrun_01KMDYR0F4B9S9GPFC7YH4EBXV
  • fetchWorkflow | wrun_01KMDYSTFC0FN37TJTPHTH87E8
  • promiseRaceStressTestWorkflow | wrun_01KMDYSY54AFHZ3916K3BCJ3HV
  • 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 | wrun_01KMDYWTSFT1AWC2X1YD0BRH7H
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMDYXKZ00QTQT1Z9CXMDBJ7S
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMDYYDFB01BTRJWV0G6BM9Q0
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KMDYZ20RQ2P9796YXAE7J3GJ
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KMDYZBE25VR14DDXF88ADEBS
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KMDYZK5NKVAMAQT3TV7KGT8A
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KMDYZP55RC0JKGVCF02PJG1A
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMDZ07FQHE5WK4421J1Y6YCZ
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KMDZ0E81K08X7CEK5KB5G73E
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KMDZ0KPJHJ3EWC4J9BGT0K9Y
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KMDZ0TPRSC9Q6YCKHX2X2DSW
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KMDZ11DYDVATRGCSJYVG4J4W
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KMDZ1888XYQ4C4JF0TRYMEVR
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KMDZ1G50ATZXXTZBK31HPVMP
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KMDZ1V5R4XE1WAKQ1NDDS30A
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KMDZ246Y3TVA9RK18FYQPSX0
  • cancelRun - cancelling a running workflow | wrun_01KMDZ2AYCED42T9HZPK32ESXZ
  • cancelRun via CLI - cancelling a running workflow | wrun_01KMDZ2M8PGXZ9KE5ZSE2H51N0
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KMDZ30ED1M4XX0VVF3YNCKYY
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KMDZ3NWX7TH9D6G5Q2S80KRC
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KMDZ408Q6ST32VK529QAKS6V

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro7007
✅ example7007
✅ express7007
✅ fastify7007
❌ hono6827
✅ nextjs-turbopack7502
✅ nextjs-webpack7502
✅ nitro7007
❌ nuxt6917
✅ sveltekit7007
✅ vite7007
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable66011
✅ express-stable66011
✅ fastify-stable66011
✅ hono-stable66011
✅ nextjs-turbopack-canary55022
✅ nextjs-turbopack-stable7205
✅ nextjs-webpack-canary55022
✅ nextjs-webpack-stable7205
✅ nitro-stable66011
✅ nuxt-stable66011
✅ sveltekit-stable66011
✅ vite-stable66011
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable66011
✅ express-stable66011
✅ fastify-stable66011
✅ hono-stable66011
✅ nextjs-turbopack-canary55022
✅ nextjs-turbopack-stable7205
✅ nextjs-webpack-canary55022
✅ nextjs-webpack-stable7205
✅ nitro-stable66011
✅ nuxt-stable66011
✅ sveltekit-stable66011
✅ vite-stable66011
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable66011
✅ express-stable66011
✅ fastify-stable66011
✅ hono-stable66011
✅ nextjs-turbopack-canary55022
✅ nextjs-turbopack-stable7205
✅ nextjs-webpack-canary55022
✅ nextjs-webpack-stable7205
✅ nitro-stable66011
✅ nuxt-stable66011
✅ sveltekit-stable66011
✅ vite-stable66011
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack7205
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev302
❌ mongodb5235
✅ redis-dev302
❌ redis5325
✅ turso-dev302
❌ turso4515
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable66011
✅ e2e-local-postgres-nest-stable66011
✅ e2e-local-prod-nest-stable66011

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

@github-actions

github-actionsBot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.043s (-4.0%)1.005s (~)0.962s101.00x
💻 LocalNitro0.043s (-8.4% 🟢)1.005s (~)0.962s101.01x
🌐 RedisNext.js (Turbopack)0.053s1.006s0.953s101.23x
🐘 PostgresNext.js (Turbopack)0.058s1.012s0.954s101.34x
🐘 PostgresNitro0.061s (-11.5% 🟢)1.012s (~)0.951s101.43x
🐘 PostgresExpress0.076s (+7.0% 🔺)1.028s (+1.1%)0.952s101.77x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.472s (-4.9%)2.714s (+6.7% 🔺)2.242s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.123s (-1.4%)2.014s (~)0.890s101.00x
🌐 RedisNext.js (Turbopack)1.123s2.007s0.884s101.00x
💻 LocalExpress1.125s (~)2.006s (~)0.881s101.00x
💻 LocalNitro1.130s (~)2.006s (~)0.876s101.01x
🐘 PostgresNitro1.149s (+0.6%)2.013s (~)0.863s101.02x
🐘 PostgresNext.js (Turbopack)1.153s2.013s0.860s101.03x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.139s (-8.5% 🟢)3.701s (-4.5%)1.562s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express10.755s (-1.4%)11.040s (~)0.285s31.00x
🌐 RedisNext.js (Turbopack)10.794s11.022s0.229s31.00x
🐘 PostgresNext.js (Turbopack)10.886s11.043s0.157s31.01x
💻 LocalExpress10.915s (~)11.023s (~)0.108s31.01x
💻 LocalNitro10.947s (~)11.024s (~)0.077s31.02x
🐘 PostgresNitro10.994s (~)11.376s (+3.0%)0.383s31.02x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.359s (~)19.980s (+5.9% 🔺)2.621s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express14.188s (-2.7%)15.042s (~)0.854s41.00x
🌐 RedisNext.js (Turbopack)14.198s15.028s0.830s41.00x
🐘 PostgresNext.js (Turbopack)14.484s15.042s0.558s41.02x
🐘 PostgresNitro14.772s (~)15.045s (~)0.274s41.04x
💻 LocalExpress14.923s (-0.5%)15.029s (-3.2%)0.106s41.05x
💻 LocalNitro14.942s (~)15.029s (~)0.087s41.05x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro38.029s (+17.6% 🔺)40.139s (+15.5% 🔺)2.110s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express13.360s (-4.7%)14.043s (-2.9%)0.682s71.00x
🌐 RedisNext.js (Turbopack)13.429s14.025s0.597s71.01x
🐘 PostgresNext.js (Turbopack)13.796s14.036s0.240s71.03x
🐘 PostgresNitro14.299s (~)15.040s (~)0.741s61.07x
💻 LocalExpress16.611s (~)17.029s (~)0.417s61.24x
💻 LocalNitro16.628s (+1.0%)17.031s (~)0.403s61.24x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro60.687s (+7.9% 🔺)62.475s (+9.1% 🔺)1.788s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.213s (-4.2%)2.011s (~)0.798s151.00x
🐘 PostgresNext.js (Turbopack)1.265s2.012s0.746s151.04x
🐘 PostgresNitro1.281s (-0.9%)2.011s (~)0.730s151.06x
🌐 RedisNext.js (Turbopack)1.396s2.006s0.611s151.15x
💻 LocalExpress1.504s (~)2.005s (~)0.501s151.24x
💻 LocalNitro1.517s (+2.3%)2.005s (~)0.488s151.25x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.535s (-3.2%)4.036s (-3.9%)1.501s81.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.348s (-4.6%)3.012s (~)0.664s101.00x
🐘 PostgresNitro2.430s (-1.6%)3.012s (~)0.582s101.03x
🐘 PostgresNext.js (Turbopack)2.480s3.012s0.532s101.06x
🌐 RedisNext.js (Turbopack)2.731s3.108s0.377s101.16x
💻 LocalNitro2.901s (+1.0%)3.341s (+7.5% 🔺)0.440s91.24x
💻 LocalExpress2.948s (-1.7%)3.308s (-7.2% 🟢)0.360s101.26x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.473s (+36.9% 🔺)5.099s (+33.9% 🔺)1.626s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.539s (-1.4%)4.014s (~)0.475s81.00x
🐘 PostgresNitro3.619s (~)4.013s (~)0.394s81.02x
🐘 PostgresNext.js (Turbopack)3.771s4.016s0.245s81.07x
🌐 RedisNext.js (Turbopack)4.173s4.868s0.695s71.18x
💻 LocalNitro8.268s (+1.8%)9.019s (+2.8%)0.751s42.34x
💻 LocalExpress8.483s (~)9.023s (~)0.540s42.40x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.366s (+10.6% 🔺)5.161s (+15.5% 🔺)1.795s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.215s (-3.5%)2.011s (~)0.797s151.00x
🐘 PostgresNext.js (Turbopack)1.240s2.011s0.771s151.02x
🐘 PostgresNitro1.267s (-0.8%)2.012s (~)0.745s151.04x
🌐 RedisNext.js (Turbopack)1.310s2.006s0.697s151.08x
💻 LocalExpress1.555s (+1.2%)2.006s (~)0.451s151.28x
💻 LocalNitro1.632s (+4.6%)2.073s (+3.3%)0.441s151.34x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.594s (+22.1% 🔺)3.961s (+7.3% 🔺)1.367s81.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.349s (-4.1%)3.012s (~)0.663s101.00x
🐘 PostgresNitro2.431s (-1.1%)3.013s (~)0.582s101.03x
🐘 PostgresNext.js (Turbopack)2.466s3.010s0.544s101.05x
🌐 RedisNext.js (Turbopack)2.681s3.108s0.427s101.14x
💻 LocalNitro3.067s (+1.3%)3.884s (+5.7% 🔺)0.818s81.31x
💻 LocalExpress3.177s (+4.8%)3.886s (+3.4%)0.709s81.35x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.965s (+14.6% 🔺)4.182s (+8.3% 🔺)1.217s81.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.518s (-2.3%)4.013s (~)0.495s81.00x
🐘 PostgresNitro3.556s (-1.7%)4.015s (~)0.458s81.01x
🐘 PostgresNext.js (Turbopack)3.754s4.015s0.261s81.07x
🌐 RedisNext.js (Turbopack)4.134s4.867s0.734s71.17x
💻 LocalNitro8.968s (+3.8%)9.271s (+2.8%)0.303s42.55x
💻 LocalExpress9.146s (+1.0%)9.772s (~)0.626s42.60x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.948s (+39.5% 🔺)5.897s (+33.1% 🔺)1.949s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.665s (-23.2% 🟢)1.009s (-1.6%)0.344s601.00x
🌐 RedisNext.js (Turbopack)0.679s1.005s0.326s601.02x
🐘 PostgresNext.js (Turbopack)0.843s1.044s0.200s581.27x
🐘 PostgresNitro0.900s (~)1.043s (~)0.143s581.35x
💻 LocalNitro0.989s (+3.4%)1.159s (+13.4% 🔺)0.170s521.49x
💻 LocalExpress0.989s (+0.6%)1.229s (+12.2% 🔺)0.240s491.49x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro10.144s (+6.3% 🔺)11.529s (+5.4% 🔺)1.385s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.597s (-24.5% 🟢)2.010s (-33.2% 🟢)0.413s451.00x
🌐 RedisNext.js (Turbopack)1.639s2.006s0.367s451.03x
🐘 PostgresNext.js (Turbopack)2.050s2.658s0.609s341.28x
🐘 PostgresNitro2.151s (~)3.012s (+1.1%)0.861s301.35x
💻 LocalNitro2.959s (~)3.111s (~)0.152s291.85x
💻 LocalExpress3.012s (~)3.508s (-1.1%)0.496s261.89x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro31.899s (+2.8%)33.848s (+4.2%)1.948s31.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)3.256s4.008s0.752s301.00x
🐘 PostgresExpress3.373s (-20.9% 🟢)4.014s (-19.3% 🟢)0.640s301.04x
🐘 PostgresNext.js (Turbopack)4.038s4.495s0.457s271.24x
🐘 PostgresNitro4.360s (+0.6%)5.014s (~)0.653s241.34x
💻 LocalExpress9.093s (-0.6%)9.633s (-1.6%)0.540s132.79x
💻 LocalNitro9.123s (+1.0%)9.788s (+3.3%)0.665s132.80x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro101.326s (+9.8% 🔺)103.336s (+9.7% 🔺)2.010s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.254s (-15.8% 🟢)1.009s (~)0.755s601.00x
🐘 PostgresNext.js (Turbopack)0.260s1.008s0.748s601.02x
🐘 PostgresNitro0.301s (+2.3%)1.009s (~)0.708s601.18x
🌐 RedisNext.js (Turbopack)0.404s1.004s0.600s601.59x
💻 LocalExpress0.581s (-3.7%)1.004s (~)0.424s602.28x
💻 LocalNitro0.603s (+0.8%)1.005s (~)0.402s602.37x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.418s (+4.3%)4.071s (+5.3% 🔺)1.652s151.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.434s (-17.7% 🟢)1.009s (~)0.575s901.00x
🐘 PostgresNext.js (Turbopack)0.522s1.009s0.486s901.20x
🐘 PostgresNitro0.525s (-2.5%)1.009s (~)0.484s901.21x
🌐 RedisNext.js (Turbopack)1.132s2.006s0.874s452.61x
💻 LocalExpress2.555s (-1.0%)3.009s (~)0.454s305.88x
💻 LocalNitro2.557s (+3.3%)3.009s (~)0.452s305.89x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.288s (+13.5% 🔺)4.816s (+14.2% 🔺)1.528s191.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.621s (-30.9% 🟢)1.009s (-3.1%)0.388s1191.00x
🐘 PostgresNext.js (Turbopack)0.848s1.027s0.179s1171.37x
🐘 PostgresNitro0.883s (-5.9% 🟢)1.068s (-10.4% 🟢)0.185s1131.42x
🌐 RedisNext.js (Turbopack)2.703s3.032s0.329s404.36x
💻 LocalExpress11.180s (-0.9%)11.844s (-1.5%)0.664s1118.01x
💻 LocalNitro11.609s (+4.4%)12.028s (+3.1%)0.419s1018.71x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro8.450s (+1.1%)10.227s (+4.9%)1.777s121.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.168s (-22.6% 🟢)0.999s (~)0.001s (+16.7% 🔺)1.013s (~)0.845s101.00x
🌐 RedisNext.js (Turbopack)0.188s0.999s0.002s1.007s0.819s101.12x
🐘 PostgresNext.js (Turbopack)0.199s1.001s0.001s1.012s0.812s101.19x
💻 LocalExpress0.200s (-2.3%)1.003s (~)0.012s (+0.8%)1.017s (~)0.818s101.19x
💻 LocalNitro0.201s (+2.1%)1.003s (~)0.012s (+3.4%)1.018s (~)0.817s101.20x
🐘 PostgresNitro0.207s (-13.5% 🟢)0.995s (~)0.001s (-14.3% 🟢)1.012s (~)0.805s101.23x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.722s (+4.3%)2.689s (~)0.582s (+9595.0% 🔺)3.850s (+17.6% 🔺)2.128s101.00x
▲ VercelExpress⚠️missing-----
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.475s1.000s0.003s1.011s0.536s601.00x
🐘 PostgresExpress0.578s (-16.7% 🟢)1.005s (~)0.003s (-13.3% 🟢)1.024s (~)0.446s591.21x
🐘 PostgresNext.js (Turbopack)0.654s1.009s0.005s1.026s0.372s591.37x
🐘 PostgresNitro0.681s (-5.8% 🟢)1.004s (~)0.009s (+153.1% 🔺)1.034s (+0.7%)0.354s591.43x
💻 LocalExpress0.733s (-5.6% 🟢)1.009s (-1.7%)0.010s (+6.8% 🔺)1.024s (-1.6%)0.291s591.54x
💻 LocalNitro0.744s (+2.4%)1.009s (~)0.009s (-0.7%)1.022s (~)0.278s591.56x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro4.730s (+9.3% 🔺)6.026s (+9.4% 🔺)0.192s (-26.5% 🟢)6.994s (+11.1% 🔺)2.265s91.00x
▲ VercelExpress⚠️missing-----
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.890s1.017s0.000s1.021s0.132s591.00x
🐘 PostgresExpress1.022s (+14.4% 🔺)1.578s (+45.7% 🔺)0.000s (+623.7% 🔺)1.590s (+43.9% 🔺)0.568s381.15x
🐘 PostgresNext.js (Turbopack)1.087s1.623s0.000s1.632s0.546s371.22x
🐘 PostgresNitro1.100s (+19.4% 🔺)1.868s (+75.8% 🔺)0.000s (-12.5% 🟢)1.886s (+74.5% 🔺)0.787s321.24x
💻 LocalExpress1.262s (~)2.021s (~)0.000s (-41.2% 🟢)2.024s (~)0.762s301.42x
💻 LocalNitro1.283s (+4.7%)2.022s (~)0.000s (-30.8% 🟢)2.025s (~)0.743s301.44x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.926s (+15.3% 🔺)3.896s (+21.2% 🔺)0.000s (+242.9% 🔺)4.547s (+21.0% 🔺)1.621s141.00x
▲ VercelExpress⚠️missing-----
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.573s2.001s0.000s2.006s0.434s301.00x
🐘 PostgresExpress1.953s (+8.3% 🔺)2.216s (+5.6% 🔺)0.000s (+Infinity% 🔺)2.226s (+5.0%)0.273s281.24x
🐘 PostgresNitro2.014s (+6.5% 🔺)2.475s (+11.5% 🔺)0.000s (-100.0% 🟢)2.493s (+11.3% 🔺)0.479s251.28x
🐘 PostgresNext.js (Turbopack)2.194s2.776s0.000s2.784s0.590s221.40x
💻 LocalExpress3.616s (+5.0% 🔺)4.098s (~)0.000s (-12.5% 🟢)4.102s (~)0.486s152.30x
💻 LocalNitro3.744s (+12.5% 🔺)4.166s (+5.0%)0.000s (+28.0% 🔺)4.171s (+5.0%)0.427s152.38x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro4.120s (+22.1% 🔺)4.819s (+6.2% 🔺)0.000s (+118.2% 🔺)5.554s (+9.3% 🔺)1.434s111.00x
▲ VercelExpress⚠️missing-----
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress15/21
🐘 PostgresExpress20/21
▲ VercelNitro21/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres20/21
Next.js (Turbopack)🌐 Redis12/21
Nitro🐘 Postgres16/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


Some benchmark jobs failed:

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

Check the workflow run for details.

@vercelvercelBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Additional Suggestion:

Missing esbuild dependency in @workflow/nest package.json causes runtime MODULE_NOT_FOUND error when calling buildVercelOutput().

Fix on Vercel

Comment threaddocs/content/docs/getting-started/nestjs.mdx Outdated
NestLocalBuilder.build() only generates runtime .mjs bundles for the
WorkflowController — no Vercel Build Output API functions are created.
VQS discovers consumers via experimentalTriggers in .vc-config.json,
so NestJS deployments silently fail with "no v2beta consumer".
Add buildVercelOutput() which generates:
- .well-known/workflow/v1/step.func with STEP_QUEUE_TRIGGER
- .well-known/workflow/v1/flow.func with WORKFLOW_QUEUE_TRIGGER
- .well-known/workflow/v1/webhook/[token].func
- api/index.js.func (esbuild-bundled NestJS app)
- config.json with routing rules
Also update NestJS getting-started docs and README with Vercel
deployment instructions.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
VaguelySeriousand others added 2 commits March 20, 2026 16:30
Add nest to the e2e-vercel-prod matrix in tests.yml with the correct
project ID (prj_G3RlX1TsB5V2hcqTNvuVoJXdfE1o) and slug
(workbench-nestjs-workflow).
Set up the workbench for Vercel Build Output API deployment:
- Add api/index.js entry point for the NestJS serverless function
- Add scripts/build-vercel.ts postbuild step calling buildVercelOutput()
- Update vercel.json with buildCommand
- Fix project slug in create-test-matrix.mjs
- Clear framework preset from "NestJS" to "Other" on Vercel project
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add a `build` subcommand to the workflow-nest CLI that builds workflow
bundles and, when VERCEL env is detected, automatically generates the
Build Output API with experimentalTriggers. The entry point is auto-
detected from api/index.js (or can be specified via --entry).
This replaces the need for a custom scripts/build-vercel.ts file —
users just add `"postbuild": "workflow-nest build"` to package.json.
Also document the Vercel project requirement: framework preset must be
set to "Other" (not "NestJS") to avoid conflicting with Build Output API.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
VaguelySeriousand others added 28 commits March 21, 2026 05:54
The workflow-nest build CLI copies manifest.json to dist/ during
postbuild. The app.module.ts reads it at module load time using
join(process.cwd(), 'dist', 'workflow-manifest.json'). On Vercel's
Lambda, CWD is the project root and dist/ is always NFT-included.
The globalThis.__workflowManifestJson value is read by the
WorkflowController as a fallback when readFileSync fails.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
NFT can't trace readFileSync with computed paths. But it DOES trace
dynamic import() with string literals. Generate a JS module
(dist/workflow-manifest.js) and use await import('./workflow-manifest.js')
in app.module.ts. NFT sees the static string and includes the file.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The env var may not be reaching the Lambda runtime. Force-set it
in app.module.ts at import time when VERCEL env is detected.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Top-level await may crash in the Vercel Lambda context. Use
createRequire(import.meta.url) for synchronous require() of
the manifest module.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SWC compiles app.module.ts to CJS. The createRequire require() can't
load ESM modules. Write the manifest module as CJS (module.exports)
instead of ESM (export default).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
With package.json type=module, .js files are ESM. CJS module.exports
in a .js file is misinterpreted. Use .cjs extension to force CJS.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ively
.cjs files may not be included by the NestJS Vercel preset. Use .json
which require() auto-parses and is universally included in dist/.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
In ESM modules, bare require() isn't available. createRequire creates
a require function that resolves relative to the file. The .json file
in dist/ IS copied to the Lambda by the NestJS Vercel preset (it
copies all of dist/). This approach works both locally and on Vercel.
Verified locally: globalThis.__workflowManifestJson is set correctly.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The fix:
1. prebuild: workflow-nest build generates .nestjs/workflow/manifest.json
2. nest-cli.json assets: copies manifest to dist/workflow/manifest.json
3. nest build: produces dist/ with the manifest included
4. app.module.ts: createRequire loads dist/workflow/manifest.json
5. NestJS Vercel preset includes ALL nest build output in Lambda
Key insight: nest build's assets copy runs during compilation, so the
manifest is part of the official dist/ output that the NestJS Vercel
preset deploys. No NFT tracing needed.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add configureManifest(json) to WorkflowController which sets the
manifest as a string constant. The controller checks this before
falling back to readFileSync. WorkflowModule.forRoot() accepts a
manifestJson option that calls configureManifest during setup.
In the workbench:
- prebuild generates manifest via workflow-nest build
- nest-cli.json assets copies it to dist/workflow/manifest.json
- app.module.ts loads it via createRequire and passes to forRoot()
- On Vercel, the controller serves the pre-loaded manifest directly
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The definitive fix for the manifest on Vercel:
1. prebuild: workflow-nest build generates src/_manifest-data.ts
containing the manifest as an exported string constant
2. nest build: SWC compiles it to dist/_manifest-data.js
3. app.module.ts: imports _manifest-data.js via standard ESM import
4. NFT traces the standard import and includes the compiled module
5. WorkflowModule.forRoot({ manifestJson }) passes it to the controller
This avoids ALL the previous issues:
- No readFileSync with untraceable paths
- No createRequire that NFT can't follow
- No .cjs/.json files that Vercel doesn't include
- The manifest is part of the standard compiled output
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The WorkflowController imports steps.mjs/workflows.mjs from outDir.
On Vercel, these need to be in the Lambda. NestJS CLI assets copies
them from .nestjs/workflow/ to dist/workflow/ during nest build. Set
outDir to dist/workflow/ on Vercel so the controller finds them.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…I for workflows
Use framework=null. Generate Build Output API for step/flow/webhook
with experimentalTriggers. Use api/index.js with @vercel/node and
includeFiles for the NestJS handler with the workflow bundles.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… functions
Go back to framework=nestjs. The NestJS preset + Build Output API
should coexist — the preset handles the NestJS handler, and the
Build Output API provides step/flow/webhook functions with
experimentalTriggers for VQS.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
On Vercel, the .mjs bundle files aren't in the Lambda (NFT can't
trace dynamic import(pathToFileURL(...))). Fix by:
1. CLI build generates _steps-bundle.ts, _workflows-bundle.ts,
_webhook-bundle.ts with base64-encoded bundle content
2. nest build compiles them → NFT traces standard imports
3. app.module.ts loads base64 data into globalThis
4. WorkflowController.loadBundle() tries filesystem first, then
decodes base64, writes to /tmp/, and imports from there
This makes workflow execution work on Vercel:
- VQS delivers to the NestJS handler (merged lambda)
- The handler's WorkflowController loads bundles from /tmp/
- Workflows execute successfully
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dynamic await import() is NOT traced by @vercel/nft. Static import
statements ARE traced. Change from:
const { data } = await import('./_steps-bundle.js') // NOT traced
to:
import { data } from './_steps-bundle.js' // TRACED by NFT
SWC preserves static import statements as-is in the compiled output.
This ensures dist/_steps-bundle.js is included in the Vercel Lambda.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The .mjs bundles import 'workflow' and other packages that resolve
from node_modules/. Writing to /tmp/ breaks package resolution.
Use process.cwd()/.wf_bundles so node_modules is in the parent chain.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Lambda is read-only except /tmp/. Write bundles to /tmp/ and
symlink node_modules from the project root so the bundles can
resolve packages like 'workflow'.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two fixes:
1. Generate Build Output API FIRST, then create TS bundle wrappers
from the self-contained CJS bundles (not the local .mjs ones)
2. Use .cjs extension when writing bundles to /tmp/ so Node.js
treats them as CJS regardless of package.json type
The BOA bundles have ALL dependencies inlined — no external package
resolution needed. This fixes 'Cannot find package workflow' error.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Static imports crash if the files don't exist during nest start
(local dev). Check in empty placeholders so they always exist.
The workflow-nest build CLI overwrites them with actual data.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…a outputs
With framework=nestjs, all functions merge into 1 lambda, losing
experimentalTriggers. With framework=null, Build Output API creates
separate lambda outputs for step, flow, webhook (with triggers) and
__nestjs (esbuild-bundled NestJS handler).
The esbuild step only runs in postbuild (when dist/ exists from nest
build). In prebuild, only workflow bundles and TS files are generated.
Config.json: webhook → handle:filesystem → handle:miss → catch-all
with check:true.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Sign up for freeto 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.

1 participant

@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
[nest] Add NestJS support on Vercel by VaguelySerious · Pull Request #1472 · vercel/workflow · GitHub
Skip to content

[nest] Add NestJS support on Vercel - #1472

Closed
VaguelySerious wants to merge 95 commits into
mainfrom
peter/nest-fix-mar-20
Closed

[nest] Add NestJS support on Vercel#1472
VaguelySerious wants to merge 95 commits into
mainfrom
peter/nest-fix-mar-20

Conversation

@VaguelySerious

@VaguelySeriousVaguelySerious commented Mar 20, 2026

Copy link
Copy Markdown
Member

Extends builder to bundle separate functions for app/flow/step routes with experimentalTriggers enabled, allowing queue callbacks when deployed to Vercel, and adds e2e tests for the Vercel environment.

Related:

@changeset-bot

changeset-botBot commented Mar 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5d7ef34

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

This PR includes changesets to release 16 packages
NameType
@workflow/nestPatch
workflowPatch
@workflow/aiPatch
@workflow/world-testingPatch
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/astroPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

vercelBot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production777367847
✅ 💻 Local Development7820142924
✅ 📦 Local Production7820142924
✅ 🐘 Local Postgres7820142924
✅ 🪟 Windows720577
❌ 🌍 Community Worlds1185621195
✅ 📋 Other198033231
Total3511595524122

❌ Failed Tests

▲ Vercel Production (3 failed)

hono (2 failed):

nuxt (1 failed):

  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMDYYDFB01BTRJWV0G6BM9Q0 | 🔍 observability
🌍 Community Worlds (56 failed)

mongodb (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMDYPNQCQF0P2A1KHX2DGAGD
  • webhookWorkflow | wrun_01KMDYQ4D90V2PW2AHJ6EPJX90
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMDYXKZ00QTQT1Z9CXMDBJ7S

redis (2 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMDYPNQCQF0P2A1KHX2DGAGD
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMDYXKZ00QTQT1Z9CXMDBJ7S

turso (51 failed):

  • addTenWorkflow | wrun_01KMDYNHM3VGEKP7NXJ9240102
  • addTenWorkflow | wrun_01KMDYNHM3VGEKP7NXJ9240102
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KMDYPV79A7BXN4DPWPCX6WWN
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KMDYNRANBQPHKC249W6THZ4P
  • promiseRaceWorkflow | wrun_01KMDYNWVBYZN8X1RV4329QN38
  • promiseAnyWorkflow | wrun_01KMDYNYZR398MDDX8Z76B1W84
  • importedStepOnlyWorkflow | wrun_01KMDYQ5H0WQAR7NSAK47CK327
  • hookWorkflow | wrun_01KMDYPBH4P5VJDNEX0W7Y3JQ3
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMDYPNQCQF0P2A1KHX2DGAGD
  • webhookWorkflow | wrun_01KMDYQ4D90V2PW2AHJ6EPJX90
  • sleepingWorkflow | wrun_01KMDYQBK6CV7NDVA59SKYGYVC
  • parallelSleepWorkflow | wrun_01KMDYQRNRVK3W4EFK37KWEZK8
  • nullByteWorkflow | wrun_01KMDYQX5F3A8B7NY0TGWNSVR7
  • workflowAndStepMetadataWorkflow | wrun_01KMDYR0F4B9S9GPFC7YH4EBXV
  • fetchWorkflow | wrun_01KMDYSTFC0FN37TJTPHTH87E8
  • promiseRaceStressTestWorkflow | wrun_01KMDYSY54AFHZ3916K3BCJ3HV
  • 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 | wrun_01KMDYWTSFT1AWC2X1YD0BRH7H
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMDYXKZ00QTQT1Z9CXMDBJ7S
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMDYYDFB01BTRJWV0G6BM9Q0
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KMDYZ20RQ2P9796YXAE7J3GJ
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KMDYZBE25VR14DDXF88ADEBS
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KMDYZK5NKVAMAQT3TV7KGT8A
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KMDYZP55RC0JKGVCF02PJG1A
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMDZ07FQHE5WK4421J1Y6YCZ
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KMDZ0E81K08X7CEK5KB5G73E
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KMDZ0KPJHJ3EWC4J9BGT0K9Y
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KMDZ0TPRSC9Q6YCKHX2X2DSW
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KMDZ11DYDVATRGCSJYVG4J4W
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KMDZ1888XYQ4C4JF0TRYMEVR
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KMDZ1G50ATZXXTZBK31HPVMP
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KMDZ1V5R4XE1WAKQ1NDDS30A
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KMDZ246Y3TVA9RK18FYQPSX0
  • cancelRun - cancelling a running workflow | wrun_01KMDZ2AYCED42T9HZPK32ESXZ
  • cancelRun via CLI - cancelling a running workflow | wrun_01KMDZ2M8PGXZ9KE5ZSE2H51N0
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KMDZ30ED1M4XX0VVF3YNCKYY
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KMDZ3NWX7TH9D6G5Q2S80KRC
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KMDZ408Q6ST32VK529QAKS6V

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro7007
✅ example7007
✅ express7007
✅ fastify7007
❌ hono6827
✅ nextjs-turbopack7502
✅ nextjs-webpack7502
✅ nitro7007
❌ nuxt6917
✅ sveltekit7007
✅ vite7007
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable66011
✅ express-stable66011
✅ fastify-stable66011
✅ hono-stable66011
✅ nextjs-turbopack-canary55022
✅ nextjs-turbopack-stable7205
✅ nextjs-webpack-canary55022
✅ nextjs-webpack-stable7205
✅ nitro-stable66011
✅ nuxt-stable66011
✅ sveltekit-stable66011
✅ vite-stable66011
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable66011
✅ express-stable66011
✅ fastify-stable66011
✅ hono-stable66011
✅ nextjs-turbopack-canary55022
✅ nextjs-turbopack-stable7205
✅ nextjs-webpack-canary55022
✅ nextjs-webpack-stable7205
✅ nitro-stable66011
✅ nuxt-stable66011
✅ sveltekit-stable66011
✅ vite-stable66011
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable66011
✅ express-stable66011
✅ fastify-stable66011
✅ hono-stable66011
✅ nextjs-turbopack-canary55022
✅ nextjs-turbopack-stable7205
✅ nextjs-webpack-canary55022
✅ nextjs-webpack-stable7205
✅ nitro-stable66011
✅ nuxt-stable66011
✅ sveltekit-stable66011
✅ vite-stable66011
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack7205
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev302
❌ mongodb5235
✅ redis-dev302
❌ redis5325
✅ turso-dev302
❌ turso4515
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable66011
✅ e2e-local-postgres-nest-stable66011
✅ e2e-local-prod-nest-stable66011

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

@github-actions

github-actionsBot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.043s (-4.0%)1.005s (~)0.962s101.00x
💻 LocalNitro0.043s (-8.4% 🟢)1.005s (~)0.962s101.01x
🌐 RedisNext.js (Turbopack)0.053s1.006s0.953s101.23x
🐘 PostgresNext.js (Turbopack)0.058s1.012s0.954s101.34x
🐘 PostgresNitro0.061s (-11.5% 🟢)1.012s (~)0.951s101.43x
🐘 PostgresExpress0.076s (+7.0% 🔺)1.028s (+1.1%)0.952s101.77x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.472s (-4.9%)2.714s (+6.7% 🔺)2.242s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.123s (-1.4%)2.014s (~)0.890s101.00x
🌐 RedisNext.js (Turbopack)1.123s2.007s0.884s101.00x
💻 LocalExpress1.125s (~)2.006s (~)0.881s101.00x
💻 LocalNitro1.130s (~)2.006s (~)0.876s101.01x
🐘 PostgresNitro1.149s (+0.6%)2.013s (~)0.863s101.02x
🐘 PostgresNext.js (Turbopack)1.153s2.013s0.860s101.03x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.139s (-8.5% 🟢)3.701s (-4.5%)1.562s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express10.755s (-1.4%)11.040s (~)0.285s31.00x
🌐 RedisNext.js (Turbopack)10.794s11.022s0.229s31.00x
🐘 PostgresNext.js (Turbopack)10.886s11.043s0.157s31.01x
💻 LocalExpress10.915s (~)11.023s (~)0.108s31.01x
💻 LocalNitro10.947s (~)11.024s (~)0.077s31.02x
🐘 PostgresNitro10.994s (~)11.376s (+3.0%)0.383s31.02x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.359s (~)19.980s (+5.9% 🔺)2.621s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express14.188s (-2.7%)15.042s (~)0.854s41.00x
🌐 RedisNext.js (Turbopack)14.198s15.028s0.830s41.00x
🐘 PostgresNext.js (Turbopack)14.484s15.042s0.558s41.02x
🐘 PostgresNitro14.772s (~)15.045s (~)0.274s41.04x
💻 LocalExpress14.923s (-0.5%)15.029s (-3.2%)0.106s41.05x
💻 LocalNitro14.942s (~)15.029s (~)0.087s41.05x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro38.029s (+17.6% 🔺)40.139s (+15.5% 🔺)2.110s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express13.360s (-4.7%)14.043s (-2.9%)0.682s71.00x
🌐 RedisNext.js (Turbopack)13.429s14.025s0.597s71.01x
🐘 PostgresNext.js (Turbopack)13.796s14.036s0.240s71.03x
🐘 PostgresNitro14.299s (~)15.040s (~)0.741s61.07x
💻 LocalExpress16.611s (~)17.029s (~)0.417s61.24x
💻 LocalNitro16.628s (+1.0%)17.031s (~)0.403s61.24x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro60.687s (+7.9% 🔺)62.475s (+9.1% 🔺)1.788s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.213s (-4.2%)2.011s (~)0.798s151.00x
🐘 PostgresNext.js (Turbopack)1.265s2.012s0.746s151.04x
🐘 PostgresNitro1.281s (-0.9%)2.011s (~)0.730s151.06x
🌐 RedisNext.js (Turbopack)1.396s2.006s0.611s151.15x
💻 LocalExpress1.504s (~)2.005s (~)0.501s151.24x
💻 LocalNitro1.517s (+2.3%)2.005s (~)0.488s151.25x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.535s (-3.2%)4.036s (-3.9%)1.501s81.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.348s (-4.6%)3.012s (~)0.664s101.00x
🐘 PostgresNitro2.430s (-1.6%)3.012s (~)0.582s101.03x
🐘 PostgresNext.js (Turbopack)2.480s3.012s0.532s101.06x
🌐 RedisNext.js (Turbopack)2.731s3.108s0.377s101.16x
💻 LocalNitro2.901s (+1.0%)3.341s (+7.5% 🔺)0.440s91.24x
💻 LocalExpress2.948s (-1.7%)3.308s (-7.2% 🟢)0.360s101.26x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.473s (+36.9% 🔺)5.099s (+33.9% 🔺)1.626s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.539s (-1.4%)4.014s (~)0.475s81.00x
🐘 PostgresNitro3.619s (~)4.013s (~)0.394s81.02x
🐘 PostgresNext.js (Turbopack)3.771s4.016s0.245s81.07x
🌐 RedisNext.js (Turbopack)4.173s4.868s0.695s71.18x
💻 LocalNitro8.268s (+1.8%)9.019s (+2.8%)0.751s42.34x
💻 LocalExpress8.483s (~)9.023s (~)0.540s42.40x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.366s (+10.6% 🔺)5.161s (+15.5% 🔺)1.795s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.215s (-3.5%)2.011s (~)0.797s151.00x
🐘 PostgresNext.js (Turbopack)1.240s2.011s0.771s151.02x
🐘 PostgresNitro1.267s (-0.8%)2.012s (~)0.745s151.04x
🌐 RedisNext.js (Turbopack)1.310s2.006s0.697s151.08x
💻 LocalExpress1.555s (+1.2%)2.006s (~)0.451s151.28x
💻 LocalNitro1.632s (+4.6%)2.073s (+3.3%)0.441s151.34x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.594s (+22.1% 🔺)3.961s (+7.3% 🔺)1.367s81.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.349s (-4.1%)3.012s (~)0.663s101.00x
🐘 PostgresNitro2.431s (-1.1%)3.013s (~)0.582s101.03x
🐘 PostgresNext.js (Turbopack)2.466s3.010s0.544s101.05x
🌐 RedisNext.js (Turbopack)2.681s3.108s0.427s101.14x
💻 LocalNitro3.067s (+1.3%)3.884s (+5.7% 🔺)0.818s81.31x
💻 LocalExpress3.177s (+4.8%)3.886s (+3.4%)0.709s81.35x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.965s (+14.6% 🔺)4.182s (+8.3% 🔺)1.217s81.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.518s (-2.3%)4.013s (~)0.495s81.00x
🐘 PostgresNitro3.556s (-1.7%)4.015s (~)0.458s81.01x
🐘 PostgresNext.js (Turbopack)3.754s4.015s0.261s81.07x
🌐 RedisNext.js (Turbopack)4.134s4.867s0.734s71.17x
💻 LocalNitro8.968s (+3.8%)9.271s (+2.8%)0.303s42.55x
💻 LocalExpress9.146s (+1.0%)9.772s (~)0.626s42.60x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.948s (+39.5% 🔺)5.897s (+33.1% 🔺)1.949s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.665s (-23.2% 🟢)1.009s (-1.6%)0.344s601.00x
🌐 RedisNext.js (Turbopack)0.679s1.005s0.326s601.02x
🐘 PostgresNext.js (Turbopack)0.843s1.044s0.200s581.27x
🐘 PostgresNitro0.900s (~)1.043s (~)0.143s581.35x
💻 LocalNitro0.989s (+3.4%)1.159s (+13.4% 🔺)0.170s521.49x
💻 LocalExpress0.989s (+0.6%)1.229s (+12.2% 🔺)0.240s491.49x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro10.144s (+6.3% 🔺)11.529s (+5.4% 🔺)1.385s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.597s (-24.5% 🟢)2.010s (-33.2% 🟢)0.413s451.00x
🌐 RedisNext.js (Turbopack)1.639s2.006s0.367s451.03x
🐘 PostgresNext.js (Turbopack)2.050s2.658s0.609s341.28x
🐘 PostgresNitro2.151s (~)3.012s (+1.1%)0.861s301.35x
💻 LocalNitro2.959s (~)3.111s (~)0.152s291.85x
💻 LocalExpress3.012s (~)3.508s (-1.1%)0.496s261.89x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro31.899s (+2.8%)33.848s (+4.2%)1.948s31.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)3.256s4.008s0.752s301.00x
🐘 PostgresExpress3.373s (-20.9% 🟢)4.014s (-19.3% 🟢)0.640s301.04x
🐘 PostgresNext.js (Turbopack)4.038s4.495s0.457s271.24x
🐘 PostgresNitro4.360s (+0.6%)5.014s (~)0.653s241.34x
💻 LocalExpress9.093s (-0.6%)9.633s (-1.6%)0.540s132.79x
💻 LocalNitro9.123s (+1.0%)9.788s (+3.3%)0.665s132.80x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro101.326s (+9.8% 🔺)103.336s (+9.7% 🔺)2.010s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.254s (-15.8% 🟢)1.009s (~)0.755s601.00x
🐘 PostgresNext.js (Turbopack)0.260s1.008s0.748s601.02x
🐘 PostgresNitro0.301s (+2.3%)1.009s (~)0.708s601.18x
🌐 RedisNext.js (Turbopack)0.404s1.004s0.600s601.59x
💻 LocalExpress0.581s (-3.7%)1.004s (~)0.424s602.28x
💻 LocalNitro0.603s (+0.8%)1.005s (~)0.402s602.37x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.418s (+4.3%)4.071s (+5.3% 🔺)1.652s151.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.434s (-17.7% 🟢)1.009s (~)0.575s901.00x
🐘 PostgresNext.js (Turbopack)0.522s1.009s0.486s901.20x
🐘 PostgresNitro0.525s (-2.5%)1.009s (~)0.484s901.21x
🌐 RedisNext.js (Turbopack)1.132s2.006s0.874s452.61x
💻 LocalExpress2.555s (-1.0%)3.009s (~)0.454s305.88x
💻 LocalNitro2.557s (+3.3%)3.009s (~)0.452s305.89x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.288s (+13.5% 🔺)4.816s (+14.2% 🔺)1.528s191.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.621s (-30.9% 🟢)1.009s (-3.1%)0.388s1191.00x
🐘 PostgresNext.js (Turbopack)0.848s1.027s0.179s1171.37x
🐘 PostgresNitro0.883s (-5.9% 🟢)1.068s (-10.4% 🟢)0.185s1131.42x
🌐 RedisNext.js (Turbopack)2.703s3.032s0.329s404.36x
💻 LocalExpress11.180s (-0.9%)11.844s (-1.5%)0.664s1118.01x
💻 LocalNitro11.609s (+4.4%)12.028s (+3.1%)0.419s1018.71x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro8.450s (+1.1%)10.227s (+4.9%)1.777s121.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.168s (-22.6% 🟢)0.999s (~)0.001s (+16.7% 🔺)1.013s (~)0.845s101.00x
🌐 RedisNext.js (Turbopack)0.188s0.999s0.002s1.007s0.819s101.12x
🐘 PostgresNext.js (Turbopack)0.199s1.001s0.001s1.012s0.812s101.19x
💻 LocalExpress0.200s (-2.3%)1.003s (~)0.012s (+0.8%)1.017s (~)0.818s101.19x
💻 LocalNitro0.201s (+2.1%)1.003s (~)0.012s (+3.4%)1.018s (~)0.817s101.20x
🐘 PostgresNitro0.207s (-13.5% 🟢)0.995s (~)0.001s (-14.3% 🟢)1.012s (~)0.805s101.23x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.722s (+4.3%)2.689s (~)0.582s (+9595.0% 🔺)3.850s (+17.6% 🔺)2.128s101.00x
▲ VercelExpress⚠️missing-----
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.475s1.000s0.003s1.011s0.536s601.00x
🐘 PostgresExpress0.578s (-16.7% 🟢)1.005s (~)0.003s (-13.3% 🟢)1.024s (~)0.446s591.21x
🐘 PostgresNext.js (Turbopack)0.654s1.009s0.005s1.026s0.372s591.37x
🐘 PostgresNitro0.681s (-5.8% 🟢)1.004s (~)0.009s (+153.1% 🔺)1.034s (+0.7%)0.354s591.43x
💻 LocalExpress0.733s (-5.6% 🟢)1.009s (-1.7%)0.010s (+6.8% 🔺)1.024s (-1.6%)0.291s591.54x
💻 LocalNitro0.744s (+2.4%)1.009s (~)0.009s (-0.7%)1.022s (~)0.278s591.56x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro4.730s (+9.3% 🔺)6.026s (+9.4% 🔺)0.192s (-26.5% 🟢)6.994s (+11.1% 🔺)2.265s91.00x
▲ VercelExpress⚠️missing-----
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.890s1.017s0.000s1.021s0.132s591.00x
🐘 PostgresExpress1.022s (+14.4% 🔺)1.578s (+45.7% 🔺)0.000s (+623.7% 🔺)1.590s (+43.9% 🔺)0.568s381.15x
🐘 PostgresNext.js (Turbopack)1.087s1.623s0.000s1.632s0.546s371.22x
🐘 PostgresNitro1.100s (+19.4% 🔺)1.868s (+75.8% 🔺)0.000s (-12.5% 🟢)1.886s (+74.5% 🔺)0.787s321.24x
💻 LocalExpress1.262s (~)2.021s (~)0.000s (-41.2% 🟢)2.024s (~)0.762s301.42x
💻 LocalNitro1.283s (+4.7%)2.022s (~)0.000s (-30.8% 🟢)2.025s (~)0.743s301.44x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.926s (+15.3% 🔺)3.896s (+21.2% 🔺)0.000s (+242.9% 🔺)4.547s (+21.0% 🔺)1.621s141.00x
▲ VercelExpress⚠️missing-----
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.573s2.001s0.000s2.006s0.434s301.00x
🐘 PostgresExpress1.953s (+8.3% 🔺)2.216s (+5.6% 🔺)0.000s (+Infinity% 🔺)2.226s (+5.0%)0.273s281.24x
🐘 PostgresNitro2.014s (+6.5% 🔺)2.475s (+11.5% 🔺)0.000s (-100.0% 🟢)2.493s (+11.3% 🔺)0.479s251.28x
🐘 PostgresNext.js (Turbopack)2.194s2.776s0.000s2.784s0.590s221.40x
💻 LocalExpress3.616s (+5.0% 🔺)4.098s (~)0.000s (-12.5% 🟢)4.102s (~)0.486s152.30x
💻 LocalNitro3.744s (+12.5% 🔺)4.166s (+5.0%)0.000s (+28.0% 🔺)4.171s (+5.0%)0.427s152.38x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro4.120s (+22.1% 🔺)4.819s (+6.2% 🔺)0.000s (+118.2% 🔺)5.554s (+9.3% 🔺)1.434s111.00x
▲ VercelExpress⚠️missing-----
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress15/21
🐘 PostgresExpress20/21
▲ VercelNitro21/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres20/21
Next.js (Turbopack)🌐 Redis12/21
Nitro🐘 Postgres16/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


Some benchmark jobs failed:

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

Check the workflow run for details.

@vercelvercelBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Additional Suggestion:

Missing esbuild dependency in @workflow/nest package.json causes runtime MODULE_NOT_FOUND error when calling buildVercelOutput().

Fix on Vercel

Comment threaddocs/content/docs/getting-started/nestjs.mdx Outdated
NestLocalBuilder.build() only generates runtime .mjs bundles for the
WorkflowController — no Vercel Build Output API functions are created.
VQS discovers consumers via experimentalTriggers in .vc-config.json,
so NestJS deployments silently fail with "no v2beta consumer".
Add buildVercelOutput() which generates:
- .well-known/workflow/v1/step.func with STEP_QUEUE_TRIGGER
- .well-known/workflow/v1/flow.func with WORKFLOW_QUEUE_TRIGGER
- .well-known/workflow/v1/webhook/[token].func
- api/index.js.func (esbuild-bundled NestJS app)
- config.json with routing rules
Also update NestJS getting-started docs and README with Vercel
deployment instructions.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
VaguelySeriousand others added 2 commits March 20, 2026 16:30
Add nest to the e2e-vercel-prod matrix in tests.yml with the correct
project ID (prj_G3RlX1TsB5V2hcqTNvuVoJXdfE1o) and slug
(workbench-nestjs-workflow).
Set up the workbench for Vercel Build Output API deployment:
- Add api/index.js entry point for the NestJS serverless function
- Add scripts/build-vercel.ts postbuild step calling buildVercelOutput()
- Update vercel.json with buildCommand
- Fix project slug in create-test-matrix.mjs
- Clear framework preset from "NestJS" to "Other" on Vercel project
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add a `build` subcommand to the workflow-nest CLI that builds workflow
bundles and, when VERCEL env is detected, automatically generates the
Build Output API with experimentalTriggers. The entry point is auto-
detected from api/index.js (or can be specified via --entry).
This replaces the need for a custom scripts/build-vercel.ts file —
users just add `"postbuild": "workflow-nest build"` to package.json.
Also document the Vercel project requirement: framework preset must be
set to "Other" (not "NestJS") to avoid conflicting with Build Output API.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
VaguelySeriousand others added 28 commits March 21, 2026 05:54
The workflow-nest build CLI copies manifest.json to dist/ during
postbuild. The app.module.ts reads it at module load time using
join(process.cwd(), 'dist', 'workflow-manifest.json'). On Vercel's
Lambda, CWD is the project root and dist/ is always NFT-included.
The globalThis.__workflowManifestJson value is read by the
WorkflowController as a fallback when readFileSync fails.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
NFT can't trace readFileSync with computed paths. But it DOES trace
dynamic import() with string literals. Generate a JS module
(dist/workflow-manifest.js) and use await import('./workflow-manifest.js')
in app.module.ts. NFT sees the static string and includes the file.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The env var may not be reaching the Lambda runtime. Force-set it
in app.module.ts at import time when VERCEL env is detected.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Top-level await may crash in the Vercel Lambda context. Use
createRequire(import.meta.url) for synchronous require() of
the manifest module.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SWC compiles app.module.ts to CJS. The createRequire require() can't
load ESM modules. Write the manifest module as CJS (module.exports)
instead of ESM (export default).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
With package.json type=module, .js files are ESM. CJS module.exports
in a .js file is misinterpreted. Use .cjs extension to force CJS.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ively
.cjs files may not be included by the NestJS Vercel preset. Use .json
which require() auto-parses and is universally included in dist/.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
In ESM modules, bare require() isn't available. createRequire creates
a require function that resolves relative to the file. The .json file
in dist/ IS copied to the Lambda by the NestJS Vercel preset (it
copies all of dist/). This approach works both locally and on Vercel.
Verified locally: globalThis.__workflowManifestJson is set correctly.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The fix:
1. prebuild: workflow-nest build generates .nestjs/workflow/manifest.json
2. nest-cli.json assets: copies manifest to dist/workflow/manifest.json
3. nest build: produces dist/ with the manifest included
4. app.module.ts: createRequire loads dist/workflow/manifest.json
5. NestJS Vercel preset includes ALL nest build output in Lambda
Key insight: nest build's assets copy runs during compilation, so the
manifest is part of the official dist/ output that the NestJS Vercel
preset deploys. No NFT tracing needed.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add configureManifest(json) to WorkflowController which sets the
manifest as a string constant. The controller checks this before
falling back to readFileSync. WorkflowModule.forRoot() accepts a
manifestJson option that calls configureManifest during setup.
In the workbench:
- prebuild generates manifest via workflow-nest build
- nest-cli.json assets copies it to dist/workflow/manifest.json
- app.module.ts loads it via createRequire and passes to forRoot()
- On Vercel, the controller serves the pre-loaded manifest directly
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The definitive fix for the manifest on Vercel:
1. prebuild: workflow-nest build generates src/_manifest-data.ts
containing the manifest as an exported string constant
2. nest build: SWC compiles it to dist/_manifest-data.js
3. app.module.ts: imports _manifest-data.js via standard ESM import
4. NFT traces the standard import and includes the compiled module
5. WorkflowModule.forRoot({ manifestJson }) passes it to the controller
This avoids ALL the previous issues:
- No readFileSync with untraceable paths
- No createRequire that NFT can't follow
- No .cjs/.json files that Vercel doesn't include
- The manifest is part of the standard compiled output
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The WorkflowController imports steps.mjs/workflows.mjs from outDir.
On Vercel, these need to be in the Lambda. NestJS CLI assets copies
them from .nestjs/workflow/ to dist/workflow/ during nest build. Set
outDir to dist/workflow/ on Vercel so the controller finds them.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…I for workflows
Use framework=null. Generate Build Output API for step/flow/webhook
with experimentalTriggers. Use api/index.js with @vercel/node and
includeFiles for the NestJS handler with the workflow bundles.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… functions
Go back to framework=nestjs. The NestJS preset + Build Output API
should coexist — the preset handles the NestJS handler, and the
Build Output API provides step/flow/webhook functions with
experimentalTriggers for VQS.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
On Vercel, the .mjs bundle files aren't in the Lambda (NFT can't
trace dynamic import(pathToFileURL(...))). Fix by:
1. CLI build generates _steps-bundle.ts, _workflows-bundle.ts,
_webhook-bundle.ts with base64-encoded bundle content
2. nest build compiles them → NFT traces standard imports
3. app.module.ts loads base64 data into globalThis
4. WorkflowController.loadBundle() tries filesystem first, then
decodes base64, writes to /tmp/, and imports from there
This makes workflow execution work on Vercel:
- VQS delivers to the NestJS handler (merged lambda)
- The handler's WorkflowController loads bundles from /tmp/
- Workflows execute successfully
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dynamic await import() is NOT traced by @vercel/nft. Static import
statements ARE traced. Change from:
const { data } = await import('./_steps-bundle.js') // NOT traced
to:
import { data } from './_steps-bundle.js' // TRACED by NFT
SWC preserves static import statements as-is in the compiled output.
This ensures dist/_steps-bundle.js is included in the Vercel Lambda.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The .mjs bundles import 'workflow' and other packages that resolve
from node_modules/. Writing to /tmp/ breaks package resolution.
Use process.cwd()/.wf_bundles so node_modules is in the parent chain.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Lambda is read-only except /tmp/. Write bundles to /tmp/ and
symlink node_modules from the project root so the bundles can
resolve packages like 'workflow'.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two fixes:
1. Generate Build Output API FIRST, then create TS bundle wrappers
from the self-contained CJS bundles (not the local .mjs ones)
2. Use .cjs extension when writing bundles to /tmp/ so Node.js
treats them as CJS regardless of package.json type
The BOA bundles have ALL dependencies inlined — no external package
resolution needed. This fixes 'Cannot find package workflow' error.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Static imports crash if the files don't exist during nest start
(local dev). Check in empty placeholders so they always exist.
The workflow-nest build CLI overwrites them with actual data.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…a outputs
With framework=nestjs, all functions merge into 1 lambda, losing
experimentalTriggers. With framework=null, Build Output API creates
separate lambda outputs for step, flow, webhook (with triggers) and
__nestjs (esbuild-bundled NestJS handler).
The esbuild step only runs in postbuild (when dist/ exists from nest
build). In prebuild, only workflow bundles and TS files are generated.
Config.json: webhook → handle:filesystem → handle:miss → catch-all
with check:true.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Sign up for freeto 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.

1 participant

@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' [nest] Add NestJS support on Vercel by VaguelySerious · Pull Request #1472 · vercel/workflow · GitHub
Skip to content

[nest] Add NestJS support on Vercel - #1472

Closed
VaguelySerious wants to merge 95 commits into
mainfrom
peter/nest-fix-mar-20
Closed

[nest] Add NestJS support on Vercel#1472
VaguelySerious wants to merge 95 commits into
mainfrom
peter/nest-fix-mar-20

Conversation

@VaguelySerious

@VaguelySeriousVaguelySerious commented Mar 20, 2026

Copy link
Copy Markdown
Member

Extends builder to bundle separate functions for app/flow/step routes with experimentalTriggers enabled, allowing queue callbacks when deployed to Vercel, and adds e2e tests for the Vercel environment.

Related:

@changeset-bot

changeset-botBot commented Mar 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5d7ef34

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

This PR includes changesets to release 16 packages
NameType
@workflow/nestPatch
workflowPatch
@workflow/aiPatch
@workflow/world-testingPatch
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/astroPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

vercelBot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production777367847
✅ 💻 Local Development7820142924
✅ 📦 Local Production7820142924
✅ 🐘 Local Postgres7820142924
✅ 🪟 Windows720577
❌ 🌍 Community Worlds1185621195
✅ 📋 Other198033231
Total3511595524122

❌ Failed Tests

▲ Vercel Production (3 failed)

hono (2 failed):

nuxt (1 failed):

  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMDYYDFB01BTRJWV0G6BM9Q0 | 🔍 observability
🌍 Community Worlds (56 failed)

mongodb (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMDYPNQCQF0P2A1KHX2DGAGD
  • webhookWorkflow | wrun_01KMDYQ4D90V2PW2AHJ6EPJX90
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMDYXKZ00QTQT1Z9CXMDBJ7S

redis (2 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMDYPNQCQF0P2A1KHX2DGAGD
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMDYXKZ00QTQT1Z9CXMDBJ7S

turso (51 failed):

  • addTenWorkflow | wrun_01KMDYNHM3VGEKP7NXJ9240102
  • addTenWorkflow | wrun_01KMDYNHM3VGEKP7NXJ9240102
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KMDYPV79A7BXN4DPWPCX6WWN
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KMDYNRANBQPHKC249W6THZ4P
  • promiseRaceWorkflow | wrun_01KMDYNWVBYZN8X1RV4329QN38
  • promiseAnyWorkflow | wrun_01KMDYNYZR398MDDX8Z76B1W84
  • importedStepOnlyWorkflow | wrun_01KMDYQ5H0WQAR7NSAK47CK327
  • hookWorkflow | wrun_01KMDYPBH4P5VJDNEX0W7Y3JQ3
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMDYPNQCQF0P2A1KHX2DGAGD
  • webhookWorkflow | wrun_01KMDYQ4D90V2PW2AHJ6EPJX90
  • sleepingWorkflow | wrun_01KMDYQBK6CV7NDVA59SKYGYVC
  • parallelSleepWorkflow | wrun_01KMDYQRNRVK3W4EFK37KWEZK8
  • nullByteWorkflow | wrun_01KMDYQX5F3A8B7NY0TGWNSVR7
  • workflowAndStepMetadataWorkflow | wrun_01KMDYR0F4B9S9GPFC7YH4EBXV
  • fetchWorkflow | wrun_01KMDYSTFC0FN37TJTPHTH87E8
  • promiseRaceStressTestWorkflow | wrun_01KMDYSY54AFHZ3916K3BCJ3HV
  • 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 | wrun_01KMDYWTSFT1AWC2X1YD0BRH7H
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMDYXKZ00QTQT1Z9CXMDBJ7S
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMDYYDFB01BTRJWV0G6BM9Q0
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KMDYZ20RQ2P9796YXAE7J3GJ
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KMDYZBE25VR14DDXF88ADEBS
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KMDYZK5NKVAMAQT3TV7KGT8A
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KMDYZP55RC0JKGVCF02PJG1A
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMDZ07FQHE5WK4421J1Y6YCZ
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KMDZ0E81K08X7CEK5KB5G73E
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KMDZ0KPJHJ3EWC4J9BGT0K9Y
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KMDZ0TPRSC9Q6YCKHX2X2DSW
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KMDZ11DYDVATRGCSJYVG4J4W
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KMDZ1888XYQ4C4JF0TRYMEVR
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KMDZ1G50ATZXXTZBK31HPVMP
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KMDZ1V5R4XE1WAKQ1NDDS30A
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KMDZ246Y3TVA9RK18FYQPSX0
  • cancelRun - cancelling a running workflow | wrun_01KMDZ2AYCED42T9HZPK32ESXZ
  • cancelRun via CLI - cancelling a running workflow | wrun_01KMDZ2M8PGXZ9KE5ZSE2H51N0
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KMDZ30ED1M4XX0VVF3YNCKYY
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KMDZ3NWX7TH9D6G5Q2S80KRC
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KMDZ408Q6ST32VK529QAKS6V

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro7007
✅ example7007
✅ express7007
✅ fastify7007
❌ hono6827
✅ nextjs-turbopack7502
✅ nextjs-webpack7502
✅ nitro7007
❌ nuxt6917
✅ sveltekit7007
✅ vite7007
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable66011
✅ express-stable66011
✅ fastify-stable66011
✅ hono-stable66011
✅ nextjs-turbopack-canary55022
✅ nextjs-turbopack-stable7205
✅ nextjs-webpack-canary55022
✅ nextjs-webpack-stable7205
✅ nitro-stable66011
✅ nuxt-stable66011
✅ sveltekit-stable66011
✅ vite-stable66011
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable66011
✅ express-stable66011
✅ fastify-stable66011
✅ hono-stable66011
✅ nextjs-turbopack-canary55022
✅ nextjs-turbopack-stable7205
✅ nextjs-webpack-canary55022
✅ nextjs-webpack-stable7205
✅ nitro-stable66011
✅ nuxt-stable66011
✅ sveltekit-stable66011
✅ vite-stable66011
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable66011
✅ express-stable66011
✅ fastify-stable66011
✅ hono-stable66011
✅ nextjs-turbopack-canary55022
✅ nextjs-turbopack-stable7205
✅ nextjs-webpack-canary55022
✅ nextjs-webpack-stable7205
✅ nitro-stable66011
✅ nuxt-stable66011
✅ sveltekit-stable66011
✅ vite-stable66011
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack7205
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev302
❌ mongodb5235
✅ redis-dev302
❌ redis5325
✅ turso-dev302
❌ turso4515
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable66011
✅ e2e-local-postgres-nest-stable66011
✅ e2e-local-prod-nest-stable66011

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

@github-actions

github-actionsBot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.043s (-4.0%)1.005s (~)0.962s101.00x
💻 LocalNitro0.043s (-8.4% 🟢)1.005s (~)0.962s101.01x
🌐 RedisNext.js (Turbopack)0.053s1.006s0.953s101.23x
🐘 PostgresNext.js (Turbopack)0.058s1.012s0.954s101.34x
🐘 PostgresNitro0.061s (-11.5% 🟢)1.012s (~)0.951s101.43x
🐘 PostgresExpress0.076s (+7.0% 🔺)1.028s (+1.1%)0.952s101.77x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.472s (-4.9%)2.714s (+6.7% 🔺)2.242s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.123s (-1.4%)2.014s (~)0.890s101.00x
🌐 RedisNext.js (Turbopack)1.123s2.007s0.884s101.00x
💻 LocalExpress1.125s (~)2.006s (~)0.881s101.00x
💻 LocalNitro1.130s (~)2.006s (~)0.876s101.01x
🐘 PostgresNitro1.149s (+0.6%)2.013s (~)0.863s101.02x
🐘 PostgresNext.js (Turbopack)1.153s2.013s0.860s101.03x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.139s (-8.5% 🟢)3.701s (-4.5%)1.562s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express10.755s (-1.4%)11.040s (~)0.285s31.00x
🌐 RedisNext.js (Turbopack)10.794s11.022s0.229s31.00x
🐘 PostgresNext.js (Turbopack)10.886s11.043s0.157s31.01x
💻 LocalExpress10.915s (~)11.023s (~)0.108s31.01x
💻 LocalNitro10.947s (~)11.024s (~)0.077s31.02x
🐘 PostgresNitro10.994s (~)11.376s (+3.0%)0.383s31.02x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.359s (~)19.980s (+5.9% 🔺)2.621s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express14.188s (-2.7%)15.042s (~)0.854s41.00x
🌐 RedisNext.js (Turbopack)14.198s15.028s0.830s41.00x
🐘 PostgresNext.js (Turbopack)14.484s15.042s0.558s41.02x
🐘 PostgresNitro14.772s (~)15.045s (~)0.274s41.04x
💻 LocalExpress14.923s (-0.5%)15.029s (-3.2%)0.106s41.05x
💻 LocalNitro14.942s (~)15.029s (~)0.087s41.05x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro38.029s (+17.6% 🔺)40.139s (+15.5% 🔺)2.110s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express13.360s (-4.7%)14.043s (-2.9%)0.682s71.00x
🌐 RedisNext.js (Turbopack)13.429s14.025s0.597s71.01x
🐘 PostgresNext.js (Turbopack)13.796s14.036s0.240s71.03x
🐘 PostgresNitro14.299s (~)15.040s (~)0.741s61.07x
💻 LocalExpress16.611s (~)17.029s (~)0.417s61.24x
💻 LocalNitro16.628s (+1.0%)17.031s (~)0.403s61.24x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro60.687s (+7.9% 🔺)62.475s (+9.1% 🔺)1.788s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.213s (-4.2%)2.011s (~)0.798s151.00x
🐘 PostgresNext.js (Turbopack)1.265s2.012s0.746s151.04x
🐘 PostgresNitro1.281s (-0.9%)2.011s (~)0.730s151.06x
🌐 RedisNext.js (Turbopack)1.396s2.006s0.611s151.15x
💻 LocalExpress1.504s (~)2.005s (~)0.501s151.24x
💻 LocalNitro1.517s (+2.3%)2.005s (~)0.488s151.25x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.535s (-3.2%)4.036s (-3.9%)1.501s81.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.348s (-4.6%)3.012s (~)0.664s101.00x
🐘 PostgresNitro2.430s (-1.6%)3.012s (~)0.582s101.03x
🐘 PostgresNext.js (Turbopack)2.480s3.012s0.532s101.06x
🌐 RedisNext.js (Turbopack)2.731s3.108s0.377s101.16x
💻 LocalNitro2.901s (+1.0%)3.341s (+7.5% 🔺)0.440s91.24x
💻 LocalExpress2.948s (-1.7%)3.308s (-7.2% 🟢)0.360s101.26x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.473s (+36.9% 🔺)5.099s (+33.9% 🔺)1.626s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.539s (-1.4%)4.014s (~)0.475s81.00x
🐘 PostgresNitro3.619s (~)4.013s (~)0.394s81.02x
🐘 PostgresNext.js (Turbopack)3.771s4.016s0.245s81.07x
🌐 RedisNext.js (Turbopack)4.173s4.868s0.695s71.18x
💻 LocalNitro8.268s (+1.8%)9.019s (+2.8%)0.751s42.34x
💻 LocalExpress8.483s (~)9.023s (~)0.540s42.40x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.366s (+10.6% 🔺)5.161s (+15.5% 🔺)1.795s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.215s (-3.5%)2.011s (~)0.797s151.00x
🐘 PostgresNext.js (Turbopack)1.240s2.011s0.771s151.02x
🐘 PostgresNitro1.267s (-0.8%)2.012s (~)0.745s151.04x
🌐 RedisNext.js (Turbopack)1.310s2.006s0.697s151.08x
💻 LocalExpress1.555s (+1.2%)2.006s (~)0.451s151.28x
💻 LocalNitro1.632s (+4.6%)2.073s (+3.3%)0.441s151.34x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.594s (+22.1% 🔺)3.961s (+7.3% 🔺)1.367s81.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.349s (-4.1%)3.012s (~)0.663s101.00x
🐘 PostgresNitro2.431s (-1.1%)3.013s (~)0.582s101.03x
🐘 PostgresNext.js (Turbopack)2.466s3.010s0.544s101.05x
🌐 RedisNext.js (Turbopack)2.681s3.108s0.427s101.14x
💻 LocalNitro3.067s (+1.3%)3.884s (+5.7% 🔺)0.818s81.31x
💻 LocalExpress3.177s (+4.8%)3.886s (+3.4%)0.709s81.35x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.965s (+14.6% 🔺)4.182s (+8.3% 🔺)1.217s81.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.518s (-2.3%)4.013s (~)0.495s81.00x
🐘 PostgresNitro3.556s (-1.7%)4.015s (~)0.458s81.01x
🐘 PostgresNext.js (Turbopack)3.754s4.015s0.261s81.07x
🌐 RedisNext.js (Turbopack)4.134s4.867s0.734s71.17x
💻 LocalNitro8.968s (+3.8%)9.271s (+2.8%)0.303s42.55x
💻 LocalExpress9.146s (+1.0%)9.772s (~)0.626s42.60x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.948s (+39.5% 🔺)5.897s (+33.1% 🔺)1.949s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.665s (-23.2% 🟢)1.009s (-1.6%)0.344s601.00x
🌐 RedisNext.js (Turbopack)0.679s1.005s0.326s601.02x
🐘 PostgresNext.js (Turbopack)0.843s1.044s0.200s581.27x
🐘 PostgresNitro0.900s (~)1.043s (~)0.143s581.35x
💻 LocalNitro0.989s (+3.4%)1.159s (+13.4% 🔺)0.170s521.49x
💻 LocalExpress0.989s (+0.6%)1.229s (+12.2% 🔺)0.240s491.49x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro10.144s (+6.3% 🔺)11.529s (+5.4% 🔺)1.385s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.597s (-24.5% 🟢)2.010s (-33.2% 🟢)0.413s451.00x
🌐 RedisNext.js (Turbopack)1.639s2.006s0.367s451.03x
🐘 PostgresNext.js (Turbopack)2.050s2.658s0.609s341.28x
🐘 PostgresNitro2.151s (~)3.012s (+1.1%)0.861s301.35x
💻 LocalNitro2.959s (~)3.111s (~)0.152s291.85x
💻 LocalExpress3.012s (~)3.508s (-1.1%)0.496s261.89x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro31.899s (+2.8%)33.848s (+4.2%)1.948s31.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)3.256s4.008s0.752s301.00x
🐘 PostgresExpress3.373s (-20.9% 🟢)4.014s (-19.3% 🟢)0.640s301.04x
🐘 PostgresNext.js (Turbopack)4.038s4.495s0.457s271.24x
🐘 PostgresNitro4.360s (+0.6%)5.014s (~)0.653s241.34x
💻 LocalExpress9.093s (-0.6%)9.633s (-1.6%)0.540s132.79x
💻 LocalNitro9.123s (+1.0%)9.788s (+3.3%)0.665s132.80x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro101.326s (+9.8% 🔺)103.336s (+9.7% 🔺)2.010s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.254s (-15.8% 🟢)1.009s (~)0.755s601.00x
🐘 PostgresNext.js (Turbopack)0.260s1.008s0.748s601.02x
🐘 PostgresNitro0.301s (+2.3%)1.009s (~)0.708s601.18x
🌐 RedisNext.js (Turbopack)0.404s1.004s0.600s601.59x
💻 LocalExpress0.581s (-3.7%)1.004s (~)0.424s602.28x
💻 LocalNitro0.603s (+0.8%)1.005s (~)0.402s602.37x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.418s (+4.3%)4.071s (+5.3% 🔺)1.652s151.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.434s (-17.7% 🟢)1.009s (~)0.575s901.00x
🐘 PostgresNext.js (Turbopack)0.522s1.009s0.486s901.20x
🐘 PostgresNitro0.525s (-2.5%)1.009s (~)0.484s901.21x
🌐 RedisNext.js (Turbopack)1.132s2.006s0.874s452.61x
💻 LocalExpress2.555s (-1.0%)3.009s (~)0.454s305.88x
💻 LocalNitro2.557s (+3.3%)3.009s (~)0.452s305.89x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.288s (+13.5% 🔺)4.816s (+14.2% 🔺)1.528s191.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.621s (-30.9% 🟢)1.009s (-3.1%)0.388s1191.00x
🐘 PostgresNext.js (Turbopack)0.848s1.027s0.179s1171.37x
🐘 PostgresNitro0.883s (-5.9% 🟢)1.068s (-10.4% 🟢)0.185s1131.42x
🌐 RedisNext.js (Turbopack)2.703s3.032s0.329s404.36x
💻 LocalExpress11.180s (-0.9%)11.844s (-1.5%)0.664s1118.01x
💻 LocalNitro11.609s (+4.4%)12.028s (+3.1%)0.419s1018.71x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro8.450s (+1.1%)10.227s (+4.9%)1.777s121.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.168s (-22.6% 🟢)0.999s (~)0.001s (+16.7% 🔺)1.013s (~)0.845s101.00x
🌐 RedisNext.js (Turbopack)0.188s0.999s0.002s1.007s0.819s101.12x
🐘 PostgresNext.js (Turbopack)0.199s1.001s0.001s1.012s0.812s101.19x
💻 LocalExpress0.200s (-2.3%)1.003s (~)0.012s (+0.8%)1.017s (~)0.818s101.19x
💻 LocalNitro0.201s (+2.1%)1.003s (~)0.012s (+3.4%)1.018s (~)0.817s101.20x
🐘 PostgresNitro0.207s (-13.5% 🟢)0.995s (~)0.001s (-14.3% 🟢)1.012s (~)0.805s101.23x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.722s (+4.3%)2.689s (~)0.582s (+9595.0% 🔺)3.850s (+17.6% 🔺)2.128s101.00x
▲ VercelExpress⚠️missing-----
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.475s1.000s0.003s1.011s0.536s601.00x
🐘 PostgresExpress0.578s (-16.7% 🟢)1.005s (~)0.003s (-13.3% 🟢)1.024s (~)0.446s591.21x
🐘 PostgresNext.js (Turbopack)0.654s1.009s0.005s1.026s0.372s591.37x
🐘 PostgresNitro0.681s (-5.8% 🟢)1.004s (~)0.009s (+153.1% 🔺)1.034s (+0.7%)0.354s591.43x
💻 LocalExpress0.733s (-5.6% 🟢)1.009s (-1.7%)0.010s (+6.8% 🔺)1.024s (-1.6%)0.291s591.54x
💻 LocalNitro0.744s (+2.4%)1.009s (~)0.009s (-0.7%)1.022s (~)0.278s591.56x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro4.730s (+9.3% 🔺)6.026s (+9.4% 🔺)0.192s (-26.5% 🟢)6.994s (+11.1% 🔺)2.265s91.00x
▲ VercelExpress⚠️missing-----
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.890s1.017s0.000s1.021s0.132s591.00x
🐘 PostgresExpress1.022s (+14.4% 🔺)1.578s (+45.7% 🔺)0.000s (+623.7% 🔺)1.590s (+43.9% 🔺)0.568s381.15x
🐘 PostgresNext.js (Turbopack)1.087s1.623s0.000s1.632s0.546s371.22x
🐘 PostgresNitro1.100s (+19.4% 🔺)1.868s (+75.8% 🔺)0.000s (-12.5% 🟢)1.886s (+74.5% 🔺)0.787s321.24x
💻 LocalExpress1.262s (~)2.021s (~)0.000s (-41.2% 🟢)2.024s (~)0.762s301.42x
💻 LocalNitro1.283s (+4.7%)2.022s (~)0.000s (-30.8% 🟢)2.025s (~)0.743s301.44x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.926s (+15.3% 🔺)3.896s (+21.2% 🔺)0.000s (+242.9% 🔺)4.547s (+21.0% 🔺)1.621s141.00x
▲ VercelExpress⚠️missing-----
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.573s2.001s0.000s2.006s0.434s301.00x
🐘 PostgresExpress1.953s (+8.3% 🔺)2.216s (+5.6% 🔺)0.000s (+Infinity% 🔺)2.226s (+5.0%)0.273s281.24x
🐘 PostgresNitro2.014s (+6.5% 🔺)2.475s (+11.5% 🔺)0.000s (-100.0% 🟢)2.493s (+11.3% 🔺)0.479s251.28x
🐘 PostgresNext.js (Turbopack)2.194s2.776s0.000s2.784s0.590s221.40x
💻 LocalExpress3.616s (+5.0% 🔺)4.098s (~)0.000s (-12.5% 🟢)4.102s (~)0.486s152.30x
💻 LocalNitro3.744s (+12.5% 🔺)4.166s (+5.0%)0.000s (+28.0% 🔺)4.171s (+5.0%)0.427s152.38x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro4.120s (+22.1% 🔺)4.819s (+6.2% 🔺)0.000s (+118.2% 🔺)5.554s (+9.3% 🔺)1.434s111.00x
▲ VercelExpress⚠️missing-----
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress15/21
🐘 PostgresExpress20/21
▲ VercelNitro21/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres20/21
Next.js (Turbopack)🌐 Redis12/21
Nitro🐘 Postgres16/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


Some benchmark jobs failed:

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

Check the workflow run for details.

@vercelvercelBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Additional Suggestion:

Missing esbuild dependency in @workflow/nest package.json causes runtime MODULE_NOT_FOUND error when calling buildVercelOutput().

Fix on Vercel

Comment threaddocs/content/docs/getting-started/nestjs.mdx Outdated
NestLocalBuilder.build() only generates runtime .mjs bundles for the
WorkflowController — no Vercel Build Output API functions are created.
VQS discovers consumers via experimentalTriggers in .vc-config.json,
so NestJS deployments silently fail with "no v2beta consumer".
Add buildVercelOutput() which generates:
- .well-known/workflow/v1/step.func with STEP_QUEUE_TRIGGER
- .well-known/workflow/v1/flow.func with WORKFLOW_QUEUE_TRIGGER
- .well-known/workflow/v1/webhook/[token].func
- api/index.js.func (esbuild-bundled NestJS app)
- config.json with routing rules
Also update NestJS getting-started docs and README with Vercel
deployment instructions.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
VaguelySeriousand others added 2 commits March 20, 2026 16:30
Add nest to the e2e-vercel-prod matrix in tests.yml with the correct
project ID (prj_G3RlX1TsB5V2hcqTNvuVoJXdfE1o) and slug
(workbench-nestjs-workflow).
Set up the workbench for Vercel Build Output API deployment:
- Add api/index.js entry point for the NestJS serverless function
- Add scripts/build-vercel.ts postbuild step calling buildVercelOutput()
- Update vercel.json with buildCommand
- Fix project slug in create-test-matrix.mjs
- Clear framework preset from "NestJS" to "Other" on Vercel project
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add a `build` subcommand to the workflow-nest CLI that builds workflow
bundles and, when VERCEL env is detected, automatically generates the
Build Output API with experimentalTriggers. The entry point is auto-
detected from api/index.js (or can be specified via --entry).
This replaces the need for a custom scripts/build-vercel.ts file —
users just add `"postbuild": "workflow-nest build"` to package.json.
Also document the Vercel project requirement: framework preset must be
set to "Other" (not "NestJS") to avoid conflicting with Build Output API.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
VaguelySeriousand others added 28 commits March 21, 2026 05:54
The workflow-nest build CLI copies manifest.json to dist/ during
postbuild. The app.module.ts reads it at module load time using
join(process.cwd(), 'dist', 'workflow-manifest.json'). On Vercel's
Lambda, CWD is the project root and dist/ is always NFT-included.
The globalThis.__workflowManifestJson value is read by the
WorkflowController as a fallback when readFileSync fails.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
NFT can't trace readFileSync with computed paths. But it DOES trace
dynamic import() with string literals. Generate a JS module
(dist/workflow-manifest.js) and use await import('./workflow-manifest.js')
in app.module.ts. NFT sees the static string and includes the file.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The env var may not be reaching the Lambda runtime. Force-set it
in app.module.ts at import time when VERCEL env is detected.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Top-level await may crash in the Vercel Lambda context. Use
createRequire(import.meta.url) for synchronous require() of
the manifest module.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SWC compiles app.module.ts to CJS. The createRequire require() can't
load ESM modules. Write the manifest module as CJS (module.exports)
instead of ESM (export default).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
With package.json type=module, .js files are ESM. CJS module.exports
in a .js file is misinterpreted. Use .cjs extension to force CJS.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ively
.cjs files may not be included by the NestJS Vercel preset. Use .json
which require() auto-parses and is universally included in dist/.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
In ESM modules, bare require() isn't available. createRequire creates
a require function that resolves relative to the file. The .json file
in dist/ IS copied to the Lambda by the NestJS Vercel preset (it
copies all of dist/). This approach works both locally and on Vercel.
Verified locally: globalThis.__workflowManifestJson is set correctly.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The fix:
1. prebuild: workflow-nest build generates .nestjs/workflow/manifest.json
2. nest-cli.json assets: copies manifest to dist/workflow/manifest.json
3. nest build: produces dist/ with the manifest included
4. app.module.ts: createRequire loads dist/workflow/manifest.json
5. NestJS Vercel preset includes ALL nest build output in Lambda
Key insight: nest build's assets copy runs during compilation, so the
manifest is part of the official dist/ output that the NestJS Vercel
preset deploys. No NFT tracing needed.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add configureManifest(json) to WorkflowController which sets the
manifest as a string constant. The controller checks this before
falling back to readFileSync. WorkflowModule.forRoot() accepts a
manifestJson option that calls configureManifest during setup.
In the workbench:
- prebuild generates manifest via workflow-nest build
- nest-cli.json assets copies it to dist/workflow/manifest.json
- app.module.ts loads it via createRequire and passes to forRoot()
- On Vercel, the controller serves the pre-loaded manifest directly
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The definitive fix for the manifest on Vercel:
1. prebuild: workflow-nest build generates src/_manifest-data.ts
containing the manifest as an exported string constant
2. nest build: SWC compiles it to dist/_manifest-data.js
3. app.module.ts: imports _manifest-data.js via standard ESM import
4. NFT traces the standard import and includes the compiled module
5. WorkflowModule.forRoot({ manifestJson }) passes it to the controller
This avoids ALL the previous issues:
- No readFileSync with untraceable paths
- No createRequire that NFT can't follow
- No .cjs/.json files that Vercel doesn't include
- The manifest is part of the standard compiled output
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The WorkflowController imports steps.mjs/workflows.mjs from outDir.
On Vercel, these need to be in the Lambda. NestJS CLI assets copies
them from .nestjs/workflow/ to dist/workflow/ during nest build. Set
outDir to dist/workflow/ on Vercel so the controller finds them.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…I for workflows
Use framework=null. Generate Build Output API for step/flow/webhook
with experimentalTriggers. Use api/index.js with @vercel/node and
includeFiles for the NestJS handler with the workflow bundles.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… functions
Go back to framework=nestjs. The NestJS preset + Build Output API
should coexist — the preset handles the NestJS handler, and the
Build Output API provides step/flow/webhook functions with
experimentalTriggers for VQS.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
On Vercel, the .mjs bundle files aren't in the Lambda (NFT can't
trace dynamic import(pathToFileURL(...))). Fix by:
1. CLI build generates _steps-bundle.ts, _workflows-bundle.ts,
_webhook-bundle.ts with base64-encoded bundle content
2. nest build compiles them → NFT traces standard imports
3. app.module.ts loads base64 data into globalThis
4. WorkflowController.loadBundle() tries filesystem first, then
decodes base64, writes to /tmp/, and imports from there
This makes workflow execution work on Vercel:
- VQS delivers to the NestJS handler (merged lambda)
- The handler's WorkflowController loads bundles from /tmp/
- Workflows execute successfully
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dynamic await import() is NOT traced by @vercel/nft. Static import
statements ARE traced. Change from:
const { data } = await import('./_steps-bundle.js') // NOT traced
to:
import { data } from './_steps-bundle.js' // TRACED by NFT
SWC preserves static import statements as-is in the compiled output.
This ensures dist/_steps-bundle.js is included in the Vercel Lambda.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The .mjs bundles import 'workflow' and other packages that resolve
from node_modules/. Writing to /tmp/ breaks package resolution.
Use process.cwd()/.wf_bundles so node_modules is in the parent chain.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Lambda is read-only except /tmp/. Write bundles to /tmp/ and
symlink node_modules from the project root so the bundles can
resolve packages like 'workflow'.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two fixes:
1. Generate Build Output API FIRST, then create TS bundle wrappers
from the self-contained CJS bundles (not the local .mjs ones)
2. Use .cjs extension when writing bundles to /tmp/ so Node.js
treats them as CJS regardless of package.json type
The BOA bundles have ALL dependencies inlined — no external package
resolution needed. This fixes 'Cannot find package workflow' error.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Static imports crash if the files don't exist during nest start
(local dev). Check in empty placeholders so they always exist.
The workflow-nest build CLI overwrites them with actual data.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…a outputs
With framework=nestjs, all functions merge into 1 lambda, losing
experimentalTriggers. With framework=null, Build Output API creates
separate lambda outputs for step, flow, webhook (with triggers) and
__nestjs (esbuild-bundled NestJS handler).
The esbuild step only runs in postbuild (when dist/ exists from nest
build). In prebuild, only workflow bundles and TS files are generated.
Config.json: webhook → handle:filesystem → handle:miss → catch-all
with check:true.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Sign up for freeto 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.

1 participant

@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' [nest] Add NestJS support on Vercel by VaguelySerious · Pull Request #1472 · vercel/workflow · GitHub
Skip to content

[nest] Add NestJS support on Vercel - #1472

Closed
VaguelySerious wants to merge 95 commits into
mainfrom
peter/nest-fix-mar-20
Closed

[nest] Add NestJS support on Vercel#1472
VaguelySerious wants to merge 95 commits into
mainfrom
peter/nest-fix-mar-20

Conversation

@VaguelySerious

@VaguelySeriousVaguelySerious commented Mar 20, 2026

Copy link
Copy Markdown
Member

Extends builder to bundle separate functions for app/flow/step routes with experimentalTriggers enabled, allowing queue callbacks when deployed to Vercel, and adds e2e tests for the Vercel environment.

Related:

@changeset-bot

changeset-botBot commented Mar 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5d7ef34

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

This PR includes changesets to release 16 packages
NameType
@workflow/nestPatch
workflowPatch
@workflow/aiPatch
@workflow/world-testingPatch
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/astroPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

vercelBot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production777367847
✅ 💻 Local Development7820142924
✅ 📦 Local Production7820142924
✅ 🐘 Local Postgres7820142924
✅ 🪟 Windows720577
❌ 🌍 Community Worlds1185621195
✅ 📋 Other198033231
Total3511595524122

❌ Failed Tests

▲ Vercel Production (3 failed)

hono (2 failed):

nuxt (1 failed):

  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMDYYDFB01BTRJWV0G6BM9Q0 | 🔍 observability
🌍 Community Worlds (56 failed)

mongodb (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMDYPNQCQF0P2A1KHX2DGAGD
  • webhookWorkflow | wrun_01KMDYQ4D90V2PW2AHJ6EPJX90
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMDYXKZ00QTQT1Z9CXMDBJ7S

redis (2 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMDYPNQCQF0P2A1KHX2DGAGD
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMDYXKZ00QTQT1Z9CXMDBJ7S

turso (51 failed):

  • addTenWorkflow | wrun_01KMDYNHM3VGEKP7NXJ9240102
  • addTenWorkflow | wrun_01KMDYNHM3VGEKP7NXJ9240102
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KMDYPV79A7BXN4DPWPCX6WWN
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KMDYNRANBQPHKC249W6THZ4P
  • promiseRaceWorkflow | wrun_01KMDYNWVBYZN8X1RV4329QN38
  • promiseAnyWorkflow | wrun_01KMDYNYZR398MDDX8Z76B1W84
  • importedStepOnlyWorkflow | wrun_01KMDYQ5H0WQAR7NSAK47CK327
  • hookWorkflow | wrun_01KMDYPBH4P5VJDNEX0W7Y3JQ3
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMDYPNQCQF0P2A1KHX2DGAGD
  • webhookWorkflow | wrun_01KMDYQ4D90V2PW2AHJ6EPJX90
  • sleepingWorkflow | wrun_01KMDYQBK6CV7NDVA59SKYGYVC
  • parallelSleepWorkflow | wrun_01KMDYQRNRVK3W4EFK37KWEZK8
  • nullByteWorkflow | wrun_01KMDYQX5F3A8B7NY0TGWNSVR7
  • workflowAndStepMetadataWorkflow | wrun_01KMDYR0F4B9S9GPFC7YH4EBXV
  • fetchWorkflow | wrun_01KMDYSTFC0FN37TJTPHTH87E8
  • promiseRaceStressTestWorkflow | wrun_01KMDYSY54AFHZ3916K3BCJ3HV
  • 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 | wrun_01KMDYWTSFT1AWC2X1YD0BRH7H
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMDYXKZ00QTQT1Z9CXMDBJ7S
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMDYYDFB01BTRJWV0G6BM9Q0
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KMDYZ20RQ2P9796YXAE7J3GJ
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KMDYZBE25VR14DDXF88ADEBS
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KMDYZK5NKVAMAQT3TV7KGT8A
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KMDYZP55RC0JKGVCF02PJG1A
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMDZ07FQHE5WK4421J1Y6YCZ
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KMDZ0E81K08X7CEK5KB5G73E
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KMDZ0KPJHJ3EWC4J9BGT0K9Y
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KMDZ0TPRSC9Q6YCKHX2X2DSW
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KMDZ11DYDVATRGCSJYVG4J4W
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KMDZ1888XYQ4C4JF0TRYMEVR
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KMDZ1G50ATZXXTZBK31HPVMP
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KMDZ1V5R4XE1WAKQ1NDDS30A
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KMDZ246Y3TVA9RK18FYQPSX0
  • cancelRun - cancelling a running workflow | wrun_01KMDZ2AYCED42T9HZPK32ESXZ
  • cancelRun via CLI - cancelling a running workflow | wrun_01KMDZ2M8PGXZ9KE5ZSE2H51N0
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KMDZ30ED1M4XX0VVF3YNCKYY
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KMDZ3NWX7TH9D6G5Q2S80KRC
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KMDZ408Q6ST32VK529QAKS6V

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro7007
✅ example7007
✅ express7007
✅ fastify7007
❌ hono6827
✅ nextjs-turbopack7502
✅ nextjs-webpack7502
✅ nitro7007
❌ nuxt6917
✅ sveltekit7007
✅ vite7007
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable66011
✅ express-stable66011
✅ fastify-stable66011
✅ hono-stable66011
✅ nextjs-turbopack-canary55022
✅ nextjs-turbopack-stable7205
✅ nextjs-webpack-canary55022
✅ nextjs-webpack-stable7205
✅ nitro-stable66011
✅ nuxt-stable66011
✅ sveltekit-stable66011
✅ vite-stable66011
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable66011
✅ express-stable66011
✅ fastify-stable66011
✅ hono-stable66011
✅ nextjs-turbopack-canary55022
✅ nextjs-turbopack-stable7205
✅ nextjs-webpack-canary55022
✅ nextjs-webpack-stable7205
✅ nitro-stable66011
✅ nuxt-stable66011
✅ sveltekit-stable66011
✅ vite-stable66011
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable66011
✅ express-stable66011
✅ fastify-stable66011
✅ hono-stable66011
✅ nextjs-turbopack-canary55022
✅ nextjs-turbopack-stable7205
✅ nextjs-webpack-canary55022
✅ nextjs-webpack-stable7205
✅ nitro-stable66011
✅ nuxt-stable66011
✅ sveltekit-stable66011
✅ vite-stable66011
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack7205
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev302
❌ mongodb5235
✅ redis-dev302
❌ redis5325
✅ turso-dev302
❌ turso4515
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable66011
✅ e2e-local-postgres-nest-stable66011
✅ e2e-local-prod-nest-stable66011

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

@github-actions

github-actionsBot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.043s (-4.0%)1.005s (~)0.962s101.00x
💻 LocalNitro0.043s (-8.4% 🟢)1.005s (~)0.962s101.01x
🌐 RedisNext.js (Turbopack)0.053s1.006s0.953s101.23x
🐘 PostgresNext.js (Turbopack)0.058s1.012s0.954s101.34x
🐘 PostgresNitro0.061s (-11.5% 🟢)1.012s (~)0.951s101.43x
🐘 PostgresExpress0.076s (+7.0% 🔺)1.028s (+1.1%)0.952s101.77x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.472s (-4.9%)2.714s (+6.7% 🔺)2.242s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.123s (-1.4%)2.014s (~)0.890s101.00x
🌐 RedisNext.js (Turbopack)1.123s2.007s0.884s101.00x
💻 LocalExpress1.125s (~)2.006s (~)0.881s101.00x
💻 LocalNitro1.130s (~)2.006s (~)0.876s101.01x
🐘 PostgresNitro1.149s (+0.6%)2.013s (~)0.863s101.02x
🐘 PostgresNext.js (Turbopack)1.153s2.013s0.860s101.03x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.139s (-8.5% 🟢)3.701s (-4.5%)1.562s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express10.755s (-1.4%)11.040s (~)0.285s31.00x
🌐 RedisNext.js (Turbopack)10.794s11.022s0.229s31.00x
🐘 PostgresNext.js (Turbopack)10.886s11.043s0.157s31.01x
💻 LocalExpress10.915s (~)11.023s (~)0.108s31.01x
💻 LocalNitro10.947s (~)11.024s (~)0.077s31.02x
🐘 PostgresNitro10.994s (~)11.376s (+3.0%)0.383s31.02x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.359s (~)19.980s (+5.9% 🔺)2.621s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express14.188s (-2.7%)15.042s (~)0.854s41.00x
🌐 RedisNext.js (Turbopack)14.198s15.028s0.830s41.00x
🐘 PostgresNext.js (Turbopack)14.484s15.042s0.558s41.02x
🐘 PostgresNitro14.772s (~)15.045s (~)0.274s41.04x
💻 LocalExpress14.923s (-0.5%)15.029s (-3.2%)0.106s41.05x
💻 LocalNitro14.942s (~)15.029s (~)0.087s41.05x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro38.029s (+17.6% 🔺)40.139s (+15.5% 🔺)2.110s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express13.360s (-4.7%)14.043s (-2.9%)0.682s71.00x
🌐 RedisNext.js (Turbopack)13.429s14.025s0.597s71.01x
🐘 PostgresNext.js (Turbopack)13.796s14.036s0.240s71.03x
🐘 PostgresNitro14.299s (~)15.040s (~)0.741s61.07x
💻 LocalExpress16.611s (~)17.029s (~)0.417s61.24x
💻 LocalNitro16.628s (+1.0%)17.031s (~)0.403s61.24x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro60.687s (+7.9% 🔺)62.475s (+9.1% 🔺)1.788s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.213s (-4.2%)2.011s (~)0.798s151.00x
🐘 PostgresNext.js (Turbopack)1.265s2.012s0.746s151.04x
🐘 PostgresNitro1.281s (-0.9%)2.011s (~)0.730s151.06x
🌐 RedisNext.js (Turbopack)1.396s2.006s0.611s151.15x
💻 LocalExpress1.504s (~)2.005s (~)0.501s151.24x
💻 LocalNitro1.517s (+2.3%)2.005s (~)0.488s151.25x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.535s (-3.2%)4.036s (-3.9%)1.501s81.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.348s (-4.6%)3.012s (~)0.664s101.00x
🐘 PostgresNitro2.430s (-1.6%)3.012s (~)0.582s101.03x
🐘 PostgresNext.js (Turbopack)2.480s3.012s0.532s101.06x
🌐 RedisNext.js (Turbopack)2.731s3.108s0.377s101.16x
💻 LocalNitro2.901s (+1.0%)3.341s (+7.5% 🔺)0.440s91.24x
💻 LocalExpress2.948s (-1.7%)3.308s (-7.2% 🟢)0.360s101.26x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.473s (+36.9% 🔺)5.099s (+33.9% 🔺)1.626s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.539s (-1.4%)4.014s (~)0.475s81.00x
🐘 PostgresNitro3.619s (~)4.013s (~)0.394s81.02x
🐘 PostgresNext.js (Turbopack)3.771s4.016s0.245s81.07x
🌐 RedisNext.js (Turbopack)4.173s4.868s0.695s71.18x
💻 LocalNitro8.268s (+1.8%)9.019s (+2.8%)0.751s42.34x
💻 LocalExpress8.483s (~)9.023s (~)0.540s42.40x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.366s (+10.6% 🔺)5.161s (+15.5% 🔺)1.795s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.215s (-3.5%)2.011s (~)0.797s151.00x
🐘 PostgresNext.js (Turbopack)1.240s2.011s0.771s151.02x
🐘 PostgresNitro1.267s (-0.8%)2.012s (~)0.745s151.04x
🌐 RedisNext.js (Turbopack)1.310s2.006s0.697s151.08x
💻 LocalExpress1.555s (+1.2%)2.006s (~)0.451s151.28x
💻 LocalNitro1.632s (+4.6%)2.073s (+3.3%)0.441s151.34x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.594s (+22.1% 🔺)3.961s (+7.3% 🔺)1.367s81.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.349s (-4.1%)3.012s (~)0.663s101.00x
🐘 PostgresNitro2.431s (-1.1%)3.013s (~)0.582s101.03x
🐘 PostgresNext.js (Turbopack)2.466s3.010s0.544s101.05x
🌐 RedisNext.js (Turbopack)2.681s3.108s0.427s101.14x
💻 LocalNitro3.067s (+1.3%)3.884s (+5.7% 🔺)0.818s81.31x
💻 LocalExpress3.177s (+4.8%)3.886s (+3.4%)0.709s81.35x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.965s (+14.6% 🔺)4.182s (+8.3% 🔺)1.217s81.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.518s (-2.3%)4.013s (~)0.495s81.00x
🐘 PostgresNitro3.556s (-1.7%)4.015s (~)0.458s81.01x
🐘 PostgresNext.js (Turbopack)3.754s4.015s0.261s81.07x
🌐 RedisNext.js (Turbopack)4.134s4.867s0.734s71.17x
💻 LocalNitro8.968s (+3.8%)9.271s (+2.8%)0.303s42.55x
💻 LocalExpress9.146s (+1.0%)9.772s (~)0.626s42.60x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.948s (+39.5% 🔺)5.897s (+33.1% 🔺)1.949s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.665s (-23.2% 🟢)1.009s (-1.6%)0.344s601.00x
🌐 RedisNext.js (Turbopack)0.679s1.005s0.326s601.02x
🐘 PostgresNext.js (Turbopack)0.843s1.044s0.200s581.27x
🐘 PostgresNitro0.900s (~)1.043s (~)0.143s581.35x
💻 LocalNitro0.989s (+3.4%)1.159s (+13.4% 🔺)0.170s521.49x
💻 LocalExpress0.989s (+0.6%)1.229s (+12.2% 🔺)0.240s491.49x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro10.144s (+6.3% 🔺)11.529s (+5.4% 🔺)1.385s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.597s (-24.5% 🟢)2.010s (-33.2% 🟢)0.413s451.00x
🌐 RedisNext.js (Turbopack)1.639s2.006s0.367s451.03x
🐘 PostgresNext.js (Turbopack)2.050s2.658s0.609s341.28x
🐘 PostgresNitro2.151s (~)3.012s (+1.1%)0.861s301.35x
💻 LocalNitro2.959s (~)3.111s (~)0.152s291.85x
💻 LocalExpress3.012s (~)3.508s (-1.1%)0.496s261.89x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro31.899s (+2.8%)33.848s (+4.2%)1.948s31.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)3.256s4.008s0.752s301.00x
🐘 PostgresExpress3.373s (-20.9% 🟢)4.014s (-19.3% 🟢)0.640s301.04x
🐘 PostgresNext.js (Turbopack)4.038s4.495s0.457s271.24x
🐘 PostgresNitro4.360s (+0.6%)5.014s (~)0.653s241.34x
💻 LocalExpress9.093s (-0.6%)9.633s (-1.6%)0.540s132.79x
💻 LocalNitro9.123s (+1.0%)9.788s (+3.3%)0.665s132.80x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro101.326s (+9.8% 🔺)103.336s (+9.7% 🔺)2.010s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.254s (-15.8% 🟢)1.009s (~)0.755s601.00x
🐘 PostgresNext.js (Turbopack)0.260s1.008s0.748s601.02x
🐘 PostgresNitro0.301s (+2.3%)1.009s (~)0.708s601.18x
🌐 RedisNext.js (Turbopack)0.404s1.004s0.600s601.59x
💻 LocalExpress0.581s (-3.7%)1.004s (~)0.424s602.28x
💻 LocalNitro0.603s (+0.8%)1.005s (~)0.402s602.37x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.418s (+4.3%)4.071s (+5.3% 🔺)1.652s151.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.434s (-17.7% 🟢)1.009s (~)0.575s901.00x
🐘 PostgresNext.js (Turbopack)0.522s1.009s0.486s901.20x
🐘 PostgresNitro0.525s (-2.5%)1.009s (~)0.484s901.21x
🌐 RedisNext.js (Turbopack)1.132s2.006s0.874s452.61x
💻 LocalExpress2.555s (-1.0%)3.009s (~)0.454s305.88x
💻 LocalNitro2.557s (+3.3%)3.009s (~)0.452s305.89x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.288s (+13.5% 🔺)4.816s (+14.2% 🔺)1.528s191.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.621s (-30.9% 🟢)1.009s (-3.1%)0.388s1191.00x
🐘 PostgresNext.js (Turbopack)0.848s1.027s0.179s1171.37x
🐘 PostgresNitro0.883s (-5.9% 🟢)1.068s (-10.4% 🟢)0.185s1131.42x
🌐 RedisNext.js (Turbopack)2.703s3.032s0.329s404.36x
💻 LocalExpress11.180s (-0.9%)11.844s (-1.5%)0.664s1118.01x
💻 LocalNitro11.609s (+4.4%)12.028s (+3.1%)0.419s1018.71x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro8.450s (+1.1%)10.227s (+4.9%)1.777s121.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.168s (-22.6% 🟢)0.999s (~)0.001s (+16.7% 🔺)1.013s (~)0.845s101.00x
🌐 RedisNext.js (Turbopack)0.188s0.999s0.002s1.007s0.819s101.12x
🐘 PostgresNext.js (Turbopack)0.199s1.001s0.001s1.012s0.812s101.19x
💻 LocalExpress0.200s (-2.3%)1.003s (~)0.012s (+0.8%)1.017s (~)0.818s101.19x
💻 LocalNitro0.201s (+2.1%)1.003s (~)0.012s (+3.4%)1.018s (~)0.817s101.20x
🐘 PostgresNitro0.207s (-13.5% 🟢)0.995s (~)0.001s (-14.3% 🟢)1.012s (~)0.805s101.23x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.722s (+4.3%)2.689s (~)0.582s (+9595.0% 🔺)3.850s (+17.6% 🔺)2.128s101.00x
▲ VercelExpress⚠️missing-----
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.475s1.000s0.003s1.011s0.536s601.00x
🐘 PostgresExpress0.578s (-16.7% 🟢)1.005s (~)0.003s (-13.3% 🟢)1.024s (~)0.446s591.21x
🐘 PostgresNext.js (Turbopack)0.654s1.009s0.005s1.026s0.372s591.37x
🐘 PostgresNitro0.681s (-5.8% 🟢)1.004s (~)0.009s (+153.1% 🔺)1.034s (+0.7%)0.354s591.43x
💻 LocalExpress0.733s (-5.6% 🟢)1.009s (-1.7%)0.010s (+6.8% 🔺)1.024s (-1.6%)0.291s591.54x
💻 LocalNitro0.744s (+2.4%)1.009s (~)0.009s (-0.7%)1.022s (~)0.278s591.56x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro4.730s (+9.3% 🔺)6.026s (+9.4% 🔺)0.192s (-26.5% 🟢)6.994s (+11.1% 🔺)2.265s91.00x
▲ VercelExpress⚠️missing-----
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.890s1.017s0.000s1.021s0.132s591.00x
🐘 PostgresExpress1.022s (+14.4% 🔺)1.578s (+45.7% 🔺)0.000s (+623.7% 🔺)1.590s (+43.9% 🔺)0.568s381.15x
🐘 PostgresNext.js (Turbopack)1.087s1.623s0.000s1.632s0.546s371.22x
🐘 PostgresNitro1.100s (+19.4% 🔺)1.868s (+75.8% 🔺)0.000s (-12.5% 🟢)1.886s (+74.5% 🔺)0.787s321.24x
💻 LocalExpress1.262s (~)2.021s (~)0.000s (-41.2% 🟢)2.024s (~)0.762s301.42x
💻 LocalNitro1.283s (+4.7%)2.022s (~)0.000s (-30.8% 🟢)2.025s (~)0.743s301.44x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.926s (+15.3% 🔺)3.896s (+21.2% 🔺)0.000s (+242.9% 🔺)4.547s (+21.0% 🔺)1.621s141.00x
▲ VercelExpress⚠️missing-----
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.573s2.001s0.000s2.006s0.434s301.00x
🐘 PostgresExpress1.953s (+8.3% 🔺)2.216s (+5.6% 🔺)0.000s (+Infinity% 🔺)2.226s (+5.0%)0.273s281.24x
🐘 PostgresNitro2.014s (+6.5% 🔺)2.475s (+11.5% 🔺)0.000s (-100.0% 🟢)2.493s (+11.3% 🔺)0.479s251.28x
🐘 PostgresNext.js (Turbopack)2.194s2.776s0.000s2.784s0.590s221.40x
💻 LocalExpress3.616s (+5.0% 🔺)4.098s (~)0.000s (-12.5% 🟢)4.102s (~)0.486s152.30x
💻 LocalNitro3.744s (+12.5% 🔺)4.166s (+5.0%)0.000s (+28.0% 🔺)4.171s (+5.0%)0.427s152.38x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro4.120s (+22.1% 🔺)4.819s (+6.2% 🔺)0.000s (+118.2% 🔺)5.554s (+9.3% 🔺)1.434s111.00x
▲ VercelExpress⚠️missing-----
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress15/21
🐘 PostgresExpress20/21
▲ VercelNitro21/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres20/21
Next.js (Turbopack)🌐 Redis12/21
Nitro🐘 Postgres16/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


Some benchmark jobs failed:

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

Check the workflow run for details.

@vercelvercelBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Additional Suggestion:

Missing esbuild dependency in @workflow/nest package.json causes runtime MODULE_NOT_FOUND error when calling buildVercelOutput().

Fix on Vercel

Comment threaddocs/content/docs/getting-started/nestjs.mdx Outdated
NestLocalBuilder.build() only generates runtime .mjs bundles for the
WorkflowController — no Vercel Build Output API functions are created.
VQS discovers consumers via experimentalTriggers in .vc-config.json,
so NestJS deployments silently fail with "no v2beta consumer".
Add buildVercelOutput() which generates:
- .well-known/workflow/v1/step.func with STEP_QUEUE_TRIGGER
- .well-known/workflow/v1/flow.func with WORKFLOW_QUEUE_TRIGGER
- .well-known/workflow/v1/webhook/[token].func
- api/index.js.func (esbuild-bundled NestJS app)
- config.json with routing rules
Also update NestJS getting-started docs and README with Vercel
deployment instructions.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
VaguelySeriousand others added 2 commits March 20, 2026 16:30
Add nest to the e2e-vercel-prod matrix in tests.yml with the correct
project ID (prj_G3RlX1TsB5V2hcqTNvuVoJXdfE1o) and slug
(workbench-nestjs-workflow).
Set up the workbench for Vercel Build Output API deployment:
- Add api/index.js entry point for the NestJS serverless function
- Add scripts/build-vercel.ts postbuild step calling buildVercelOutput()
- Update vercel.json with buildCommand
- Fix project slug in create-test-matrix.mjs
- Clear framework preset from "NestJS" to "Other" on Vercel project
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add a `build` subcommand to the workflow-nest CLI that builds workflow
bundles and, when VERCEL env is detected, automatically generates the
Build Output API with experimentalTriggers. The entry point is auto-
detected from api/index.js (or can be specified via --entry).
This replaces the need for a custom scripts/build-vercel.ts file —
users just add `"postbuild": "workflow-nest build"` to package.json.
Also document the Vercel project requirement: framework preset must be
set to "Other" (not "NestJS") to avoid conflicting with Build Output API.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
VaguelySeriousand others added 28 commits March 21, 2026 05:54
The workflow-nest build CLI copies manifest.json to dist/ during
postbuild. The app.module.ts reads it at module load time using
join(process.cwd(), 'dist', 'workflow-manifest.json'). On Vercel's
Lambda, CWD is the project root and dist/ is always NFT-included.
The globalThis.__workflowManifestJson value is read by the
WorkflowController as a fallback when readFileSync fails.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
NFT can't trace readFileSync with computed paths. But it DOES trace
dynamic import() with string literals. Generate a JS module
(dist/workflow-manifest.js) and use await import('./workflow-manifest.js')
in app.module.ts. NFT sees the static string and includes the file.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The env var may not be reaching the Lambda runtime. Force-set it
in app.module.ts at import time when VERCEL env is detected.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Top-level await may crash in the Vercel Lambda context. Use
createRequire(import.meta.url) for synchronous require() of
the manifest module.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SWC compiles app.module.ts to CJS. The createRequire require() can't
load ESM modules. Write the manifest module as CJS (module.exports)
instead of ESM (export default).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
With package.json type=module, .js files are ESM. CJS module.exports
in a .js file is misinterpreted. Use .cjs extension to force CJS.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ively
.cjs files may not be included by the NestJS Vercel preset. Use .json
which require() auto-parses and is universally included in dist/.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
In ESM modules, bare require() isn't available. createRequire creates
a require function that resolves relative to the file. The .json file
in dist/ IS copied to the Lambda by the NestJS Vercel preset (it
copies all of dist/). This approach works both locally and on Vercel.
Verified locally: globalThis.__workflowManifestJson is set correctly.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The fix:
1. prebuild: workflow-nest build generates .nestjs/workflow/manifest.json
2. nest-cli.json assets: copies manifest to dist/workflow/manifest.json
3. nest build: produces dist/ with the manifest included
4. app.module.ts: createRequire loads dist/workflow/manifest.json
5. NestJS Vercel preset includes ALL nest build output in Lambda
Key insight: nest build's assets copy runs during compilation, so the
manifest is part of the official dist/ output that the NestJS Vercel
preset deploys. No NFT tracing needed.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add configureManifest(json) to WorkflowController which sets the
manifest as a string constant. The controller checks this before
falling back to readFileSync. WorkflowModule.forRoot() accepts a
manifestJson option that calls configureManifest during setup.
In the workbench:
- prebuild generates manifest via workflow-nest build
- nest-cli.json assets copies it to dist/workflow/manifest.json
- app.module.ts loads it via createRequire and passes to forRoot()
- On Vercel, the controller serves the pre-loaded manifest directly
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The definitive fix for the manifest on Vercel:
1. prebuild: workflow-nest build generates src/_manifest-data.ts
containing the manifest as an exported string constant
2. nest build: SWC compiles it to dist/_manifest-data.js
3. app.module.ts: imports _manifest-data.js via standard ESM import
4. NFT traces the standard import and includes the compiled module
5. WorkflowModule.forRoot({ manifestJson }) passes it to the controller
This avoids ALL the previous issues:
- No readFileSync with untraceable paths
- No createRequire that NFT can't follow
- No .cjs/.json files that Vercel doesn't include
- The manifest is part of the standard compiled output
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The WorkflowController imports steps.mjs/workflows.mjs from outDir.
On Vercel, these need to be in the Lambda. NestJS CLI assets copies
them from .nestjs/workflow/ to dist/workflow/ during nest build. Set
outDir to dist/workflow/ on Vercel so the controller finds them.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…I for workflows
Use framework=null. Generate Build Output API for step/flow/webhook
with experimentalTriggers. Use api/index.js with @vercel/node and
includeFiles for the NestJS handler with the workflow bundles.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… functions
Go back to framework=nestjs. The NestJS preset + Build Output API
should coexist — the preset handles the NestJS handler, and the
Build Output API provides step/flow/webhook functions with
experimentalTriggers for VQS.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
On Vercel, the .mjs bundle files aren't in the Lambda (NFT can't
trace dynamic import(pathToFileURL(...))). Fix by:
1. CLI build generates _steps-bundle.ts, _workflows-bundle.ts,
_webhook-bundle.ts with base64-encoded bundle content
2. nest build compiles them → NFT traces standard imports
3. app.module.ts loads base64 data into globalThis
4. WorkflowController.loadBundle() tries filesystem first, then
decodes base64, writes to /tmp/, and imports from there
This makes workflow execution work on Vercel:
- VQS delivers to the NestJS handler (merged lambda)
- The handler's WorkflowController loads bundles from /tmp/
- Workflows execute successfully
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dynamic await import() is NOT traced by @vercel/nft. Static import
statements ARE traced. Change from:
const { data } = await import('./_steps-bundle.js') // NOT traced
to:
import { data } from './_steps-bundle.js' // TRACED by NFT
SWC preserves static import statements as-is in the compiled output.
This ensures dist/_steps-bundle.js is included in the Vercel Lambda.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The .mjs bundles import 'workflow' and other packages that resolve
from node_modules/. Writing to /tmp/ breaks package resolution.
Use process.cwd()/.wf_bundles so node_modules is in the parent chain.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Lambda is read-only except /tmp/. Write bundles to /tmp/ and
symlink node_modules from the project root so the bundles can
resolve packages like 'workflow'.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two fixes:
1. Generate Build Output API FIRST, then create TS bundle wrappers
from the self-contained CJS bundles (not the local .mjs ones)
2. Use .cjs extension when writing bundles to /tmp/ so Node.js
treats them as CJS regardless of package.json type
The BOA bundles have ALL dependencies inlined — no external package
resolution needed. This fixes 'Cannot find package workflow' error.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Static imports crash if the files don't exist during nest start
(local dev). Check in empty placeholders so they always exist.
The workflow-nest build CLI overwrites them with actual data.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…a outputs
With framework=nestjs, all functions merge into 1 lambda, losing
experimentalTriggers. With framework=null, Build Output API creates
separate lambda outputs for step, flow, webhook (with triggers) and
__nestjs (esbuild-bundled NestJS handler).
The esbuild step only runs in postbuild (when dist/ exists from nest
build). In prebuild, only workflow bundles and TS files are generated.
Config.json: webhook → handle:filesystem → handle:miss → catch-all
with check:true.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Sign up for freeto 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.

1 participant

@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' [nest] Add NestJS support on Vercel by VaguelySerious · Pull Request #1472 · vercel/workflow · GitHub
Skip to content

[nest] Add NestJS support on Vercel - #1472

Closed
VaguelySerious wants to merge 95 commits into
mainfrom
peter/nest-fix-mar-20
Closed

[nest] Add NestJS support on Vercel#1472
VaguelySerious wants to merge 95 commits into
mainfrom
peter/nest-fix-mar-20

Conversation

@VaguelySerious

@VaguelySeriousVaguelySerious commented Mar 20, 2026

Copy link
Copy Markdown
Member

Extends builder to bundle separate functions for app/flow/step routes with experimentalTriggers enabled, allowing queue callbacks when deployed to Vercel, and adds e2e tests for the Vercel environment.

Related:

@changeset-bot

changeset-botBot commented Mar 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5d7ef34

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

This PR includes changesets to release 16 packages
NameType
@workflow/nestPatch
workflowPatch
@workflow/aiPatch
@workflow/world-testingPatch
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/astroPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

vercelBot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production777367847
✅ 💻 Local Development7820142924
✅ 📦 Local Production7820142924
✅ 🐘 Local Postgres7820142924
✅ 🪟 Windows720577
❌ 🌍 Community Worlds1185621195
✅ 📋 Other198033231
Total3511595524122

❌ Failed Tests

▲ Vercel Production (3 failed)

hono (2 failed):

nuxt (1 failed):

  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMDYYDFB01BTRJWV0G6BM9Q0 | 🔍 observability
🌍 Community Worlds (56 failed)

mongodb (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMDYPNQCQF0P2A1KHX2DGAGD
  • webhookWorkflow | wrun_01KMDYQ4D90V2PW2AHJ6EPJX90
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMDYXKZ00QTQT1Z9CXMDBJ7S

redis (2 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMDYPNQCQF0P2A1KHX2DGAGD
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMDYXKZ00QTQT1Z9CXMDBJ7S

turso (51 failed):

  • addTenWorkflow | wrun_01KMDYNHM3VGEKP7NXJ9240102
  • addTenWorkflow | wrun_01KMDYNHM3VGEKP7NXJ9240102
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KMDYPV79A7BXN4DPWPCX6WWN
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KMDYNRANBQPHKC249W6THZ4P
  • promiseRaceWorkflow | wrun_01KMDYNWVBYZN8X1RV4329QN38
  • promiseAnyWorkflow | wrun_01KMDYNYZR398MDDX8Z76B1W84
  • importedStepOnlyWorkflow | wrun_01KMDYQ5H0WQAR7NSAK47CK327
  • hookWorkflow | wrun_01KMDYPBH4P5VJDNEX0W7Y3JQ3
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMDYPNQCQF0P2A1KHX2DGAGD
  • webhookWorkflow | wrun_01KMDYQ4D90V2PW2AHJ6EPJX90
  • sleepingWorkflow | wrun_01KMDYQBK6CV7NDVA59SKYGYVC
  • parallelSleepWorkflow | wrun_01KMDYQRNRVK3W4EFK37KWEZK8
  • nullByteWorkflow | wrun_01KMDYQX5F3A8B7NY0TGWNSVR7
  • workflowAndStepMetadataWorkflow | wrun_01KMDYR0F4B9S9GPFC7YH4EBXV
  • fetchWorkflow | wrun_01KMDYSTFC0FN37TJTPHTH87E8
  • promiseRaceStressTestWorkflow | wrun_01KMDYSY54AFHZ3916K3BCJ3HV
  • 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 | wrun_01KMDYWTSFT1AWC2X1YD0BRH7H
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMDYXKZ00QTQT1Z9CXMDBJ7S
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMDYYDFB01BTRJWV0G6BM9Q0
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KMDYZ20RQ2P9796YXAE7J3GJ
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KMDYZBE25VR14DDXF88ADEBS
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KMDYZK5NKVAMAQT3TV7KGT8A
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KMDYZP55RC0JKGVCF02PJG1A
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMDZ07FQHE5WK4421J1Y6YCZ
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KMDZ0E81K08X7CEK5KB5G73E
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KMDZ0KPJHJ3EWC4J9BGT0K9Y
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KMDZ0TPRSC9Q6YCKHX2X2DSW
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KMDZ11DYDVATRGCSJYVG4J4W
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KMDZ1888XYQ4C4JF0TRYMEVR
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KMDZ1G50ATZXXTZBK31HPVMP
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KMDZ1V5R4XE1WAKQ1NDDS30A
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KMDZ246Y3TVA9RK18FYQPSX0
  • cancelRun - cancelling a running workflow | wrun_01KMDZ2AYCED42T9HZPK32ESXZ
  • cancelRun via CLI - cancelling a running workflow | wrun_01KMDZ2M8PGXZ9KE5ZSE2H51N0
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KMDZ30ED1M4XX0VVF3YNCKYY
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KMDZ3NWX7TH9D6G5Q2S80KRC
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KMDZ408Q6ST32VK529QAKS6V

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro7007
✅ example7007
✅ express7007
✅ fastify7007
❌ hono6827
✅ nextjs-turbopack7502
✅ nextjs-webpack7502
✅ nitro7007
❌ nuxt6917
✅ sveltekit7007
✅ vite7007
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable66011
✅ express-stable66011
✅ fastify-stable66011
✅ hono-stable66011
✅ nextjs-turbopack-canary55022
✅ nextjs-turbopack-stable7205
✅ nextjs-webpack-canary55022
✅ nextjs-webpack-stable7205
✅ nitro-stable66011
✅ nuxt-stable66011
✅ sveltekit-stable66011
✅ vite-stable66011
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable66011
✅ express-stable66011
✅ fastify-stable66011
✅ hono-stable66011
✅ nextjs-turbopack-canary55022
✅ nextjs-turbopack-stable7205
✅ nextjs-webpack-canary55022
✅ nextjs-webpack-stable7205
✅ nitro-stable66011
✅ nuxt-stable66011
✅ sveltekit-stable66011
✅ vite-stable66011
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable66011
✅ express-stable66011
✅ fastify-stable66011
✅ hono-stable66011
✅ nextjs-turbopack-canary55022
✅ nextjs-turbopack-stable7205
✅ nextjs-webpack-canary55022
✅ nextjs-webpack-stable7205
✅ nitro-stable66011
✅ nuxt-stable66011
✅ sveltekit-stable66011
✅ vite-stable66011
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack7205
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev302
❌ mongodb5235
✅ redis-dev302
❌ redis5325
✅ turso-dev302
❌ turso4515
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable66011
✅ e2e-local-postgres-nest-stable66011
✅ e2e-local-prod-nest-stable66011

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

@github-actions

github-actionsBot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.043s (-4.0%)1.005s (~)0.962s101.00x
💻 LocalNitro0.043s (-8.4% 🟢)1.005s (~)0.962s101.01x
🌐 RedisNext.js (Turbopack)0.053s1.006s0.953s101.23x
🐘 PostgresNext.js (Turbopack)0.058s1.012s0.954s101.34x
🐘 PostgresNitro0.061s (-11.5% 🟢)1.012s (~)0.951s101.43x
🐘 PostgresExpress0.076s (+7.0% 🔺)1.028s (+1.1%)0.952s101.77x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.472s (-4.9%)2.714s (+6.7% 🔺)2.242s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.123s (-1.4%)2.014s (~)0.890s101.00x
🌐 RedisNext.js (Turbopack)1.123s2.007s0.884s101.00x
💻 LocalExpress1.125s (~)2.006s (~)0.881s101.00x
💻 LocalNitro1.130s (~)2.006s (~)0.876s101.01x
🐘 PostgresNitro1.149s (+0.6%)2.013s (~)0.863s101.02x
🐘 PostgresNext.js (Turbopack)1.153s2.013s0.860s101.03x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.139s (-8.5% 🟢)3.701s (-4.5%)1.562s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express10.755s (-1.4%)11.040s (~)0.285s31.00x
🌐 RedisNext.js (Turbopack)10.794s11.022s0.229s31.00x
🐘 PostgresNext.js (Turbopack)10.886s11.043s0.157s31.01x
💻 LocalExpress10.915s (~)11.023s (~)0.108s31.01x
💻 LocalNitro10.947s (~)11.024s (~)0.077s31.02x
🐘 PostgresNitro10.994s (~)11.376s (+3.0%)0.383s31.02x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.359s (~)19.980s (+5.9% 🔺)2.621s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express14.188s (-2.7%)15.042s (~)0.854s41.00x
🌐 RedisNext.js (Turbopack)14.198s15.028s0.830s41.00x
🐘 PostgresNext.js (Turbopack)14.484s15.042s0.558s41.02x
🐘 PostgresNitro14.772s (~)15.045s (~)0.274s41.04x
💻 LocalExpress14.923s (-0.5%)15.029s (-3.2%)0.106s41.05x
💻 LocalNitro14.942s (~)15.029s (~)0.087s41.05x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro38.029s (+17.6% 🔺)40.139s (+15.5% 🔺)2.110s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express13.360s (-4.7%)14.043s (-2.9%)0.682s71.00x
🌐 RedisNext.js (Turbopack)13.429s14.025s0.597s71.01x
🐘 PostgresNext.js (Turbopack)13.796s14.036s0.240s71.03x
🐘 PostgresNitro14.299s (~)15.040s (~)0.741s61.07x
💻 LocalExpress16.611s (~)17.029s (~)0.417s61.24x
💻 LocalNitro16.628s (+1.0%)17.031s (~)0.403s61.24x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro60.687s (+7.9% 🔺)62.475s (+9.1% 🔺)1.788s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.213s (-4.2%)2.011s (~)0.798s151.00x
🐘 PostgresNext.js (Turbopack)1.265s2.012s0.746s151.04x
🐘 PostgresNitro1.281s (-0.9%)2.011s (~)0.730s151.06x
🌐 RedisNext.js (Turbopack)1.396s2.006s0.611s151.15x
💻 LocalExpress1.504s (~)2.005s (~)0.501s151.24x
💻 LocalNitro1.517s (+2.3%)2.005s (~)0.488s151.25x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.535s (-3.2%)4.036s (-3.9%)1.501s81.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.348s (-4.6%)3.012s (~)0.664s101.00x
🐘 PostgresNitro2.430s (-1.6%)3.012s (~)0.582s101.03x
🐘 PostgresNext.js (Turbopack)2.480s3.012s0.532s101.06x
🌐 RedisNext.js (Turbopack)2.731s3.108s0.377s101.16x
💻 LocalNitro2.901s (+1.0%)3.341s (+7.5% 🔺)0.440s91.24x
💻 LocalExpress2.948s (-1.7%)3.308s (-7.2% 🟢)0.360s101.26x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.473s (+36.9% 🔺)5.099s (+33.9% 🔺)1.626s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.539s (-1.4%)4.014s (~)0.475s81.00x
🐘 PostgresNitro3.619s (~)4.013s (~)0.394s81.02x
🐘 PostgresNext.js (Turbopack)3.771s4.016s0.245s81.07x
🌐 RedisNext.js (Turbopack)4.173s4.868s0.695s71.18x
💻 LocalNitro8.268s (+1.8%)9.019s (+2.8%)0.751s42.34x
💻 LocalExpress8.483s (~)9.023s (~)0.540s42.40x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.366s (+10.6% 🔺)5.161s (+15.5% 🔺)1.795s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.215s (-3.5%)2.011s (~)0.797s151.00x
🐘 PostgresNext.js (Turbopack)1.240s2.011s0.771s151.02x
🐘 PostgresNitro1.267s (-0.8%)2.012s (~)0.745s151.04x
🌐 RedisNext.js (Turbopack)1.310s2.006s0.697s151.08x
💻 LocalExpress1.555s (+1.2%)2.006s (~)0.451s151.28x
💻 LocalNitro1.632s (+4.6%)2.073s (+3.3%)0.441s151.34x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.594s (+22.1% 🔺)3.961s (+7.3% 🔺)1.367s81.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.349s (-4.1%)3.012s (~)0.663s101.00x
🐘 PostgresNitro2.431s (-1.1%)3.013s (~)0.582s101.03x
🐘 PostgresNext.js (Turbopack)2.466s3.010s0.544s101.05x
🌐 RedisNext.js (Turbopack)2.681s3.108s0.427s101.14x
💻 LocalNitro3.067s (+1.3%)3.884s (+5.7% 🔺)0.818s81.31x
💻 LocalExpress3.177s (+4.8%)3.886s (+3.4%)0.709s81.35x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.965s (+14.6% 🔺)4.182s (+8.3% 🔺)1.217s81.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.518s (-2.3%)4.013s (~)0.495s81.00x
🐘 PostgresNitro3.556s (-1.7%)4.015s (~)0.458s81.01x
🐘 PostgresNext.js (Turbopack)3.754s4.015s0.261s81.07x
🌐 RedisNext.js (Turbopack)4.134s4.867s0.734s71.17x
💻 LocalNitro8.968s (+3.8%)9.271s (+2.8%)0.303s42.55x
💻 LocalExpress9.146s (+1.0%)9.772s (~)0.626s42.60x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.948s (+39.5% 🔺)5.897s (+33.1% 🔺)1.949s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.665s (-23.2% 🟢)1.009s (-1.6%)0.344s601.00x
🌐 RedisNext.js (Turbopack)0.679s1.005s0.326s601.02x
🐘 PostgresNext.js (Turbopack)0.843s1.044s0.200s581.27x
🐘 PostgresNitro0.900s (~)1.043s (~)0.143s581.35x
💻 LocalNitro0.989s (+3.4%)1.159s (+13.4% 🔺)0.170s521.49x
💻 LocalExpress0.989s (+0.6%)1.229s (+12.2% 🔺)0.240s491.49x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro10.144s (+6.3% 🔺)11.529s (+5.4% 🔺)1.385s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.597s (-24.5% 🟢)2.010s (-33.2% 🟢)0.413s451.00x
🌐 RedisNext.js (Turbopack)1.639s2.006s0.367s451.03x
🐘 PostgresNext.js (Turbopack)2.050s2.658s0.609s341.28x
🐘 PostgresNitro2.151s (~)3.012s (+1.1%)0.861s301.35x
💻 LocalNitro2.959s (~)3.111s (~)0.152s291.85x
💻 LocalExpress3.012s (~)3.508s (-1.1%)0.496s261.89x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro31.899s (+2.8%)33.848s (+4.2%)1.948s31.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)3.256s4.008s0.752s301.00x
🐘 PostgresExpress3.373s (-20.9% 🟢)4.014s (-19.3% 🟢)0.640s301.04x
🐘 PostgresNext.js (Turbopack)4.038s4.495s0.457s271.24x
🐘 PostgresNitro4.360s (+0.6%)5.014s (~)0.653s241.34x
💻 LocalExpress9.093s (-0.6%)9.633s (-1.6%)0.540s132.79x
💻 LocalNitro9.123s (+1.0%)9.788s (+3.3%)0.665s132.80x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro101.326s (+9.8% 🔺)103.336s (+9.7% 🔺)2.010s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.254s (-15.8% 🟢)1.009s (~)0.755s601.00x
🐘 PostgresNext.js (Turbopack)0.260s1.008s0.748s601.02x
🐘 PostgresNitro0.301s (+2.3%)1.009s (~)0.708s601.18x
🌐 RedisNext.js (Turbopack)0.404s1.004s0.600s601.59x
💻 LocalExpress0.581s (-3.7%)1.004s (~)0.424s602.28x
💻 LocalNitro0.603s (+0.8%)1.005s (~)0.402s602.37x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.418s (+4.3%)4.071s (+5.3% 🔺)1.652s151.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.434s (-17.7% 🟢)1.009s (~)0.575s901.00x
🐘 PostgresNext.js (Turbopack)0.522s1.009s0.486s901.20x
🐘 PostgresNitro0.525s (-2.5%)1.009s (~)0.484s901.21x
🌐 RedisNext.js (Turbopack)1.132s2.006s0.874s452.61x
💻 LocalExpress2.555s (-1.0%)3.009s (~)0.454s305.88x
💻 LocalNitro2.557s (+3.3%)3.009s (~)0.452s305.89x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.288s (+13.5% 🔺)4.816s (+14.2% 🔺)1.528s191.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.621s (-30.9% 🟢)1.009s (-3.1%)0.388s1191.00x
🐘 PostgresNext.js (Turbopack)0.848s1.027s0.179s1171.37x
🐘 PostgresNitro0.883s (-5.9% 🟢)1.068s (-10.4% 🟢)0.185s1131.42x
🌐 RedisNext.js (Turbopack)2.703s3.032s0.329s404.36x
💻 LocalExpress11.180s (-0.9%)11.844s (-1.5%)0.664s1118.01x
💻 LocalNitro11.609s (+4.4%)12.028s (+3.1%)0.419s1018.71x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro8.450s (+1.1%)10.227s (+4.9%)1.777s121.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.168s (-22.6% 🟢)0.999s (~)0.001s (+16.7% 🔺)1.013s (~)0.845s101.00x
🌐 RedisNext.js (Turbopack)0.188s0.999s0.002s1.007s0.819s101.12x
🐘 PostgresNext.js (Turbopack)0.199s1.001s0.001s1.012s0.812s101.19x
💻 LocalExpress0.200s (-2.3%)1.003s (~)0.012s (+0.8%)1.017s (~)0.818s101.19x
💻 LocalNitro0.201s (+2.1%)1.003s (~)0.012s (+3.4%)1.018s (~)0.817s101.20x
🐘 PostgresNitro0.207s (-13.5% 🟢)0.995s (~)0.001s (-14.3% 🟢)1.012s (~)0.805s101.23x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.722s (+4.3%)2.689s (~)0.582s (+9595.0% 🔺)3.850s (+17.6% 🔺)2.128s101.00x
▲ VercelExpress⚠️missing-----
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.475s1.000s0.003s1.011s0.536s601.00x
🐘 PostgresExpress0.578s (-16.7% 🟢)1.005s (~)0.003s (-13.3% 🟢)1.024s (~)0.446s591.21x
🐘 PostgresNext.js (Turbopack)0.654s1.009s0.005s1.026s0.372s591.37x
🐘 PostgresNitro0.681s (-5.8% 🟢)1.004s (~)0.009s (+153.1% 🔺)1.034s (+0.7%)0.354s591.43x
💻 LocalExpress0.733s (-5.6% 🟢)1.009s (-1.7%)0.010s (+6.8% 🔺)1.024s (-1.6%)0.291s591.54x
💻 LocalNitro0.744s (+2.4%)1.009s (~)0.009s (-0.7%)1.022s (~)0.278s591.56x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro4.730s (+9.3% 🔺)6.026s (+9.4% 🔺)0.192s (-26.5% 🟢)6.994s (+11.1% 🔺)2.265s91.00x
▲ VercelExpress⚠️missing-----
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.890s1.017s0.000s1.021s0.132s591.00x
🐘 PostgresExpress1.022s (+14.4% 🔺)1.578s (+45.7% 🔺)0.000s (+623.7% 🔺)1.590s (+43.9% 🔺)0.568s381.15x
🐘 PostgresNext.js (Turbopack)1.087s1.623s0.000s1.632s0.546s371.22x
🐘 PostgresNitro1.100s (+19.4% 🔺)1.868s (+75.8% 🔺)0.000s (-12.5% 🟢)1.886s (+74.5% 🔺)0.787s321.24x
💻 LocalExpress1.262s (~)2.021s (~)0.000s (-41.2% 🟢)2.024s (~)0.762s301.42x
💻 LocalNitro1.283s (+4.7%)2.022s (~)0.000s (-30.8% 🟢)2.025s (~)0.743s301.44x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.926s (+15.3% 🔺)3.896s (+21.2% 🔺)0.000s (+242.9% 🔺)4.547s (+21.0% 🔺)1.621s141.00x
▲ VercelExpress⚠️missing-----
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.573s2.001s0.000s2.006s0.434s301.00x
🐘 PostgresExpress1.953s (+8.3% 🔺)2.216s (+5.6% 🔺)0.000s (+Infinity% 🔺)2.226s (+5.0%)0.273s281.24x
🐘 PostgresNitro2.014s (+6.5% 🔺)2.475s (+11.5% 🔺)0.000s (-100.0% 🟢)2.493s (+11.3% 🔺)0.479s251.28x
🐘 PostgresNext.js (Turbopack)2.194s2.776s0.000s2.784s0.590s221.40x
💻 LocalExpress3.616s (+5.0% 🔺)4.098s (~)0.000s (-12.5% 🟢)4.102s (~)0.486s152.30x
💻 LocalNitro3.744s (+12.5% 🔺)4.166s (+5.0%)0.000s (+28.0% 🔺)4.171s (+5.0%)0.427s152.38x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro4.120s (+22.1% 🔺)4.819s (+6.2% 🔺)0.000s (+118.2% 🔺)5.554s (+9.3% 🔺)1.434s111.00x
▲ VercelExpress⚠️missing-----
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress15/21
🐘 PostgresExpress20/21
▲ VercelNitro21/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres20/21
Next.js (Turbopack)🌐 Redis12/21
Nitro🐘 Postgres16/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


Some benchmark jobs failed:

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

Check the workflow run for details.

@vercelvercelBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Additional Suggestion:

Missing esbuild dependency in @workflow/nest package.json causes runtime MODULE_NOT_FOUND error when calling buildVercelOutput().

Fix on Vercel

Comment threaddocs/content/docs/getting-started/nestjs.mdx Outdated
NestLocalBuilder.build() only generates runtime .mjs bundles for the
WorkflowController — no Vercel Build Output API functions are created.
VQS discovers consumers via experimentalTriggers in .vc-config.json,
so NestJS deployments silently fail with "no v2beta consumer".
Add buildVercelOutput() which generates:
- .well-known/workflow/v1/step.func with STEP_QUEUE_TRIGGER
- .well-known/workflow/v1/flow.func with WORKFLOW_QUEUE_TRIGGER
- .well-known/workflow/v1/webhook/[token].func
- api/index.js.func (esbuild-bundled NestJS app)
- config.json with routing rules
Also update NestJS getting-started docs and README with Vercel
deployment instructions.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
VaguelySeriousand others added 2 commits March 20, 2026 16:30
Add nest to the e2e-vercel-prod matrix in tests.yml with the correct
project ID (prj_G3RlX1TsB5V2hcqTNvuVoJXdfE1o) and slug
(workbench-nestjs-workflow).
Set up the workbench for Vercel Build Output API deployment:
- Add api/index.js entry point for the NestJS serverless function
- Add scripts/build-vercel.ts postbuild step calling buildVercelOutput()
- Update vercel.json with buildCommand
- Fix project slug in create-test-matrix.mjs
- Clear framework preset from "NestJS" to "Other" on Vercel project
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add a `build` subcommand to the workflow-nest CLI that builds workflow
bundles and, when VERCEL env is detected, automatically generates the
Build Output API with experimentalTriggers. The entry point is auto-
detected from api/index.js (or can be specified via --entry).
This replaces the need for a custom scripts/build-vercel.ts file —
users just add `"postbuild": "workflow-nest build"` to package.json.
Also document the Vercel project requirement: framework preset must be
set to "Other" (not "NestJS") to avoid conflicting with Build Output API.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
VaguelySeriousand others added 28 commits March 21, 2026 05:54
The workflow-nest build CLI copies manifest.json to dist/ during
postbuild. The app.module.ts reads it at module load time using
join(process.cwd(), 'dist', 'workflow-manifest.json'). On Vercel's
Lambda, CWD is the project root and dist/ is always NFT-included.
The globalThis.__workflowManifestJson value is read by the
WorkflowController as a fallback when readFileSync fails.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
NFT can't trace readFileSync with computed paths. But it DOES trace
dynamic import() with string literals. Generate a JS module
(dist/workflow-manifest.js) and use await import('./workflow-manifest.js')
in app.module.ts. NFT sees the static string and includes the file.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The env var may not be reaching the Lambda runtime. Force-set it
in app.module.ts at import time when VERCEL env is detected.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Top-level await may crash in the Vercel Lambda context. Use
createRequire(import.meta.url) for synchronous require() of
the manifest module.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SWC compiles app.module.ts to CJS. The createRequire require() can't
load ESM modules. Write the manifest module as CJS (module.exports)
instead of ESM (export default).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
With package.json type=module, .js files are ESM. CJS module.exports
in a .js file is misinterpreted. Use .cjs extension to force CJS.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ively
.cjs files may not be included by the NestJS Vercel preset. Use .json
which require() auto-parses and is universally included in dist/.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
In ESM modules, bare require() isn't available. createRequire creates
a require function that resolves relative to the file. The .json file
in dist/ IS copied to the Lambda by the NestJS Vercel preset (it
copies all of dist/). This approach works both locally and on Vercel.
Verified locally: globalThis.__workflowManifestJson is set correctly.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The fix:
1. prebuild: workflow-nest build generates .nestjs/workflow/manifest.json
2. nest-cli.json assets: copies manifest to dist/workflow/manifest.json
3. nest build: produces dist/ with the manifest included
4. app.module.ts: createRequire loads dist/workflow/manifest.json
5. NestJS Vercel preset includes ALL nest build output in Lambda
Key insight: nest build's assets copy runs during compilation, so the
manifest is part of the official dist/ output that the NestJS Vercel
preset deploys. No NFT tracing needed.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add configureManifest(json) to WorkflowController which sets the
manifest as a string constant. The controller checks this before
falling back to readFileSync. WorkflowModule.forRoot() accepts a
manifestJson option that calls configureManifest during setup.
In the workbench:
- prebuild generates manifest via workflow-nest build
- nest-cli.json assets copies it to dist/workflow/manifest.json
- app.module.ts loads it via createRequire and passes to forRoot()
- On Vercel, the controller serves the pre-loaded manifest directly
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The definitive fix for the manifest on Vercel:
1. prebuild: workflow-nest build generates src/_manifest-data.ts
containing the manifest as an exported string constant
2. nest build: SWC compiles it to dist/_manifest-data.js
3. app.module.ts: imports _manifest-data.js via standard ESM import
4. NFT traces the standard import and includes the compiled module
5. WorkflowModule.forRoot({ manifestJson }) passes it to the controller
This avoids ALL the previous issues:
- No readFileSync with untraceable paths
- No createRequire that NFT can't follow
- No .cjs/.json files that Vercel doesn't include
- The manifest is part of the standard compiled output
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The WorkflowController imports steps.mjs/workflows.mjs from outDir.
On Vercel, these need to be in the Lambda. NestJS CLI assets copies
them from .nestjs/workflow/ to dist/workflow/ during nest build. Set
outDir to dist/workflow/ on Vercel so the controller finds them.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…I for workflows
Use framework=null. Generate Build Output API for step/flow/webhook
with experimentalTriggers. Use api/index.js with @vercel/node and
includeFiles for the NestJS handler with the workflow bundles.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… functions
Go back to framework=nestjs. The NestJS preset + Build Output API
should coexist — the preset handles the NestJS handler, and the
Build Output API provides step/flow/webhook functions with
experimentalTriggers for VQS.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
On Vercel, the .mjs bundle files aren't in the Lambda (NFT can't
trace dynamic import(pathToFileURL(...))). Fix by:
1. CLI build generates _steps-bundle.ts, _workflows-bundle.ts,
_webhook-bundle.ts with base64-encoded bundle content
2. nest build compiles them → NFT traces standard imports
3. app.module.ts loads base64 data into globalThis
4. WorkflowController.loadBundle() tries filesystem first, then
decodes base64, writes to /tmp/, and imports from there
This makes workflow execution work on Vercel:
- VQS delivers to the NestJS handler (merged lambda)
- The handler's WorkflowController loads bundles from /tmp/
- Workflows execute successfully
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dynamic await import() is NOT traced by @vercel/nft. Static import
statements ARE traced. Change from:
const { data } = await import('./_steps-bundle.js') // NOT traced
to:
import { data } from './_steps-bundle.js' // TRACED by NFT
SWC preserves static import statements as-is in the compiled output.
This ensures dist/_steps-bundle.js is included in the Vercel Lambda.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The .mjs bundles import 'workflow' and other packages that resolve
from node_modules/. Writing to /tmp/ breaks package resolution.
Use process.cwd()/.wf_bundles so node_modules is in the parent chain.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Lambda is read-only except /tmp/. Write bundles to /tmp/ and
symlink node_modules from the project root so the bundles can
resolve packages like 'workflow'.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two fixes:
1. Generate Build Output API FIRST, then create TS bundle wrappers
from the self-contained CJS bundles (not the local .mjs ones)
2. Use .cjs extension when writing bundles to /tmp/ so Node.js
treats them as CJS regardless of package.json type
The BOA bundles have ALL dependencies inlined — no external package
resolution needed. This fixes 'Cannot find package workflow' error.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Static imports crash if the files don't exist during nest start
(local dev). Check in empty placeholders so they always exist.
The workflow-nest build CLI overwrites them with actual data.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…a outputs
With framework=nestjs, all functions merge into 1 lambda, losing
experimentalTriggers. With framework=null, Build Output API creates
separate lambda outputs for step, flow, webhook (with triggers) and
__nestjs (esbuild-bundled NestJS handler).
The esbuild step only runs in postbuild (when dist/ exists from nest
build). In prebuild, only workflow bundles and TS files are generated.
Config.json: webhook → handle:filesystem → handle:miss → catch-all
with check:true.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Sign up for freeto 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.

1 participant

@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' [nest] Add NestJS support on Vercel by VaguelySerious · Pull Request #1472 · vercel/workflow · GitHub
Skip to content

[nest] Add NestJS support on Vercel - #1472

Closed
VaguelySerious wants to merge 95 commits into
mainfrom
peter/nest-fix-mar-20
Closed

[nest] Add NestJS support on Vercel#1472
VaguelySerious wants to merge 95 commits into
mainfrom
peter/nest-fix-mar-20

Conversation

@VaguelySerious

@VaguelySeriousVaguelySerious commented Mar 20, 2026

Copy link
Copy Markdown
Member

Extends builder to bundle separate functions for app/flow/step routes with experimentalTriggers enabled, allowing queue callbacks when deployed to Vercel, and adds e2e tests for the Vercel environment.

Related:

@changeset-bot

changeset-botBot commented Mar 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5d7ef34

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

This PR includes changesets to release 16 packages
NameType
@workflow/nestPatch
workflowPatch
@workflow/aiPatch
@workflow/world-testingPatch
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/astroPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

vercelBot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production777367847
✅ 💻 Local Development7820142924
✅ 📦 Local Production7820142924
✅ 🐘 Local Postgres7820142924
✅ 🪟 Windows720577
❌ 🌍 Community Worlds1185621195
✅ 📋 Other198033231
Total3511595524122

❌ Failed Tests

▲ Vercel Production (3 failed)

hono (2 failed):

nuxt (1 failed):

  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMDYYDFB01BTRJWV0G6BM9Q0 | 🔍 observability
🌍 Community Worlds (56 failed)

mongodb (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMDYPNQCQF0P2A1KHX2DGAGD
  • webhookWorkflow | wrun_01KMDYQ4D90V2PW2AHJ6EPJX90
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMDYXKZ00QTQT1Z9CXMDBJ7S

redis (2 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMDYPNQCQF0P2A1KHX2DGAGD
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMDYXKZ00QTQT1Z9CXMDBJ7S

turso (51 failed):

  • addTenWorkflow | wrun_01KMDYNHM3VGEKP7NXJ9240102
  • addTenWorkflow | wrun_01KMDYNHM3VGEKP7NXJ9240102
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KMDYPV79A7BXN4DPWPCX6WWN
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KMDYNRANBQPHKC249W6THZ4P
  • promiseRaceWorkflow | wrun_01KMDYNWVBYZN8X1RV4329QN38
  • promiseAnyWorkflow | wrun_01KMDYNYZR398MDDX8Z76B1W84
  • importedStepOnlyWorkflow | wrun_01KMDYQ5H0WQAR7NSAK47CK327
  • hookWorkflow | wrun_01KMDYPBH4P5VJDNEX0W7Y3JQ3
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMDYPNQCQF0P2A1KHX2DGAGD
  • webhookWorkflow | wrun_01KMDYQ4D90V2PW2AHJ6EPJX90
  • sleepingWorkflow | wrun_01KMDYQBK6CV7NDVA59SKYGYVC
  • parallelSleepWorkflow | wrun_01KMDYQRNRVK3W4EFK37KWEZK8
  • nullByteWorkflow | wrun_01KMDYQX5F3A8B7NY0TGWNSVR7
  • workflowAndStepMetadataWorkflow | wrun_01KMDYR0F4B9S9GPFC7YH4EBXV
  • fetchWorkflow | wrun_01KMDYSTFC0FN37TJTPHTH87E8
  • promiseRaceStressTestWorkflow | wrun_01KMDYSY54AFHZ3916K3BCJ3HV
  • 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 | wrun_01KMDYWTSFT1AWC2X1YD0BRH7H
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMDYXKZ00QTQT1Z9CXMDBJ7S
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMDYYDFB01BTRJWV0G6BM9Q0
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KMDYZ20RQ2P9796YXAE7J3GJ
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KMDYZBE25VR14DDXF88ADEBS
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KMDYZK5NKVAMAQT3TV7KGT8A
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KMDYZP55RC0JKGVCF02PJG1A
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMDZ07FQHE5WK4421J1Y6YCZ
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KMDZ0E81K08X7CEK5KB5G73E
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KMDZ0KPJHJ3EWC4J9BGT0K9Y
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KMDZ0TPRSC9Q6YCKHX2X2DSW
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KMDZ11DYDVATRGCSJYVG4J4W
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KMDZ1888XYQ4C4JF0TRYMEVR
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KMDZ1G50ATZXXTZBK31HPVMP
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KMDZ1V5R4XE1WAKQ1NDDS30A
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KMDZ246Y3TVA9RK18FYQPSX0
  • cancelRun - cancelling a running workflow | wrun_01KMDZ2AYCED42T9HZPK32ESXZ
  • cancelRun via CLI - cancelling a running workflow | wrun_01KMDZ2M8PGXZ9KE5ZSE2H51N0
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KMDZ30ED1M4XX0VVF3YNCKYY
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KMDZ3NWX7TH9D6G5Q2S80KRC
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KMDZ408Q6ST32VK529QAKS6V

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro7007
✅ example7007
✅ express7007
✅ fastify7007
❌ hono6827
✅ nextjs-turbopack7502
✅ nextjs-webpack7502
✅ nitro7007
❌ nuxt6917
✅ sveltekit7007
✅ vite7007
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable66011
✅ express-stable66011
✅ fastify-stable66011
✅ hono-stable66011
✅ nextjs-turbopack-canary55022
✅ nextjs-turbopack-stable7205
✅ nextjs-webpack-canary55022
✅ nextjs-webpack-stable7205
✅ nitro-stable66011
✅ nuxt-stable66011
✅ sveltekit-stable66011
✅ vite-stable66011
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable66011
✅ express-stable66011
✅ fastify-stable66011
✅ hono-stable66011
✅ nextjs-turbopack-canary55022
✅ nextjs-turbopack-stable7205
✅ nextjs-webpack-canary55022
✅ nextjs-webpack-stable7205
✅ nitro-stable66011
✅ nuxt-stable66011
✅ sveltekit-stable66011
✅ vite-stable66011
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable66011
✅ express-stable66011
✅ fastify-stable66011
✅ hono-stable66011
✅ nextjs-turbopack-canary55022
✅ nextjs-turbopack-stable7205
✅ nextjs-webpack-canary55022
✅ nextjs-webpack-stable7205
✅ nitro-stable66011
✅ nuxt-stable66011
✅ sveltekit-stable66011
✅ vite-stable66011
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack7205
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev302
❌ mongodb5235
✅ redis-dev302
❌ redis5325
✅ turso-dev302
❌ turso4515
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable66011
✅ e2e-local-postgres-nest-stable66011
✅ e2e-local-prod-nest-stable66011

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

@github-actions

github-actionsBot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.043s (-4.0%)1.005s (~)0.962s101.00x
💻 LocalNitro0.043s (-8.4% 🟢)1.005s (~)0.962s101.01x
🌐 RedisNext.js (Turbopack)0.053s1.006s0.953s101.23x
🐘 PostgresNext.js (Turbopack)0.058s1.012s0.954s101.34x
🐘 PostgresNitro0.061s (-11.5% 🟢)1.012s (~)0.951s101.43x
🐘 PostgresExpress0.076s (+7.0% 🔺)1.028s (+1.1%)0.952s101.77x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.472s (-4.9%)2.714s (+6.7% 🔺)2.242s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.123s (-1.4%)2.014s (~)0.890s101.00x
🌐 RedisNext.js (Turbopack)1.123s2.007s0.884s101.00x
💻 LocalExpress1.125s (~)2.006s (~)0.881s101.00x
💻 LocalNitro1.130s (~)2.006s (~)0.876s101.01x
🐘 PostgresNitro1.149s (+0.6%)2.013s (~)0.863s101.02x
🐘 PostgresNext.js (Turbopack)1.153s2.013s0.860s101.03x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.139s (-8.5% 🟢)3.701s (-4.5%)1.562s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express10.755s (-1.4%)11.040s (~)0.285s31.00x
🌐 RedisNext.js (Turbopack)10.794s11.022s0.229s31.00x
🐘 PostgresNext.js (Turbopack)10.886s11.043s0.157s31.01x
💻 LocalExpress10.915s (~)11.023s (~)0.108s31.01x
💻 LocalNitro10.947s (~)11.024s (~)0.077s31.02x
🐘 PostgresNitro10.994s (~)11.376s (+3.0%)0.383s31.02x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.359s (~)19.980s (+5.9% 🔺)2.621s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express14.188s (-2.7%)15.042s (~)0.854s41.00x
🌐 RedisNext.js (Turbopack)14.198s15.028s0.830s41.00x
🐘 PostgresNext.js (Turbopack)14.484s15.042s0.558s41.02x
🐘 PostgresNitro14.772s (~)15.045s (~)0.274s41.04x
💻 LocalExpress14.923s (-0.5%)15.029s (-3.2%)0.106s41.05x
💻 LocalNitro14.942s (~)15.029s (~)0.087s41.05x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro38.029s (+17.6% 🔺)40.139s (+15.5% 🔺)2.110s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express13.360s (-4.7%)14.043s (-2.9%)0.682s71.00x
🌐 RedisNext.js (Turbopack)13.429s14.025s0.597s71.01x
🐘 PostgresNext.js (Turbopack)13.796s14.036s0.240s71.03x
🐘 PostgresNitro14.299s (~)15.040s (~)0.741s61.07x
💻 LocalExpress16.611s (~)17.029s (~)0.417s61.24x
💻 LocalNitro16.628s (+1.0%)17.031s (~)0.403s61.24x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro60.687s (+7.9% 🔺)62.475s (+9.1% 🔺)1.788s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.213s (-4.2%)2.011s (~)0.798s151.00x
🐘 PostgresNext.js (Turbopack)1.265s2.012s0.746s151.04x
🐘 PostgresNitro1.281s (-0.9%)2.011s (~)0.730s151.06x
🌐 RedisNext.js (Turbopack)1.396s2.006s0.611s151.15x
💻 LocalExpress1.504s (~)2.005s (~)0.501s151.24x
💻 LocalNitro1.517s (+2.3%)2.005s (~)0.488s151.25x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.535s (-3.2%)4.036s (-3.9%)1.501s81.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.348s (-4.6%)3.012s (~)0.664s101.00x
🐘 PostgresNitro2.430s (-1.6%)3.012s (~)0.582s101.03x
🐘 PostgresNext.js (Turbopack)2.480s3.012s0.532s101.06x
🌐 RedisNext.js (Turbopack)2.731s3.108s0.377s101.16x
💻 LocalNitro2.901s (+1.0%)3.341s (+7.5% 🔺)0.440s91.24x
💻 LocalExpress2.948s (-1.7%)3.308s (-7.2% 🟢)0.360s101.26x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.473s (+36.9% 🔺)5.099s (+33.9% 🔺)1.626s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.539s (-1.4%)4.014s (~)0.475s81.00x
🐘 PostgresNitro3.619s (~)4.013s (~)0.394s81.02x
🐘 PostgresNext.js (Turbopack)3.771s4.016s0.245s81.07x
🌐 RedisNext.js (Turbopack)4.173s4.868s0.695s71.18x
💻 LocalNitro8.268s (+1.8%)9.019s (+2.8%)0.751s42.34x
💻 LocalExpress8.483s (~)9.023s (~)0.540s42.40x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.366s (+10.6% 🔺)5.161s (+15.5% 🔺)1.795s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.215s (-3.5%)2.011s (~)0.797s151.00x
🐘 PostgresNext.js (Turbopack)1.240s2.011s0.771s151.02x
🐘 PostgresNitro1.267s (-0.8%)2.012s (~)0.745s151.04x
🌐 RedisNext.js (Turbopack)1.310s2.006s0.697s151.08x
💻 LocalExpress1.555s (+1.2%)2.006s (~)0.451s151.28x
💻 LocalNitro1.632s (+4.6%)2.073s (+3.3%)0.441s151.34x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.594s (+22.1% 🔺)3.961s (+7.3% 🔺)1.367s81.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.349s (-4.1%)3.012s (~)0.663s101.00x
🐘 PostgresNitro2.431s (-1.1%)3.013s (~)0.582s101.03x
🐘 PostgresNext.js (Turbopack)2.466s3.010s0.544s101.05x
🌐 RedisNext.js (Turbopack)2.681s3.108s0.427s101.14x
💻 LocalNitro3.067s (+1.3%)3.884s (+5.7% 🔺)0.818s81.31x
💻 LocalExpress3.177s (+4.8%)3.886s (+3.4%)0.709s81.35x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.965s (+14.6% 🔺)4.182s (+8.3% 🔺)1.217s81.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.518s (-2.3%)4.013s (~)0.495s81.00x
🐘 PostgresNitro3.556s (-1.7%)4.015s (~)0.458s81.01x
🐘 PostgresNext.js (Turbopack)3.754s4.015s0.261s81.07x
🌐 RedisNext.js (Turbopack)4.134s4.867s0.734s71.17x
💻 LocalNitro8.968s (+3.8%)9.271s (+2.8%)0.303s42.55x
💻 LocalExpress9.146s (+1.0%)9.772s (~)0.626s42.60x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.948s (+39.5% 🔺)5.897s (+33.1% 🔺)1.949s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.665s (-23.2% 🟢)1.009s (-1.6%)0.344s601.00x
🌐 RedisNext.js (Turbopack)0.679s1.005s0.326s601.02x
🐘 PostgresNext.js (Turbopack)0.843s1.044s0.200s581.27x
🐘 PostgresNitro0.900s (~)1.043s (~)0.143s581.35x
💻 LocalNitro0.989s (+3.4%)1.159s (+13.4% 🔺)0.170s521.49x
💻 LocalExpress0.989s (+0.6%)1.229s (+12.2% 🔺)0.240s491.49x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro10.144s (+6.3% 🔺)11.529s (+5.4% 🔺)1.385s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.597s (-24.5% 🟢)2.010s (-33.2% 🟢)0.413s451.00x
🌐 RedisNext.js (Turbopack)1.639s2.006s0.367s451.03x
🐘 PostgresNext.js (Turbopack)2.050s2.658s0.609s341.28x
🐘 PostgresNitro2.151s (~)3.012s (+1.1%)0.861s301.35x
💻 LocalNitro2.959s (~)3.111s (~)0.152s291.85x
💻 LocalExpress3.012s (~)3.508s (-1.1%)0.496s261.89x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro31.899s (+2.8%)33.848s (+4.2%)1.948s31.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)3.256s4.008s0.752s301.00x
🐘 PostgresExpress3.373s (-20.9% 🟢)4.014s (-19.3% 🟢)0.640s301.04x
🐘 PostgresNext.js (Turbopack)4.038s4.495s0.457s271.24x
🐘 PostgresNitro4.360s (+0.6%)5.014s (~)0.653s241.34x
💻 LocalExpress9.093s (-0.6%)9.633s (-1.6%)0.540s132.79x
💻 LocalNitro9.123s (+1.0%)9.788s (+3.3%)0.665s132.80x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro101.326s (+9.8% 🔺)103.336s (+9.7% 🔺)2.010s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.254s (-15.8% 🟢)1.009s (~)0.755s601.00x
🐘 PostgresNext.js (Turbopack)0.260s1.008s0.748s601.02x
🐘 PostgresNitro0.301s (+2.3%)1.009s (~)0.708s601.18x
🌐 RedisNext.js (Turbopack)0.404s1.004s0.600s601.59x
💻 LocalExpress0.581s (-3.7%)1.004s (~)0.424s602.28x
💻 LocalNitro0.603s (+0.8%)1.005s (~)0.402s602.37x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.418s (+4.3%)4.071s (+5.3% 🔺)1.652s151.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.434s (-17.7% 🟢)1.009s (~)0.575s901.00x
🐘 PostgresNext.js (Turbopack)0.522s1.009s0.486s901.20x
🐘 PostgresNitro0.525s (-2.5%)1.009s (~)0.484s901.21x
🌐 RedisNext.js (Turbopack)1.132s2.006s0.874s452.61x
💻 LocalExpress2.555s (-1.0%)3.009s (~)0.454s305.88x
💻 LocalNitro2.557s (+3.3%)3.009s (~)0.452s305.89x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.288s (+13.5% 🔺)4.816s (+14.2% 🔺)1.528s191.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.621s (-30.9% 🟢)1.009s (-3.1%)0.388s1191.00x
🐘 PostgresNext.js (Turbopack)0.848s1.027s0.179s1171.37x
🐘 PostgresNitro0.883s (-5.9% 🟢)1.068s (-10.4% 🟢)0.185s1131.42x
🌐 RedisNext.js (Turbopack)2.703s3.032s0.329s404.36x
💻 LocalExpress11.180s (-0.9%)11.844s (-1.5%)0.664s1118.01x
💻 LocalNitro11.609s (+4.4%)12.028s (+3.1%)0.419s1018.71x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro8.450s (+1.1%)10.227s (+4.9%)1.777s121.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.168s (-22.6% 🟢)0.999s (~)0.001s (+16.7% 🔺)1.013s (~)0.845s101.00x
🌐 RedisNext.js (Turbopack)0.188s0.999s0.002s1.007s0.819s101.12x
🐘 PostgresNext.js (Turbopack)0.199s1.001s0.001s1.012s0.812s101.19x
💻 LocalExpress0.200s (-2.3%)1.003s (~)0.012s (+0.8%)1.017s (~)0.818s101.19x
💻 LocalNitro0.201s (+2.1%)1.003s (~)0.012s (+3.4%)1.018s (~)0.817s101.20x
🐘 PostgresNitro0.207s (-13.5% 🟢)0.995s (~)0.001s (-14.3% 🟢)1.012s (~)0.805s101.23x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.722s (+4.3%)2.689s (~)0.582s (+9595.0% 🔺)3.850s (+17.6% 🔺)2.128s101.00x
▲ VercelExpress⚠️missing-----
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.475s1.000s0.003s1.011s0.536s601.00x
🐘 PostgresExpress0.578s (-16.7% 🟢)1.005s (~)0.003s (-13.3% 🟢)1.024s (~)0.446s591.21x
🐘 PostgresNext.js (Turbopack)0.654s1.009s0.005s1.026s0.372s591.37x
🐘 PostgresNitro0.681s (-5.8% 🟢)1.004s (~)0.009s (+153.1% 🔺)1.034s (+0.7%)0.354s591.43x
💻 LocalExpress0.733s (-5.6% 🟢)1.009s (-1.7%)0.010s (+6.8% 🔺)1.024s (-1.6%)0.291s591.54x
💻 LocalNitro0.744s (+2.4%)1.009s (~)0.009s (-0.7%)1.022s (~)0.278s591.56x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro4.730s (+9.3% 🔺)6.026s (+9.4% 🔺)0.192s (-26.5% 🟢)6.994s (+11.1% 🔺)2.265s91.00x
▲ VercelExpress⚠️missing-----
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.890s1.017s0.000s1.021s0.132s591.00x
🐘 PostgresExpress1.022s (+14.4% 🔺)1.578s (+45.7% 🔺)0.000s (+623.7% 🔺)1.590s (+43.9% 🔺)0.568s381.15x
🐘 PostgresNext.js (Turbopack)1.087s1.623s0.000s1.632s0.546s371.22x
🐘 PostgresNitro1.100s (+19.4% 🔺)1.868s (+75.8% 🔺)0.000s (-12.5% 🟢)1.886s (+74.5% 🔺)0.787s321.24x
💻 LocalExpress1.262s (~)2.021s (~)0.000s (-41.2% 🟢)2.024s (~)0.762s301.42x
💻 LocalNitro1.283s (+4.7%)2.022s (~)0.000s (-30.8% 🟢)2.025s (~)0.743s301.44x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.926s (+15.3% 🔺)3.896s (+21.2% 🔺)0.000s (+242.9% 🔺)4.547s (+21.0% 🔺)1.621s141.00x
▲ VercelExpress⚠️missing-----
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.573s2.001s0.000s2.006s0.434s301.00x
🐘 PostgresExpress1.953s (+8.3% 🔺)2.216s (+5.6% 🔺)0.000s (+Infinity% 🔺)2.226s (+5.0%)0.273s281.24x
🐘 PostgresNitro2.014s (+6.5% 🔺)2.475s (+11.5% 🔺)0.000s (-100.0% 🟢)2.493s (+11.3% 🔺)0.479s251.28x
🐘 PostgresNext.js (Turbopack)2.194s2.776s0.000s2.784s0.590s221.40x
💻 LocalExpress3.616s (+5.0% 🔺)4.098s (~)0.000s (-12.5% 🟢)4.102s (~)0.486s152.30x
💻 LocalNitro3.744s (+12.5% 🔺)4.166s (+5.0%)0.000s (+28.0% 🔺)4.171s (+5.0%)0.427s152.38x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro4.120s (+22.1% 🔺)4.819s (+6.2% 🔺)0.000s (+118.2% 🔺)5.554s (+9.3% 🔺)1.434s111.00x
▲ VercelExpress⚠️missing-----
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress15/21
🐘 PostgresExpress20/21
▲ VercelNitro21/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres20/21
Next.js (Turbopack)🌐 Redis12/21
Nitro🐘 Postgres16/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


Some benchmark jobs failed:

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

Check the workflow run for details.

@vercelvercelBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Additional Suggestion:

Missing esbuild dependency in @workflow/nest package.json causes runtime MODULE_NOT_FOUND error when calling buildVercelOutput().

Fix on Vercel

Comment threaddocs/content/docs/getting-started/nestjs.mdx Outdated
NestLocalBuilder.build() only generates runtime .mjs bundles for the
WorkflowController — no Vercel Build Output API functions are created.
VQS discovers consumers via experimentalTriggers in .vc-config.json,
so NestJS deployments silently fail with "no v2beta consumer".
Add buildVercelOutput() which generates:
- .well-known/workflow/v1/step.func with STEP_QUEUE_TRIGGER
- .well-known/workflow/v1/flow.func with WORKFLOW_QUEUE_TRIGGER
- .well-known/workflow/v1/webhook/[token].func
- api/index.js.func (esbuild-bundled NestJS app)
- config.json with routing rules
Also update NestJS getting-started docs and README with Vercel
deployment instructions.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
VaguelySeriousand others added 2 commits March 20, 2026 16:30
Add nest to the e2e-vercel-prod matrix in tests.yml with the correct
project ID (prj_G3RlX1TsB5V2hcqTNvuVoJXdfE1o) and slug
(workbench-nestjs-workflow).
Set up the workbench for Vercel Build Output API deployment:
- Add api/index.js entry point for the NestJS serverless function
- Add scripts/build-vercel.ts postbuild step calling buildVercelOutput()
- Update vercel.json with buildCommand
- Fix project slug in create-test-matrix.mjs
- Clear framework preset from "NestJS" to "Other" on Vercel project
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add a `build` subcommand to the workflow-nest CLI that builds workflow
bundles and, when VERCEL env is detected, automatically generates the
Build Output API with experimentalTriggers. The entry point is auto-
detected from api/index.js (or can be specified via --entry).
This replaces the need for a custom scripts/build-vercel.ts file —
users just add `"postbuild": "workflow-nest build"` to package.json.
Also document the Vercel project requirement: framework preset must be
set to "Other" (not "NestJS") to avoid conflicting with Build Output API.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
VaguelySeriousand others added 28 commits March 21, 2026 05:54
The workflow-nest build CLI copies manifest.json to dist/ during
postbuild. The app.module.ts reads it at module load time using
join(process.cwd(), 'dist', 'workflow-manifest.json'). On Vercel's
Lambda, CWD is the project root and dist/ is always NFT-included.
The globalThis.__workflowManifestJson value is read by the
WorkflowController as a fallback when readFileSync fails.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
NFT can't trace readFileSync with computed paths. But it DOES trace
dynamic import() with string literals. Generate a JS module
(dist/workflow-manifest.js) and use await import('./workflow-manifest.js')
in app.module.ts. NFT sees the static string and includes the file.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The env var may not be reaching the Lambda runtime. Force-set it
in app.module.ts at import time when VERCEL env is detected.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Top-level await may crash in the Vercel Lambda context. Use
createRequire(import.meta.url) for synchronous require() of
the manifest module.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SWC compiles app.module.ts to CJS. The createRequire require() can't
load ESM modules. Write the manifest module as CJS (module.exports)
instead of ESM (export default).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
With package.json type=module, .js files are ESM. CJS module.exports
in a .js file is misinterpreted. Use .cjs extension to force CJS.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ively
.cjs files may not be included by the NestJS Vercel preset. Use .json
which require() auto-parses and is universally included in dist/.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
In ESM modules, bare require() isn't available. createRequire creates
a require function that resolves relative to the file. The .json file
in dist/ IS copied to the Lambda by the NestJS Vercel preset (it
copies all of dist/). This approach works both locally and on Vercel.
Verified locally: globalThis.__workflowManifestJson is set correctly.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The fix:
1. prebuild: workflow-nest build generates .nestjs/workflow/manifest.json
2. nest-cli.json assets: copies manifest to dist/workflow/manifest.json
3. nest build: produces dist/ with the manifest included
4. app.module.ts: createRequire loads dist/workflow/manifest.json
5. NestJS Vercel preset includes ALL nest build output in Lambda
Key insight: nest build's assets copy runs during compilation, so the
manifest is part of the official dist/ output that the NestJS Vercel
preset deploys. No NFT tracing needed.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add configureManifest(json) to WorkflowController which sets the
manifest as a string constant. The controller checks this before
falling back to readFileSync. WorkflowModule.forRoot() accepts a
manifestJson option that calls configureManifest during setup.
In the workbench:
- prebuild generates manifest via workflow-nest build
- nest-cli.json assets copies it to dist/workflow/manifest.json
- app.module.ts loads it via createRequire and passes to forRoot()
- On Vercel, the controller serves the pre-loaded manifest directly
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The definitive fix for the manifest on Vercel:
1. prebuild: workflow-nest build generates src/_manifest-data.ts
containing the manifest as an exported string constant
2. nest build: SWC compiles it to dist/_manifest-data.js
3. app.module.ts: imports _manifest-data.js via standard ESM import
4. NFT traces the standard import and includes the compiled module
5. WorkflowModule.forRoot({ manifestJson }) passes it to the controller
This avoids ALL the previous issues:
- No readFileSync with untraceable paths
- No createRequire that NFT can't follow
- No .cjs/.json files that Vercel doesn't include
- The manifest is part of the standard compiled output
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The WorkflowController imports steps.mjs/workflows.mjs from outDir.
On Vercel, these need to be in the Lambda. NestJS CLI assets copies
them from .nestjs/workflow/ to dist/workflow/ during nest build. Set
outDir to dist/workflow/ on Vercel so the controller finds them.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…I for workflows
Use framework=null. Generate Build Output API for step/flow/webhook
with experimentalTriggers. Use api/index.js with @vercel/node and
includeFiles for the NestJS handler with the workflow bundles.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… functions
Go back to framework=nestjs. The NestJS preset + Build Output API
should coexist — the preset handles the NestJS handler, and the
Build Output API provides step/flow/webhook functions with
experimentalTriggers for VQS.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
On Vercel, the .mjs bundle files aren't in the Lambda (NFT can't
trace dynamic import(pathToFileURL(...))). Fix by:
1. CLI build generates _steps-bundle.ts, _workflows-bundle.ts,
_webhook-bundle.ts with base64-encoded bundle content
2. nest build compiles them → NFT traces standard imports
3. app.module.ts loads base64 data into globalThis
4. WorkflowController.loadBundle() tries filesystem first, then
decodes base64, writes to /tmp/, and imports from there
This makes workflow execution work on Vercel:
- VQS delivers to the NestJS handler (merged lambda)
- The handler's WorkflowController loads bundles from /tmp/
- Workflows execute successfully
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dynamic await import() is NOT traced by @vercel/nft. Static import
statements ARE traced. Change from:
const { data } = await import('./_steps-bundle.js') // NOT traced
to:
import { data } from './_steps-bundle.js' // TRACED by NFT
SWC preserves static import statements as-is in the compiled output.
This ensures dist/_steps-bundle.js is included in the Vercel Lambda.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The .mjs bundles import 'workflow' and other packages that resolve
from node_modules/. Writing to /tmp/ breaks package resolution.
Use process.cwd()/.wf_bundles so node_modules is in the parent chain.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Lambda is read-only except /tmp/. Write bundles to /tmp/ and
symlink node_modules from the project root so the bundles can
resolve packages like 'workflow'.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two fixes:
1. Generate Build Output API FIRST, then create TS bundle wrappers
from the self-contained CJS bundles (not the local .mjs ones)
2. Use .cjs extension when writing bundles to /tmp/ so Node.js
treats them as CJS regardless of package.json type
The BOA bundles have ALL dependencies inlined — no external package
resolution needed. This fixes 'Cannot find package workflow' error.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Static imports crash if the files don't exist during nest start
(local dev). Check in empty placeholders so they always exist.
The workflow-nest build CLI overwrites them with actual data.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…a outputs
With framework=nestjs, all functions merge into 1 lambda, losing
experimentalTriggers. With framework=null, Build Output API creates
separate lambda outputs for step, flow, webhook (with triggers) and
__nestjs (esbuild-bundled NestJS handler).
The esbuild step only runs in postbuild (when dist/ exists from nest
build). In prebuild, only workflow bundles and TS files are generated.
Config.json: webhook → handle:filesystem → handle:miss → catch-all
with check:true.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Sign up for freeto 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.

1 participant

@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' [nest] Add NestJS support on Vercel by VaguelySerious · Pull Request #1472 · vercel/workflow · GitHub
Skip to content

[nest] Add NestJS support on Vercel - #1472

Closed
VaguelySerious wants to merge 95 commits into
mainfrom
peter/nest-fix-mar-20
Closed

[nest] Add NestJS support on Vercel#1472
VaguelySerious wants to merge 95 commits into
mainfrom
peter/nest-fix-mar-20

Conversation

@VaguelySerious

@VaguelySeriousVaguelySerious commented Mar 20, 2026

Copy link
Copy Markdown
Member

Extends builder to bundle separate functions for app/flow/step routes with experimentalTriggers enabled, allowing queue callbacks when deployed to Vercel, and adds e2e tests for the Vercel environment.

Related:

@changeset-bot

changeset-botBot commented Mar 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5d7ef34

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

This PR includes changesets to release 16 packages
NameType
@workflow/nestPatch
workflowPatch
@workflow/aiPatch
@workflow/world-testingPatch
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/astroPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

vercelBot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production777367847
✅ 💻 Local Development7820142924
✅ 📦 Local Production7820142924
✅ 🐘 Local Postgres7820142924
✅ 🪟 Windows720577
❌ 🌍 Community Worlds1185621195
✅ 📋 Other198033231
Total3511595524122

❌ Failed Tests

▲ Vercel Production (3 failed)

hono (2 failed):

nuxt (1 failed):

  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMDYYDFB01BTRJWV0G6BM9Q0 | 🔍 observability
🌍 Community Worlds (56 failed)

mongodb (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMDYPNQCQF0P2A1KHX2DGAGD
  • webhookWorkflow | wrun_01KMDYQ4D90V2PW2AHJ6EPJX90
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMDYXKZ00QTQT1Z9CXMDBJ7S

redis (2 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMDYPNQCQF0P2A1KHX2DGAGD
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMDYXKZ00QTQT1Z9CXMDBJ7S

turso (51 failed):

  • addTenWorkflow | wrun_01KMDYNHM3VGEKP7NXJ9240102
  • addTenWorkflow | wrun_01KMDYNHM3VGEKP7NXJ9240102
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KMDYPV79A7BXN4DPWPCX6WWN
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KMDYNRANBQPHKC249W6THZ4P
  • promiseRaceWorkflow | wrun_01KMDYNWVBYZN8X1RV4329QN38
  • promiseAnyWorkflow | wrun_01KMDYNYZR398MDDX8Z76B1W84
  • importedStepOnlyWorkflow | wrun_01KMDYQ5H0WQAR7NSAK47CK327
  • hookWorkflow | wrun_01KMDYPBH4P5VJDNEX0W7Y3JQ3
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMDYPNQCQF0P2A1KHX2DGAGD
  • webhookWorkflow | wrun_01KMDYQ4D90V2PW2AHJ6EPJX90
  • sleepingWorkflow | wrun_01KMDYQBK6CV7NDVA59SKYGYVC
  • parallelSleepWorkflow | wrun_01KMDYQRNRVK3W4EFK37KWEZK8
  • nullByteWorkflow | wrun_01KMDYQX5F3A8B7NY0TGWNSVR7
  • workflowAndStepMetadataWorkflow | wrun_01KMDYR0F4B9S9GPFC7YH4EBXV
  • fetchWorkflow | wrun_01KMDYSTFC0FN37TJTPHTH87E8
  • promiseRaceStressTestWorkflow | wrun_01KMDYSY54AFHZ3916K3BCJ3HV
  • 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 | wrun_01KMDYWTSFT1AWC2X1YD0BRH7H
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMDYXKZ00QTQT1Z9CXMDBJ7S
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMDYYDFB01BTRJWV0G6BM9Q0
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KMDYZ20RQ2P9796YXAE7J3GJ
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KMDYZBE25VR14DDXF88ADEBS
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KMDYZK5NKVAMAQT3TV7KGT8A
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KMDYZP55RC0JKGVCF02PJG1A
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMDZ07FQHE5WK4421J1Y6YCZ
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KMDZ0E81K08X7CEK5KB5G73E
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KMDZ0KPJHJ3EWC4J9BGT0K9Y
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KMDZ0TPRSC9Q6YCKHX2X2DSW
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KMDZ11DYDVATRGCSJYVG4J4W
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KMDZ1888XYQ4C4JF0TRYMEVR
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KMDZ1G50ATZXXTZBK31HPVMP
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KMDZ1V5R4XE1WAKQ1NDDS30A
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KMDZ246Y3TVA9RK18FYQPSX0
  • cancelRun - cancelling a running workflow | wrun_01KMDZ2AYCED42T9HZPK32ESXZ
  • cancelRun via CLI - cancelling a running workflow | wrun_01KMDZ2M8PGXZ9KE5ZSE2H51N0
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KMDZ30ED1M4XX0VVF3YNCKYY
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KMDZ3NWX7TH9D6G5Q2S80KRC
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KMDZ408Q6ST32VK529QAKS6V

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro7007
✅ example7007
✅ express7007
✅ fastify7007
❌ hono6827
✅ nextjs-turbopack7502
✅ nextjs-webpack7502
✅ nitro7007
❌ nuxt6917
✅ sveltekit7007
✅ vite7007
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable66011
✅ express-stable66011
✅ fastify-stable66011
✅ hono-stable66011
✅ nextjs-turbopack-canary55022
✅ nextjs-turbopack-stable7205
✅ nextjs-webpack-canary55022
✅ nextjs-webpack-stable7205
✅ nitro-stable66011
✅ nuxt-stable66011
✅ sveltekit-stable66011
✅ vite-stable66011
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable66011
✅ express-stable66011
✅ fastify-stable66011
✅ hono-stable66011
✅ nextjs-turbopack-canary55022
✅ nextjs-turbopack-stable7205
✅ nextjs-webpack-canary55022
✅ nextjs-webpack-stable7205
✅ nitro-stable66011
✅ nuxt-stable66011
✅ sveltekit-stable66011
✅ vite-stable66011
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable66011
✅ express-stable66011
✅ fastify-stable66011
✅ hono-stable66011
✅ nextjs-turbopack-canary55022
✅ nextjs-turbopack-stable7205
✅ nextjs-webpack-canary55022
✅ nextjs-webpack-stable7205
✅ nitro-stable66011
✅ nuxt-stable66011
✅ sveltekit-stable66011
✅ vite-stable66011
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack7205
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev302
❌ mongodb5235
✅ redis-dev302
❌ redis5325
✅ turso-dev302
❌ turso4515
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable66011
✅ e2e-local-postgres-nest-stable66011
✅ e2e-local-prod-nest-stable66011

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

@github-actions

github-actionsBot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.043s (-4.0%)1.005s (~)0.962s101.00x
💻 LocalNitro0.043s (-8.4% 🟢)1.005s (~)0.962s101.01x
🌐 RedisNext.js (Turbopack)0.053s1.006s0.953s101.23x
🐘 PostgresNext.js (Turbopack)0.058s1.012s0.954s101.34x
🐘 PostgresNitro0.061s (-11.5% 🟢)1.012s (~)0.951s101.43x
🐘 PostgresExpress0.076s (+7.0% 🔺)1.028s (+1.1%)0.952s101.77x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.472s (-4.9%)2.714s (+6.7% 🔺)2.242s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.123s (-1.4%)2.014s (~)0.890s101.00x
🌐 RedisNext.js (Turbopack)1.123s2.007s0.884s101.00x
💻 LocalExpress1.125s (~)2.006s (~)0.881s101.00x
💻 LocalNitro1.130s (~)2.006s (~)0.876s101.01x
🐘 PostgresNitro1.149s (+0.6%)2.013s (~)0.863s101.02x
🐘 PostgresNext.js (Turbopack)1.153s2.013s0.860s101.03x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.139s (-8.5% 🟢)3.701s (-4.5%)1.562s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express10.755s (-1.4%)11.040s (~)0.285s31.00x
🌐 RedisNext.js (Turbopack)10.794s11.022s0.229s31.00x
🐘 PostgresNext.js (Turbopack)10.886s11.043s0.157s31.01x
💻 LocalExpress10.915s (~)11.023s (~)0.108s31.01x
💻 LocalNitro10.947s (~)11.024s (~)0.077s31.02x
🐘 PostgresNitro10.994s (~)11.376s (+3.0%)0.383s31.02x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.359s (~)19.980s (+5.9% 🔺)2.621s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express14.188s (-2.7%)15.042s (~)0.854s41.00x
🌐 RedisNext.js (Turbopack)14.198s15.028s0.830s41.00x
🐘 PostgresNext.js (Turbopack)14.484s15.042s0.558s41.02x
🐘 PostgresNitro14.772s (~)15.045s (~)0.274s41.04x
💻 LocalExpress14.923s (-0.5%)15.029s (-3.2%)0.106s41.05x
💻 LocalNitro14.942s (~)15.029s (~)0.087s41.05x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro38.029s (+17.6% 🔺)40.139s (+15.5% 🔺)2.110s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express13.360s (-4.7%)14.043s (-2.9%)0.682s71.00x
🌐 RedisNext.js (Turbopack)13.429s14.025s0.597s71.01x
🐘 PostgresNext.js (Turbopack)13.796s14.036s0.240s71.03x
🐘 PostgresNitro14.299s (~)15.040s (~)0.741s61.07x
💻 LocalExpress16.611s (~)17.029s (~)0.417s61.24x
💻 LocalNitro16.628s (+1.0%)17.031s (~)0.403s61.24x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro60.687s (+7.9% 🔺)62.475s (+9.1% 🔺)1.788s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.213s (-4.2%)2.011s (~)0.798s151.00x
🐘 PostgresNext.js (Turbopack)1.265s2.012s0.746s151.04x
🐘 PostgresNitro1.281s (-0.9%)2.011s (~)0.730s151.06x
🌐 RedisNext.js (Turbopack)1.396s2.006s0.611s151.15x
💻 LocalExpress1.504s (~)2.005s (~)0.501s151.24x
💻 LocalNitro1.517s (+2.3%)2.005s (~)0.488s151.25x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.535s (-3.2%)4.036s (-3.9%)1.501s81.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.348s (-4.6%)3.012s (~)0.664s101.00x
🐘 PostgresNitro2.430s (-1.6%)3.012s (~)0.582s101.03x
🐘 PostgresNext.js (Turbopack)2.480s3.012s0.532s101.06x
🌐 RedisNext.js (Turbopack)2.731s3.108s0.377s101.16x
💻 LocalNitro2.901s (+1.0%)3.341s (+7.5% 🔺)0.440s91.24x
💻 LocalExpress2.948s (-1.7%)3.308s (-7.2% 🟢)0.360s101.26x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.473s (+36.9% 🔺)5.099s (+33.9% 🔺)1.626s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.539s (-1.4%)4.014s (~)0.475s81.00x
🐘 PostgresNitro3.619s (~)4.013s (~)0.394s81.02x
🐘 PostgresNext.js (Turbopack)3.771s4.016s0.245s81.07x
🌐 RedisNext.js (Turbopack)4.173s4.868s0.695s71.18x
💻 LocalNitro8.268s (+1.8%)9.019s (+2.8%)0.751s42.34x
💻 LocalExpress8.483s (~)9.023s (~)0.540s42.40x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.366s (+10.6% 🔺)5.161s (+15.5% 🔺)1.795s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.215s (-3.5%)2.011s (~)0.797s151.00x
🐘 PostgresNext.js (Turbopack)1.240s2.011s0.771s151.02x
🐘 PostgresNitro1.267s (-0.8%)2.012s (~)0.745s151.04x
🌐 RedisNext.js (Turbopack)1.310s2.006s0.697s151.08x
💻 LocalExpress1.555s (+1.2%)2.006s (~)0.451s151.28x
💻 LocalNitro1.632s (+4.6%)2.073s (+3.3%)0.441s151.34x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.594s (+22.1% 🔺)3.961s (+7.3% 🔺)1.367s81.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.349s (-4.1%)3.012s (~)0.663s101.00x
🐘 PostgresNitro2.431s (-1.1%)3.013s (~)0.582s101.03x
🐘 PostgresNext.js (Turbopack)2.466s3.010s0.544s101.05x
🌐 RedisNext.js (Turbopack)2.681s3.108s0.427s101.14x
💻 LocalNitro3.067s (+1.3%)3.884s (+5.7% 🔺)0.818s81.31x
💻 LocalExpress3.177s (+4.8%)3.886s (+3.4%)0.709s81.35x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.965s (+14.6% 🔺)4.182s (+8.3% 🔺)1.217s81.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.518s (-2.3%)4.013s (~)0.495s81.00x
🐘 PostgresNitro3.556s (-1.7%)4.015s (~)0.458s81.01x
🐘 PostgresNext.js (Turbopack)3.754s4.015s0.261s81.07x
🌐 RedisNext.js (Turbopack)4.134s4.867s0.734s71.17x
💻 LocalNitro8.968s (+3.8%)9.271s (+2.8%)0.303s42.55x
💻 LocalExpress9.146s (+1.0%)9.772s (~)0.626s42.60x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.948s (+39.5% 🔺)5.897s (+33.1% 🔺)1.949s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.665s (-23.2% 🟢)1.009s (-1.6%)0.344s601.00x
🌐 RedisNext.js (Turbopack)0.679s1.005s0.326s601.02x
🐘 PostgresNext.js (Turbopack)0.843s1.044s0.200s581.27x
🐘 PostgresNitro0.900s (~)1.043s (~)0.143s581.35x
💻 LocalNitro0.989s (+3.4%)1.159s (+13.4% 🔺)0.170s521.49x
💻 LocalExpress0.989s (+0.6%)1.229s (+12.2% 🔺)0.240s491.49x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro10.144s (+6.3% 🔺)11.529s (+5.4% 🔺)1.385s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.597s (-24.5% 🟢)2.010s (-33.2% 🟢)0.413s451.00x
🌐 RedisNext.js (Turbopack)1.639s2.006s0.367s451.03x
🐘 PostgresNext.js (Turbopack)2.050s2.658s0.609s341.28x
🐘 PostgresNitro2.151s (~)3.012s (+1.1%)0.861s301.35x
💻 LocalNitro2.959s (~)3.111s (~)0.152s291.85x
💻 LocalExpress3.012s (~)3.508s (-1.1%)0.496s261.89x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro31.899s (+2.8%)33.848s (+4.2%)1.948s31.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)3.256s4.008s0.752s301.00x
🐘 PostgresExpress3.373s (-20.9% 🟢)4.014s (-19.3% 🟢)0.640s301.04x
🐘 PostgresNext.js (Turbopack)4.038s4.495s0.457s271.24x
🐘 PostgresNitro4.360s (+0.6%)5.014s (~)0.653s241.34x
💻 LocalExpress9.093s (-0.6%)9.633s (-1.6%)0.540s132.79x
💻 LocalNitro9.123s (+1.0%)9.788s (+3.3%)0.665s132.80x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro101.326s (+9.8% 🔺)103.336s (+9.7% 🔺)2.010s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.254s (-15.8% 🟢)1.009s (~)0.755s601.00x
🐘 PostgresNext.js (Turbopack)0.260s1.008s0.748s601.02x
🐘 PostgresNitro0.301s (+2.3%)1.009s (~)0.708s601.18x
🌐 RedisNext.js (Turbopack)0.404s1.004s0.600s601.59x
💻 LocalExpress0.581s (-3.7%)1.004s (~)0.424s602.28x
💻 LocalNitro0.603s (+0.8%)1.005s (~)0.402s602.37x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.418s (+4.3%)4.071s (+5.3% 🔺)1.652s151.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.434s (-17.7% 🟢)1.009s (~)0.575s901.00x
🐘 PostgresNext.js (Turbopack)0.522s1.009s0.486s901.20x
🐘 PostgresNitro0.525s (-2.5%)1.009s (~)0.484s901.21x
🌐 RedisNext.js (Turbopack)1.132s2.006s0.874s452.61x
💻 LocalExpress2.555s (-1.0%)3.009s (~)0.454s305.88x
💻 LocalNitro2.557s (+3.3%)3.009s (~)0.452s305.89x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.288s (+13.5% 🔺)4.816s (+14.2% 🔺)1.528s191.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.621s (-30.9% 🟢)1.009s (-3.1%)0.388s1191.00x
🐘 PostgresNext.js (Turbopack)0.848s1.027s0.179s1171.37x
🐘 PostgresNitro0.883s (-5.9% 🟢)1.068s (-10.4% 🟢)0.185s1131.42x
🌐 RedisNext.js (Turbopack)2.703s3.032s0.329s404.36x
💻 LocalExpress11.180s (-0.9%)11.844s (-1.5%)0.664s1118.01x
💻 LocalNitro11.609s (+4.4%)12.028s (+3.1%)0.419s1018.71x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro8.450s (+1.1%)10.227s (+4.9%)1.777s121.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.168s (-22.6% 🟢)0.999s (~)0.001s (+16.7% 🔺)1.013s (~)0.845s101.00x
🌐 RedisNext.js (Turbopack)0.188s0.999s0.002s1.007s0.819s101.12x
🐘 PostgresNext.js (Turbopack)0.199s1.001s0.001s1.012s0.812s101.19x
💻 LocalExpress0.200s (-2.3%)1.003s (~)0.012s (+0.8%)1.017s (~)0.818s101.19x
💻 LocalNitro0.201s (+2.1%)1.003s (~)0.012s (+3.4%)1.018s (~)0.817s101.20x
🐘 PostgresNitro0.207s (-13.5% 🟢)0.995s (~)0.001s (-14.3% 🟢)1.012s (~)0.805s101.23x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.722s (+4.3%)2.689s (~)0.582s (+9595.0% 🔺)3.850s (+17.6% 🔺)2.128s101.00x
▲ VercelExpress⚠️missing-----
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.475s1.000s0.003s1.011s0.536s601.00x
🐘 PostgresExpress0.578s (-16.7% 🟢)1.005s (~)0.003s (-13.3% 🟢)1.024s (~)0.446s591.21x
🐘 PostgresNext.js (Turbopack)0.654s1.009s0.005s1.026s0.372s591.37x
🐘 PostgresNitro0.681s (-5.8% 🟢)1.004s (~)0.009s (+153.1% 🔺)1.034s (+0.7%)0.354s591.43x
💻 LocalExpress0.733s (-5.6% 🟢)1.009s (-1.7%)0.010s (+6.8% 🔺)1.024s (-1.6%)0.291s591.54x
💻 LocalNitro0.744s (+2.4%)1.009s (~)0.009s (-0.7%)1.022s (~)0.278s591.56x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro4.730s (+9.3% 🔺)6.026s (+9.4% 🔺)0.192s (-26.5% 🟢)6.994s (+11.1% 🔺)2.265s91.00x
▲ VercelExpress⚠️missing-----
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.890s1.017s0.000s1.021s0.132s591.00x
🐘 PostgresExpress1.022s (+14.4% 🔺)1.578s (+45.7% 🔺)0.000s (+623.7% 🔺)1.590s (+43.9% 🔺)0.568s381.15x
🐘 PostgresNext.js (Turbopack)1.087s1.623s0.000s1.632s0.546s371.22x
🐘 PostgresNitro1.100s (+19.4% 🔺)1.868s (+75.8% 🔺)0.000s (-12.5% 🟢)1.886s (+74.5% 🔺)0.787s321.24x
💻 LocalExpress1.262s (~)2.021s (~)0.000s (-41.2% 🟢)2.024s (~)0.762s301.42x
💻 LocalNitro1.283s (+4.7%)2.022s (~)0.000s (-30.8% 🟢)2.025s (~)0.743s301.44x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.926s (+15.3% 🔺)3.896s (+21.2% 🔺)0.000s (+242.9% 🔺)4.547s (+21.0% 🔺)1.621s141.00x
▲ VercelExpress⚠️missing-----
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.573s2.001s0.000s2.006s0.434s301.00x
🐘 PostgresExpress1.953s (+8.3% 🔺)2.216s (+5.6% 🔺)0.000s (+Infinity% 🔺)2.226s (+5.0%)0.273s281.24x
🐘 PostgresNitro2.014s (+6.5% 🔺)2.475s (+11.5% 🔺)0.000s (-100.0% 🟢)2.493s (+11.3% 🔺)0.479s251.28x
🐘 PostgresNext.js (Turbopack)2.194s2.776s0.000s2.784s0.590s221.40x
💻 LocalExpress3.616s (+5.0% 🔺)4.098s (~)0.000s (-12.5% 🟢)4.102s (~)0.486s152.30x
💻 LocalNitro3.744s (+12.5% 🔺)4.166s (+5.0%)0.000s (+28.0% 🔺)4.171s (+5.0%)0.427s152.38x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro4.120s (+22.1% 🔺)4.819s (+6.2% 🔺)0.000s (+118.2% 🔺)5.554s (+9.3% 🔺)1.434s111.00x
▲ VercelExpress⚠️missing-----
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress15/21
🐘 PostgresExpress20/21
▲ VercelNitro21/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres20/21
Next.js (Turbopack)🌐 Redis12/21
Nitro🐘 Postgres16/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


Some benchmark jobs failed:

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

Check the workflow run for details.

@vercelvercelBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Additional Suggestion:

Missing esbuild dependency in @workflow/nest package.json causes runtime MODULE_NOT_FOUND error when calling buildVercelOutput().

Fix on Vercel

Comment threaddocs/content/docs/getting-started/nestjs.mdx Outdated
NestLocalBuilder.build() only generates runtime .mjs bundles for the
WorkflowController — no Vercel Build Output API functions are created.
VQS discovers consumers via experimentalTriggers in .vc-config.json,
so NestJS deployments silently fail with "no v2beta consumer".
Add buildVercelOutput() which generates:
- .well-known/workflow/v1/step.func with STEP_QUEUE_TRIGGER
- .well-known/workflow/v1/flow.func with WORKFLOW_QUEUE_TRIGGER
- .well-known/workflow/v1/webhook/[token].func
- api/index.js.func (esbuild-bundled NestJS app)
- config.json with routing rules
Also update NestJS getting-started docs and README with Vercel
deployment instructions.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
VaguelySeriousand others added 2 commits March 20, 2026 16:30
Add nest to the e2e-vercel-prod matrix in tests.yml with the correct
project ID (prj_G3RlX1TsB5V2hcqTNvuVoJXdfE1o) and slug
(workbench-nestjs-workflow).
Set up the workbench for Vercel Build Output API deployment:
- Add api/index.js entry point for the NestJS serverless function
- Add scripts/build-vercel.ts postbuild step calling buildVercelOutput()
- Update vercel.json with buildCommand
- Fix project slug in create-test-matrix.mjs
- Clear framework preset from "NestJS" to "Other" on Vercel project
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add a `build` subcommand to the workflow-nest CLI that builds workflow
bundles and, when VERCEL env is detected, automatically generates the
Build Output API with experimentalTriggers. The entry point is auto-
detected from api/index.js (or can be specified via --entry).
This replaces the need for a custom scripts/build-vercel.ts file —
users just add `"postbuild": "workflow-nest build"` to package.json.
Also document the Vercel project requirement: framework preset must be
set to "Other" (not "NestJS") to avoid conflicting with Build Output API.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
VaguelySeriousand others added 28 commits March 21, 2026 05:54
The workflow-nest build CLI copies manifest.json to dist/ during
postbuild. The app.module.ts reads it at module load time using
join(process.cwd(), 'dist', 'workflow-manifest.json'). On Vercel's
Lambda, CWD is the project root and dist/ is always NFT-included.
The globalThis.__workflowManifestJson value is read by the
WorkflowController as a fallback when readFileSync fails.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
NFT can't trace readFileSync with computed paths. But it DOES trace
dynamic import() with string literals. Generate a JS module
(dist/workflow-manifest.js) and use await import('./workflow-manifest.js')
in app.module.ts. NFT sees the static string and includes the file.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The env var may not be reaching the Lambda runtime. Force-set it
in app.module.ts at import time when VERCEL env is detected.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Top-level await may crash in the Vercel Lambda context. Use
createRequire(import.meta.url) for synchronous require() of
the manifest module.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SWC compiles app.module.ts to CJS. The createRequire require() can't
load ESM modules. Write the manifest module as CJS (module.exports)
instead of ESM (export default).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
With package.json type=module, .js files are ESM. CJS module.exports
in a .js file is misinterpreted. Use .cjs extension to force CJS.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ively
.cjs files may not be included by the NestJS Vercel preset. Use .json
which require() auto-parses and is universally included in dist/.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
In ESM modules, bare require() isn't available. createRequire creates
a require function that resolves relative to the file. The .json file
in dist/ IS copied to the Lambda by the NestJS Vercel preset (it
copies all of dist/). This approach works both locally and on Vercel.
Verified locally: globalThis.__workflowManifestJson is set correctly.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The fix:
1. prebuild: workflow-nest build generates .nestjs/workflow/manifest.json
2. nest-cli.json assets: copies manifest to dist/workflow/manifest.json
3. nest build: produces dist/ with the manifest included
4. app.module.ts: createRequire loads dist/workflow/manifest.json
5. NestJS Vercel preset includes ALL nest build output in Lambda
Key insight: nest build's assets copy runs during compilation, so the
manifest is part of the official dist/ output that the NestJS Vercel
preset deploys. No NFT tracing needed.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add configureManifest(json) to WorkflowController which sets the
manifest as a string constant. The controller checks this before
falling back to readFileSync. WorkflowModule.forRoot() accepts a
manifestJson option that calls configureManifest during setup.
In the workbench:
- prebuild generates manifest via workflow-nest build
- nest-cli.json assets copies it to dist/workflow/manifest.json
- app.module.ts loads it via createRequire and passes to forRoot()
- On Vercel, the controller serves the pre-loaded manifest directly
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The definitive fix for the manifest on Vercel:
1. prebuild: workflow-nest build generates src/_manifest-data.ts
containing the manifest as an exported string constant
2. nest build: SWC compiles it to dist/_manifest-data.js
3. app.module.ts: imports _manifest-data.js via standard ESM import
4. NFT traces the standard import and includes the compiled module
5. WorkflowModule.forRoot({ manifestJson }) passes it to the controller
This avoids ALL the previous issues:
- No readFileSync with untraceable paths
- No createRequire that NFT can't follow
- No .cjs/.json files that Vercel doesn't include
- The manifest is part of the standard compiled output
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The WorkflowController imports steps.mjs/workflows.mjs from outDir.
On Vercel, these need to be in the Lambda. NestJS CLI assets copies
them from .nestjs/workflow/ to dist/workflow/ during nest build. Set
outDir to dist/workflow/ on Vercel so the controller finds them.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…I for workflows
Use framework=null. Generate Build Output API for step/flow/webhook
with experimentalTriggers. Use api/index.js with @vercel/node and
includeFiles for the NestJS handler with the workflow bundles.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… functions
Go back to framework=nestjs. The NestJS preset + Build Output API
should coexist — the preset handles the NestJS handler, and the
Build Output API provides step/flow/webhook functions with
experimentalTriggers for VQS.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
On Vercel, the .mjs bundle files aren't in the Lambda (NFT can't
trace dynamic import(pathToFileURL(...))). Fix by:
1. CLI build generates _steps-bundle.ts, _workflows-bundle.ts,
_webhook-bundle.ts with base64-encoded bundle content
2. nest build compiles them → NFT traces standard imports
3. app.module.ts loads base64 data into globalThis
4. WorkflowController.loadBundle() tries filesystem first, then
decodes base64, writes to /tmp/, and imports from there
This makes workflow execution work on Vercel:
- VQS delivers to the NestJS handler (merged lambda)
- The handler's WorkflowController loads bundles from /tmp/
- Workflows execute successfully
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dynamic await import() is NOT traced by @vercel/nft. Static import
statements ARE traced. Change from:
const { data } = await import('./_steps-bundle.js') // NOT traced
to:
import { data } from './_steps-bundle.js' // TRACED by NFT
SWC preserves static import statements as-is in the compiled output.
This ensures dist/_steps-bundle.js is included in the Vercel Lambda.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The .mjs bundles import 'workflow' and other packages that resolve
from node_modules/. Writing to /tmp/ breaks package resolution.
Use process.cwd()/.wf_bundles so node_modules is in the parent chain.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Lambda is read-only except /tmp/. Write bundles to /tmp/ and
symlink node_modules from the project root so the bundles can
resolve packages like 'workflow'.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two fixes:
1. Generate Build Output API FIRST, then create TS bundle wrappers
from the self-contained CJS bundles (not the local .mjs ones)
2. Use .cjs extension when writing bundles to /tmp/ so Node.js
treats them as CJS regardless of package.json type
The BOA bundles have ALL dependencies inlined — no external package
resolution needed. This fixes 'Cannot find package workflow' error.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Static imports crash if the files don't exist during nest start
(local dev). Check in empty placeholders so they always exist.
The workflow-nest build CLI overwrites them with actual data.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…a outputs
With framework=nestjs, all functions merge into 1 lambda, losing
experimentalTriggers. With framework=null, Build Output API creates
separate lambda outputs for step, flow, webhook (with triggers) and
__nestjs (esbuild-bundled NestJS handler).
The esbuild step only runs in postbuild (when dist/ exists from nest
build). In prebuild, only workflow bundles and TS files are generated.
Config.json: webhook → handle:filesystem → handle:miss → catch-all
with check:true.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Sign up for freeto 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.

1 participant

@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })(); [nest] Add NestJS support on Vercel by VaguelySerious · Pull Request #1472 · vercel/workflow · GitHub
Skip to content

[nest] Add NestJS support on Vercel - #1472

Closed
VaguelySerious wants to merge 95 commits into
mainfrom
peter/nest-fix-mar-20
Closed

[nest] Add NestJS support on Vercel#1472
VaguelySerious wants to merge 95 commits into
mainfrom
peter/nest-fix-mar-20

Conversation

@VaguelySerious

@VaguelySeriousVaguelySerious commented Mar 20, 2026

Copy link
Copy Markdown
Member

Extends builder to bundle separate functions for app/flow/step routes with experimentalTriggers enabled, allowing queue callbacks when deployed to Vercel, and adds e2e tests for the Vercel environment.

Related:

@changeset-bot

changeset-botBot commented Mar 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5d7ef34

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

This PR includes changesets to release 16 packages
NameType
@workflow/nestPatch
workflowPatch
@workflow/aiPatch
@workflow/world-testingPatch
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/astroPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

vercelBot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production777367847
✅ 💻 Local Development7820142924
✅ 📦 Local Production7820142924
✅ 🐘 Local Postgres7820142924
✅ 🪟 Windows720577
❌ 🌍 Community Worlds1185621195
✅ 📋 Other198033231
Total3511595524122

❌ Failed Tests

▲ Vercel Production (3 failed)

hono (2 failed):

nuxt (1 failed):

  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMDYYDFB01BTRJWV0G6BM9Q0 | 🔍 observability
🌍 Community Worlds (56 failed)

mongodb (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMDYPNQCQF0P2A1KHX2DGAGD
  • webhookWorkflow | wrun_01KMDYQ4D90V2PW2AHJ6EPJX90
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMDYXKZ00QTQT1Z9CXMDBJ7S

redis (2 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMDYPNQCQF0P2A1KHX2DGAGD
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMDYXKZ00QTQT1Z9CXMDBJ7S

turso (51 failed):

  • addTenWorkflow | wrun_01KMDYNHM3VGEKP7NXJ9240102
  • addTenWorkflow | wrun_01KMDYNHM3VGEKP7NXJ9240102
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KMDYPV79A7BXN4DPWPCX6WWN
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KMDYNRANBQPHKC249W6THZ4P
  • promiseRaceWorkflow | wrun_01KMDYNWVBYZN8X1RV4329QN38
  • promiseAnyWorkflow | wrun_01KMDYNYZR398MDDX8Z76B1W84
  • importedStepOnlyWorkflow | wrun_01KMDYQ5H0WQAR7NSAK47CK327
  • hookWorkflow | wrun_01KMDYPBH4P5VJDNEX0W7Y3JQ3
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMDYPNQCQF0P2A1KHX2DGAGD
  • webhookWorkflow | wrun_01KMDYQ4D90V2PW2AHJ6EPJX90
  • sleepingWorkflow | wrun_01KMDYQBK6CV7NDVA59SKYGYVC
  • parallelSleepWorkflow | wrun_01KMDYQRNRVK3W4EFK37KWEZK8
  • nullByteWorkflow | wrun_01KMDYQX5F3A8B7NY0TGWNSVR7
  • workflowAndStepMetadataWorkflow | wrun_01KMDYR0F4B9S9GPFC7YH4EBXV
  • fetchWorkflow | wrun_01KMDYSTFC0FN37TJTPHTH87E8
  • promiseRaceStressTestWorkflow | wrun_01KMDYSY54AFHZ3916K3BCJ3HV
  • 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 | wrun_01KMDYWTSFT1AWC2X1YD0BRH7H
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMDYXKZ00QTQT1Z9CXMDBJ7S
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMDYYDFB01BTRJWV0G6BM9Q0
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KMDYZ20RQ2P9796YXAE7J3GJ
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KMDYZBE25VR14DDXF88ADEBS
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KMDYZK5NKVAMAQT3TV7KGT8A
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KMDYZP55RC0JKGVCF02PJG1A
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMDZ07FQHE5WK4421J1Y6YCZ
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KMDZ0E81K08X7CEK5KB5G73E
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KMDZ0KPJHJ3EWC4J9BGT0K9Y
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KMDZ0TPRSC9Q6YCKHX2X2DSW
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KMDZ11DYDVATRGCSJYVG4J4W
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KMDZ1888XYQ4C4JF0TRYMEVR
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KMDZ1G50ATZXXTZBK31HPVMP
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KMDZ1V5R4XE1WAKQ1NDDS30A
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KMDZ246Y3TVA9RK18FYQPSX0
  • cancelRun - cancelling a running workflow | wrun_01KMDZ2AYCED42T9HZPK32ESXZ
  • cancelRun via CLI - cancelling a running workflow | wrun_01KMDZ2M8PGXZ9KE5ZSE2H51N0
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KMDZ30ED1M4XX0VVF3YNCKYY
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KMDZ3NWX7TH9D6G5Q2S80KRC
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KMDZ408Q6ST32VK529QAKS6V

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro7007
✅ example7007
✅ express7007
✅ fastify7007
❌ hono6827
✅ nextjs-turbopack7502
✅ nextjs-webpack7502
✅ nitro7007
❌ nuxt6917
✅ sveltekit7007
✅ vite7007
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable66011
✅ express-stable66011
✅ fastify-stable66011
✅ hono-stable66011
✅ nextjs-turbopack-canary55022
✅ nextjs-turbopack-stable7205
✅ nextjs-webpack-canary55022
✅ nextjs-webpack-stable7205
✅ nitro-stable66011
✅ nuxt-stable66011
✅ sveltekit-stable66011
✅ vite-stable66011
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable66011
✅ express-stable66011
✅ fastify-stable66011
✅ hono-stable66011
✅ nextjs-turbopack-canary55022
✅ nextjs-turbopack-stable7205
✅ nextjs-webpack-canary55022
✅ nextjs-webpack-stable7205
✅ nitro-stable66011
✅ nuxt-stable66011
✅ sveltekit-stable66011
✅ vite-stable66011
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable66011
✅ express-stable66011
✅ fastify-stable66011
✅ hono-stable66011
✅ nextjs-turbopack-canary55022
✅ nextjs-turbopack-stable7205
✅ nextjs-webpack-canary55022
✅ nextjs-webpack-stable7205
✅ nitro-stable66011
✅ nuxt-stable66011
✅ sveltekit-stable66011
✅ vite-stable66011
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack7205
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev302
❌ mongodb5235
✅ redis-dev302
❌ redis5325
✅ turso-dev302
❌ turso4515
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable66011
✅ e2e-local-postgres-nest-stable66011
✅ e2e-local-prod-nest-stable66011

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

@github-actions

github-actionsBot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.043s (-4.0%)1.005s (~)0.962s101.00x
💻 LocalNitro0.043s (-8.4% 🟢)1.005s (~)0.962s101.01x
🌐 RedisNext.js (Turbopack)0.053s1.006s0.953s101.23x
🐘 PostgresNext.js (Turbopack)0.058s1.012s0.954s101.34x
🐘 PostgresNitro0.061s (-11.5% 🟢)1.012s (~)0.951s101.43x
🐘 PostgresExpress0.076s (+7.0% 🔺)1.028s (+1.1%)0.952s101.77x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.472s (-4.9%)2.714s (+6.7% 🔺)2.242s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.123s (-1.4%)2.014s (~)0.890s101.00x
🌐 RedisNext.js (Turbopack)1.123s2.007s0.884s101.00x
💻 LocalExpress1.125s (~)2.006s (~)0.881s101.00x
💻 LocalNitro1.130s (~)2.006s (~)0.876s101.01x
🐘 PostgresNitro1.149s (+0.6%)2.013s (~)0.863s101.02x
🐘 PostgresNext.js (Turbopack)1.153s2.013s0.860s101.03x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.139s (-8.5% 🟢)3.701s (-4.5%)1.562s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express10.755s (-1.4%)11.040s (~)0.285s31.00x
🌐 RedisNext.js (Turbopack)10.794s11.022s0.229s31.00x
🐘 PostgresNext.js (Turbopack)10.886s11.043s0.157s31.01x
💻 LocalExpress10.915s (~)11.023s (~)0.108s31.01x
💻 LocalNitro10.947s (~)11.024s (~)0.077s31.02x
🐘 PostgresNitro10.994s (~)11.376s (+3.0%)0.383s31.02x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.359s (~)19.980s (+5.9% 🔺)2.621s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express14.188s (-2.7%)15.042s (~)0.854s41.00x
🌐 RedisNext.js (Turbopack)14.198s15.028s0.830s41.00x
🐘 PostgresNext.js (Turbopack)14.484s15.042s0.558s41.02x
🐘 PostgresNitro14.772s (~)15.045s (~)0.274s41.04x
💻 LocalExpress14.923s (-0.5%)15.029s (-3.2%)0.106s41.05x
💻 LocalNitro14.942s (~)15.029s (~)0.087s41.05x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro38.029s (+17.6% 🔺)40.139s (+15.5% 🔺)2.110s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express13.360s (-4.7%)14.043s (-2.9%)0.682s71.00x
🌐 RedisNext.js (Turbopack)13.429s14.025s0.597s71.01x
🐘 PostgresNext.js (Turbopack)13.796s14.036s0.240s71.03x
🐘 PostgresNitro14.299s (~)15.040s (~)0.741s61.07x
💻 LocalExpress16.611s (~)17.029s (~)0.417s61.24x
💻 LocalNitro16.628s (+1.0%)17.031s (~)0.403s61.24x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro60.687s (+7.9% 🔺)62.475s (+9.1% 🔺)1.788s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.213s (-4.2%)2.011s (~)0.798s151.00x
🐘 PostgresNext.js (Turbopack)1.265s2.012s0.746s151.04x
🐘 PostgresNitro1.281s (-0.9%)2.011s (~)0.730s151.06x
🌐 RedisNext.js (Turbopack)1.396s2.006s0.611s151.15x
💻 LocalExpress1.504s (~)2.005s (~)0.501s151.24x
💻 LocalNitro1.517s (+2.3%)2.005s (~)0.488s151.25x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.535s (-3.2%)4.036s (-3.9%)1.501s81.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.348s (-4.6%)3.012s (~)0.664s101.00x
🐘 PostgresNitro2.430s (-1.6%)3.012s (~)0.582s101.03x
🐘 PostgresNext.js (Turbopack)2.480s3.012s0.532s101.06x
🌐 RedisNext.js (Turbopack)2.731s3.108s0.377s101.16x
💻 LocalNitro2.901s (+1.0%)3.341s (+7.5% 🔺)0.440s91.24x
💻 LocalExpress2.948s (-1.7%)3.308s (-7.2% 🟢)0.360s101.26x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.473s (+36.9% 🔺)5.099s (+33.9% 🔺)1.626s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.539s (-1.4%)4.014s (~)0.475s81.00x
🐘 PostgresNitro3.619s (~)4.013s (~)0.394s81.02x
🐘 PostgresNext.js (Turbopack)3.771s4.016s0.245s81.07x
🌐 RedisNext.js (Turbopack)4.173s4.868s0.695s71.18x
💻 LocalNitro8.268s (+1.8%)9.019s (+2.8%)0.751s42.34x
💻 LocalExpress8.483s (~)9.023s (~)0.540s42.40x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.366s (+10.6% 🔺)5.161s (+15.5% 🔺)1.795s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.215s (-3.5%)2.011s (~)0.797s151.00x
🐘 PostgresNext.js (Turbopack)1.240s2.011s0.771s151.02x
🐘 PostgresNitro1.267s (-0.8%)2.012s (~)0.745s151.04x
🌐 RedisNext.js (Turbopack)1.310s2.006s0.697s151.08x
💻 LocalExpress1.555s (+1.2%)2.006s (~)0.451s151.28x
💻 LocalNitro1.632s (+4.6%)2.073s (+3.3%)0.441s151.34x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.594s (+22.1% 🔺)3.961s (+7.3% 🔺)1.367s81.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.349s (-4.1%)3.012s (~)0.663s101.00x
🐘 PostgresNitro2.431s (-1.1%)3.013s (~)0.582s101.03x
🐘 PostgresNext.js (Turbopack)2.466s3.010s0.544s101.05x
🌐 RedisNext.js (Turbopack)2.681s3.108s0.427s101.14x
💻 LocalNitro3.067s (+1.3%)3.884s (+5.7% 🔺)0.818s81.31x
💻 LocalExpress3.177s (+4.8%)3.886s (+3.4%)0.709s81.35x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.965s (+14.6% 🔺)4.182s (+8.3% 🔺)1.217s81.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.518s (-2.3%)4.013s (~)0.495s81.00x
🐘 PostgresNitro3.556s (-1.7%)4.015s (~)0.458s81.01x
🐘 PostgresNext.js (Turbopack)3.754s4.015s0.261s81.07x
🌐 RedisNext.js (Turbopack)4.134s4.867s0.734s71.17x
💻 LocalNitro8.968s (+3.8%)9.271s (+2.8%)0.303s42.55x
💻 LocalExpress9.146s (+1.0%)9.772s (~)0.626s42.60x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.948s (+39.5% 🔺)5.897s (+33.1% 🔺)1.949s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.665s (-23.2% 🟢)1.009s (-1.6%)0.344s601.00x
🌐 RedisNext.js (Turbopack)0.679s1.005s0.326s601.02x
🐘 PostgresNext.js (Turbopack)0.843s1.044s0.200s581.27x
🐘 PostgresNitro0.900s (~)1.043s (~)0.143s581.35x
💻 LocalNitro0.989s (+3.4%)1.159s (+13.4% 🔺)0.170s521.49x
💻 LocalExpress0.989s (+0.6%)1.229s (+12.2% 🔺)0.240s491.49x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro10.144s (+6.3% 🔺)11.529s (+5.4% 🔺)1.385s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.597s (-24.5% 🟢)2.010s (-33.2% 🟢)0.413s451.00x
🌐 RedisNext.js (Turbopack)1.639s2.006s0.367s451.03x
🐘 PostgresNext.js (Turbopack)2.050s2.658s0.609s341.28x
🐘 PostgresNitro2.151s (~)3.012s (+1.1%)0.861s301.35x
💻 LocalNitro2.959s (~)3.111s (~)0.152s291.85x
💻 LocalExpress3.012s (~)3.508s (-1.1%)0.496s261.89x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro31.899s (+2.8%)33.848s (+4.2%)1.948s31.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)3.256s4.008s0.752s301.00x
🐘 PostgresExpress3.373s (-20.9% 🟢)4.014s (-19.3% 🟢)0.640s301.04x
🐘 PostgresNext.js (Turbopack)4.038s4.495s0.457s271.24x
🐘 PostgresNitro4.360s (+0.6%)5.014s (~)0.653s241.34x
💻 LocalExpress9.093s (-0.6%)9.633s (-1.6%)0.540s132.79x
💻 LocalNitro9.123s (+1.0%)9.788s (+3.3%)0.665s132.80x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro101.326s (+9.8% 🔺)103.336s (+9.7% 🔺)2.010s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.254s (-15.8% 🟢)1.009s (~)0.755s601.00x
🐘 PostgresNext.js (Turbopack)0.260s1.008s0.748s601.02x
🐘 PostgresNitro0.301s (+2.3%)1.009s (~)0.708s601.18x
🌐 RedisNext.js (Turbopack)0.404s1.004s0.600s601.59x
💻 LocalExpress0.581s (-3.7%)1.004s (~)0.424s602.28x
💻 LocalNitro0.603s (+0.8%)1.005s (~)0.402s602.37x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.418s (+4.3%)4.071s (+5.3% 🔺)1.652s151.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.434s (-17.7% 🟢)1.009s (~)0.575s901.00x
🐘 PostgresNext.js (Turbopack)0.522s1.009s0.486s901.20x
🐘 PostgresNitro0.525s (-2.5%)1.009s (~)0.484s901.21x
🌐 RedisNext.js (Turbopack)1.132s2.006s0.874s452.61x
💻 LocalExpress2.555s (-1.0%)3.009s (~)0.454s305.88x
💻 LocalNitro2.557s (+3.3%)3.009s (~)0.452s305.89x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.288s (+13.5% 🔺)4.816s (+14.2% 🔺)1.528s191.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.621s (-30.9% 🟢)1.009s (-3.1%)0.388s1191.00x
🐘 PostgresNext.js (Turbopack)0.848s1.027s0.179s1171.37x
🐘 PostgresNitro0.883s (-5.9% 🟢)1.068s (-10.4% 🟢)0.185s1131.42x
🌐 RedisNext.js (Turbopack)2.703s3.032s0.329s404.36x
💻 LocalExpress11.180s (-0.9%)11.844s (-1.5%)0.664s1118.01x
💻 LocalNitro11.609s (+4.4%)12.028s (+3.1%)0.419s1018.71x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro8.450s (+1.1%)10.227s (+4.9%)1.777s121.00x
▲ VercelExpress⚠️missing----
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.168s (-22.6% 🟢)0.999s (~)0.001s (+16.7% 🔺)1.013s (~)0.845s101.00x
🌐 RedisNext.js (Turbopack)0.188s0.999s0.002s1.007s0.819s101.12x
🐘 PostgresNext.js (Turbopack)0.199s1.001s0.001s1.012s0.812s101.19x
💻 LocalExpress0.200s (-2.3%)1.003s (~)0.012s (+0.8%)1.017s (~)0.818s101.19x
💻 LocalNitro0.201s (+2.1%)1.003s (~)0.012s (+3.4%)1.018s (~)0.817s101.20x
🐘 PostgresNitro0.207s (-13.5% 🟢)0.995s (~)0.001s (-14.3% 🟢)1.012s (~)0.805s101.23x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.722s (+4.3%)2.689s (~)0.582s (+9595.0% 🔺)3.850s (+17.6% 🔺)2.128s101.00x
▲ VercelExpress⚠️missing-----
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.475s1.000s0.003s1.011s0.536s601.00x
🐘 PostgresExpress0.578s (-16.7% 🟢)1.005s (~)0.003s (-13.3% 🟢)1.024s (~)0.446s591.21x
🐘 PostgresNext.js (Turbopack)0.654s1.009s0.005s1.026s0.372s591.37x
🐘 PostgresNitro0.681s (-5.8% 🟢)1.004s (~)0.009s (+153.1% 🔺)1.034s (+0.7%)0.354s591.43x
💻 LocalExpress0.733s (-5.6% 🟢)1.009s (-1.7%)0.010s (+6.8% 🔺)1.024s (-1.6%)0.291s591.54x
💻 LocalNitro0.744s (+2.4%)1.009s (~)0.009s (-0.7%)1.022s (~)0.278s591.56x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro4.730s (+9.3% 🔺)6.026s (+9.4% 🔺)0.192s (-26.5% 🟢)6.994s (+11.1% 🔺)2.265s91.00x
▲ VercelExpress⚠️missing-----
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.890s1.017s0.000s1.021s0.132s591.00x
🐘 PostgresExpress1.022s (+14.4% 🔺)1.578s (+45.7% 🔺)0.000s (+623.7% 🔺)1.590s (+43.9% 🔺)0.568s381.15x
🐘 PostgresNext.js (Turbopack)1.087s1.623s0.000s1.632s0.546s371.22x
🐘 PostgresNitro1.100s (+19.4% 🔺)1.868s (+75.8% 🔺)0.000s (-12.5% 🟢)1.886s (+74.5% 🔺)0.787s321.24x
💻 LocalExpress1.262s (~)2.021s (~)0.000s (-41.2% 🟢)2.024s (~)0.762s301.42x
💻 LocalNitro1.283s (+4.7%)2.022s (~)0.000s (-30.8% 🟢)2.025s (~)0.743s301.44x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.926s (+15.3% 🔺)3.896s (+21.2% 🔺)0.000s (+242.9% 🔺)4.547s (+21.0% 🔺)1.621s141.00x
▲ VercelExpress⚠️missing-----
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.573s2.001s0.000s2.006s0.434s301.00x
🐘 PostgresExpress1.953s (+8.3% 🔺)2.216s (+5.6% 🔺)0.000s (+Infinity% 🔺)2.226s (+5.0%)0.273s281.24x
🐘 PostgresNitro2.014s (+6.5% 🔺)2.475s (+11.5% 🔺)0.000s (-100.0% 🟢)2.493s (+11.3% 🔺)0.479s251.28x
🐘 PostgresNext.js (Turbopack)2.194s2.776s0.000s2.784s0.590s221.40x
💻 LocalExpress3.616s (+5.0% 🔺)4.098s (~)0.000s (-12.5% 🟢)4.102s (~)0.486s152.30x
💻 LocalNitro3.744s (+12.5% 🔺)4.166s (+5.0%)0.000s (+28.0% 🔺)4.171s (+5.0%)0.427s152.38x
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro4.120s (+22.1% 🔺)4.819s (+6.2% 🔺)0.000s (+118.2% 🔺)5.554s (+9.3% 🔺)1.434s111.00x
▲ VercelExpress⚠️missing-----
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress15/21
🐘 PostgresExpress20/21
▲ VercelNitro21/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres20/21
Next.js (Turbopack)🌐 Redis12/21
Nitro🐘 Postgres16/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


Some benchmark jobs failed:

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

Check the workflow run for details.

@vercelvercelBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Additional Suggestion:

Missing esbuild dependency in @workflow/nest package.json causes runtime MODULE_NOT_FOUND error when calling buildVercelOutput().

Fix on Vercel

Comment threaddocs/content/docs/getting-started/nestjs.mdx Outdated
NestLocalBuilder.build() only generates runtime .mjs bundles for the
WorkflowController — no Vercel Build Output API functions are created.
VQS discovers consumers via experimentalTriggers in .vc-config.json,
so NestJS deployments silently fail with "no v2beta consumer".
Add buildVercelOutput() which generates:
- .well-known/workflow/v1/step.func with STEP_QUEUE_TRIGGER
- .well-known/workflow/v1/flow.func with WORKFLOW_QUEUE_TRIGGER
- .well-known/workflow/v1/webhook/[token].func
- api/index.js.func (esbuild-bundled NestJS app)
- config.json with routing rules
Also update NestJS getting-started docs and README with Vercel
deployment instructions.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
VaguelySeriousand others added 2 commits March 20, 2026 16:30
Add nest to the e2e-vercel-prod matrix in tests.yml with the correct
project ID (prj_G3RlX1TsB5V2hcqTNvuVoJXdfE1o) and slug
(workbench-nestjs-workflow).
Set up the workbench for Vercel Build Output API deployment:
- Add api/index.js entry point for the NestJS serverless function
- Add scripts/build-vercel.ts postbuild step calling buildVercelOutput()
- Update vercel.json with buildCommand
- Fix project slug in create-test-matrix.mjs
- Clear framework preset from "NestJS" to "Other" on Vercel project
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add a `build` subcommand to the workflow-nest CLI that builds workflow
bundles and, when VERCEL env is detected, automatically generates the
Build Output API with experimentalTriggers. The entry point is auto-
detected from api/index.js (or can be specified via --entry).
This replaces the need for a custom scripts/build-vercel.ts file —
users just add `"postbuild": "workflow-nest build"` to package.json.
Also document the Vercel project requirement: framework preset must be
set to "Other" (not "NestJS") to avoid conflicting with Build Output API.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
VaguelySeriousand others added 28 commits March 21, 2026 05:54
The workflow-nest build CLI copies manifest.json to dist/ during
postbuild. The app.module.ts reads it at module load time using
join(process.cwd(), 'dist', 'workflow-manifest.json'). On Vercel's
Lambda, CWD is the project root and dist/ is always NFT-included.
The globalThis.__workflowManifestJson value is read by the
WorkflowController as a fallback when readFileSync fails.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
NFT can't trace readFileSync with computed paths. But it DOES trace
dynamic import() with string literals. Generate a JS module
(dist/workflow-manifest.js) and use await import('./workflow-manifest.js')
in app.module.ts. NFT sees the static string and includes the file.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The env var may not be reaching the Lambda runtime. Force-set it
in app.module.ts at import time when VERCEL env is detected.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Top-level await may crash in the Vercel Lambda context. Use
createRequire(import.meta.url) for synchronous require() of
the manifest module.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SWC compiles app.module.ts to CJS. The createRequire require() can't
load ESM modules. Write the manifest module as CJS (module.exports)
instead of ESM (export default).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
With package.json type=module, .js files are ESM. CJS module.exports
in a .js file is misinterpreted. Use .cjs extension to force CJS.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ively
.cjs files may not be included by the NestJS Vercel preset. Use .json
which require() auto-parses and is universally included in dist/.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
In ESM modules, bare require() isn't available. createRequire creates
a require function that resolves relative to the file. The .json file
in dist/ IS copied to the Lambda by the NestJS Vercel preset (it
copies all of dist/). This approach works both locally and on Vercel.
Verified locally: globalThis.__workflowManifestJson is set correctly.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The fix:
1. prebuild: workflow-nest build generates .nestjs/workflow/manifest.json
2. nest-cli.json assets: copies manifest to dist/workflow/manifest.json
3. nest build: produces dist/ with the manifest included
4. app.module.ts: createRequire loads dist/workflow/manifest.json
5. NestJS Vercel preset includes ALL nest build output in Lambda
Key insight: nest build's assets copy runs during compilation, so the
manifest is part of the official dist/ output that the NestJS Vercel
preset deploys. No NFT tracing needed.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add configureManifest(json) to WorkflowController which sets the
manifest as a string constant. The controller checks this before
falling back to readFileSync. WorkflowModule.forRoot() accepts a
manifestJson option that calls configureManifest during setup.
In the workbench:
- prebuild generates manifest via workflow-nest build
- nest-cli.json assets copies it to dist/workflow/manifest.json
- app.module.ts loads it via createRequire and passes to forRoot()
- On Vercel, the controller serves the pre-loaded manifest directly
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The definitive fix for the manifest on Vercel:
1. prebuild: workflow-nest build generates src/_manifest-data.ts
containing the manifest as an exported string constant
2. nest build: SWC compiles it to dist/_manifest-data.js
3. app.module.ts: imports _manifest-data.js via standard ESM import
4. NFT traces the standard import and includes the compiled module
5. WorkflowModule.forRoot({ manifestJson }) passes it to the controller
This avoids ALL the previous issues:
- No readFileSync with untraceable paths
- No createRequire that NFT can't follow
- No .cjs/.json files that Vercel doesn't include
- The manifest is part of the standard compiled output
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The WorkflowController imports steps.mjs/workflows.mjs from outDir.
On Vercel, these need to be in the Lambda. NestJS CLI assets copies
them from .nestjs/workflow/ to dist/workflow/ during nest build. Set
outDir to dist/workflow/ on Vercel so the controller finds them.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…I for workflows
Use framework=null. Generate Build Output API for step/flow/webhook
with experimentalTriggers. Use api/index.js with @vercel/node and
includeFiles for the NestJS handler with the workflow bundles.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… functions
Go back to framework=nestjs. The NestJS preset + Build Output API
should coexist — the preset handles the NestJS handler, and the
Build Output API provides step/flow/webhook functions with
experimentalTriggers for VQS.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
On Vercel, the .mjs bundle files aren't in the Lambda (NFT can't
trace dynamic import(pathToFileURL(...))). Fix by:
1. CLI build generates _steps-bundle.ts, _workflows-bundle.ts,
_webhook-bundle.ts with base64-encoded bundle content
2. nest build compiles them → NFT traces standard imports
3. app.module.ts loads base64 data into globalThis
4. WorkflowController.loadBundle() tries filesystem first, then
decodes base64, writes to /tmp/, and imports from there
This makes workflow execution work on Vercel:
- VQS delivers to the NestJS handler (merged lambda)
- The handler's WorkflowController loads bundles from /tmp/
- Workflows execute successfully
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dynamic await import() is NOT traced by @vercel/nft. Static import
statements ARE traced. Change from:
const { data } = await import('./_steps-bundle.js') // NOT traced
to:
import { data } from './_steps-bundle.js' // TRACED by NFT
SWC preserves static import statements as-is in the compiled output.
This ensures dist/_steps-bundle.js is included in the Vercel Lambda.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The .mjs bundles import 'workflow' and other packages that resolve
from node_modules/. Writing to /tmp/ breaks package resolution.
Use process.cwd()/.wf_bundles so node_modules is in the parent chain.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Lambda is read-only except /tmp/. Write bundles to /tmp/ and
symlink node_modules from the project root so the bundles can
resolve packages like 'workflow'.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two fixes:
1. Generate Build Output API FIRST, then create TS bundle wrappers
from the self-contained CJS bundles (not the local .mjs ones)
2. Use .cjs extension when writing bundles to /tmp/ so Node.js
treats them as CJS regardless of package.json type
The BOA bundles have ALL dependencies inlined — no external package
resolution needed. This fixes 'Cannot find package workflow' error.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Static imports crash if the files don't exist during nest start
(local dev). Check in empty placeholders so they always exist.
The workflow-nest build CLI overwrites them with actual data.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…a outputs
With framework=nestjs, all functions merge into 1 lambda, losing
experimentalTriggers. With framework=null, Build Output API creates
separate lambda outputs for step, flow, webhook (with triggers) and
__nestjs (esbuild-bundled NestJS handler).
The esbuild step only runs in postbuild (when dist/ exists from nest
build). In prebuild, only workflow bundles and TS files are generated.
Config.json: webhook → handle:filesystem → handle:miss → catch-all
with check:true.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Sign up for freeto 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.

1 participant

@VaguelySerious