Skip to content

fix(next): respect basePath for workflow routes - #2732

Merged
NathanColosimo merged 9 commits into
mainfrom
nathanc/fix-next-base-path
Jul 6, 2026
Merged

fix(next): respect basePath for workflow routes#2732
NathanColosimo merged 9 commits into
mainfrom
nathanc/fix-next-base-path

Conversation

@NathanColosimo

@NathanColosimoNathanColosimo commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • derive Workflow's route prefix from nextConfig.basePath; users should only configure basePath in Next.js
  • pass that basePath into generated workflow entrypoints and route URL construction
  • use shared route helpers for workflow metadata, webhook URLs, manifest/health URLs, and local/postgres queue delivery URLs
  • preserve full URL overrides like WORKFLOW_LOCAL_BASE_URL as full overrides

Fixes#1864.

This is separate from #2729: that PR fixes project-root discovery, while this PR fixes runtime URL/route construction for apps served below a path prefix.

Vercel note

Runtime workflow execution works on a Vercel preview with basePath: '/v2': direct step calls and async workflow trigger/poll complete through /v2.

One platform follow-up remains: the generated Vercel/Next output serves internal workflow invocation at /v2/.well-known/workflow/v1/flow, but a public direct health probe to /v2/.well-known/workflow/v1/flow?__health still hits the app 404 route. That appears to be a Vercel/Next build-output route-table issue, not a Vercel REST API issue and not a Workflow queue/runtime URL issue.

Tests

  • pnpm --filter @workflow/utils --filter @workflow/builders --filter @workflow/core --filter @workflow/world-local --filter @workflow/world-postgres --filter @workflow/next build
  • pnpm --filter @workflow/utils test
  • pnpm --filter @workflow/next test
  • pnpm exec vitest run packages/world-local/src/config.test.ts packages/world-local/src/queue.test.ts packages/world-postgres/src/queue.test.ts packages/builders/src/constants.test.ts
  • pnpm exec biome check --max-diagnostics 12 ... on touched files (passes with existing warnings)
  • git diff --check
  • local nextjs-turbopack production smoke with basePath: '/v2': root health 404, /v2 health 200, direct step 200, workflow trigger/poll returns 133
  • Vercel preview smoke with basePath: '/v2': direct step 200, workflow trigger/poll returns 133; public /v2 health 404 as noted above
  • Codex autoreview (gpt-5.5, xhigh): clean after fixing the CommonJS/ESM issue in @workflow/next
  • Claude Opus fallback review (xhigh): no blocking findings; requested claude-opus-4.8 was unavailable

@changeset-bot

changeset-botBot commented Jun 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ce1ddb2

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

This PR includes changesets to release 21 packages
NameType
@workflow/buildersPatch
@workflow/corePatch
@workflow/nextPatch
@workflow/utilsPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/astroPatch
@workflow/cliPatch
@workflow/nestPatch
@workflow/nitroPatch
@workflow/nuxtPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/webPatch
workflowPatch
@workflow/world-testingPatch
@workflow/errorsPatch
@workflow/world-vercelPatch

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 Jun 30, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jun 30, 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🥇 Nitro0.046s (~)1.006s (~)0.959s101.00x
💻 LocalExpress0.048s (+7.2% 🔺)1.006s (~)0.958s101.03x
💻 LocalNext.js (Turbopack)0.054s (+1.3%)1.006s (~)0.952s101.16x
🐘 PostgresNitro0.128s (+95.1% 🔺)1.042s (+3.0%)0.915s102.75x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.204s (+8.7% 🔺)1.902s (-6.3% 🟢)1.697s101.00x
▲ VercelExpress0.260s (+15.6% 🔺)1.640s (-19.9% 🟢)1.380s101.27x
▲ VercelNext.js (Turbopack)0.480s (+97.6% 🔺)2.307s (-3.0%)1.826s102.35x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.081s (~)2.006s (~)0.925s101.00x
💻 LocalExpress1.083s (~)2.006s (~)0.923s101.00x
💻 LocalNext.js (Turbopack)1.089s (~)2.006s (~)0.917s101.01x
🐘 PostgresNitro1.113s (+1.4%)2.015s (~)0.901s101.03x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.390s (+2.1%)2.977s (-1.3%)1.587s101.00x
▲ VercelExpress1.402s (-1.1%)2.887s (+2.3%)1.485s101.01x
▲ VercelNext.js (Turbopack)2.120s (-9.6% 🟢)3.824s (+6.5% 🔺)1.704s101.53x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.449s (~)11.023s (~)0.574s31.00x
💻 LocalExpress10.464s (~)11.022s (~)0.557s31.00x
🐘 PostgresNitro10.509s (~)11.047s (~)0.537s31.01x
💻 LocalNext.js (Turbopack)10.516s (~)11.023s (~)0.507s31.01x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro11.723s (~)13.343s (+5.1% 🔺)1.620s31.00x
▲ VercelExpress11.886s (+1.8%)13.666s (-2.0%)1.780s31.01x
▲ VercelNext.js (Turbopack)13.087s (+1.3%)15.138s (+6.8% 🔺)2.051s21.12x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro13.549s (-1.1%)14.015s (~)0.466s51.00x
💻 LocalNitro13.663s (~)14.027s (~)0.364s51.01x
💻 LocalNext.js (Turbopack)13.781s (~)14.028s (~)0.247s51.02x
💻 LocalExpress13.798s (+0.7%)14.028s (~)0.229s51.02x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.456s (-1.3%)18.438s (-2.7%)1.983s41.00x
▲ VercelNitro16.473s (+1.8%)17.812s (+2.1%)1.339s41.00x
▲ VercelNext.js (Turbopack)17.996s (~)20.274s (+2.6%)2.278s31.09x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro11.888s (-3.6%)12.282s (-5.7% 🟢)0.394s81.00x
💻 LocalNitro12.144s (-0.7%)13.026s (~)0.882s71.02x
💻 LocalExpress12.257s (~)13.025s (~)0.767s71.03x
💻 LocalNext.js (Turbopack)12.351s (+0.9%)13.024s (~)0.673s71.04x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express17.467s (+1.0%)19.349s (+0.9%)1.881s51.00x
▲ VercelNitro17.987s (+5.3% 🔺)19.248s (+2.5%)1.261s51.03x
▲ VercelNext.js (Turbopack)19.714s (~)21.810s (+0.6%)2.096s51.13x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.201s (+1.3%)2.020s (+0.6%)0.819s151.00x
💻 LocalExpress1.398s (-3.2%)2.006s (~)0.608s151.16x
💻 LocalNext.js (Turbopack)1.412s (~)2.007s (~)0.595s151.18x
💻 LocalNitro1.461s (+3.8%)2.007s (~)0.546s151.22x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.153s (-5.9% 🟢)3.489s (-3.2%)1.336s91.00x
▲ VercelExpress2.354s (+3.6%)4.101s (+5.1% 🔺)1.747s81.09x
▲ VercelNext.js (Turbopack)4.048s (+37.8% 🔺)5.865s (+26.4% 🔺)1.817s61.88x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.284s (-8.3% 🟢)2.159s (-12.6% 🟢)0.875s141.00x
💻 LocalNext.js (Turbopack)2.345s (-5.7% 🟢)3.010s (-3.2%)0.664s101.83x
💻 LocalNitro2.384s (+2.8%)3.009s (~)0.625s101.86x
💻 LocalExpress2.412s (-9.2% 🟢)3.009s (-3.2%)0.596s101.88x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.289s (-9.5% 🟢)3.570s (~)1.281s91.00x
▲ VercelExpress2.355s (-9.6% 🟢)3.864s (-6.2% 🟢)1.509s81.03x
▲ VercelNext.js (Turbopack)3.790s (+13.8% 🔺)5.415s (+10.3% 🔺)1.625s61.66x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.665s (+2.2%)4.010s (-3.1%)2.345s81.00x
💻 LocalNext.js (Turbopack)2.870s (-38.9% 🟢)4.729s (-14.2% 🟢)1.860s71.72x
💻 LocalNitro3.678s (-14.3% 🟢)4.871s (~)1.193s72.21x
💻 LocalExpress3.833s (-13.2% 🟢)5.012s (-3.2%)1.179s72.30x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.763s (-2.4%)4.554s (+1.0%)1.792s71.00x
▲ VercelExpress2.966s (+1.6%)4.759s (+8.3% 🔺)1.793s71.07x
▲ VercelNext.js (Turbopack)4.868s (+23.2% 🔺)6.612s (+14.6% 🔺)1.744s51.76x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.226s (+2.5%)2.023s (+0.8%)0.797s151.00x
💻 LocalNitro1.407s (-0.6%)2.007s (~)0.600s151.15x
💻 LocalNext.js (Turbopack)1.472s (-1.9%)2.007s (~)0.535s151.20x
💻 LocalExpress1.480s (+1.8%)2.007s (~)0.527s151.21x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.964s (+1.6%)3.760s (+2.9%)1.796s81.00x
▲ VercelNitro2.110s (+11.1% 🔺)3.535s (+5.6% 🔺)1.424s91.07x
▲ VercelNext.js (Turbopack)3.243s (+9.1% 🔺)4.991s (+6.1% 🔺)1.748s71.65x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.298s (-1.6%)2.223s (+10.7% 🔺)0.925s141.00x
💻 LocalNitro2.572s (+5.3% 🔺)3.009s (~)0.437s101.98x
💻 LocalNext.js (Turbopack)2.634s (-6.3% 🟢)3.109s (-7.0% 🟢)0.476s102.03x
💻 LocalExpress2.799s (+12.5% 🔺)3.211s (+6.7% 🔺)0.412s102.16x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.258s (-27.2% 🟢)3.752s (-18.0% 🟢)1.493s81.00x
▲ VercelNitro2.335s (+6.3% 🔺)3.810s (+8.7% 🔺)1.475s81.03x
▲ VercelNext.js (Turbopack)4.193s (+32.9% 🔺)5.807s (+28.0% 🔺)1.614s61.86x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.886s (+15.4% 🔺)4.442s (+3.3%)2.556s71.00x
💻 LocalNext.js (Turbopack)5.512s (+2.0%)6.014s (~)0.502s52.92x
💻 LocalNitro5.845s (+5.9% 🔺)6.413s (+6.6% 🔺)0.568s53.10x
💻 LocalExpress5.863s (+64.4% 🔺)6.215s (+24.0% 🔺)0.352s53.11x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.640s (-0.9%)4.228s (-4.7%)1.588s81.00x
▲ VercelNitro2.665s (+4.6%)4.561s (+19.8% 🔺)1.895s71.01x
▲ VercelNext.js (Turbopack)4.500s (~)6.531s (+6.3% 🔺)2.031s51.70x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.530s (-12.0% 🟢)1.051s (+2.7%)0.522s581.00x
💻 LocalNitro0.587s (~)1.005s (~)0.418s601.11x
💻 LocalNext.js (Turbopack)0.631s (+5.4% 🔺)1.005s (~)0.374s601.19x
💻 LocalExpress0.638s (+5.4% 🔺)1.022s (+1.7%)0.385s591.20x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.415s (-2.9%)3.773s (-4.9%)1.357s161.00x
▲ VercelNitro2.481s (-4.8%)3.797s (-5.4% 🟢)1.316s161.03x
▲ VercelNext.js (Turbopack)3.631s (-10.4% 🟢)5.451s (-3.7%)1.819s121.50x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.228s (-11.9% 🟢)1.888s (-7.0% 🟢)0.660s481.00x
💻 LocalNitro1.522s (+5.2% 🔺)2.006s (~)0.484s451.24x
💻 LocalExpress1.560s (+4.5%)2.029s (+1.1%)0.469s451.27x
💻 LocalNext.js (Turbopack)1.595s (+1.3%)2.006s (~)0.411s451.30x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express6.086s (+4.5%)7.797s (+4.2%)1.711s121.00x
▲ VercelNitro6.312s (+8.1% 🔺)7.877s (+6.7% 🔺)1.565s121.04x
▲ VercelNext.js (Turbopack)8.166s (-1.0%)10.073s (+5.1% 🔺)1.907s101.34x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.441s (-14.2% 🟢)3.034s (-5.8% 🟢)0.593s401.00x
💻 LocalExpress3.341s (~)4.043s (+0.8%)0.702s301.37x
💻 LocalNitro3.385s (+6.5% 🔺)4.043s (+2.5%)0.658s301.39x
💻 LocalNext.js (Turbopack)3.443s (~)4.043s (+0.8%)0.600s301.41x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro11.413s (-0.7%)13.055s (+1.0%)1.642s101.00x
▲ VercelExpress11.577s (-1.0%)13.806s (~)2.228s91.01x
▲ VercelNext.js (Turbopack)16.842s (-1.7%)18.789s (~)1.946s71.48x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.221s (~)1.017s (+1.0%)0.795s601.00x
💻 LocalExpress0.511s (-1.0%)1.005s (~)0.493s602.31x
💻 LocalNitro0.542s (+5.8% 🔺)1.005s (~)0.463s602.45x
💻 LocalNext.js (Turbopack)0.662s (+3.1%)1.039s (+1.7%)0.377s582.99x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.079s (-4.2%)2.535s (-3.5%)1.456s241.00x
▲ VercelNitro1.181s (+7.8% 🔺)2.362s (-1.6%)1.180s261.09x
▲ VercelNext.js (Turbopack)2.348s (+19.9% 🔺)3.927s (+16.9% 🔺)1.578s162.18x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.294s (-16.0% 🟢)1.007s (~)0.713s901.00x
💻 LocalExpress2.481s (-1.9%)3.010s (-1.1%)0.529s308.44x
💻 LocalNitro2.604s (+3.1%)3.011s (~)0.406s308.86x
💻 LocalNext.js (Turbopack)2.640s (-3.9%)3.042s (-3.4%)0.402s308.98x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.450s (+9.6% 🔺)2.854s (+14.6% 🔺)1.405s321.00x
▲ VercelExpress1.679s (+17.8% 🔺)3.265s (+7.0% 🔺)1.586s281.16x
▲ VercelNext.js (Turbopack)3.364s (+29.8% 🔺)5.296s (+30.5% 🔺)1.933s172.32x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.654s (+14.1% 🔺)1.248s (+15.8% 🔺)0.594s971.00x
💻 LocalExpress5.629s (-5.9% 🟢)8.739s (+2.9%)3.110s148.61x
💻 LocalNitro5.801s (-0.9%)8.669s (~)2.868s148.87x
💻 LocalNext.js (Turbopack)5.958s (-7.3% 🟢)8.955s (-3.1%)2.997s149.11x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.367s (+42.1% 🔺)3.895s (+10.0% 🔺)1.528s311.00x
▲ VercelExpress2.403s (+49.7% 🔺)4.297s (+18.1% 🔺)1.894s281.02x
▲ VercelNext.js (Turbopack)4.360s (+3.8%)6.241s (+9.0% 🔺)1.882s201.84x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.130s (-2.7%)2.001s (~)0.001s (-33.3% 🟢)2.010s (~)0.880s101.00x
💻 LocalNext.js (Turbopack)1.146s (+0.5%)1.966s (~)0.012s (+12.6% 🔺)2.019s (~)0.873s101.01x
💻 LocalNitro1.159s (~)2.005s (~)0.010s (-1.9%)2.018s (~)0.859s101.03x
💻 LocalExpress1.161s (~)2.005s (~)0.013s (+11.4% 🔺)2.020s (~)0.859s101.03x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.904s (+0.7%)3.175s (-2.0%)1.666s (+1.7%)5.326s (~)3.423s101.00x
▲ VercelNitro1.915s (~)2.975s (~)1.744s (-5.2% 🟢)5.149s (-1.4%)3.233s101.01x
▲ VercelNext.js (Turbopack)3.329s (+4.5%)4.163s (+19.0% 🔺)0.626s (-57.0% 🟢)6.073s (-5.7% 🟢)2.744s101.75x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.572s (~)2.009s (~)0.013s (+13.8% 🔺)2.026s (~)0.454s301.00x
💻 LocalNitro1.574s (-0.6%)2.010s (-1.5%)0.013s (-4.7%)2.027s (-1.6%)0.453s301.00x
💻 LocalNext.js (Turbopack)1.633s (+2.0%)1.968s (~)0.013s (+4.9%)2.026s (~)0.393s301.04x
🐘 PostgresNitro1.707s (+4.8%)2.150s (+7.3% 🔺)0.004s (-17.6% 🟢)2.179s (+7.4% 🔺)0.471s281.09x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.563s (-2.2%)6.640s (+0.7%)0.224s (-3.9%)7.298s (-1.6%)1.734s91.00x
▲ VercelExpress5.622s (+3.6%)7.114s (+0.9%)0.272s (+21.9% 🔺)7.848s (+0.9%)2.226s81.01x
▲ VercelNext.js (Turbopack)10.479s (+10.2% 🔺)11.116s (+5.5% 🔺)0.345s (+58.0% 🔺)12.762s (+10.5% 🔺)2.283s51.88x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.948s (+11.9% 🔺)1.297s (+15.5% 🔺)0.000s (+130.4% 🔺)1.322s (+15.8% 🔺)0.374s461.00x
💻 LocalExpress1.269s (-6.3% 🟢)1.948s (+1.5%)0.000s (-9.7% 🟢)1.951s (+1.5%)0.682s311.34x
💻 LocalNext.js (Turbopack)1.336s (-4.6%)1.976s (~)0.000s (-47.4% 🟢)2.017s (~)0.681s301.41x
💻 LocalNitro1.340s (-0.7%)1.948s (~)0.000s (+50.0% 🔺)1.951s (~)0.611s311.41x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.179s (-22.6% 🟢)4.222s (-19.6% 🟢)0.000s (NaN%)4.706s (-17.8% 🟢)1.527s131.00x
▲ VercelExpress3.651s (-30.1% 🟢)5.145s (-22.2% 🟢)0.000s (-18.2% 🟢)5.652s (-20.8% 🟢)2.001s111.15x
▲ VercelNext.js (Turbopack)4.812s (+7.0% 🔺)5.690s (+5.3% 🔺)0.000s (NaN%)6.759s (+9.5% 🔺)1.946s91.51x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.022s (+13.5% 🔺)2.562s (+6.0% 🔺)0.000s (+Infinity% 🔺)2.612s (+7.4% 🔺)0.590s231.00x
💻 LocalNitro3.357s (+3.5%)3.842s (-1.5%)0.001s (+90.0% 🔺)3.846s (-1.5%)0.490s161.66x
💻 LocalExpress3.375s (+1.6%)3.900s (~)0.001s (+333.3% 🔺)3.904s (~)0.529s161.67x
💻 LocalNext.js (Turbopack)3.484s (+0.7%)4.056s (+1.6%)0.001s (-23.5% 🟢)4.098s (+1.7%)0.614s151.72x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro4.513s (+3.8%)5.726s (+9.0% 🔺)0.000s (NaN%)6.125s (+8.1% 🔺)1.612s101.00x
▲ VercelExpress4.540s (+1.1%)5.856s (+2.8%)0.000s (+Infinity% 🔺)6.385s (+3.6%)1.845s101.01x
▲ VercelNext.js (Turbopack)7.675s (+4.3%)8.439s (+8.1% 🔺)0.000s (+Infinity% 🔺)9.803s (+9.6% 🔺)2.128s71.70x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro10/21
🐘 PostgresNitro21/21
▲ VercelNitro12/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local15/21
Next.js (Turbopack)💻 Local19/21
Nitro🐘 Postgres17/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)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)
  • 🌐 Platformatic: Community world (local development)

📋 View full workflow run

@github-actions

github-actionsBot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production144202301672
✅ 💻 Local Development160502191824
✅ 📦 Local Production160502191824
✅ 🐘 Local Postgres160502191824
✅ 🪟 Windows15200152
✅ 📋 Other88701771064
Total7296010648360

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro125027
✅ example125027
✅ express125027
✅ fastify125027
✅ hono125027
✅ nextjs-turbopack14903
✅ nextjs-webpack14903
✅ nitro125027
✅ nuxt125027
✅ sveltekit14408
✅ vite125027
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack15200
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable127025
✅ e2e-local-dev-tanstack-start-127025
✅ e2e-local-postgres-nest-stable127025
✅ e2e-local-postgres-tanstack-start-127025
✅ e2e-local-prod-nest-stable127025
✅ e2e-local-prod-tanstack-start-127025
✅ e2e-vercel-prod-tanstack-start125027

📋 View full workflow run

@NathanColosimo

Copy link
Copy Markdown
ContributorAuthor

CI note: after the force-push rewrite, all checks are green except E2E Local Dev Tests (nextjs-webpack - canary) and the derived E2E Required Check.

I reran the canary dev job twice on this PR; it failed the same HMR manifest update test each time (should follow Next flow-route HMR rebuild rules for body-only changes). The current mainTests workflow is failing on the same job as well: https://github.com/vercel/workflow/actions/runs/28568531186/job/84700980822

The first nextjs-turbopack - stable dev failure and the Nitro benchmark failure both passed after rerun.

@NathanColosimo

Copy link
Copy Markdown
ContributorAuthor

Fresh manual basePath smoke after the rewrite:

  • Temporary workbench config: basePath: '/v2' in workbench/nextjs-turbopack/next.config.ts.
  • Fresh Vercel preview: https://example-nextjs-workflow-turbopack-ixptnm4nf.labs.vercel.dev (dpl_FLpB9FQqLN2qZzU1BBLWiuq6nuAv).
  • Local production smoke from the /v2 build:
    • POST /.well-known/workflow/v1/flow?__health -> 404
    • POST /v2/.well-known/workflow/v1/flow?__health -> 200
    • POST /v2/api/test-direct-step-call -> 200 {"result":5}
    • POST /v2/api/trigger-pages?workflowFn=addTenWorkflow&args=123, then poll /v2/api/trigger-pages?runId=... -> 200 133
  • Vercel preview smoke:
    • POST /.well-known/workflow/v1/flow?__health -> 404
    • POST /v2/.well-known/workflow/v1/flow?__health -> 404 (same public route-table caveat noted in the PR body)
    • POST /v2/api/test-direct-step-call -> 200 {"result":5}
    • POST /v2/api/trigger-pages?workflowFn=addTenWorkflow&args=123, then poll /v2/api/trigger-pages?runId=... -> 200 133

The temporary basePath edit was removed after the smoke; the PR worktree is clean.

@NathanColosimo

Copy link
Copy Markdown
ContributorAuthor

Health-check follow-up pushed in 610c9c016.

What changed:

  • Generated workflow route modules now keep the adapter-compatible export const POST = workflowEntrypoint(...) shape and also export GET, HEAD, and OPTIONS as aliases to POST, so withHealthCheck() can actually receive direct health probes in Next App Router.
  • Kept the old public @workflow/utils URL helper exports as wrappers around the new createWorkflowUrl(...) helper, so this stays patch-compatible.
  • Re-ran the basePath queue/probe coverage and restored the utils invalid-basePath coverage.

Manual health check result from the basePath smoke:

  • Local next start with temporary basePath: '/v2' works for /v2/.well-known/workflow/v1/flow?__health using GET, HEAD, OPTIONS, and POST; root /.well-known/... remains 404 as expected.
  • Vercel preview still returns the app 404 for public direct /v2/.well-known/workflow/v1/flow?__health, even though vercel inspect --format=json shows the lambda output exists at v2/.well-known/workflow/v1/flow and other /v2/api/... routes work. That still looks like a Vercel/Next deployed routing issue around basePath + .well-known, not workflow-server and not a missing SDK route file.

Local proof after the follow-up:

  • pnpm --filter @workflow/utils test
  • pnpm --filter @workflow/builders test
  • pnpm --filter @workflow/next test
  • pnpm exec vitest run packages/world-local/src/config.test.ts packages/world-local/src/queue.test.ts packages/world-postgres/src/queue.test.ts
  • pnpm --filter @workflow/utils --filter @workflow/builders --filter @workflow/core --filter @workflow/world-local --filter @workflow/world-postgres --filter @workflow/next build
  • Autoreview panel clean: Codex gpt-5.5 xhigh + Claude claude-opus-4-8 xhigh, 0 findings.

Comment threadpackages/next/src/index.ts
…-path-local
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
# Conflicts:
#	packages/next/src/index.ts
#	packages/utils/src/index.ts

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI review: no blocking issues

| { type: 'webhook'; token: string }
| { type: 'health' };

export function createWorkflowUrl(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI Review: Note

These new URL helpers (createWorkflowUrl, createWorkflowBaseUrl, createWorkflowHealthEndpoint) are the correctness core of this PR but have no dedicated unit test — they're only exercised indirectly via the world-local / world-postgres / builders suites. A focused workflow-routes.test.ts would be worth adding, in particular to pin the subtle property that createWorkflowUrl derives the prefix from the base URL's existing pathname (not the global basePath). That's what keeps the createWorkflowBaseUrlcreateWorkflowUrl webhook path from double-prefixing (/v2/v2/...). I verified this holds locally (base URL already carrying /v2 produces a single prefix), but a regression test would lock it in.

Record<symbol, string | undefined>;

// Keep this local: @workflow/next is CommonJS, while @workflow/utils is ESM-only.
function setWorkflowBasePath(basePath: string | undefined): void {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI Review: Nit

This BASE_PATH_SYMBOL + setWorkflowBasePath pair is duplicated from @workflow/utils (the CJS-vs-ESM comment explains why). Both sides depend on the Symbol.for('@workflow/core/basePath') string staying identical — if one drifts, basePath propagation silently breaks with no build/type error. Worth a cross-reference comment on both copies pointing at workflow-routes.ts so the coupling is discoverable.

@github-actionsgithub-actionsBot mentioned this pull request Jul 6, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2791. Merge conflicts were resolved by AI — please review carefully. (backport job run)

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.

Workflow does not work well/properly when using basePath on Nextjs app

3 participants

@NathanColosimo@VaguelySerious@karthikscale3
, '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" + '
fix(next): respect basePath for workflow routes by NathanColosimo · Pull Request #2732 · vercel/workflow · GitHub
Skip to content

fix(next): respect basePath for workflow routes - #2732

Merged
NathanColosimo merged 9 commits into
mainfrom
nathanc/fix-next-base-path
Jul 6, 2026
Merged

fix(next): respect basePath for workflow routes#2732
NathanColosimo merged 9 commits into
mainfrom
nathanc/fix-next-base-path

Conversation

@NathanColosimo

@NathanColosimoNathanColosimo commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • derive Workflow's route prefix from nextConfig.basePath; users should only configure basePath in Next.js
  • pass that basePath into generated workflow entrypoints and route URL construction
  • use shared route helpers for workflow metadata, webhook URLs, manifest/health URLs, and local/postgres queue delivery URLs
  • preserve full URL overrides like WORKFLOW_LOCAL_BASE_URL as full overrides

Fixes#1864.

This is separate from #2729: that PR fixes project-root discovery, while this PR fixes runtime URL/route construction for apps served below a path prefix.

Vercel note

Runtime workflow execution works on a Vercel preview with basePath: '/v2': direct step calls and async workflow trigger/poll complete through /v2.

One platform follow-up remains: the generated Vercel/Next output serves internal workflow invocation at /v2/.well-known/workflow/v1/flow, but a public direct health probe to /v2/.well-known/workflow/v1/flow?__health still hits the app 404 route. That appears to be a Vercel/Next build-output route-table issue, not a Vercel REST API issue and not a Workflow queue/runtime URL issue.

Tests

  • pnpm --filter @workflow/utils --filter @workflow/builders --filter @workflow/core --filter @workflow/world-local --filter @workflow/world-postgres --filter @workflow/next build
  • pnpm --filter @workflow/utils test
  • pnpm --filter @workflow/next test
  • pnpm exec vitest run packages/world-local/src/config.test.ts packages/world-local/src/queue.test.ts packages/world-postgres/src/queue.test.ts packages/builders/src/constants.test.ts
  • pnpm exec biome check --max-diagnostics 12 ... on touched files (passes with existing warnings)
  • git diff --check
  • local nextjs-turbopack production smoke with basePath: '/v2': root health 404, /v2 health 200, direct step 200, workflow trigger/poll returns 133
  • Vercel preview smoke with basePath: '/v2': direct step 200, workflow trigger/poll returns 133; public /v2 health 404 as noted above
  • Codex autoreview (gpt-5.5, xhigh): clean after fixing the CommonJS/ESM issue in @workflow/next
  • Claude Opus fallback review (xhigh): no blocking findings; requested claude-opus-4.8 was unavailable

@changeset-bot

changeset-botBot commented Jun 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ce1ddb2

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

This PR includes changesets to release 21 packages
NameType
@workflow/buildersPatch
@workflow/corePatch
@workflow/nextPatch
@workflow/utilsPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/astroPatch
@workflow/cliPatch
@workflow/nestPatch
@workflow/nitroPatch
@workflow/nuxtPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/webPatch
workflowPatch
@workflow/world-testingPatch
@workflow/errorsPatch
@workflow/world-vercelPatch

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 Jun 30, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jun 30, 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🥇 Nitro0.046s (~)1.006s (~)0.959s101.00x
💻 LocalExpress0.048s (+7.2% 🔺)1.006s (~)0.958s101.03x
💻 LocalNext.js (Turbopack)0.054s (+1.3%)1.006s (~)0.952s101.16x
🐘 PostgresNitro0.128s (+95.1% 🔺)1.042s (+3.0%)0.915s102.75x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.204s (+8.7% 🔺)1.902s (-6.3% 🟢)1.697s101.00x
▲ VercelExpress0.260s (+15.6% 🔺)1.640s (-19.9% 🟢)1.380s101.27x
▲ VercelNext.js (Turbopack)0.480s (+97.6% 🔺)2.307s (-3.0%)1.826s102.35x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.081s (~)2.006s (~)0.925s101.00x
💻 LocalExpress1.083s (~)2.006s (~)0.923s101.00x
💻 LocalNext.js (Turbopack)1.089s (~)2.006s (~)0.917s101.01x
🐘 PostgresNitro1.113s (+1.4%)2.015s (~)0.901s101.03x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.390s (+2.1%)2.977s (-1.3%)1.587s101.00x
▲ VercelExpress1.402s (-1.1%)2.887s (+2.3%)1.485s101.01x
▲ VercelNext.js (Turbopack)2.120s (-9.6% 🟢)3.824s (+6.5% 🔺)1.704s101.53x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.449s (~)11.023s (~)0.574s31.00x
💻 LocalExpress10.464s (~)11.022s (~)0.557s31.00x
🐘 PostgresNitro10.509s (~)11.047s (~)0.537s31.01x
💻 LocalNext.js (Turbopack)10.516s (~)11.023s (~)0.507s31.01x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro11.723s (~)13.343s (+5.1% 🔺)1.620s31.00x
▲ VercelExpress11.886s (+1.8%)13.666s (-2.0%)1.780s31.01x
▲ VercelNext.js (Turbopack)13.087s (+1.3%)15.138s (+6.8% 🔺)2.051s21.12x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro13.549s (-1.1%)14.015s (~)0.466s51.00x
💻 LocalNitro13.663s (~)14.027s (~)0.364s51.01x
💻 LocalNext.js (Turbopack)13.781s (~)14.028s (~)0.247s51.02x
💻 LocalExpress13.798s (+0.7%)14.028s (~)0.229s51.02x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.456s (-1.3%)18.438s (-2.7%)1.983s41.00x
▲ VercelNitro16.473s (+1.8%)17.812s (+2.1%)1.339s41.00x
▲ VercelNext.js (Turbopack)17.996s (~)20.274s (+2.6%)2.278s31.09x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro11.888s (-3.6%)12.282s (-5.7% 🟢)0.394s81.00x
💻 LocalNitro12.144s (-0.7%)13.026s (~)0.882s71.02x
💻 LocalExpress12.257s (~)13.025s (~)0.767s71.03x
💻 LocalNext.js (Turbopack)12.351s (+0.9%)13.024s (~)0.673s71.04x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express17.467s (+1.0%)19.349s (+0.9%)1.881s51.00x
▲ VercelNitro17.987s (+5.3% 🔺)19.248s (+2.5%)1.261s51.03x
▲ VercelNext.js (Turbopack)19.714s (~)21.810s (+0.6%)2.096s51.13x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.201s (+1.3%)2.020s (+0.6%)0.819s151.00x
💻 LocalExpress1.398s (-3.2%)2.006s (~)0.608s151.16x
💻 LocalNext.js (Turbopack)1.412s (~)2.007s (~)0.595s151.18x
💻 LocalNitro1.461s (+3.8%)2.007s (~)0.546s151.22x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.153s (-5.9% 🟢)3.489s (-3.2%)1.336s91.00x
▲ VercelExpress2.354s (+3.6%)4.101s (+5.1% 🔺)1.747s81.09x
▲ VercelNext.js (Turbopack)4.048s (+37.8% 🔺)5.865s (+26.4% 🔺)1.817s61.88x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.284s (-8.3% 🟢)2.159s (-12.6% 🟢)0.875s141.00x
💻 LocalNext.js (Turbopack)2.345s (-5.7% 🟢)3.010s (-3.2%)0.664s101.83x
💻 LocalNitro2.384s (+2.8%)3.009s (~)0.625s101.86x
💻 LocalExpress2.412s (-9.2% 🟢)3.009s (-3.2%)0.596s101.88x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.289s (-9.5% 🟢)3.570s (~)1.281s91.00x
▲ VercelExpress2.355s (-9.6% 🟢)3.864s (-6.2% 🟢)1.509s81.03x
▲ VercelNext.js (Turbopack)3.790s (+13.8% 🔺)5.415s (+10.3% 🔺)1.625s61.66x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.665s (+2.2%)4.010s (-3.1%)2.345s81.00x
💻 LocalNext.js (Turbopack)2.870s (-38.9% 🟢)4.729s (-14.2% 🟢)1.860s71.72x
💻 LocalNitro3.678s (-14.3% 🟢)4.871s (~)1.193s72.21x
💻 LocalExpress3.833s (-13.2% 🟢)5.012s (-3.2%)1.179s72.30x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.763s (-2.4%)4.554s (+1.0%)1.792s71.00x
▲ VercelExpress2.966s (+1.6%)4.759s (+8.3% 🔺)1.793s71.07x
▲ VercelNext.js (Turbopack)4.868s (+23.2% 🔺)6.612s (+14.6% 🔺)1.744s51.76x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.226s (+2.5%)2.023s (+0.8%)0.797s151.00x
💻 LocalNitro1.407s (-0.6%)2.007s (~)0.600s151.15x
💻 LocalNext.js (Turbopack)1.472s (-1.9%)2.007s (~)0.535s151.20x
💻 LocalExpress1.480s (+1.8%)2.007s (~)0.527s151.21x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.964s (+1.6%)3.760s (+2.9%)1.796s81.00x
▲ VercelNitro2.110s (+11.1% 🔺)3.535s (+5.6% 🔺)1.424s91.07x
▲ VercelNext.js (Turbopack)3.243s (+9.1% 🔺)4.991s (+6.1% 🔺)1.748s71.65x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.298s (-1.6%)2.223s (+10.7% 🔺)0.925s141.00x
💻 LocalNitro2.572s (+5.3% 🔺)3.009s (~)0.437s101.98x
💻 LocalNext.js (Turbopack)2.634s (-6.3% 🟢)3.109s (-7.0% 🟢)0.476s102.03x
💻 LocalExpress2.799s (+12.5% 🔺)3.211s (+6.7% 🔺)0.412s102.16x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.258s (-27.2% 🟢)3.752s (-18.0% 🟢)1.493s81.00x
▲ VercelNitro2.335s (+6.3% 🔺)3.810s (+8.7% 🔺)1.475s81.03x
▲ VercelNext.js (Turbopack)4.193s (+32.9% 🔺)5.807s (+28.0% 🔺)1.614s61.86x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.886s (+15.4% 🔺)4.442s (+3.3%)2.556s71.00x
💻 LocalNext.js (Turbopack)5.512s (+2.0%)6.014s (~)0.502s52.92x
💻 LocalNitro5.845s (+5.9% 🔺)6.413s (+6.6% 🔺)0.568s53.10x
💻 LocalExpress5.863s (+64.4% 🔺)6.215s (+24.0% 🔺)0.352s53.11x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.640s (-0.9%)4.228s (-4.7%)1.588s81.00x
▲ VercelNitro2.665s (+4.6%)4.561s (+19.8% 🔺)1.895s71.01x
▲ VercelNext.js (Turbopack)4.500s (~)6.531s (+6.3% 🔺)2.031s51.70x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.530s (-12.0% 🟢)1.051s (+2.7%)0.522s581.00x
💻 LocalNitro0.587s (~)1.005s (~)0.418s601.11x
💻 LocalNext.js (Turbopack)0.631s (+5.4% 🔺)1.005s (~)0.374s601.19x
💻 LocalExpress0.638s (+5.4% 🔺)1.022s (+1.7%)0.385s591.20x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.415s (-2.9%)3.773s (-4.9%)1.357s161.00x
▲ VercelNitro2.481s (-4.8%)3.797s (-5.4% 🟢)1.316s161.03x
▲ VercelNext.js (Turbopack)3.631s (-10.4% 🟢)5.451s (-3.7%)1.819s121.50x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.228s (-11.9% 🟢)1.888s (-7.0% 🟢)0.660s481.00x
💻 LocalNitro1.522s (+5.2% 🔺)2.006s (~)0.484s451.24x
💻 LocalExpress1.560s (+4.5%)2.029s (+1.1%)0.469s451.27x
💻 LocalNext.js (Turbopack)1.595s (+1.3%)2.006s (~)0.411s451.30x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express6.086s (+4.5%)7.797s (+4.2%)1.711s121.00x
▲ VercelNitro6.312s (+8.1% 🔺)7.877s (+6.7% 🔺)1.565s121.04x
▲ VercelNext.js (Turbopack)8.166s (-1.0%)10.073s (+5.1% 🔺)1.907s101.34x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.441s (-14.2% 🟢)3.034s (-5.8% 🟢)0.593s401.00x
💻 LocalExpress3.341s (~)4.043s (+0.8%)0.702s301.37x
💻 LocalNitro3.385s (+6.5% 🔺)4.043s (+2.5%)0.658s301.39x
💻 LocalNext.js (Turbopack)3.443s (~)4.043s (+0.8%)0.600s301.41x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro11.413s (-0.7%)13.055s (+1.0%)1.642s101.00x
▲ VercelExpress11.577s (-1.0%)13.806s (~)2.228s91.01x
▲ VercelNext.js (Turbopack)16.842s (-1.7%)18.789s (~)1.946s71.48x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.221s (~)1.017s (+1.0%)0.795s601.00x
💻 LocalExpress0.511s (-1.0%)1.005s (~)0.493s602.31x
💻 LocalNitro0.542s (+5.8% 🔺)1.005s (~)0.463s602.45x
💻 LocalNext.js (Turbopack)0.662s (+3.1%)1.039s (+1.7%)0.377s582.99x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.079s (-4.2%)2.535s (-3.5%)1.456s241.00x
▲ VercelNitro1.181s (+7.8% 🔺)2.362s (-1.6%)1.180s261.09x
▲ VercelNext.js (Turbopack)2.348s (+19.9% 🔺)3.927s (+16.9% 🔺)1.578s162.18x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.294s (-16.0% 🟢)1.007s (~)0.713s901.00x
💻 LocalExpress2.481s (-1.9%)3.010s (-1.1%)0.529s308.44x
💻 LocalNitro2.604s (+3.1%)3.011s (~)0.406s308.86x
💻 LocalNext.js (Turbopack)2.640s (-3.9%)3.042s (-3.4%)0.402s308.98x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.450s (+9.6% 🔺)2.854s (+14.6% 🔺)1.405s321.00x
▲ VercelExpress1.679s (+17.8% 🔺)3.265s (+7.0% 🔺)1.586s281.16x
▲ VercelNext.js (Turbopack)3.364s (+29.8% 🔺)5.296s (+30.5% 🔺)1.933s172.32x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.654s (+14.1% 🔺)1.248s (+15.8% 🔺)0.594s971.00x
💻 LocalExpress5.629s (-5.9% 🟢)8.739s (+2.9%)3.110s148.61x
💻 LocalNitro5.801s (-0.9%)8.669s (~)2.868s148.87x
💻 LocalNext.js (Turbopack)5.958s (-7.3% 🟢)8.955s (-3.1%)2.997s149.11x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.367s (+42.1% 🔺)3.895s (+10.0% 🔺)1.528s311.00x
▲ VercelExpress2.403s (+49.7% 🔺)4.297s (+18.1% 🔺)1.894s281.02x
▲ VercelNext.js (Turbopack)4.360s (+3.8%)6.241s (+9.0% 🔺)1.882s201.84x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.130s (-2.7%)2.001s (~)0.001s (-33.3% 🟢)2.010s (~)0.880s101.00x
💻 LocalNext.js (Turbopack)1.146s (+0.5%)1.966s (~)0.012s (+12.6% 🔺)2.019s (~)0.873s101.01x
💻 LocalNitro1.159s (~)2.005s (~)0.010s (-1.9%)2.018s (~)0.859s101.03x
💻 LocalExpress1.161s (~)2.005s (~)0.013s (+11.4% 🔺)2.020s (~)0.859s101.03x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.904s (+0.7%)3.175s (-2.0%)1.666s (+1.7%)5.326s (~)3.423s101.00x
▲ VercelNitro1.915s (~)2.975s (~)1.744s (-5.2% 🟢)5.149s (-1.4%)3.233s101.01x
▲ VercelNext.js (Turbopack)3.329s (+4.5%)4.163s (+19.0% 🔺)0.626s (-57.0% 🟢)6.073s (-5.7% 🟢)2.744s101.75x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.572s (~)2.009s (~)0.013s (+13.8% 🔺)2.026s (~)0.454s301.00x
💻 LocalNitro1.574s (-0.6%)2.010s (-1.5%)0.013s (-4.7%)2.027s (-1.6%)0.453s301.00x
💻 LocalNext.js (Turbopack)1.633s (+2.0%)1.968s (~)0.013s (+4.9%)2.026s (~)0.393s301.04x
🐘 PostgresNitro1.707s (+4.8%)2.150s (+7.3% 🔺)0.004s (-17.6% 🟢)2.179s (+7.4% 🔺)0.471s281.09x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.563s (-2.2%)6.640s (+0.7%)0.224s (-3.9%)7.298s (-1.6%)1.734s91.00x
▲ VercelExpress5.622s (+3.6%)7.114s (+0.9%)0.272s (+21.9% 🔺)7.848s (+0.9%)2.226s81.01x
▲ VercelNext.js (Turbopack)10.479s (+10.2% 🔺)11.116s (+5.5% 🔺)0.345s (+58.0% 🔺)12.762s (+10.5% 🔺)2.283s51.88x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.948s (+11.9% 🔺)1.297s (+15.5% 🔺)0.000s (+130.4% 🔺)1.322s (+15.8% 🔺)0.374s461.00x
💻 LocalExpress1.269s (-6.3% 🟢)1.948s (+1.5%)0.000s (-9.7% 🟢)1.951s (+1.5%)0.682s311.34x
💻 LocalNext.js (Turbopack)1.336s (-4.6%)1.976s (~)0.000s (-47.4% 🟢)2.017s (~)0.681s301.41x
💻 LocalNitro1.340s (-0.7%)1.948s (~)0.000s (+50.0% 🔺)1.951s (~)0.611s311.41x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.179s (-22.6% 🟢)4.222s (-19.6% 🟢)0.000s (NaN%)4.706s (-17.8% 🟢)1.527s131.00x
▲ VercelExpress3.651s (-30.1% 🟢)5.145s (-22.2% 🟢)0.000s (-18.2% 🟢)5.652s (-20.8% 🟢)2.001s111.15x
▲ VercelNext.js (Turbopack)4.812s (+7.0% 🔺)5.690s (+5.3% 🔺)0.000s (NaN%)6.759s (+9.5% 🔺)1.946s91.51x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.022s (+13.5% 🔺)2.562s (+6.0% 🔺)0.000s (+Infinity% 🔺)2.612s (+7.4% 🔺)0.590s231.00x
💻 LocalNitro3.357s (+3.5%)3.842s (-1.5%)0.001s (+90.0% 🔺)3.846s (-1.5%)0.490s161.66x
💻 LocalExpress3.375s (+1.6%)3.900s (~)0.001s (+333.3% 🔺)3.904s (~)0.529s161.67x
💻 LocalNext.js (Turbopack)3.484s (+0.7%)4.056s (+1.6%)0.001s (-23.5% 🟢)4.098s (+1.7%)0.614s151.72x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro4.513s (+3.8%)5.726s (+9.0% 🔺)0.000s (NaN%)6.125s (+8.1% 🔺)1.612s101.00x
▲ VercelExpress4.540s (+1.1%)5.856s (+2.8%)0.000s (+Infinity% 🔺)6.385s (+3.6%)1.845s101.01x
▲ VercelNext.js (Turbopack)7.675s (+4.3%)8.439s (+8.1% 🔺)0.000s (+Infinity% 🔺)9.803s (+9.6% 🔺)2.128s71.70x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro10/21
🐘 PostgresNitro21/21
▲ VercelNitro12/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local15/21
Next.js (Turbopack)💻 Local19/21
Nitro🐘 Postgres17/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)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)
  • 🌐 Platformatic: Community world (local development)

📋 View full workflow run

@github-actions

github-actionsBot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production144202301672
✅ 💻 Local Development160502191824
✅ 📦 Local Production160502191824
✅ 🐘 Local Postgres160502191824
✅ 🪟 Windows15200152
✅ 📋 Other88701771064
Total7296010648360

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro125027
✅ example125027
✅ express125027
✅ fastify125027
✅ hono125027
✅ nextjs-turbopack14903
✅ nextjs-webpack14903
✅ nitro125027
✅ nuxt125027
✅ sveltekit14408
✅ vite125027
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack15200
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable127025
✅ e2e-local-dev-tanstack-start-127025
✅ e2e-local-postgres-nest-stable127025
✅ e2e-local-postgres-tanstack-start-127025
✅ e2e-local-prod-nest-stable127025
✅ e2e-local-prod-tanstack-start-127025
✅ e2e-vercel-prod-tanstack-start125027

📋 View full workflow run

@NathanColosimo

Copy link
Copy Markdown
ContributorAuthor

CI note: after the force-push rewrite, all checks are green except E2E Local Dev Tests (nextjs-webpack - canary) and the derived E2E Required Check.

I reran the canary dev job twice on this PR; it failed the same HMR manifest update test each time (should follow Next flow-route HMR rebuild rules for body-only changes). The current mainTests workflow is failing on the same job as well: https://github.com/vercel/workflow/actions/runs/28568531186/job/84700980822

The first nextjs-turbopack - stable dev failure and the Nitro benchmark failure both passed after rerun.

@NathanColosimo

Copy link
Copy Markdown
ContributorAuthor

Fresh manual basePath smoke after the rewrite:

  • Temporary workbench config: basePath: '/v2' in workbench/nextjs-turbopack/next.config.ts.
  • Fresh Vercel preview: https://example-nextjs-workflow-turbopack-ixptnm4nf.labs.vercel.dev (dpl_FLpB9FQqLN2qZzU1BBLWiuq6nuAv).
  • Local production smoke from the /v2 build:
    • POST /.well-known/workflow/v1/flow?__health -> 404
    • POST /v2/.well-known/workflow/v1/flow?__health -> 200
    • POST /v2/api/test-direct-step-call -> 200 {"result":5}
    • POST /v2/api/trigger-pages?workflowFn=addTenWorkflow&args=123, then poll /v2/api/trigger-pages?runId=... -> 200 133
  • Vercel preview smoke:
    • POST /.well-known/workflow/v1/flow?__health -> 404
    • POST /v2/.well-known/workflow/v1/flow?__health -> 404 (same public route-table caveat noted in the PR body)
    • POST /v2/api/test-direct-step-call -> 200 {"result":5}
    • POST /v2/api/trigger-pages?workflowFn=addTenWorkflow&args=123, then poll /v2/api/trigger-pages?runId=... -> 200 133

The temporary basePath edit was removed after the smoke; the PR worktree is clean.

@NathanColosimo

Copy link
Copy Markdown
ContributorAuthor

Health-check follow-up pushed in 610c9c016.

What changed:

  • Generated workflow route modules now keep the adapter-compatible export const POST = workflowEntrypoint(...) shape and also export GET, HEAD, and OPTIONS as aliases to POST, so withHealthCheck() can actually receive direct health probes in Next App Router.
  • Kept the old public @workflow/utils URL helper exports as wrappers around the new createWorkflowUrl(...) helper, so this stays patch-compatible.
  • Re-ran the basePath queue/probe coverage and restored the utils invalid-basePath coverage.

Manual health check result from the basePath smoke:

  • Local next start with temporary basePath: '/v2' works for /v2/.well-known/workflow/v1/flow?__health using GET, HEAD, OPTIONS, and POST; root /.well-known/... remains 404 as expected.
  • Vercel preview still returns the app 404 for public direct /v2/.well-known/workflow/v1/flow?__health, even though vercel inspect --format=json shows the lambda output exists at v2/.well-known/workflow/v1/flow and other /v2/api/... routes work. That still looks like a Vercel/Next deployed routing issue around basePath + .well-known, not workflow-server and not a missing SDK route file.

Local proof after the follow-up:

  • pnpm --filter @workflow/utils test
  • pnpm --filter @workflow/builders test
  • pnpm --filter @workflow/next test
  • pnpm exec vitest run packages/world-local/src/config.test.ts packages/world-local/src/queue.test.ts packages/world-postgres/src/queue.test.ts
  • pnpm --filter @workflow/utils --filter @workflow/builders --filter @workflow/core --filter @workflow/world-local --filter @workflow/world-postgres --filter @workflow/next build
  • Autoreview panel clean: Codex gpt-5.5 xhigh + Claude claude-opus-4-8 xhigh, 0 findings.

Comment threadpackages/next/src/index.ts
…-path-local
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
# Conflicts:
#	packages/next/src/index.ts
#	packages/utils/src/index.ts

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI review: no blocking issues

| { type: 'webhook'; token: string }
| { type: 'health' };

export function createWorkflowUrl(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI Review: Note

These new URL helpers (createWorkflowUrl, createWorkflowBaseUrl, createWorkflowHealthEndpoint) are the correctness core of this PR but have no dedicated unit test — they're only exercised indirectly via the world-local / world-postgres / builders suites. A focused workflow-routes.test.ts would be worth adding, in particular to pin the subtle property that createWorkflowUrl derives the prefix from the base URL's existing pathname (not the global basePath). That's what keeps the createWorkflowBaseUrlcreateWorkflowUrl webhook path from double-prefixing (/v2/v2/...). I verified this holds locally (base URL already carrying /v2 produces a single prefix), but a regression test would lock it in.

Record<symbol, string | undefined>;

// Keep this local: @workflow/next is CommonJS, while @workflow/utils is ESM-only.
function setWorkflowBasePath(basePath: string | undefined): void {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI Review: Nit

This BASE_PATH_SYMBOL + setWorkflowBasePath pair is duplicated from @workflow/utils (the CJS-vs-ESM comment explains why). Both sides depend on the Symbol.for('@workflow/core/basePath') string staying identical — if one drifts, basePath propagation silently breaks with no build/type error. Worth a cross-reference comment on both copies pointing at workflow-routes.ts so the coupling is discoverable.

@github-actionsgithub-actionsBot mentioned this pull request Jul 6, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2791. Merge conflicts were resolved by AI — please review carefully. (backport job run)

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.

Workflow does not work well/properly when using basePath on Nextjs app

3 participants

@NathanColosimo@VaguelySerious@karthikscale3
, '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('^' + ".*" + ' fix(next): respect basePath for workflow routes by NathanColosimo · Pull Request #2732 · vercel/workflow · GitHub
Skip to content

fix(next): respect basePath for workflow routes - #2732

Merged
NathanColosimo merged 9 commits into
mainfrom
nathanc/fix-next-base-path
Jul 6, 2026
Merged

fix(next): respect basePath for workflow routes#2732
NathanColosimo merged 9 commits into
mainfrom
nathanc/fix-next-base-path

Conversation

@NathanColosimo

@NathanColosimoNathanColosimo commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • derive Workflow's route prefix from nextConfig.basePath; users should only configure basePath in Next.js
  • pass that basePath into generated workflow entrypoints and route URL construction
  • use shared route helpers for workflow metadata, webhook URLs, manifest/health URLs, and local/postgres queue delivery URLs
  • preserve full URL overrides like WORKFLOW_LOCAL_BASE_URL as full overrides

Fixes#1864.

This is separate from #2729: that PR fixes project-root discovery, while this PR fixes runtime URL/route construction for apps served below a path prefix.

Vercel note

Runtime workflow execution works on a Vercel preview with basePath: '/v2': direct step calls and async workflow trigger/poll complete through /v2.

One platform follow-up remains: the generated Vercel/Next output serves internal workflow invocation at /v2/.well-known/workflow/v1/flow, but a public direct health probe to /v2/.well-known/workflow/v1/flow?__health still hits the app 404 route. That appears to be a Vercel/Next build-output route-table issue, not a Vercel REST API issue and not a Workflow queue/runtime URL issue.

Tests

  • pnpm --filter @workflow/utils --filter @workflow/builders --filter @workflow/core --filter @workflow/world-local --filter @workflow/world-postgres --filter @workflow/next build
  • pnpm --filter @workflow/utils test
  • pnpm --filter @workflow/next test
  • pnpm exec vitest run packages/world-local/src/config.test.ts packages/world-local/src/queue.test.ts packages/world-postgres/src/queue.test.ts packages/builders/src/constants.test.ts
  • pnpm exec biome check --max-diagnostics 12 ... on touched files (passes with existing warnings)
  • git diff --check
  • local nextjs-turbopack production smoke with basePath: '/v2': root health 404, /v2 health 200, direct step 200, workflow trigger/poll returns 133
  • Vercel preview smoke with basePath: '/v2': direct step 200, workflow trigger/poll returns 133; public /v2 health 404 as noted above
  • Codex autoreview (gpt-5.5, xhigh): clean after fixing the CommonJS/ESM issue in @workflow/next
  • Claude Opus fallback review (xhigh): no blocking findings; requested claude-opus-4.8 was unavailable

@changeset-bot

changeset-botBot commented Jun 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ce1ddb2

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

This PR includes changesets to release 21 packages
NameType
@workflow/buildersPatch
@workflow/corePatch
@workflow/nextPatch
@workflow/utilsPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/astroPatch
@workflow/cliPatch
@workflow/nestPatch
@workflow/nitroPatch
@workflow/nuxtPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/webPatch
workflowPatch
@workflow/world-testingPatch
@workflow/errorsPatch
@workflow/world-vercelPatch

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 Jun 30, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jun 30, 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🥇 Nitro0.046s (~)1.006s (~)0.959s101.00x
💻 LocalExpress0.048s (+7.2% 🔺)1.006s (~)0.958s101.03x
💻 LocalNext.js (Turbopack)0.054s (+1.3%)1.006s (~)0.952s101.16x
🐘 PostgresNitro0.128s (+95.1% 🔺)1.042s (+3.0%)0.915s102.75x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.204s (+8.7% 🔺)1.902s (-6.3% 🟢)1.697s101.00x
▲ VercelExpress0.260s (+15.6% 🔺)1.640s (-19.9% 🟢)1.380s101.27x
▲ VercelNext.js (Turbopack)0.480s (+97.6% 🔺)2.307s (-3.0%)1.826s102.35x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.081s (~)2.006s (~)0.925s101.00x
💻 LocalExpress1.083s (~)2.006s (~)0.923s101.00x
💻 LocalNext.js (Turbopack)1.089s (~)2.006s (~)0.917s101.01x
🐘 PostgresNitro1.113s (+1.4%)2.015s (~)0.901s101.03x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.390s (+2.1%)2.977s (-1.3%)1.587s101.00x
▲ VercelExpress1.402s (-1.1%)2.887s (+2.3%)1.485s101.01x
▲ VercelNext.js (Turbopack)2.120s (-9.6% 🟢)3.824s (+6.5% 🔺)1.704s101.53x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.449s (~)11.023s (~)0.574s31.00x
💻 LocalExpress10.464s (~)11.022s (~)0.557s31.00x
🐘 PostgresNitro10.509s (~)11.047s (~)0.537s31.01x
💻 LocalNext.js (Turbopack)10.516s (~)11.023s (~)0.507s31.01x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro11.723s (~)13.343s (+5.1% 🔺)1.620s31.00x
▲ VercelExpress11.886s (+1.8%)13.666s (-2.0%)1.780s31.01x
▲ VercelNext.js (Turbopack)13.087s (+1.3%)15.138s (+6.8% 🔺)2.051s21.12x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro13.549s (-1.1%)14.015s (~)0.466s51.00x
💻 LocalNitro13.663s (~)14.027s (~)0.364s51.01x
💻 LocalNext.js (Turbopack)13.781s (~)14.028s (~)0.247s51.02x
💻 LocalExpress13.798s (+0.7%)14.028s (~)0.229s51.02x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.456s (-1.3%)18.438s (-2.7%)1.983s41.00x
▲ VercelNitro16.473s (+1.8%)17.812s (+2.1%)1.339s41.00x
▲ VercelNext.js (Turbopack)17.996s (~)20.274s (+2.6%)2.278s31.09x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro11.888s (-3.6%)12.282s (-5.7% 🟢)0.394s81.00x
💻 LocalNitro12.144s (-0.7%)13.026s (~)0.882s71.02x
💻 LocalExpress12.257s (~)13.025s (~)0.767s71.03x
💻 LocalNext.js (Turbopack)12.351s (+0.9%)13.024s (~)0.673s71.04x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express17.467s (+1.0%)19.349s (+0.9%)1.881s51.00x
▲ VercelNitro17.987s (+5.3% 🔺)19.248s (+2.5%)1.261s51.03x
▲ VercelNext.js (Turbopack)19.714s (~)21.810s (+0.6%)2.096s51.13x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.201s (+1.3%)2.020s (+0.6%)0.819s151.00x
💻 LocalExpress1.398s (-3.2%)2.006s (~)0.608s151.16x
💻 LocalNext.js (Turbopack)1.412s (~)2.007s (~)0.595s151.18x
💻 LocalNitro1.461s (+3.8%)2.007s (~)0.546s151.22x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.153s (-5.9% 🟢)3.489s (-3.2%)1.336s91.00x
▲ VercelExpress2.354s (+3.6%)4.101s (+5.1% 🔺)1.747s81.09x
▲ VercelNext.js (Turbopack)4.048s (+37.8% 🔺)5.865s (+26.4% 🔺)1.817s61.88x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.284s (-8.3% 🟢)2.159s (-12.6% 🟢)0.875s141.00x
💻 LocalNext.js (Turbopack)2.345s (-5.7% 🟢)3.010s (-3.2%)0.664s101.83x
💻 LocalNitro2.384s (+2.8%)3.009s (~)0.625s101.86x
💻 LocalExpress2.412s (-9.2% 🟢)3.009s (-3.2%)0.596s101.88x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.289s (-9.5% 🟢)3.570s (~)1.281s91.00x
▲ VercelExpress2.355s (-9.6% 🟢)3.864s (-6.2% 🟢)1.509s81.03x
▲ VercelNext.js (Turbopack)3.790s (+13.8% 🔺)5.415s (+10.3% 🔺)1.625s61.66x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.665s (+2.2%)4.010s (-3.1%)2.345s81.00x
💻 LocalNext.js (Turbopack)2.870s (-38.9% 🟢)4.729s (-14.2% 🟢)1.860s71.72x
💻 LocalNitro3.678s (-14.3% 🟢)4.871s (~)1.193s72.21x
💻 LocalExpress3.833s (-13.2% 🟢)5.012s (-3.2%)1.179s72.30x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.763s (-2.4%)4.554s (+1.0%)1.792s71.00x
▲ VercelExpress2.966s (+1.6%)4.759s (+8.3% 🔺)1.793s71.07x
▲ VercelNext.js (Turbopack)4.868s (+23.2% 🔺)6.612s (+14.6% 🔺)1.744s51.76x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.226s (+2.5%)2.023s (+0.8%)0.797s151.00x
💻 LocalNitro1.407s (-0.6%)2.007s (~)0.600s151.15x
💻 LocalNext.js (Turbopack)1.472s (-1.9%)2.007s (~)0.535s151.20x
💻 LocalExpress1.480s (+1.8%)2.007s (~)0.527s151.21x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.964s (+1.6%)3.760s (+2.9%)1.796s81.00x
▲ VercelNitro2.110s (+11.1% 🔺)3.535s (+5.6% 🔺)1.424s91.07x
▲ VercelNext.js (Turbopack)3.243s (+9.1% 🔺)4.991s (+6.1% 🔺)1.748s71.65x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.298s (-1.6%)2.223s (+10.7% 🔺)0.925s141.00x
💻 LocalNitro2.572s (+5.3% 🔺)3.009s (~)0.437s101.98x
💻 LocalNext.js (Turbopack)2.634s (-6.3% 🟢)3.109s (-7.0% 🟢)0.476s102.03x
💻 LocalExpress2.799s (+12.5% 🔺)3.211s (+6.7% 🔺)0.412s102.16x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.258s (-27.2% 🟢)3.752s (-18.0% 🟢)1.493s81.00x
▲ VercelNitro2.335s (+6.3% 🔺)3.810s (+8.7% 🔺)1.475s81.03x
▲ VercelNext.js (Turbopack)4.193s (+32.9% 🔺)5.807s (+28.0% 🔺)1.614s61.86x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.886s (+15.4% 🔺)4.442s (+3.3%)2.556s71.00x
💻 LocalNext.js (Turbopack)5.512s (+2.0%)6.014s (~)0.502s52.92x
💻 LocalNitro5.845s (+5.9% 🔺)6.413s (+6.6% 🔺)0.568s53.10x
💻 LocalExpress5.863s (+64.4% 🔺)6.215s (+24.0% 🔺)0.352s53.11x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.640s (-0.9%)4.228s (-4.7%)1.588s81.00x
▲ VercelNitro2.665s (+4.6%)4.561s (+19.8% 🔺)1.895s71.01x
▲ VercelNext.js (Turbopack)4.500s (~)6.531s (+6.3% 🔺)2.031s51.70x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.530s (-12.0% 🟢)1.051s (+2.7%)0.522s581.00x
💻 LocalNitro0.587s (~)1.005s (~)0.418s601.11x
💻 LocalNext.js (Turbopack)0.631s (+5.4% 🔺)1.005s (~)0.374s601.19x
💻 LocalExpress0.638s (+5.4% 🔺)1.022s (+1.7%)0.385s591.20x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.415s (-2.9%)3.773s (-4.9%)1.357s161.00x
▲ VercelNitro2.481s (-4.8%)3.797s (-5.4% 🟢)1.316s161.03x
▲ VercelNext.js (Turbopack)3.631s (-10.4% 🟢)5.451s (-3.7%)1.819s121.50x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.228s (-11.9% 🟢)1.888s (-7.0% 🟢)0.660s481.00x
💻 LocalNitro1.522s (+5.2% 🔺)2.006s (~)0.484s451.24x
💻 LocalExpress1.560s (+4.5%)2.029s (+1.1%)0.469s451.27x
💻 LocalNext.js (Turbopack)1.595s (+1.3%)2.006s (~)0.411s451.30x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express6.086s (+4.5%)7.797s (+4.2%)1.711s121.00x
▲ VercelNitro6.312s (+8.1% 🔺)7.877s (+6.7% 🔺)1.565s121.04x
▲ VercelNext.js (Turbopack)8.166s (-1.0%)10.073s (+5.1% 🔺)1.907s101.34x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.441s (-14.2% 🟢)3.034s (-5.8% 🟢)0.593s401.00x
💻 LocalExpress3.341s (~)4.043s (+0.8%)0.702s301.37x
💻 LocalNitro3.385s (+6.5% 🔺)4.043s (+2.5%)0.658s301.39x
💻 LocalNext.js (Turbopack)3.443s (~)4.043s (+0.8%)0.600s301.41x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro11.413s (-0.7%)13.055s (+1.0%)1.642s101.00x
▲ VercelExpress11.577s (-1.0%)13.806s (~)2.228s91.01x
▲ VercelNext.js (Turbopack)16.842s (-1.7%)18.789s (~)1.946s71.48x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.221s (~)1.017s (+1.0%)0.795s601.00x
💻 LocalExpress0.511s (-1.0%)1.005s (~)0.493s602.31x
💻 LocalNitro0.542s (+5.8% 🔺)1.005s (~)0.463s602.45x
💻 LocalNext.js (Turbopack)0.662s (+3.1%)1.039s (+1.7%)0.377s582.99x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.079s (-4.2%)2.535s (-3.5%)1.456s241.00x
▲ VercelNitro1.181s (+7.8% 🔺)2.362s (-1.6%)1.180s261.09x
▲ VercelNext.js (Turbopack)2.348s (+19.9% 🔺)3.927s (+16.9% 🔺)1.578s162.18x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.294s (-16.0% 🟢)1.007s (~)0.713s901.00x
💻 LocalExpress2.481s (-1.9%)3.010s (-1.1%)0.529s308.44x
💻 LocalNitro2.604s (+3.1%)3.011s (~)0.406s308.86x
💻 LocalNext.js (Turbopack)2.640s (-3.9%)3.042s (-3.4%)0.402s308.98x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.450s (+9.6% 🔺)2.854s (+14.6% 🔺)1.405s321.00x
▲ VercelExpress1.679s (+17.8% 🔺)3.265s (+7.0% 🔺)1.586s281.16x
▲ VercelNext.js (Turbopack)3.364s (+29.8% 🔺)5.296s (+30.5% 🔺)1.933s172.32x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.654s (+14.1% 🔺)1.248s (+15.8% 🔺)0.594s971.00x
💻 LocalExpress5.629s (-5.9% 🟢)8.739s (+2.9%)3.110s148.61x
💻 LocalNitro5.801s (-0.9%)8.669s (~)2.868s148.87x
💻 LocalNext.js (Turbopack)5.958s (-7.3% 🟢)8.955s (-3.1%)2.997s149.11x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.367s (+42.1% 🔺)3.895s (+10.0% 🔺)1.528s311.00x
▲ VercelExpress2.403s (+49.7% 🔺)4.297s (+18.1% 🔺)1.894s281.02x
▲ VercelNext.js (Turbopack)4.360s (+3.8%)6.241s (+9.0% 🔺)1.882s201.84x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.130s (-2.7%)2.001s (~)0.001s (-33.3% 🟢)2.010s (~)0.880s101.00x
💻 LocalNext.js (Turbopack)1.146s (+0.5%)1.966s (~)0.012s (+12.6% 🔺)2.019s (~)0.873s101.01x
💻 LocalNitro1.159s (~)2.005s (~)0.010s (-1.9%)2.018s (~)0.859s101.03x
💻 LocalExpress1.161s (~)2.005s (~)0.013s (+11.4% 🔺)2.020s (~)0.859s101.03x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.904s (+0.7%)3.175s (-2.0%)1.666s (+1.7%)5.326s (~)3.423s101.00x
▲ VercelNitro1.915s (~)2.975s (~)1.744s (-5.2% 🟢)5.149s (-1.4%)3.233s101.01x
▲ VercelNext.js (Turbopack)3.329s (+4.5%)4.163s (+19.0% 🔺)0.626s (-57.0% 🟢)6.073s (-5.7% 🟢)2.744s101.75x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.572s (~)2.009s (~)0.013s (+13.8% 🔺)2.026s (~)0.454s301.00x
💻 LocalNitro1.574s (-0.6%)2.010s (-1.5%)0.013s (-4.7%)2.027s (-1.6%)0.453s301.00x
💻 LocalNext.js (Turbopack)1.633s (+2.0%)1.968s (~)0.013s (+4.9%)2.026s (~)0.393s301.04x
🐘 PostgresNitro1.707s (+4.8%)2.150s (+7.3% 🔺)0.004s (-17.6% 🟢)2.179s (+7.4% 🔺)0.471s281.09x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.563s (-2.2%)6.640s (+0.7%)0.224s (-3.9%)7.298s (-1.6%)1.734s91.00x
▲ VercelExpress5.622s (+3.6%)7.114s (+0.9%)0.272s (+21.9% 🔺)7.848s (+0.9%)2.226s81.01x
▲ VercelNext.js (Turbopack)10.479s (+10.2% 🔺)11.116s (+5.5% 🔺)0.345s (+58.0% 🔺)12.762s (+10.5% 🔺)2.283s51.88x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.948s (+11.9% 🔺)1.297s (+15.5% 🔺)0.000s (+130.4% 🔺)1.322s (+15.8% 🔺)0.374s461.00x
💻 LocalExpress1.269s (-6.3% 🟢)1.948s (+1.5%)0.000s (-9.7% 🟢)1.951s (+1.5%)0.682s311.34x
💻 LocalNext.js (Turbopack)1.336s (-4.6%)1.976s (~)0.000s (-47.4% 🟢)2.017s (~)0.681s301.41x
💻 LocalNitro1.340s (-0.7%)1.948s (~)0.000s (+50.0% 🔺)1.951s (~)0.611s311.41x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.179s (-22.6% 🟢)4.222s (-19.6% 🟢)0.000s (NaN%)4.706s (-17.8% 🟢)1.527s131.00x
▲ VercelExpress3.651s (-30.1% 🟢)5.145s (-22.2% 🟢)0.000s (-18.2% 🟢)5.652s (-20.8% 🟢)2.001s111.15x
▲ VercelNext.js (Turbopack)4.812s (+7.0% 🔺)5.690s (+5.3% 🔺)0.000s (NaN%)6.759s (+9.5% 🔺)1.946s91.51x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.022s (+13.5% 🔺)2.562s (+6.0% 🔺)0.000s (+Infinity% 🔺)2.612s (+7.4% 🔺)0.590s231.00x
💻 LocalNitro3.357s (+3.5%)3.842s (-1.5%)0.001s (+90.0% 🔺)3.846s (-1.5%)0.490s161.66x
💻 LocalExpress3.375s (+1.6%)3.900s (~)0.001s (+333.3% 🔺)3.904s (~)0.529s161.67x
💻 LocalNext.js (Turbopack)3.484s (+0.7%)4.056s (+1.6%)0.001s (-23.5% 🟢)4.098s (+1.7%)0.614s151.72x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro4.513s (+3.8%)5.726s (+9.0% 🔺)0.000s (NaN%)6.125s (+8.1% 🔺)1.612s101.00x
▲ VercelExpress4.540s (+1.1%)5.856s (+2.8%)0.000s (+Infinity% 🔺)6.385s (+3.6%)1.845s101.01x
▲ VercelNext.js (Turbopack)7.675s (+4.3%)8.439s (+8.1% 🔺)0.000s (+Infinity% 🔺)9.803s (+9.6% 🔺)2.128s71.70x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro10/21
🐘 PostgresNitro21/21
▲ VercelNitro12/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local15/21
Next.js (Turbopack)💻 Local19/21
Nitro🐘 Postgres17/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)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)
  • 🌐 Platformatic: Community world (local development)

📋 View full workflow run

@github-actions

github-actionsBot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production144202301672
✅ 💻 Local Development160502191824
✅ 📦 Local Production160502191824
✅ 🐘 Local Postgres160502191824
✅ 🪟 Windows15200152
✅ 📋 Other88701771064
Total7296010648360

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro125027
✅ example125027
✅ express125027
✅ fastify125027
✅ hono125027
✅ nextjs-turbopack14903
✅ nextjs-webpack14903
✅ nitro125027
✅ nuxt125027
✅ sveltekit14408
✅ vite125027
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack15200
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable127025
✅ e2e-local-dev-tanstack-start-127025
✅ e2e-local-postgres-nest-stable127025
✅ e2e-local-postgres-tanstack-start-127025
✅ e2e-local-prod-nest-stable127025
✅ e2e-local-prod-tanstack-start-127025
✅ e2e-vercel-prod-tanstack-start125027

📋 View full workflow run

@NathanColosimo

Copy link
Copy Markdown
ContributorAuthor

CI note: after the force-push rewrite, all checks are green except E2E Local Dev Tests (nextjs-webpack - canary) and the derived E2E Required Check.

I reran the canary dev job twice on this PR; it failed the same HMR manifest update test each time (should follow Next flow-route HMR rebuild rules for body-only changes). The current mainTests workflow is failing on the same job as well: https://github.com/vercel/workflow/actions/runs/28568531186/job/84700980822

The first nextjs-turbopack - stable dev failure and the Nitro benchmark failure both passed after rerun.

@NathanColosimo

Copy link
Copy Markdown
ContributorAuthor

Fresh manual basePath smoke after the rewrite:

  • Temporary workbench config: basePath: '/v2' in workbench/nextjs-turbopack/next.config.ts.
  • Fresh Vercel preview: https://example-nextjs-workflow-turbopack-ixptnm4nf.labs.vercel.dev (dpl_FLpB9FQqLN2qZzU1BBLWiuq6nuAv).
  • Local production smoke from the /v2 build:
    • POST /.well-known/workflow/v1/flow?__health -> 404
    • POST /v2/.well-known/workflow/v1/flow?__health -> 200
    • POST /v2/api/test-direct-step-call -> 200 {"result":5}
    • POST /v2/api/trigger-pages?workflowFn=addTenWorkflow&args=123, then poll /v2/api/trigger-pages?runId=... -> 200 133
  • Vercel preview smoke:
    • POST /.well-known/workflow/v1/flow?__health -> 404
    • POST /v2/.well-known/workflow/v1/flow?__health -> 404 (same public route-table caveat noted in the PR body)
    • POST /v2/api/test-direct-step-call -> 200 {"result":5}
    • POST /v2/api/trigger-pages?workflowFn=addTenWorkflow&args=123, then poll /v2/api/trigger-pages?runId=... -> 200 133

The temporary basePath edit was removed after the smoke; the PR worktree is clean.

@NathanColosimo

Copy link
Copy Markdown
ContributorAuthor

Health-check follow-up pushed in 610c9c016.

What changed:

  • Generated workflow route modules now keep the adapter-compatible export const POST = workflowEntrypoint(...) shape and also export GET, HEAD, and OPTIONS as aliases to POST, so withHealthCheck() can actually receive direct health probes in Next App Router.
  • Kept the old public @workflow/utils URL helper exports as wrappers around the new createWorkflowUrl(...) helper, so this stays patch-compatible.
  • Re-ran the basePath queue/probe coverage and restored the utils invalid-basePath coverage.

Manual health check result from the basePath smoke:

  • Local next start with temporary basePath: '/v2' works for /v2/.well-known/workflow/v1/flow?__health using GET, HEAD, OPTIONS, and POST; root /.well-known/... remains 404 as expected.
  • Vercel preview still returns the app 404 for public direct /v2/.well-known/workflow/v1/flow?__health, even though vercel inspect --format=json shows the lambda output exists at v2/.well-known/workflow/v1/flow and other /v2/api/... routes work. That still looks like a Vercel/Next deployed routing issue around basePath + .well-known, not workflow-server and not a missing SDK route file.

Local proof after the follow-up:

  • pnpm --filter @workflow/utils test
  • pnpm --filter @workflow/builders test
  • pnpm --filter @workflow/next test
  • pnpm exec vitest run packages/world-local/src/config.test.ts packages/world-local/src/queue.test.ts packages/world-postgres/src/queue.test.ts
  • pnpm --filter @workflow/utils --filter @workflow/builders --filter @workflow/core --filter @workflow/world-local --filter @workflow/world-postgres --filter @workflow/next build
  • Autoreview panel clean: Codex gpt-5.5 xhigh + Claude claude-opus-4-8 xhigh, 0 findings.

Comment threadpackages/next/src/index.ts
…-path-local
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
# Conflicts:
#	packages/next/src/index.ts
#	packages/utils/src/index.ts

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI review: no blocking issues

| { type: 'webhook'; token: string }
| { type: 'health' };

export function createWorkflowUrl(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI Review: Note

These new URL helpers (createWorkflowUrl, createWorkflowBaseUrl, createWorkflowHealthEndpoint) are the correctness core of this PR but have no dedicated unit test — they're only exercised indirectly via the world-local / world-postgres / builders suites. A focused workflow-routes.test.ts would be worth adding, in particular to pin the subtle property that createWorkflowUrl derives the prefix from the base URL's existing pathname (not the global basePath). That's what keeps the createWorkflowBaseUrlcreateWorkflowUrl webhook path from double-prefixing (/v2/v2/...). I verified this holds locally (base URL already carrying /v2 produces a single prefix), but a regression test would lock it in.

Record<symbol, string | undefined>;

// Keep this local: @workflow/next is CommonJS, while @workflow/utils is ESM-only.
function setWorkflowBasePath(basePath: string | undefined): void {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI Review: Nit

This BASE_PATH_SYMBOL + setWorkflowBasePath pair is duplicated from @workflow/utils (the CJS-vs-ESM comment explains why). Both sides depend on the Symbol.for('@workflow/core/basePath') string staying identical — if one drifts, basePath propagation silently breaks with no build/type error. Worth a cross-reference comment on both copies pointing at workflow-routes.ts so the coupling is discoverable.

@github-actionsgithub-actionsBot mentioned this pull request Jul 6, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2791. Merge conflicts were resolved by AI — please review carefully. (backport job run)

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.

Workflow does not work well/properly when using basePath on Nextjs app

3 participants

@NathanColosimo@VaguelySerious@karthikscale3
, '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('^' + ".*" + ' fix(next): respect basePath for workflow routes by NathanColosimo · Pull Request #2732 · vercel/workflow · GitHub
Skip to content

fix(next): respect basePath for workflow routes - #2732

Merged
NathanColosimo merged 9 commits into
mainfrom
nathanc/fix-next-base-path
Jul 6, 2026
Merged

fix(next): respect basePath for workflow routes#2732
NathanColosimo merged 9 commits into
mainfrom
nathanc/fix-next-base-path

Conversation

@NathanColosimo

@NathanColosimoNathanColosimo commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • derive Workflow's route prefix from nextConfig.basePath; users should only configure basePath in Next.js
  • pass that basePath into generated workflow entrypoints and route URL construction
  • use shared route helpers for workflow metadata, webhook URLs, manifest/health URLs, and local/postgres queue delivery URLs
  • preserve full URL overrides like WORKFLOW_LOCAL_BASE_URL as full overrides

Fixes#1864.

This is separate from #2729: that PR fixes project-root discovery, while this PR fixes runtime URL/route construction for apps served below a path prefix.

Vercel note

Runtime workflow execution works on a Vercel preview with basePath: '/v2': direct step calls and async workflow trigger/poll complete through /v2.

One platform follow-up remains: the generated Vercel/Next output serves internal workflow invocation at /v2/.well-known/workflow/v1/flow, but a public direct health probe to /v2/.well-known/workflow/v1/flow?__health still hits the app 404 route. That appears to be a Vercel/Next build-output route-table issue, not a Vercel REST API issue and not a Workflow queue/runtime URL issue.

Tests

  • pnpm --filter @workflow/utils --filter @workflow/builders --filter @workflow/core --filter @workflow/world-local --filter @workflow/world-postgres --filter @workflow/next build
  • pnpm --filter @workflow/utils test
  • pnpm --filter @workflow/next test
  • pnpm exec vitest run packages/world-local/src/config.test.ts packages/world-local/src/queue.test.ts packages/world-postgres/src/queue.test.ts packages/builders/src/constants.test.ts
  • pnpm exec biome check --max-diagnostics 12 ... on touched files (passes with existing warnings)
  • git diff --check
  • local nextjs-turbopack production smoke with basePath: '/v2': root health 404, /v2 health 200, direct step 200, workflow trigger/poll returns 133
  • Vercel preview smoke with basePath: '/v2': direct step 200, workflow trigger/poll returns 133; public /v2 health 404 as noted above
  • Codex autoreview (gpt-5.5, xhigh): clean after fixing the CommonJS/ESM issue in @workflow/next
  • Claude Opus fallback review (xhigh): no blocking findings; requested claude-opus-4.8 was unavailable

@changeset-bot

changeset-botBot commented Jun 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ce1ddb2

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

This PR includes changesets to release 21 packages
NameType
@workflow/buildersPatch
@workflow/corePatch
@workflow/nextPatch
@workflow/utilsPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/astroPatch
@workflow/cliPatch
@workflow/nestPatch
@workflow/nitroPatch
@workflow/nuxtPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/webPatch
workflowPatch
@workflow/world-testingPatch
@workflow/errorsPatch
@workflow/world-vercelPatch

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 Jun 30, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jun 30, 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🥇 Nitro0.046s (~)1.006s (~)0.959s101.00x
💻 LocalExpress0.048s (+7.2% 🔺)1.006s (~)0.958s101.03x
💻 LocalNext.js (Turbopack)0.054s (+1.3%)1.006s (~)0.952s101.16x
🐘 PostgresNitro0.128s (+95.1% 🔺)1.042s (+3.0%)0.915s102.75x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.204s (+8.7% 🔺)1.902s (-6.3% 🟢)1.697s101.00x
▲ VercelExpress0.260s (+15.6% 🔺)1.640s (-19.9% 🟢)1.380s101.27x
▲ VercelNext.js (Turbopack)0.480s (+97.6% 🔺)2.307s (-3.0%)1.826s102.35x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.081s (~)2.006s (~)0.925s101.00x
💻 LocalExpress1.083s (~)2.006s (~)0.923s101.00x
💻 LocalNext.js (Turbopack)1.089s (~)2.006s (~)0.917s101.01x
🐘 PostgresNitro1.113s (+1.4%)2.015s (~)0.901s101.03x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.390s (+2.1%)2.977s (-1.3%)1.587s101.00x
▲ VercelExpress1.402s (-1.1%)2.887s (+2.3%)1.485s101.01x
▲ VercelNext.js (Turbopack)2.120s (-9.6% 🟢)3.824s (+6.5% 🔺)1.704s101.53x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.449s (~)11.023s (~)0.574s31.00x
💻 LocalExpress10.464s (~)11.022s (~)0.557s31.00x
🐘 PostgresNitro10.509s (~)11.047s (~)0.537s31.01x
💻 LocalNext.js (Turbopack)10.516s (~)11.023s (~)0.507s31.01x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro11.723s (~)13.343s (+5.1% 🔺)1.620s31.00x
▲ VercelExpress11.886s (+1.8%)13.666s (-2.0%)1.780s31.01x
▲ VercelNext.js (Turbopack)13.087s (+1.3%)15.138s (+6.8% 🔺)2.051s21.12x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro13.549s (-1.1%)14.015s (~)0.466s51.00x
💻 LocalNitro13.663s (~)14.027s (~)0.364s51.01x
💻 LocalNext.js (Turbopack)13.781s (~)14.028s (~)0.247s51.02x
💻 LocalExpress13.798s (+0.7%)14.028s (~)0.229s51.02x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.456s (-1.3%)18.438s (-2.7%)1.983s41.00x
▲ VercelNitro16.473s (+1.8%)17.812s (+2.1%)1.339s41.00x
▲ VercelNext.js (Turbopack)17.996s (~)20.274s (+2.6%)2.278s31.09x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro11.888s (-3.6%)12.282s (-5.7% 🟢)0.394s81.00x
💻 LocalNitro12.144s (-0.7%)13.026s (~)0.882s71.02x
💻 LocalExpress12.257s (~)13.025s (~)0.767s71.03x
💻 LocalNext.js (Turbopack)12.351s (+0.9%)13.024s (~)0.673s71.04x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express17.467s (+1.0%)19.349s (+0.9%)1.881s51.00x
▲ VercelNitro17.987s (+5.3% 🔺)19.248s (+2.5%)1.261s51.03x
▲ VercelNext.js (Turbopack)19.714s (~)21.810s (+0.6%)2.096s51.13x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.201s (+1.3%)2.020s (+0.6%)0.819s151.00x
💻 LocalExpress1.398s (-3.2%)2.006s (~)0.608s151.16x
💻 LocalNext.js (Turbopack)1.412s (~)2.007s (~)0.595s151.18x
💻 LocalNitro1.461s (+3.8%)2.007s (~)0.546s151.22x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.153s (-5.9% 🟢)3.489s (-3.2%)1.336s91.00x
▲ VercelExpress2.354s (+3.6%)4.101s (+5.1% 🔺)1.747s81.09x
▲ VercelNext.js (Turbopack)4.048s (+37.8% 🔺)5.865s (+26.4% 🔺)1.817s61.88x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.284s (-8.3% 🟢)2.159s (-12.6% 🟢)0.875s141.00x
💻 LocalNext.js (Turbopack)2.345s (-5.7% 🟢)3.010s (-3.2%)0.664s101.83x
💻 LocalNitro2.384s (+2.8%)3.009s (~)0.625s101.86x
💻 LocalExpress2.412s (-9.2% 🟢)3.009s (-3.2%)0.596s101.88x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.289s (-9.5% 🟢)3.570s (~)1.281s91.00x
▲ VercelExpress2.355s (-9.6% 🟢)3.864s (-6.2% 🟢)1.509s81.03x
▲ VercelNext.js (Turbopack)3.790s (+13.8% 🔺)5.415s (+10.3% 🔺)1.625s61.66x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.665s (+2.2%)4.010s (-3.1%)2.345s81.00x
💻 LocalNext.js (Turbopack)2.870s (-38.9% 🟢)4.729s (-14.2% 🟢)1.860s71.72x
💻 LocalNitro3.678s (-14.3% 🟢)4.871s (~)1.193s72.21x
💻 LocalExpress3.833s (-13.2% 🟢)5.012s (-3.2%)1.179s72.30x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.763s (-2.4%)4.554s (+1.0%)1.792s71.00x
▲ VercelExpress2.966s (+1.6%)4.759s (+8.3% 🔺)1.793s71.07x
▲ VercelNext.js (Turbopack)4.868s (+23.2% 🔺)6.612s (+14.6% 🔺)1.744s51.76x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.226s (+2.5%)2.023s (+0.8%)0.797s151.00x
💻 LocalNitro1.407s (-0.6%)2.007s (~)0.600s151.15x
💻 LocalNext.js (Turbopack)1.472s (-1.9%)2.007s (~)0.535s151.20x
💻 LocalExpress1.480s (+1.8%)2.007s (~)0.527s151.21x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.964s (+1.6%)3.760s (+2.9%)1.796s81.00x
▲ VercelNitro2.110s (+11.1% 🔺)3.535s (+5.6% 🔺)1.424s91.07x
▲ VercelNext.js (Turbopack)3.243s (+9.1% 🔺)4.991s (+6.1% 🔺)1.748s71.65x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.298s (-1.6%)2.223s (+10.7% 🔺)0.925s141.00x
💻 LocalNitro2.572s (+5.3% 🔺)3.009s (~)0.437s101.98x
💻 LocalNext.js (Turbopack)2.634s (-6.3% 🟢)3.109s (-7.0% 🟢)0.476s102.03x
💻 LocalExpress2.799s (+12.5% 🔺)3.211s (+6.7% 🔺)0.412s102.16x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.258s (-27.2% 🟢)3.752s (-18.0% 🟢)1.493s81.00x
▲ VercelNitro2.335s (+6.3% 🔺)3.810s (+8.7% 🔺)1.475s81.03x
▲ VercelNext.js (Turbopack)4.193s (+32.9% 🔺)5.807s (+28.0% 🔺)1.614s61.86x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.886s (+15.4% 🔺)4.442s (+3.3%)2.556s71.00x
💻 LocalNext.js (Turbopack)5.512s (+2.0%)6.014s (~)0.502s52.92x
💻 LocalNitro5.845s (+5.9% 🔺)6.413s (+6.6% 🔺)0.568s53.10x
💻 LocalExpress5.863s (+64.4% 🔺)6.215s (+24.0% 🔺)0.352s53.11x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.640s (-0.9%)4.228s (-4.7%)1.588s81.00x
▲ VercelNitro2.665s (+4.6%)4.561s (+19.8% 🔺)1.895s71.01x
▲ VercelNext.js (Turbopack)4.500s (~)6.531s (+6.3% 🔺)2.031s51.70x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.530s (-12.0% 🟢)1.051s (+2.7%)0.522s581.00x
💻 LocalNitro0.587s (~)1.005s (~)0.418s601.11x
💻 LocalNext.js (Turbopack)0.631s (+5.4% 🔺)1.005s (~)0.374s601.19x
💻 LocalExpress0.638s (+5.4% 🔺)1.022s (+1.7%)0.385s591.20x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.415s (-2.9%)3.773s (-4.9%)1.357s161.00x
▲ VercelNitro2.481s (-4.8%)3.797s (-5.4% 🟢)1.316s161.03x
▲ VercelNext.js (Turbopack)3.631s (-10.4% 🟢)5.451s (-3.7%)1.819s121.50x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.228s (-11.9% 🟢)1.888s (-7.0% 🟢)0.660s481.00x
💻 LocalNitro1.522s (+5.2% 🔺)2.006s (~)0.484s451.24x
💻 LocalExpress1.560s (+4.5%)2.029s (+1.1%)0.469s451.27x
💻 LocalNext.js (Turbopack)1.595s (+1.3%)2.006s (~)0.411s451.30x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express6.086s (+4.5%)7.797s (+4.2%)1.711s121.00x
▲ VercelNitro6.312s (+8.1% 🔺)7.877s (+6.7% 🔺)1.565s121.04x
▲ VercelNext.js (Turbopack)8.166s (-1.0%)10.073s (+5.1% 🔺)1.907s101.34x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.441s (-14.2% 🟢)3.034s (-5.8% 🟢)0.593s401.00x
💻 LocalExpress3.341s (~)4.043s (+0.8%)0.702s301.37x
💻 LocalNitro3.385s (+6.5% 🔺)4.043s (+2.5%)0.658s301.39x
💻 LocalNext.js (Turbopack)3.443s (~)4.043s (+0.8%)0.600s301.41x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro11.413s (-0.7%)13.055s (+1.0%)1.642s101.00x
▲ VercelExpress11.577s (-1.0%)13.806s (~)2.228s91.01x
▲ VercelNext.js (Turbopack)16.842s (-1.7%)18.789s (~)1.946s71.48x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.221s (~)1.017s (+1.0%)0.795s601.00x
💻 LocalExpress0.511s (-1.0%)1.005s (~)0.493s602.31x
💻 LocalNitro0.542s (+5.8% 🔺)1.005s (~)0.463s602.45x
💻 LocalNext.js (Turbopack)0.662s (+3.1%)1.039s (+1.7%)0.377s582.99x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.079s (-4.2%)2.535s (-3.5%)1.456s241.00x
▲ VercelNitro1.181s (+7.8% 🔺)2.362s (-1.6%)1.180s261.09x
▲ VercelNext.js (Turbopack)2.348s (+19.9% 🔺)3.927s (+16.9% 🔺)1.578s162.18x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.294s (-16.0% 🟢)1.007s (~)0.713s901.00x
💻 LocalExpress2.481s (-1.9%)3.010s (-1.1%)0.529s308.44x
💻 LocalNitro2.604s (+3.1%)3.011s (~)0.406s308.86x
💻 LocalNext.js (Turbopack)2.640s (-3.9%)3.042s (-3.4%)0.402s308.98x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.450s (+9.6% 🔺)2.854s (+14.6% 🔺)1.405s321.00x
▲ VercelExpress1.679s (+17.8% 🔺)3.265s (+7.0% 🔺)1.586s281.16x
▲ VercelNext.js (Turbopack)3.364s (+29.8% 🔺)5.296s (+30.5% 🔺)1.933s172.32x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.654s (+14.1% 🔺)1.248s (+15.8% 🔺)0.594s971.00x
💻 LocalExpress5.629s (-5.9% 🟢)8.739s (+2.9%)3.110s148.61x
💻 LocalNitro5.801s (-0.9%)8.669s (~)2.868s148.87x
💻 LocalNext.js (Turbopack)5.958s (-7.3% 🟢)8.955s (-3.1%)2.997s149.11x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.367s (+42.1% 🔺)3.895s (+10.0% 🔺)1.528s311.00x
▲ VercelExpress2.403s (+49.7% 🔺)4.297s (+18.1% 🔺)1.894s281.02x
▲ VercelNext.js (Turbopack)4.360s (+3.8%)6.241s (+9.0% 🔺)1.882s201.84x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.130s (-2.7%)2.001s (~)0.001s (-33.3% 🟢)2.010s (~)0.880s101.00x
💻 LocalNext.js (Turbopack)1.146s (+0.5%)1.966s (~)0.012s (+12.6% 🔺)2.019s (~)0.873s101.01x
💻 LocalNitro1.159s (~)2.005s (~)0.010s (-1.9%)2.018s (~)0.859s101.03x
💻 LocalExpress1.161s (~)2.005s (~)0.013s (+11.4% 🔺)2.020s (~)0.859s101.03x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.904s (+0.7%)3.175s (-2.0%)1.666s (+1.7%)5.326s (~)3.423s101.00x
▲ VercelNitro1.915s (~)2.975s (~)1.744s (-5.2% 🟢)5.149s (-1.4%)3.233s101.01x
▲ VercelNext.js (Turbopack)3.329s (+4.5%)4.163s (+19.0% 🔺)0.626s (-57.0% 🟢)6.073s (-5.7% 🟢)2.744s101.75x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.572s (~)2.009s (~)0.013s (+13.8% 🔺)2.026s (~)0.454s301.00x
💻 LocalNitro1.574s (-0.6%)2.010s (-1.5%)0.013s (-4.7%)2.027s (-1.6%)0.453s301.00x
💻 LocalNext.js (Turbopack)1.633s (+2.0%)1.968s (~)0.013s (+4.9%)2.026s (~)0.393s301.04x
🐘 PostgresNitro1.707s (+4.8%)2.150s (+7.3% 🔺)0.004s (-17.6% 🟢)2.179s (+7.4% 🔺)0.471s281.09x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.563s (-2.2%)6.640s (+0.7%)0.224s (-3.9%)7.298s (-1.6%)1.734s91.00x
▲ VercelExpress5.622s (+3.6%)7.114s (+0.9%)0.272s (+21.9% 🔺)7.848s (+0.9%)2.226s81.01x
▲ VercelNext.js (Turbopack)10.479s (+10.2% 🔺)11.116s (+5.5% 🔺)0.345s (+58.0% 🔺)12.762s (+10.5% 🔺)2.283s51.88x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.948s (+11.9% 🔺)1.297s (+15.5% 🔺)0.000s (+130.4% 🔺)1.322s (+15.8% 🔺)0.374s461.00x
💻 LocalExpress1.269s (-6.3% 🟢)1.948s (+1.5%)0.000s (-9.7% 🟢)1.951s (+1.5%)0.682s311.34x
💻 LocalNext.js (Turbopack)1.336s (-4.6%)1.976s (~)0.000s (-47.4% 🟢)2.017s (~)0.681s301.41x
💻 LocalNitro1.340s (-0.7%)1.948s (~)0.000s (+50.0% 🔺)1.951s (~)0.611s311.41x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.179s (-22.6% 🟢)4.222s (-19.6% 🟢)0.000s (NaN%)4.706s (-17.8% 🟢)1.527s131.00x
▲ VercelExpress3.651s (-30.1% 🟢)5.145s (-22.2% 🟢)0.000s (-18.2% 🟢)5.652s (-20.8% 🟢)2.001s111.15x
▲ VercelNext.js (Turbopack)4.812s (+7.0% 🔺)5.690s (+5.3% 🔺)0.000s (NaN%)6.759s (+9.5% 🔺)1.946s91.51x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.022s (+13.5% 🔺)2.562s (+6.0% 🔺)0.000s (+Infinity% 🔺)2.612s (+7.4% 🔺)0.590s231.00x
💻 LocalNitro3.357s (+3.5%)3.842s (-1.5%)0.001s (+90.0% 🔺)3.846s (-1.5%)0.490s161.66x
💻 LocalExpress3.375s (+1.6%)3.900s (~)0.001s (+333.3% 🔺)3.904s (~)0.529s161.67x
💻 LocalNext.js (Turbopack)3.484s (+0.7%)4.056s (+1.6%)0.001s (-23.5% 🟢)4.098s (+1.7%)0.614s151.72x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro4.513s (+3.8%)5.726s (+9.0% 🔺)0.000s (NaN%)6.125s (+8.1% 🔺)1.612s101.00x
▲ VercelExpress4.540s (+1.1%)5.856s (+2.8%)0.000s (+Infinity% 🔺)6.385s (+3.6%)1.845s101.01x
▲ VercelNext.js (Turbopack)7.675s (+4.3%)8.439s (+8.1% 🔺)0.000s (+Infinity% 🔺)9.803s (+9.6% 🔺)2.128s71.70x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro10/21
🐘 PostgresNitro21/21
▲ VercelNitro12/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local15/21
Next.js (Turbopack)💻 Local19/21
Nitro🐘 Postgres17/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)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)
  • 🌐 Platformatic: Community world (local development)

📋 View full workflow run

@github-actions

github-actionsBot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production144202301672
✅ 💻 Local Development160502191824
✅ 📦 Local Production160502191824
✅ 🐘 Local Postgres160502191824
✅ 🪟 Windows15200152
✅ 📋 Other88701771064
Total7296010648360

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro125027
✅ example125027
✅ express125027
✅ fastify125027
✅ hono125027
✅ nextjs-turbopack14903
✅ nextjs-webpack14903
✅ nitro125027
✅ nuxt125027
✅ sveltekit14408
✅ vite125027
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack15200
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable127025
✅ e2e-local-dev-tanstack-start-127025
✅ e2e-local-postgres-nest-stable127025
✅ e2e-local-postgres-tanstack-start-127025
✅ e2e-local-prod-nest-stable127025
✅ e2e-local-prod-tanstack-start-127025
✅ e2e-vercel-prod-tanstack-start125027

📋 View full workflow run

@NathanColosimo

Copy link
Copy Markdown
ContributorAuthor

CI note: after the force-push rewrite, all checks are green except E2E Local Dev Tests (nextjs-webpack - canary) and the derived E2E Required Check.

I reran the canary dev job twice on this PR; it failed the same HMR manifest update test each time (should follow Next flow-route HMR rebuild rules for body-only changes). The current mainTests workflow is failing on the same job as well: https://github.com/vercel/workflow/actions/runs/28568531186/job/84700980822

The first nextjs-turbopack - stable dev failure and the Nitro benchmark failure both passed after rerun.

@NathanColosimo

Copy link
Copy Markdown
ContributorAuthor

Fresh manual basePath smoke after the rewrite:

  • Temporary workbench config: basePath: '/v2' in workbench/nextjs-turbopack/next.config.ts.
  • Fresh Vercel preview: https://example-nextjs-workflow-turbopack-ixptnm4nf.labs.vercel.dev (dpl_FLpB9FQqLN2qZzU1BBLWiuq6nuAv).
  • Local production smoke from the /v2 build:
    • POST /.well-known/workflow/v1/flow?__health -> 404
    • POST /v2/.well-known/workflow/v1/flow?__health -> 200
    • POST /v2/api/test-direct-step-call -> 200 {"result":5}
    • POST /v2/api/trigger-pages?workflowFn=addTenWorkflow&args=123, then poll /v2/api/trigger-pages?runId=... -> 200 133
  • Vercel preview smoke:
    • POST /.well-known/workflow/v1/flow?__health -> 404
    • POST /v2/.well-known/workflow/v1/flow?__health -> 404 (same public route-table caveat noted in the PR body)
    • POST /v2/api/test-direct-step-call -> 200 {"result":5}
    • POST /v2/api/trigger-pages?workflowFn=addTenWorkflow&args=123, then poll /v2/api/trigger-pages?runId=... -> 200 133

The temporary basePath edit was removed after the smoke; the PR worktree is clean.

@NathanColosimo

Copy link
Copy Markdown
ContributorAuthor

Health-check follow-up pushed in 610c9c016.

What changed:

  • Generated workflow route modules now keep the adapter-compatible export const POST = workflowEntrypoint(...) shape and also export GET, HEAD, and OPTIONS as aliases to POST, so withHealthCheck() can actually receive direct health probes in Next App Router.
  • Kept the old public @workflow/utils URL helper exports as wrappers around the new createWorkflowUrl(...) helper, so this stays patch-compatible.
  • Re-ran the basePath queue/probe coverage and restored the utils invalid-basePath coverage.

Manual health check result from the basePath smoke:

  • Local next start with temporary basePath: '/v2' works for /v2/.well-known/workflow/v1/flow?__health using GET, HEAD, OPTIONS, and POST; root /.well-known/... remains 404 as expected.
  • Vercel preview still returns the app 404 for public direct /v2/.well-known/workflow/v1/flow?__health, even though vercel inspect --format=json shows the lambda output exists at v2/.well-known/workflow/v1/flow and other /v2/api/... routes work. That still looks like a Vercel/Next deployed routing issue around basePath + .well-known, not workflow-server and not a missing SDK route file.

Local proof after the follow-up:

  • pnpm --filter @workflow/utils test
  • pnpm --filter @workflow/builders test
  • pnpm --filter @workflow/next test
  • pnpm exec vitest run packages/world-local/src/config.test.ts packages/world-local/src/queue.test.ts packages/world-postgres/src/queue.test.ts
  • pnpm --filter @workflow/utils --filter @workflow/builders --filter @workflow/core --filter @workflow/world-local --filter @workflow/world-postgres --filter @workflow/next build
  • Autoreview panel clean: Codex gpt-5.5 xhigh + Claude claude-opus-4-8 xhigh, 0 findings.

Comment threadpackages/next/src/index.ts
…-path-local
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
# Conflicts:
#	packages/next/src/index.ts
#	packages/utils/src/index.ts

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI review: no blocking issues

| { type: 'webhook'; token: string }
| { type: 'health' };

export function createWorkflowUrl(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI Review: Note

These new URL helpers (createWorkflowUrl, createWorkflowBaseUrl, createWorkflowHealthEndpoint) are the correctness core of this PR but have no dedicated unit test — they're only exercised indirectly via the world-local / world-postgres / builders suites. A focused workflow-routes.test.ts would be worth adding, in particular to pin the subtle property that createWorkflowUrl derives the prefix from the base URL's existing pathname (not the global basePath). That's what keeps the createWorkflowBaseUrlcreateWorkflowUrl webhook path from double-prefixing (/v2/v2/...). I verified this holds locally (base URL already carrying /v2 produces a single prefix), but a regression test would lock it in.

Record<symbol, string | undefined>;

// Keep this local: @workflow/next is CommonJS, while @workflow/utils is ESM-only.
function setWorkflowBasePath(basePath: string | undefined): void {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI Review: Nit

This BASE_PATH_SYMBOL + setWorkflowBasePath pair is duplicated from @workflow/utils (the CJS-vs-ESM comment explains why). Both sides depend on the Symbol.for('@workflow/core/basePath') string staying identical — if one drifts, basePath propagation silently breaks with no build/type error. Worth a cross-reference comment on both copies pointing at workflow-routes.ts so the coupling is discoverable.

@github-actionsgithub-actionsBot mentioned this pull request Jul 6, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2791. Merge conflicts were resolved by AI — please review carefully. (backport job run)

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.

Workflow does not work well/properly when using basePath on Nextjs app

3 participants

@NathanColosimo@VaguelySerious@karthikscale3
, '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" + ' fix(next): respect basePath for workflow routes by NathanColosimo · Pull Request #2732 · vercel/workflow · GitHub
Skip to content

fix(next): respect basePath for workflow routes - #2732

Merged
NathanColosimo merged 9 commits into
mainfrom
nathanc/fix-next-base-path
Jul 6, 2026
Merged

fix(next): respect basePath for workflow routes#2732
NathanColosimo merged 9 commits into
mainfrom
nathanc/fix-next-base-path

Conversation

@NathanColosimo

@NathanColosimoNathanColosimo commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • derive Workflow's route prefix from nextConfig.basePath; users should only configure basePath in Next.js
  • pass that basePath into generated workflow entrypoints and route URL construction
  • use shared route helpers for workflow metadata, webhook URLs, manifest/health URLs, and local/postgres queue delivery URLs
  • preserve full URL overrides like WORKFLOW_LOCAL_BASE_URL as full overrides

Fixes#1864.

This is separate from #2729: that PR fixes project-root discovery, while this PR fixes runtime URL/route construction for apps served below a path prefix.

Vercel note

Runtime workflow execution works on a Vercel preview with basePath: '/v2': direct step calls and async workflow trigger/poll complete through /v2.

One platform follow-up remains: the generated Vercel/Next output serves internal workflow invocation at /v2/.well-known/workflow/v1/flow, but a public direct health probe to /v2/.well-known/workflow/v1/flow?__health still hits the app 404 route. That appears to be a Vercel/Next build-output route-table issue, not a Vercel REST API issue and not a Workflow queue/runtime URL issue.

Tests

  • pnpm --filter @workflow/utils --filter @workflow/builders --filter @workflow/core --filter @workflow/world-local --filter @workflow/world-postgres --filter @workflow/next build
  • pnpm --filter @workflow/utils test
  • pnpm --filter @workflow/next test
  • pnpm exec vitest run packages/world-local/src/config.test.ts packages/world-local/src/queue.test.ts packages/world-postgres/src/queue.test.ts packages/builders/src/constants.test.ts
  • pnpm exec biome check --max-diagnostics 12 ... on touched files (passes with existing warnings)
  • git diff --check
  • local nextjs-turbopack production smoke with basePath: '/v2': root health 404, /v2 health 200, direct step 200, workflow trigger/poll returns 133
  • Vercel preview smoke with basePath: '/v2': direct step 200, workflow trigger/poll returns 133; public /v2 health 404 as noted above
  • Codex autoreview (gpt-5.5, xhigh): clean after fixing the CommonJS/ESM issue in @workflow/next
  • Claude Opus fallback review (xhigh): no blocking findings; requested claude-opus-4.8 was unavailable

@changeset-bot

changeset-botBot commented Jun 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ce1ddb2

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

This PR includes changesets to release 21 packages
NameType
@workflow/buildersPatch
@workflow/corePatch
@workflow/nextPatch
@workflow/utilsPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/astroPatch
@workflow/cliPatch
@workflow/nestPatch
@workflow/nitroPatch
@workflow/nuxtPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/webPatch
workflowPatch
@workflow/world-testingPatch
@workflow/errorsPatch
@workflow/world-vercelPatch

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 Jun 30, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jun 30, 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🥇 Nitro0.046s (~)1.006s (~)0.959s101.00x
💻 LocalExpress0.048s (+7.2% 🔺)1.006s (~)0.958s101.03x
💻 LocalNext.js (Turbopack)0.054s (+1.3%)1.006s (~)0.952s101.16x
🐘 PostgresNitro0.128s (+95.1% 🔺)1.042s (+3.0%)0.915s102.75x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.204s (+8.7% 🔺)1.902s (-6.3% 🟢)1.697s101.00x
▲ VercelExpress0.260s (+15.6% 🔺)1.640s (-19.9% 🟢)1.380s101.27x
▲ VercelNext.js (Turbopack)0.480s (+97.6% 🔺)2.307s (-3.0%)1.826s102.35x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.081s (~)2.006s (~)0.925s101.00x
💻 LocalExpress1.083s (~)2.006s (~)0.923s101.00x
💻 LocalNext.js (Turbopack)1.089s (~)2.006s (~)0.917s101.01x
🐘 PostgresNitro1.113s (+1.4%)2.015s (~)0.901s101.03x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.390s (+2.1%)2.977s (-1.3%)1.587s101.00x
▲ VercelExpress1.402s (-1.1%)2.887s (+2.3%)1.485s101.01x
▲ VercelNext.js (Turbopack)2.120s (-9.6% 🟢)3.824s (+6.5% 🔺)1.704s101.53x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.449s (~)11.023s (~)0.574s31.00x
💻 LocalExpress10.464s (~)11.022s (~)0.557s31.00x
🐘 PostgresNitro10.509s (~)11.047s (~)0.537s31.01x
💻 LocalNext.js (Turbopack)10.516s (~)11.023s (~)0.507s31.01x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro11.723s (~)13.343s (+5.1% 🔺)1.620s31.00x
▲ VercelExpress11.886s (+1.8%)13.666s (-2.0%)1.780s31.01x
▲ VercelNext.js (Turbopack)13.087s (+1.3%)15.138s (+6.8% 🔺)2.051s21.12x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro13.549s (-1.1%)14.015s (~)0.466s51.00x
💻 LocalNitro13.663s (~)14.027s (~)0.364s51.01x
💻 LocalNext.js (Turbopack)13.781s (~)14.028s (~)0.247s51.02x
💻 LocalExpress13.798s (+0.7%)14.028s (~)0.229s51.02x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.456s (-1.3%)18.438s (-2.7%)1.983s41.00x
▲ VercelNitro16.473s (+1.8%)17.812s (+2.1%)1.339s41.00x
▲ VercelNext.js (Turbopack)17.996s (~)20.274s (+2.6%)2.278s31.09x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro11.888s (-3.6%)12.282s (-5.7% 🟢)0.394s81.00x
💻 LocalNitro12.144s (-0.7%)13.026s (~)0.882s71.02x
💻 LocalExpress12.257s (~)13.025s (~)0.767s71.03x
💻 LocalNext.js (Turbopack)12.351s (+0.9%)13.024s (~)0.673s71.04x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express17.467s (+1.0%)19.349s (+0.9%)1.881s51.00x
▲ VercelNitro17.987s (+5.3% 🔺)19.248s (+2.5%)1.261s51.03x
▲ VercelNext.js (Turbopack)19.714s (~)21.810s (+0.6%)2.096s51.13x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.201s (+1.3%)2.020s (+0.6%)0.819s151.00x
💻 LocalExpress1.398s (-3.2%)2.006s (~)0.608s151.16x
💻 LocalNext.js (Turbopack)1.412s (~)2.007s (~)0.595s151.18x
💻 LocalNitro1.461s (+3.8%)2.007s (~)0.546s151.22x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.153s (-5.9% 🟢)3.489s (-3.2%)1.336s91.00x
▲ VercelExpress2.354s (+3.6%)4.101s (+5.1% 🔺)1.747s81.09x
▲ VercelNext.js (Turbopack)4.048s (+37.8% 🔺)5.865s (+26.4% 🔺)1.817s61.88x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.284s (-8.3% 🟢)2.159s (-12.6% 🟢)0.875s141.00x
💻 LocalNext.js (Turbopack)2.345s (-5.7% 🟢)3.010s (-3.2%)0.664s101.83x
💻 LocalNitro2.384s (+2.8%)3.009s (~)0.625s101.86x
💻 LocalExpress2.412s (-9.2% 🟢)3.009s (-3.2%)0.596s101.88x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.289s (-9.5% 🟢)3.570s (~)1.281s91.00x
▲ VercelExpress2.355s (-9.6% 🟢)3.864s (-6.2% 🟢)1.509s81.03x
▲ VercelNext.js (Turbopack)3.790s (+13.8% 🔺)5.415s (+10.3% 🔺)1.625s61.66x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.665s (+2.2%)4.010s (-3.1%)2.345s81.00x
💻 LocalNext.js (Turbopack)2.870s (-38.9% 🟢)4.729s (-14.2% 🟢)1.860s71.72x
💻 LocalNitro3.678s (-14.3% 🟢)4.871s (~)1.193s72.21x
💻 LocalExpress3.833s (-13.2% 🟢)5.012s (-3.2%)1.179s72.30x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.763s (-2.4%)4.554s (+1.0%)1.792s71.00x
▲ VercelExpress2.966s (+1.6%)4.759s (+8.3% 🔺)1.793s71.07x
▲ VercelNext.js (Turbopack)4.868s (+23.2% 🔺)6.612s (+14.6% 🔺)1.744s51.76x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.226s (+2.5%)2.023s (+0.8%)0.797s151.00x
💻 LocalNitro1.407s (-0.6%)2.007s (~)0.600s151.15x
💻 LocalNext.js (Turbopack)1.472s (-1.9%)2.007s (~)0.535s151.20x
💻 LocalExpress1.480s (+1.8%)2.007s (~)0.527s151.21x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.964s (+1.6%)3.760s (+2.9%)1.796s81.00x
▲ VercelNitro2.110s (+11.1% 🔺)3.535s (+5.6% 🔺)1.424s91.07x
▲ VercelNext.js (Turbopack)3.243s (+9.1% 🔺)4.991s (+6.1% 🔺)1.748s71.65x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.298s (-1.6%)2.223s (+10.7% 🔺)0.925s141.00x
💻 LocalNitro2.572s (+5.3% 🔺)3.009s (~)0.437s101.98x
💻 LocalNext.js (Turbopack)2.634s (-6.3% 🟢)3.109s (-7.0% 🟢)0.476s102.03x
💻 LocalExpress2.799s (+12.5% 🔺)3.211s (+6.7% 🔺)0.412s102.16x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.258s (-27.2% 🟢)3.752s (-18.0% 🟢)1.493s81.00x
▲ VercelNitro2.335s (+6.3% 🔺)3.810s (+8.7% 🔺)1.475s81.03x
▲ VercelNext.js (Turbopack)4.193s (+32.9% 🔺)5.807s (+28.0% 🔺)1.614s61.86x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.886s (+15.4% 🔺)4.442s (+3.3%)2.556s71.00x
💻 LocalNext.js (Turbopack)5.512s (+2.0%)6.014s (~)0.502s52.92x
💻 LocalNitro5.845s (+5.9% 🔺)6.413s (+6.6% 🔺)0.568s53.10x
💻 LocalExpress5.863s (+64.4% 🔺)6.215s (+24.0% 🔺)0.352s53.11x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.640s (-0.9%)4.228s (-4.7%)1.588s81.00x
▲ VercelNitro2.665s (+4.6%)4.561s (+19.8% 🔺)1.895s71.01x
▲ VercelNext.js (Turbopack)4.500s (~)6.531s (+6.3% 🔺)2.031s51.70x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.530s (-12.0% 🟢)1.051s (+2.7%)0.522s581.00x
💻 LocalNitro0.587s (~)1.005s (~)0.418s601.11x
💻 LocalNext.js (Turbopack)0.631s (+5.4% 🔺)1.005s (~)0.374s601.19x
💻 LocalExpress0.638s (+5.4% 🔺)1.022s (+1.7%)0.385s591.20x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.415s (-2.9%)3.773s (-4.9%)1.357s161.00x
▲ VercelNitro2.481s (-4.8%)3.797s (-5.4% 🟢)1.316s161.03x
▲ VercelNext.js (Turbopack)3.631s (-10.4% 🟢)5.451s (-3.7%)1.819s121.50x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.228s (-11.9% 🟢)1.888s (-7.0% 🟢)0.660s481.00x
💻 LocalNitro1.522s (+5.2% 🔺)2.006s (~)0.484s451.24x
💻 LocalExpress1.560s (+4.5%)2.029s (+1.1%)0.469s451.27x
💻 LocalNext.js (Turbopack)1.595s (+1.3%)2.006s (~)0.411s451.30x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express6.086s (+4.5%)7.797s (+4.2%)1.711s121.00x
▲ VercelNitro6.312s (+8.1% 🔺)7.877s (+6.7% 🔺)1.565s121.04x
▲ VercelNext.js (Turbopack)8.166s (-1.0%)10.073s (+5.1% 🔺)1.907s101.34x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.441s (-14.2% 🟢)3.034s (-5.8% 🟢)0.593s401.00x
💻 LocalExpress3.341s (~)4.043s (+0.8%)0.702s301.37x
💻 LocalNitro3.385s (+6.5% 🔺)4.043s (+2.5%)0.658s301.39x
💻 LocalNext.js (Turbopack)3.443s (~)4.043s (+0.8%)0.600s301.41x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro11.413s (-0.7%)13.055s (+1.0%)1.642s101.00x
▲ VercelExpress11.577s (-1.0%)13.806s (~)2.228s91.01x
▲ VercelNext.js (Turbopack)16.842s (-1.7%)18.789s (~)1.946s71.48x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.221s (~)1.017s (+1.0%)0.795s601.00x
💻 LocalExpress0.511s (-1.0%)1.005s (~)0.493s602.31x
💻 LocalNitro0.542s (+5.8% 🔺)1.005s (~)0.463s602.45x
💻 LocalNext.js (Turbopack)0.662s (+3.1%)1.039s (+1.7%)0.377s582.99x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.079s (-4.2%)2.535s (-3.5%)1.456s241.00x
▲ VercelNitro1.181s (+7.8% 🔺)2.362s (-1.6%)1.180s261.09x
▲ VercelNext.js (Turbopack)2.348s (+19.9% 🔺)3.927s (+16.9% 🔺)1.578s162.18x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.294s (-16.0% 🟢)1.007s (~)0.713s901.00x
💻 LocalExpress2.481s (-1.9%)3.010s (-1.1%)0.529s308.44x
💻 LocalNitro2.604s (+3.1%)3.011s (~)0.406s308.86x
💻 LocalNext.js (Turbopack)2.640s (-3.9%)3.042s (-3.4%)0.402s308.98x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.450s (+9.6% 🔺)2.854s (+14.6% 🔺)1.405s321.00x
▲ VercelExpress1.679s (+17.8% 🔺)3.265s (+7.0% 🔺)1.586s281.16x
▲ VercelNext.js (Turbopack)3.364s (+29.8% 🔺)5.296s (+30.5% 🔺)1.933s172.32x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.654s (+14.1% 🔺)1.248s (+15.8% 🔺)0.594s971.00x
💻 LocalExpress5.629s (-5.9% 🟢)8.739s (+2.9%)3.110s148.61x
💻 LocalNitro5.801s (-0.9%)8.669s (~)2.868s148.87x
💻 LocalNext.js (Turbopack)5.958s (-7.3% 🟢)8.955s (-3.1%)2.997s149.11x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.367s (+42.1% 🔺)3.895s (+10.0% 🔺)1.528s311.00x
▲ VercelExpress2.403s (+49.7% 🔺)4.297s (+18.1% 🔺)1.894s281.02x
▲ VercelNext.js (Turbopack)4.360s (+3.8%)6.241s (+9.0% 🔺)1.882s201.84x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.130s (-2.7%)2.001s (~)0.001s (-33.3% 🟢)2.010s (~)0.880s101.00x
💻 LocalNext.js (Turbopack)1.146s (+0.5%)1.966s (~)0.012s (+12.6% 🔺)2.019s (~)0.873s101.01x
💻 LocalNitro1.159s (~)2.005s (~)0.010s (-1.9%)2.018s (~)0.859s101.03x
💻 LocalExpress1.161s (~)2.005s (~)0.013s (+11.4% 🔺)2.020s (~)0.859s101.03x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.904s (+0.7%)3.175s (-2.0%)1.666s (+1.7%)5.326s (~)3.423s101.00x
▲ VercelNitro1.915s (~)2.975s (~)1.744s (-5.2% 🟢)5.149s (-1.4%)3.233s101.01x
▲ VercelNext.js (Turbopack)3.329s (+4.5%)4.163s (+19.0% 🔺)0.626s (-57.0% 🟢)6.073s (-5.7% 🟢)2.744s101.75x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.572s (~)2.009s (~)0.013s (+13.8% 🔺)2.026s (~)0.454s301.00x
💻 LocalNitro1.574s (-0.6%)2.010s (-1.5%)0.013s (-4.7%)2.027s (-1.6%)0.453s301.00x
💻 LocalNext.js (Turbopack)1.633s (+2.0%)1.968s (~)0.013s (+4.9%)2.026s (~)0.393s301.04x
🐘 PostgresNitro1.707s (+4.8%)2.150s (+7.3% 🔺)0.004s (-17.6% 🟢)2.179s (+7.4% 🔺)0.471s281.09x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.563s (-2.2%)6.640s (+0.7%)0.224s (-3.9%)7.298s (-1.6%)1.734s91.00x
▲ VercelExpress5.622s (+3.6%)7.114s (+0.9%)0.272s (+21.9% 🔺)7.848s (+0.9%)2.226s81.01x
▲ VercelNext.js (Turbopack)10.479s (+10.2% 🔺)11.116s (+5.5% 🔺)0.345s (+58.0% 🔺)12.762s (+10.5% 🔺)2.283s51.88x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.948s (+11.9% 🔺)1.297s (+15.5% 🔺)0.000s (+130.4% 🔺)1.322s (+15.8% 🔺)0.374s461.00x
💻 LocalExpress1.269s (-6.3% 🟢)1.948s (+1.5%)0.000s (-9.7% 🟢)1.951s (+1.5%)0.682s311.34x
💻 LocalNext.js (Turbopack)1.336s (-4.6%)1.976s (~)0.000s (-47.4% 🟢)2.017s (~)0.681s301.41x
💻 LocalNitro1.340s (-0.7%)1.948s (~)0.000s (+50.0% 🔺)1.951s (~)0.611s311.41x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.179s (-22.6% 🟢)4.222s (-19.6% 🟢)0.000s (NaN%)4.706s (-17.8% 🟢)1.527s131.00x
▲ VercelExpress3.651s (-30.1% 🟢)5.145s (-22.2% 🟢)0.000s (-18.2% 🟢)5.652s (-20.8% 🟢)2.001s111.15x
▲ VercelNext.js (Turbopack)4.812s (+7.0% 🔺)5.690s (+5.3% 🔺)0.000s (NaN%)6.759s (+9.5% 🔺)1.946s91.51x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.022s (+13.5% 🔺)2.562s (+6.0% 🔺)0.000s (+Infinity% 🔺)2.612s (+7.4% 🔺)0.590s231.00x
💻 LocalNitro3.357s (+3.5%)3.842s (-1.5%)0.001s (+90.0% 🔺)3.846s (-1.5%)0.490s161.66x
💻 LocalExpress3.375s (+1.6%)3.900s (~)0.001s (+333.3% 🔺)3.904s (~)0.529s161.67x
💻 LocalNext.js (Turbopack)3.484s (+0.7%)4.056s (+1.6%)0.001s (-23.5% 🟢)4.098s (+1.7%)0.614s151.72x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro4.513s (+3.8%)5.726s (+9.0% 🔺)0.000s (NaN%)6.125s (+8.1% 🔺)1.612s101.00x
▲ VercelExpress4.540s (+1.1%)5.856s (+2.8%)0.000s (+Infinity% 🔺)6.385s (+3.6%)1.845s101.01x
▲ VercelNext.js (Turbopack)7.675s (+4.3%)8.439s (+8.1% 🔺)0.000s (+Infinity% 🔺)9.803s (+9.6% 🔺)2.128s71.70x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro10/21
🐘 PostgresNitro21/21
▲ VercelNitro12/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local15/21
Next.js (Turbopack)💻 Local19/21
Nitro🐘 Postgres17/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)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)
  • 🌐 Platformatic: Community world (local development)

📋 View full workflow run

@github-actions

github-actionsBot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production144202301672
✅ 💻 Local Development160502191824
✅ 📦 Local Production160502191824
✅ 🐘 Local Postgres160502191824
✅ 🪟 Windows15200152
✅ 📋 Other88701771064
Total7296010648360

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro125027
✅ example125027
✅ express125027
✅ fastify125027
✅ hono125027
✅ nextjs-turbopack14903
✅ nextjs-webpack14903
✅ nitro125027
✅ nuxt125027
✅ sveltekit14408
✅ vite125027
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack15200
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable127025
✅ e2e-local-dev-tanstack-start-127025
✅ e2e-local-postgres-nest-stable127025
✅ e2e-local-postgres-tanstack-start-127025
✅ e2e-local-prod-nest-stable127025
✅ e2e-local-prod-tanstack-start-127025
✅ e2e-vercel-prod-tanstack-start125027

📋 View full workflow run

@NathanColosimo

Copy link
Copy Markdown
ContributorAuthor

CI note: after the force-push rewrite, all checks are green except E2E Local Dev Tests (nextjs-webpack - canary) and the derived E2E Required Check.

I reran the canary dev job twice on this PR; it failed the same HMR manifest update test each time (should follow Next flow-route HMR rebuild rules for body-only changes). The current mainTests workflow is failing on the same job as well: https://github.com/vercel/workflow/actions/runs/28568531186/job/84700980822

The first nextjs-turbopack - stable dev failure and the Nitro benchmark failure both passed after rerun.

@NathanColosimo

Copy link
Copy Markdown
ContributorAuthor

Fresh manual basePath smoke after the rewrite:

  • Temporary workbench config: basePath: '/v2' in workbench/nextjs-turbopack/next.config.ts.
  • Fresh Vercel preview: https://example-nextjs-workflow-turbopack-ixptnm4nf.labs.vercel.dev (dpl_FLpB9FQqLN2qZzU1BBLWiuq6nuAv).
  • Local production smoke from the /v2 build:
    • POST /.well-known/workflow/v1/flow?__health -> 404
    • POST /v2/.well-known/workflow/v1/flow?__health -> 200
    • POST /v2/api/test-direct-step-call -> 200 {"result":5}
    • POST /v2/api/trigger-pages?workflowFn=addTenWorkflow&args=123, then poll /v2/api/trigger-pages?runId=... -> 200 133
  • Vercel preview smoke:
    • POST /.well-known/workflow/v1/flow?__health -> 404
    • POST /v2/.well-known/workflow/v1/flow?__health -> 404 (same public route-table caveat noted in the PR body)
    • POST /v2/api/test-direct-step-call -> 200 {"result":5}
    • POST /v2/api/trigger-pages?workflowFn=addTenWorkflow&args=123, then poll /v2/api/trigger-pages?runId=... -> 200 133

The temporary basePath edit was removed after the smoke; the PR worktree is clean.

@NathanColosimo

Copy link
Copy Markdown
ContributorAuthor

Health-check follow-up pushed in 610c9c016.

What changed:

  • Generated workflow route modules now keep the adapter-compatible export const POST = workflowEntrypoint(...) shape and also export GET, HEAD, and OPTIONS as aliases to POST, so withHealthCheck() can actually receive direct health probes in Next App Router.
  • Kept the old public @workflow/utils URL helper exports as wrappers around the new createWorkflowUrl(...) helper, so this stays patch-compatible.
  • Re-ran the basePath queue/probe coverage and restored the utils invalid-basePath coverage.

Manual health check result from the basePath smoke:

  • Local next start with temporary basePath: '/v2' works for /v2/.well-known/workflow/v1/flow?__health using GET, HEAD, OPTIONS, and POST; root /.well-known/... remains 404 as expected.
  • Vercel preview still returns the app 404 for public direct /v2/.well-known/workflow/v1/flow?__health, even though vercel inspect --format=json shows the lambda output exists at v2/.well-known/workflow/v1/flow and other /v2/api/... routes work. That still looks like a Vercel/Next deployed routing issue around basePath + .well-known, not workflow-server and not a missing SDK route file.

Local proof after the follow-up:

  • pnpm --filter @workflow/utils test
  • pnpm --filter @workflow/builders test
  • pnpm --filter @workflow/next test
  • pnpm exec vitest run packages/world-local/src/config.test.ts packages/world-local/src/queue.test.ts packages/world-postgres/src/queue.test.ts
  • pnpm --filter @workflow/utils --filter @workflow/builders --filter @workflow/core --filter @workflow/world-local --filter @workflow/world-postgres --filter @workflow/next build
  • Autoreview panel clean: Codex gpt-5.5 xhigh + Claude claude-opus-4-8 xhigh, 0 findings.

Comment threadpackages/next/src/index.ts
…-path-local
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
# Conflicts:
#	packages/next/src/index.ts
#	packages/utils/src/index.ts

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI review: no blocking issues

| { type: 'webhook'; token: string }
| { type: 'health' };

export function createWorkflowUrl(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI Review: Note

These new URL helpers (createWorkflowUrl, createWorkflowBaseUrl, createWorkflowHealthEndpoint) are the correctness core of this PR but have no dedicated unit test — they're only exercised indirectly via the world-local / world-postgres / builders suites. A focused workflow-routes.test.ts would be worth adding, in particular to pin the subtle property that createWorkflowUrl derives the prefix from the base URL's existing pathname (not the global basePath). That's what keeps the createWorkflowBaseUrlcreateWorkflowUrl webhook path from double-prefixing (/v2/v2/...). I verified this holds locally (base URL already carrying /v2 produces a single prefix), but a regression test would lock it in.

Record<symbol, string | undefined>;

// Keep this local: @workflow/next is CommonJS, while @workflow/utils is ESM-only.
function setWorkflowBasePath(basePath: string | undefined): void {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI Review: Nit

This BASE_PATH_SYMBOL + setWorkflowBasePath pair is duplicated from @workflow/utils (the CJS-vs-ESM comment explains why). Both sides depend on the Symbol.for('@workflow/core/basePath') string staying identical — if one drifts, basePath propagation silently breaks with no build/type error. Worth a cross-reference comment on both copies pointing at workflow-routes.ts so the coupling is discoverable.

@github-actionsgithub-actionsBot mentioned this pull request Jul 6, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2791. Merge conflicts were resolved by AI — please review carefully. (backport job run)

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.

Workflow does not work well/properly when using basePath on Nextjs app

3 participants

@NathanColosimo@VaguelySerious@karthikscale3
, '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('^' + ".*" + ' fix(next): respect basePath for workflow routes by NathanColosimo · Pull Request #2732 · vercel/workflow · GitHub
Skip to content

fix(next): respect basePath for workflow routes - #2732

Merged
NathanColosimo merged 9 commits into
mainfrom
nathanc/fix-next-base-path
Jul 6, 2026
Merged

fix(next): respect basePath for workflow routes#2732
NathanColosimo merged 9 commits into
mainfrom
nathanc/fix-next-base-path

Conversation

@NathanColosimo

@NathanColosimoNathanColosimo commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • derive Workflow's route prefix from nextConfig.basePath; users should only configure basePath in Next.js
  • pass that basePath into generated workflow entrypoints and route URL construction
  • use shared route helpers for workflow metadata, webhook URLs, manifest/health URLs, and local/postgres queue delivery URLs
  • preserve full URL overrides like WORKFLOW_LOCAL_BASE_URL as full overrides

Fixes#1864.

This is separate from #2729: that PR fixes project-root discovery, while this PR fixes runtime URL/route construction for apps served below a path prefix.

Vercel note

Runtime workflow execution works on a Vercel preview with basePath: '/v2': direct step calls and async workflow trigger/poll complete through /v2.

One platform follow-up remains: the generated Vercel/Next output serves internal workflow invocation at /v2/.well-known/workflow/v1/flow, but a public direct health probe to /v2/.well-known/workflow/v1/flow?__health still hits the app 404 route. That appears to be a Vercel/Next build-output route-table issue, not a Vercel REST API issue and not a Workflow queue/runtime URL issue.

Tests

  • pnpm --filter @workflow/utils --filter @workflow/builders --filter @workflow/core --filter @workflow/world-local --filter @workflow/world-postgres --filter @workflow/next build
  • pnpm --filter @workflow/utils test
  • pnpm --filter @workflow/next test
  • pnpm exec vitest run packages/world-local/src/config.test.ts packages/world-local/src/queue.test.ts packages/world-postgres/src/queue.test.ts packages/builders/src/constants.test.ts
  • pnpm exec biome check --max-diagnostics 12 ... on touched files (passes with existing warnings)
  • git diff --check
  • local nextjs-turbopack production smoke with basePath: '/v2': root health 404, /v2 health 200, direct step 200, workflow trigger/poll returns 133
  • Vercel preview smoke with basePath: '/v2': direct step 200, workflow trigger/poll returns 133; public /v2 health 404 as noted above
  • Codex autoreview (gpt-5.5, xhigh): clean after fixing the CommonJS/ESM issue in @workflow/next
  • Claude Opus fallback review (xhigh): no blocking findings; requested claude-opus-4.8 was unavailable

@changeset-bot

changeset-botBot commented Jun 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ce1ddb2

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

This PR includes changesets to release 21 packages
NameType
@workflow/buildersPatch
@workflow/corePatch
@workflow/nextPatch
@workflow/utilsPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/astroPatch
@workflow/cliPatch
@workflow/nestPatch
@workflow/nitroPatch
@workflow/nuxtPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/webPatch
workflowPatch
@workflow/world-testingPatch
@workflow/errorsPatch
@workflow/world-vercelPatch

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 Jun 30, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jun 30, 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🥇 Nitro0.046s (~)1.006s (~)0.959s101.00x
💻 LocalExpress0.048s (+7.2% 🔺)1.006s (~)0.958s101.03x
💻 LocalNext.js (Turbopack)0.054s (+1.3%)1.006s (~)0.952s101.16x
🐘 PostgresNitro0.128s (+95.1% 🔺)1.042s (+3.0%)0.915s102.75x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.204s (+8.7% 🔺)1.902s (-6.3% 🟢)1.697s101.00x
▲ VercelExpress0.260s (+15.6% 🔺)1.640s (-19.9% 🟢)1.380s101.27x
▲ VercelNext.js (Turbopack)0.480s (+97.6% 🔺)2.307s (-3.0%)1.826s102.35x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.081s (~)2.006s (~)0.925s101.00x
💻 LocalExpress1.083s (~)2.006s (~)0.923s101.00x
💻 LocalNext.js (Turbopack)1.089s (~)2.006s (~)0.917s101.01x
🐘 PostgresNitro1.113s (+1.4%)2.015s (~)0.901s101.03x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.390s (+2.1%)2.977s (-1.3%)1.587s101.00x
▲ VercelExpress1.402s (-1.1%)2.887s (+2.3%)1.485s101.01x
▲ VercelNext.js (Turbopack)2.120s (-9.6% 🟢)3.824s (+6.5% 🔺)1.704s101.53x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.449s (~)11.023s (~)0.574s31.00x
💻 LocalExpress10.464s (~)11.022s (~)0.557s31.00x
🐘 PostgresNitro10.509s (~)11.047s (~)0.537s31.01x
💻 LocalNext.js (Turbopack)10.516s (~)11.023s (~)0.507s31.01x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro11.723s (~)13.343s (+5.1% 🔺)1.620s31.00x
▲ VercelExpress11.886s (+1.8%)13.666s (-2.0%)1.780s31.01x
▲ VercelNext.js (Turbopack)13.087s (+1.3%)15.138s (+6.8% 🔺)2.051s21.12x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro13.549s (-1.1%)14.015s (~)0.466s51.00x
💻 LocalNitro13.663s (~)14.027s (~)0.364s51.01x
💻 LocalNext.js (Turbopack)13.781s (~)14.028s (~)0.247s51.02x
💻 LocalExpress13.798s (+0.7%)14.028s (~)0.229s51.02x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.456s (-1.3%)18.438s (-2.7%)1.983s41.00x
▲ VercelNitro16.473s (+1.8%)17.812s (+2.1%)1.339s41.00x
▲ VercelNext.js (Turbopack)17.996s (~)20.274s (+2.6%)2.278s31.09x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro11.888s (-3.6%)12.282s (-5.7% 🟢)0.394s81.00x
💻 LocalNitro12.144s (-0.7%)13.026s (~)0.882s71.02x
💻 LocalExpress12.257s (~)13.025s (~)0.767s71.03x
💻 LocalNext.js (Turbopack)12.351s (+0.9%)13.024s (~)0.673s71.04x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express17.467s (+1.0%)19.349s (+0.9%)1.881s51.00x
▲ VercelNitro17.987s (+5.3% 🔺)19.248s (+2.5%)1.261s51.03x
▲ VercelNext.js (Turbopack)19.714s (~)21.810s (+0.6%)2.096s51.13x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.201s (+1.3%)2.020s (+0.6%)0.819s151.00x
💻 LocalExpress1.398s (-3.2%)2.006s (~)0.608s151.16x
💻 LocalNext.js (Turbopack)1.412s (~)2.007s (~)0.595s151.18x
💻 LocalNitro1.461s (+3.8%)2.007s (~)0.546s151.22x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.153s (-5.9% 🟢)3.489s (-3.2%)1.336s91.00x
▲ VercelExpress2.354s (+3.6%)4.101s (+5.1% 🔺)1.747s81.09x
▲ VercelNext.js (Turbopack)4.048s (+37.8% 🔺)5.865s (+26.4% 🔺)1.817s61.88x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.284s (-8.3% 🟢)2.159s (-12.6% 🟢)0.875s141.00x
💻 LocalNext.js (Turbopack)2.345s (-5.7% 🟢)3.010s (-3.2%)0.664s101.83x
💻 LocalNitro2.384s (+2.8%)3.009s (~)0.625s101.86x
💻 LocalExpress2.412s (-9.2% 🟢)3.009s (-3.2%)0.596s101.88x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.289s (-9.5% 🟢)3.570s (~)1.281s91.00x
▲ VercelExpress2.355s (-9.6% 🟢)3.864s (-6.2% 🟢)1.509s81.03x
▲ VercelNext.js (Turbopack)3.790s (+13.8% 🔺)5.415s (+10.3% 🔺)1.625s61.66x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.665s (+2.2%)4.010s (-3.1%)2.345s81.00x
💻 LocalNext.js (Turbopack)2.870s (-38.9% 🟢)4.729s (-14.2% 🟢)1.860s71.72x
💻 LocalNitro3.678s (-14.3% 🟢)4.871s (~)1.193s72.21x
💻 LocalExpress3.833s (-13.2% 🟢)5.012s (-3.2%)1.179s72.30x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.763s (-2.4%)4.554s (+1.0%)1.792s71.00x
▲ VercelExpress2.966s (+1.6%)4.759s (+8.3% 🔺)1.793s71.07x
▲ VercelNext.js (Turbopack)4.868s (+23.2% 🔺)6.612s (+14.6% 🔺)1.744s51.76x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.226s (+2.5%)2.023s (+0.8%)0.797s151.00x
💻 LocalNitro1.407s (-0.6%)2.007s (~)0.600s151.15x
💻 LocalNext.js (Turbopack)1.472s (-1.9%)2.007s (~)0.535s151.20x
💻 LocalExpress1.480s (+1.8%)2.007s (~)0.527s151.21x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.964s (+1.6%)3.760s (+2.9%)1.796s81.00x
▲ VercelNitro2.110s (+11.1% 🔺)3.535s (+5.6% 🔺)1.424s91.07x
▲ VercelNext.js (Turbopack)3.243s (+9.1% 🔺)4.991s (+6.1% 🔺)1.748s71.65x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.298s (-1.6%)2.223s (+10.7% 🔺)0.925s141.00x
💻 LocalNitro2.572s (+5.3% 🔺)3.009s (~)0.437s101.98x
💻 LocalNext.js (Turbopack)2.634s (-6.3% 🟢)3.109s (-7.0% 🟢)0.476s102.03x
💻 LocalExpress2.799s (+12.5% 🔺)3.211s (+6.7% 🔺)0.412s102.16x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.258s (-27.2% 🟢)3.752s (-18.0% 🟢)1.493s81.00x
▲ VercelNitro2.335s (+6.3% 🔺)3.810s (+8.7% 🔺)1.475s81.03x
▲ VercelNext.js (Turbopack)4.193s (+32.9% 🔺)5.807s (+28.0% 🔺)1.614s61.86x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.886s (+15.4% 🔺)4.442s (+3.3%)2.556s71.00x
💻 LocalNext.js (Turbopack)5.512s (+2.0%)6.014s (~)0.502s52.92x
💻 LocalNitro5.845s (+5.9% 🔺)6.413s (+6.6% 🔺)0.568s53.10x
💻 LocalExpress5.863s (+64.4% 🔺)6.215s (+24.0% 🔺)0.352s53.11x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.640s (-0.9%)4.228s (-4.7%)1.588s81.00x
▲ VercelNitro2.665s (+4.6%)4.561s (+19.8% 🔺)1.895s71.01x
▲ VercelNext.js (Turbopack)4.500s (~)6.531s (+6.3% 🔺)2.031s51.70x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.530s (-12.0% 🟢)1.051s (+2.7%)0.522s581.00x
💻 LocalNitro0.587s (~)1.005s (~)0.418s601.11x
💻 LocalNext.js (Turbopack)0.631s (+5.4% 🔺)1.005s (~)0.374s601.19x
💻 LocalExpress0.638s (+5.4% 🔺)1.022s (+1.7%)0.385s591.20x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.415s (-2.9%)3.773s (-4.9%)1.357s161.00x
▲ VercelNitro2.481s (-4.8%)3.797s (-5.4% 🟢)1.316s161.03x
▲ VercelNext.js (Turbopack)3.631s (-10.4% 🟢)5.451s (-3.7%)1.819s121.50x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.228s (-11.9% 🟢)1.888s (-7.0% 🟢)0.660s481.00x
💻 LocalNitro1.522s (+5.2% 🔺)2.006s (~)0.484s451.24x
💻 LocalExpress1.560s (+4.5%)2.029s (+1.1%)0.469s451.27x
💻 LocalNext.js (Turbopack)1.595s (+1.3%)2.006s (~)0.411s451.30x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express6.086s (+4.5%)7.797s (+4.2%)1.711s121.00x
▲ VercelNitro6.312s (+8.1% 🔺)7.877s (+6.7% 🔺)1.565s121.04x
▲ VercelNext.js (Turbopack)8.166s (-1.0%)10.073s (+5.1% 🔺)1.907s101.34x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.441s (-14.2% 🟢)3.034s (-5.8% 🟢)0.593s401.00x
💻 LocalExpress3.341s (~)4.043s (+0.8%)0.702s301.37x
💻 LocalNitro3.385s (+6.5% 🔺)4.043s (+2.5%)0.658s301.39x
💻 LocalNext.js (Turbopack)3.443s (~)4.043s (+0.8%)0.600s301.41x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro11.413s (-0.7%)13.055s (+1.0%)1.642s101.00x
▲ VercelExpress11.577s (-1.0%)13.806s (~)2.228s91.01x
▲ VercelNext.js (Turbopack)16.842s (-1.7%)18.789s (~)1.946s71.48x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.221s (~)1.017s (+1.0%)0.795s601.00x
💻 LocalExpress0.511s (-1.0%)1.005s (~)0.493s602.31x
💻 LocalNitro0.542s (+5.8% 🔺)1.005s (~)0.463s602.45x
💻 LocalNext.js (Turbopack)0.662s (+3.1%)1.039s (+1.7%)0.377s582.99x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.079s (-4.2%)2.535s (-3.5%)1.456s241.00x
▲ VercelNitro1.181s (+7.8% 🔺)2.362s (-1.6%)1.180s261.09x
▲ VercelNext.js (Turbopack)2.348s (+19.9% 🔺)3.927s (+16.9% 🔺)1.578s162.18x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.294s (-16.0% 🟢)1.007s (~)0.713s901.00x
💻 LocalExpress2.481s (-1.9%)3.010s (-1.1%)0.529s308.44x
💻 LocalNitro2.604s (+3.1%)3.011s (~)0.406s308.86x
💻 LocalNext.js (Turbopack)2.640s (-3.9%)3.042s (-3.4%)0.402s308.98x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.450s (+9.6% 🔺)2.854s (+14.6% 🔺)1.405s321.00x
▲ VercelExpress1.679s (+17.8% 🔺)3.265s (+7.0% 🔺)1.586s281.16x
▲ VercelNext.js (Turbopack)3.364s (+29.8% 🔺)5.296s (+30.5% 🔺)1.933s172.32x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.654s (+14.1% 🔺)1.248s (+15.8% 🔺)0.594s971.00x
💻 LocalExpress5.629s (-5.9% 🟢)8.739s (+2.9%)3.110s148.61x
💻 LocalNitro5.801s (-0.9%)8.669s (~)2.868s148.87x
💻 LocalNext.js (Turbopack)5.958s (-7.3% 🟢)8.955s (-3.1%)2.997s149.11x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.367s (+42.1% 🔺)3.895s (+10.0% 🔺)1.528s311.00x
▲ VercelExpress2.403s (+49.7% 🔺)4.297s (+18.1% 🔺)1.894s281.02x
▲ VercelNext.js (Turbopack)4.360s (+3.8%)6.241s (+9.0% 🔺)1.882s201.84x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.130s (-2.7%)2.001s (~)0.001s (-33.3% 🟢)2.010s (~)0.880s101.00x
💻 LocalNext.js (Turbopack)1.146s (+0.5%)1.966s (~)0.012s (+12.6% 🔺)2.019s (~)0.873s101.01x
💻 LocalNitro1.159s (~)2.005s (~)0.010s (-1.9%)2.018s (~)0.859s101.03x
💻 LocalExpress1.161s (~)2.005s (~)0.013s (+11.4% 🔺)2.020s (~)0.859s101.03x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.904s (+0.7%)3.175s (-2.0%)1.666s (+1.7%)5.326s (~)3.423s101.00x
▲ VercelNitro1.915s (~)2.975s (~)1.744s (-5.2% 🟢)5.149s (-1.4%)3.233s101.01x
▲ VercelNext.js (Turbopack)3.329s (+4.5%)4.163s (+19.0% 🔺)0.626s (-57.0% 🟢)6.073s (-5.7% 🟢)2.744s101.75x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.572s (~)2.009s (~)0.013s (+13.8% 🔺)2.026s (~)0.454s301.00x
💻 LocalNitro1.574s (-0.6%)2.010s (-1.5%)0.013s (-4.7%)2.027s (-1.6%)0.453s301.00x
💻 LocalNext.js (Turbopack)1.633s (+2.0%)1.968s (~)0.013s (+4.9%)2.026s (~)0.393s301.04x
🐘 PostgresNitro1.707s (+4.8%)2.150s (+7.3% 🔺)0.004s (-17.6% 🟢)2.179s (+7.4% 🔺)0.471s281.09x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.563s (-2.2%)6.640s (+0.7%)0.224s (-3.9%)7.298s (-1.6%)1.734s91.00x
▲ VercelExpress5.622s (+3.6%)7.114s (+0.9%)0.272s (+21.9% 🔺)7.848s (+0.9%)2.226s81.01x
▲ VercelNext.js (Turbopack)10.479s (+10.2% 🔺)11.116s (+5.5% 🔺)0.345s (+58.0% 🔺)12.762s (+10.5% 🔺)2.283s51.88x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.948s (+11.9% 🔺)1.297s (+15.5% 🔺)0.000s (+130.4% 🔺)1.322s (+15.8% 🔺)0.374s461.00x
💻 LocalExpress1.269s (-6.3% 🟢)1.948s (+1.5%)0.000s (-9.7% 🟢)1.951s (+1.5%)0.682s311.34x
💻 LocalNext.js (Turbopack)1.336s (-4.6%)1.976s (~)0.000s (-47.4% 🟢)2.017s (~)0.681s301.41x
💻 LocalNitro1.340s (-0.7%)1.948s (~)0.000s (+50.0% 🔺)1.951s (~)0.611s311.41x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.179s (-22.6% 🟢)4.222s (-19.6% 🟢)0.000s (NaN%)4.706s (-17.8% 🟢)1.527s131.00x
▲ VercelExpress3.651s (-30.1% 🟢)5.145s (-22.2% 🟢)0.000s (-18.2% 🟢)5.652s (-20.8% 🟢)2.001s111.15x
▲ VercelNext.js (Turbopack)4.812s (+7.0% 🔺)5.690s (+5.3% 🔺)0.000s (NaN%)6.759s (+9.5% 🔺)1.946s91.51x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.022s (+13.5% 🔺)2.562s (+6.0% 🔺)0.000s (+Infinity% 🔺)2.612s (+7.4% 🔺)0.590s231.00x
💻 LocalNitro3.357s (+3.5%)3.842s (-1.5%)0.001s (+90.0% 🔺)3.846s (-1.5%)0.490s161.66x
💻 LocalExpress3.375s (+1.6%)3.900s (~)0.001s (+333.3% 🔺)3.904s (~)0.529s161.67x
💻 LocalNext.js (Turbopack)3.484s (+0.7%)4.056s (+1.6%)0.001s (-23.5% 🟢)4.098s (+1.7%)0.614s151.72x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro4.513s (+3.8%)5.726s (+9.0% 🔺)0.000s (NaN%)6.125s (+8.1% 🔺)1.612s101.00x
▲ VercelExpress4.540s (+1.1%)5.856s (+2.8%)0.000s (+Infinity% 🔺)6.385s (+3.6%)1.845s101.01x
▲ VercelNext.js (Turbopack)7.675s (+4.3%)8.439s (+8.1% 🔺)0.000s (+Infinity% 🔺)9.803s (+9.6% 🔺)2.128s71.70x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro10/21
🐘 PostgresNitro21/21
▲ VercelNitro12/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local15/21
Next.js (Turbopack)💻 Local19/21
Nitro🐘 Postgres17/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)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)
  • 🌐 Platformatic: Community world (local development)

📋 View full workflow run

@github-actions

github-actionsBot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production144202301672
✅ 💻 Local Development160502191824
✅ 📦 Local Production160502191824
✅ 🐘 Local Postgres160502191824
✅ 🪟 Windows15200152
✅ 📋 Other88701771064
Total7296010648360

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro125027
✅ example125027
✅ express125027
✅ fastify125027
✅ hono125027
✅ nextjs-turbopack14903
✅ nextjs-webpack14903
✅ nitro125027
✅ nuxt125027
✅ sveltekit14408
✅ vite125027
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack15200
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable127025
✅ e2e-local-dev-tanstack-start-127025
✅ e2e-local-postgres-nest-stable127025
✅ e2e-local-postgres-tanstack-start-127025
✅ e2e-local-prod-nest-stable127025
✅ e2e-local-prod-tanstack-start-127025
✅ e2e-vercel-prod-tanstack-start125027

📋 View full workflow run

@NathanColosimo

Copy link
Copy Markdown
ContributorAuthor

CI note: after the force-push rewrite, all checks are green except E2E Local Dev Tests (nextjs-webpack - canary) and the derived E2E Required Check.

I reran the canary dev job twice on this PR; it failed the same HMR manifest update test each time (should follow Next flow-route HMR rebuild rules for body-only changes). The current mainTests workflow is failing on the same job as well: https://github.com/vercel/workflow/actions/runs/28568531186/job/84700980822

The first nextjs-turbopack - stable dev failure and the Nitro benchmark failure both passed after rerun.

@NathanColosimo

Copy link
Copy Markdown
ContributorAuthor

Fresh manual basePath smoke after the rewrite:

  • Temporary workbench config: basePath: '/v2' in workbench/nextjs-turbopack/next.config.ts.
  • Fresh Vercel preview: https://example-nextjs-workflow-turbopack-ixptnm4nf.labs.vercel.dev (dpl_FLpB9FQqLN2qZzU1BBLWiuq6nuAv).
  • Local production smoke from the /v2 build:
    • POST /.well-known/workflow/v1/flow?__health -> 404
    • POST /v2/.well-known/workflow/v1/flow?__health -> 200
    • POST /v2/api/test-direct-step-call -> 200 {"result":5}
    • POST /v2/api/trigger-pages?workflowFn=addTenWorkflow&args=123, then poll /v2/api/trigger-pages?runId=... -> 200 133
  • Vercel preview smoke:
    • POST /.well-known/workflow/v1/flow?__health -> 404
    • POST /v2/.well-known/workflow/v1/flow?__health -> 404 (same public route-table caveat noted in the PR body)
    • POST /v2/api/test-direct-step-call -> 200 {"result":5}
    • POST /v2/api/trigger-pages?workflowFn=addTenWorkflow&args=123, then poll /v2/api/trigger-pages?runId=... -> 200 133

The temporary basePath edit was removed after the smoke; the PR worktree is clean.

@NathanColosimo

Copy link
Copy Markdown
ContributorAuthor

Health-check follow-up pushed in 610c9c016.

What changed:

  • Generated workflow route modules now keep the adapter-compatible export const POST = workflowEntrypoint(...) shape and also export GET, HEAD, and OPTIONS as aliases to POST, so withHealthCheck() can actually receive direct health probes in Next App Router.
  • Kept the old public @workflow/utils URL helper exports as wrappers around the new createWorkflowUrl(...) helper, so this stays patch-compatible.
  • Re-ran the basePath queue/probe coverage and restored the utils invalid-basePath coverage.

Manual health check result from the basePath smoke:

  • Local next start with temporary basePath: '/v2' works for /v2/.well-known/workflow/v1/flow?__health using GET, HEAD, OPTIONS, and POST; root /.well-known/... remains 404 as expected.
  • Vercel preview still returns the app 404 for public direct /v2/.well-known/workflow/v1/flow?__health, even though vercel inspect --format=json shows the lambda output exists at v2/.well-known/workflow/v1/flow and other /v2/api/... routes work. That still looks like a Vercel/Next deployed routing issue around basePath + .well-known, not workflow-server and not a missing SDK route file.

Local proof after the follow-up:

  • pnpm --filter @workflow/utils test
  • pnpm --filter @workflow/builders test
  • pnpm --filter @workflow/next test
  • pnpm exec vitest run packages/world-local/src/config.test.ts packages/world-local/src/queue.test.ts packages/world-postgres/src/queue.test.ts
  • pnpm --filter @workflow/utils --filter @workflow/builders --filter @workflow/core --filter @workflow/world-local --filter @workflow/world-postgres --filter @workflow/next build
  • Autoreview panel clean: Codex gpt-5.5 xhigh + Claude claude-opus-4-8 xhigh, 0 findings.

Comment threadpackages/next/src/index.ts
…-path-local
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
# Conflicts:
#	packages/next/src/index.ts
#	packages/utils/src/index.ts

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI review: no blocking issues

| { type: 'webhook'; token: string }
| { type: 'health' };

export function createWorkflowUrl(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI Review: Note

These new URL helpers (createWorkflowUrl, createWorkflowBaseUrl, createWorkflowHealthEndpoint) are the correctness core of this PR but have no dedicated unit test — they're only exercised indirectly via the world-local / world-postgres / builders suites. A focused workflow-routes.test.ts would be worth adding, in particular to pin the subtle property that createWorkflowUrl derives the prefix from the base URL's existing pathname (not the global basePath). That's what keeps the createWorkflowBaseUrlcreateWorkflowUrl webhook path from double-prefixing (/v2/v2/...). I verified this holds locally (base URL already carrying /v2 produces a single prefix), but a regression test would lock it in.

Record<symbol, string | undefined>;

// Keep this local: @workflow/next is CommonJS, while @workflow/utils is ESM-only.
function setWorkflowBasePath(basePath: string | undefined): void {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI Review: Nit

This BASE_PATH_SYMBOL + setWorkflowBasePath pair is duplicated from @workflow/utils (the CJS-vs-ESM comment explains why). Both sides depend on the Symbol.for('@workflow/core/basePath') string staying identical — if one drifts, basePath propagation silently breaks with no build/type error. Worth a cross-reference comment on both copies pointing at workflow-routes.ts so the coupling is discoverable.

@github-actionsgithub-actionsBot mentioned this pull request Jul 6, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2791. Merge conflicts were resolved by AI — please review carefully. (backport job run)

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.

Workflow does not work well/properly when using basePath on Nextjs app

3 participants

@NathanColosimo@VaguelySerious@karthikscale3
, '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('^' + ".*" + ' fix(next): respect basePath for workflow routes by NathanColosimo · Pull Request #2732 · vercel/workflow · GitHub
Skip to content

fix(next): respect basePath for workflow routes - #2732

Merged
NathanColosimo merged 9 commits into
mainfrom
nathanc/fix-next-base-path
Jul 6, 2026
Merged

fix(next): respect basePath for workflow routes#2732
NathanColosimo merged 9 commits into
mainfrom
nathanc/fix-next-base-path

Conversation

@NathanColosimo

@NathanColosimoNathanColosimo commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • derive Workflow's route prefix from nextConfig.basePath; users should only configure basePath in Next.js
  • pass that basePath into generated workflow entrypoints and route URL construction
  • use shared route helpers for workflow metadata, webhook URLs, manifest/health URLs, and local/postgres queue delivery URLs
  • preserve full URL overrides like WORKFLOW_LOCAL_BASE_URL as full overrides

Fixes#1864.

This is separate from #2729: that PR fixes project-root discovery, while this PR fixes runtime URL/route construction for apps served below a path prefix.

Vercel note

Runtime workflow execution works on a Vercel preview with basePath: '/v2': direct step calls and async workflow trigger/poll complete through /v2.

One platform follow-up remains: the generated Vercel/Next output serves internal workflow invocation at /v2/.well-known/workflow/v1/flow, but a public direct health probe to /v2/.well-known/workflow/v1/flow?__health still hits the app 404 route. That appears to be a Vercel/Next build-output route-table issue, not a Vercel REST API issue and not a Workflow queue/runtime URL issue.

Tests

  • pnpm --filter @workflow/utils --filter @workflow/builders --filter @workflow/core --filter @workflow/world-local --filter @workflow/world-postgres --filter @workflow/next build
  • pnpm --filter @workflow/utils test
  • pnpm --filter @workflow/next test
  • pnpm exec vitest run packages/world-local/src/config.test.ts packages/world-local/src/queue.test.ts packages/world-postgres/src/queue.test.ts packages/builders/src/constants.test.ts
  • pnpm exec biome check --max-diagnostics 12 ... on touched files (passes with existing warnings)
  • git diff --check
  • local nextjs-turbopack production smoke with basePath: '/v2': root health 404, /v2 health 200, direct step 200, workflow trigger/poll returns 133
  • Vercel preview smoke with basePath: '/v2': direct step 200, workflow trigger/poll returns 133; public /v2 health 404 as noted above
  • Codex autoreview (gpt-5.5, xhigh): clean after fixing the CommonJS/ESM issue in @workflow/next
  • Claude Opus fallback review (xhigh): no blocking findings; requested claude-opus-4.8 was unavailable

@changeset-bot

changeset-botBot commented Jun 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ce1ddb2

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

This PR includes changesets to release 21 packages
NameType
@workflow/buildersPatch
@workflow/corePatch
@workflow/nextPatch
@workflow/utilsPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/astroPatch
@workflow/cliPatch
@workflow/nestPatch
@workflow/nitroPatch
@workflow/nuxtPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/webPatch
workflowPatch
@workflow/world-testingPatch
@workflow/errorsPatch
@workflow/world-vercelPatch

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 Jun 30, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jun 30, 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🥇 Nitro0.046s (~)1.006s (~)0.959s101.00x
💻 LocalExpress0.048s (+7.2% 🔺)1.006s (~)0.958s101.03x
💻 LocalNext.js (Turbopack)0.054s (+1.3%)1.006s (~)0.952s101.16x
🐘 PostgresNitro0.128s (+95.1% 🔺)1.042s (+3.0%)0.915s102.75x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.204s (+8.7% 🔺)1.902s (-6.3% 🟢)1.697s101.00x
▲ VercelExpress0.260s (+15.6% 🔺)1.640s (-19.9% 🟢)1.380s101.27x
▲ VercelNext.js (Turbopack)0.480s (+97.6% 🔺)2.307s (-3.0%)1.826s102.35x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.081s (~)2.006s (~)0.925s101.00x
💻 LocalExpress1.083s (~)2.006s (~)0.923s101.00x
💻 LocalNext.js (Turbopack)1.089s (~)2.006s (~)0.917s101.01x
🐘 PostgresNitro1.113s (+1.4%)2.015s (~)0.901s101.03x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.390s (+2.1%)2.977s (-1.3%)1.587s101.00x
▲ VercelExpress1.402s (-1.1%)2.887s (+2.3%)1.485s101.01x
▲ VercelNext.js (Turbopack)2.120s (-9.6% 🟢)3.824s (+6.5% 🔺)1.704s101.53x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.449s (~)11.023s (~)0.574s31.00x
💻 LocalExpress10.464s (~)11.022s (~)0.557s31.00x
🐘 PostgresNitro10.509s (~)11.047s (~)0.537s31.01x
💻 LocalNext.js (Turbopack)10.516s (~)11.023s (~)0.507s31.01x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro11.723s (~)13.343s (+5.1% 🔺)1.620s31.00x
▲ VercelExpress11.886s (+1.8%)13.666s (-2.0%)1.780s31.01x
▲ VercelNext.js (Turbopack)13.087s (+1.3%)15.138s (+6.8% 🔺)2.051s21.12x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro13.549s (-1.1%)14.015s (~)0.466s51.00x
💻 LocalNitro13.663s (~)14.027s (~)0.364s51.01x
💻 LocalNext.js (Turbopack)13.781s (~)14.028s (~)0.247s51.02x
💻 LocalExpress13.798s (+0.7%)14.028s (~)0.229s51.02x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.456s (-1.3%)18.438s (-2.7%)1.983s41.00x
▲ VercelNitro16.473s (+1.8%)17.812s (+2.1%)1.339s41.00x
▲ VercelNext.js (Turbopack)17.996s (~)20.274s (+2.6%)2.278s31.09x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro11.888s (-3.6%)12.282s (-5.7% 🟢)0.394s81.00x
💻 LocalNitro12.144s (-0.7%)13.026s (~)0.882s71.02x
💻 LocalExpress12.257s (~)13.025s (~)0.767s71.03x
💻 LocalNext.js (Turbopack)12.351s (+0.9%)13.024s (~)0.673s71.04x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express17.467s (+1.0%)19.349s (+0.9%)1.881s51.00x
▲ VercelNitro17.987s (+5.3% 🔺)19.248s (+2.5%)1.261s51.03x
▲ VercelNext.js (Turbopack)19.714s (~)21.810s (+0.6%)2.096s51.13x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.201s (+1.3%)2.020s (+0.6%)0.819s151.00x
💻 LocalExpress1.398s (-3.2%)2.006s (~)0.608s151.16x
💻 LocalNext.js (Turbopack)1.412s (~)2.007s (~)0.595s151.18x
💻 LocalNitro1.461s (+3.8%)2.007s (~)0.546s151.22x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.153s (-5.9% 🟢)3.489s (-3.2%)1.336s91.00x
▲ VercelExpress2.354s (+3.6%)4.101s (+5.1% 🔺)1.747s81.09x
▲ VercelNext.js (Turbopack)4.048s (+37.8% 🔺)5.865s (+26.4% 🔺)1.817s61.88x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.284s (-8.3% 🟢)2.159s (-12.6% 🟢)0.875s141.00x
💻 LocalNext.js (Turbopack)2.345s (-5.7% 🟢)3.010s (-3.2%)0.664s101.83x
💻 LocalNitro2.384s (+2.8%)3.009s (~)0.625s101.86x
💻 LocalExpress2.412s (-9.2% 🟢)3.009s (-3.2%)0.596s101.88x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.289s (-9.5% 🟢)3.570s (~)1.281s91.00x
▲ VercelExpress2.355s (-9.6% 🟢)3.864s (-6.2% 🟢)1.509s81.03x
▲ VercelNext.js (Turbopack)3.790s (+13.8% 🔺)5.415s (+10.3% 🔺)1.625s61.66x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.665s (+2.2%)4.010s (-3.1%)2.345s81.00x
💻 LocalNext.js (Turbopack)2.870s (-38.9% 🟢)4.729s (-14.2% 🟢)1.860s71.72x
💻 LocalNitro3.678s (-14.3% 🟢)4.871s (~)1.193s72.21x
💻 LocalExpress3.833s (-13.2% 🟢)5.012s (-3.2%)1.179s72.30x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.763s (-2.4%)4.554s (+1.0%)1.792s71.00x
▲ VercelExpress2.966s (+1.6%)4.759s (+8.3% 🔺)1.793s71.07x
▲ VercelNext.js (Turbopack)4.868s (+23.2% 🔺)6.612s (+14.6% 🔺)1.744s51.76x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.226s (+2.5%)2.023s (+0.8%)0.797s151.00x
💻 LocalNitro1.407s (-0.6%)2.007s (~)0.600s151.15x
💻 LocalNext.js (Turbopack)1.472s (-1.9%)2.007s (~)0.535s151.20x
💻 LocalExpress1.480s (+1.8%)2.007s (~)0.527s151.21x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.964s (+1.6%)3.760s (+2.9%)1.796s81.00x
▲ VercelNitro2.110s (+11.1% 🔺)3.535s (+5.6% 🔺)1.424s91.07x
▲ VercelNext.js (Turbopack)3.243s (+9.1% 🔺)4.991s (+6.1% 🔺)1.748s71.65x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.298s (-1.6%)2.223s (+10.7% 🔺)0.925s141.00x
💻 LocalNitro2.572s (+5.3% 🔺)3.009s (~)0.437s101.98x
💻 LocalNext.js (Turbopack)2.634s (-6.3% 🟢)3.109s (-7.0% 🟢)0.476s102.03x
💻 LocalExpress2.799s (+12.5% 🔺)3.211s (+6.7% 🔺)0.412s102.16x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.258s (-27.2% 🟢)3.752s (-18.0% 🟢)1.493s81.00x
▲ VercelNitro2.335s (+6.3% 🔺)3.810s (+8.7% 🔺)1.475s81.03x
▲ VercelNext.js (Turbopack)4.193s (+32.9% 🔺)5.807s (+28.0% 🔺)1.614s61.86x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.886s (+15.4% 🔺)4.442s (+3.3%)2.556s71.00x
💻 LocalNext.js (Turbopack)5.512s (+2.0%)6.014s (~)0.502s52.92x
💻 LocalNitro5.845s (+5.9% 🔺)6.413s (+6.6% 🔺)0.568s53.10x
💻 LocalExpress5.863s (+64.4% 🔺)6.215s (+24.0% 🔺)0.352s53.11x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.640s (-0.9%)4.228s (-4.7%)1.588s81.00x
▲ VercelNitro2.665s (+4.6%)4.561s (+19.8% 🔺)1.895s71.01x
▲ VercelNext.js (Turbopack)4.500s (~)6.531s (+6.3% 🔺)2.031s51.70x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.530s (-12.0% 🟢)1.051s (+2.7%)0.522s581.00x
💻 LocalNitro0.587s (~)1.005s (~)0.418s601.11x
💻 LocalNext.js (Turbopack)0.631s (+5.4% 🔺)1.005s (~)0.374s601.19x
💻 LocalExpress0.638s (+5.4% 🔺)1.022s (+1.7%)0.385s591.20x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.415s (-2.9%)3.773s (-4.9%)1.357s161.00x
▲ VercelNitro2.481s (-4.8%)3.797s (-5.4% 🟢)1.316s161.03x
▲ VercelNext.js (Turbopack)3.631s (-10.4% 🟢)5.451s (-3.7%)1.819s121.50x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.228s (-11.9% 🟢)1.888s (-7.0% 🟢)0.660s481.00x
💻 LocalNitro1.522s (+5.2% 🔺)2.006s (~)0.484s451.24x
💻 LocalExpress1.560s (+4.5%)2.029s (+1.1%)0.469s451.27x
💻 LocalNext.js (Turbopack)1.595s (+1.3%)2.006s (~)0.411s451.30x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express6.086s (+4.5%)7.797s (+4.2%)1.711s121.00x
▲ VercelNitro6.312s (+8.1% 🔺)7.877s (+6.7% 🔺)1.565s121.04x
▲ VercelNext.js (Turbopack)8.166s (-1.0%)10.073s (+5.1% 🔺)1.907s101.34x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.441s (-14.2% 🟢)3.034s (-5.8% 🟢)0.593s401.00x
💻 LocalExpress3.341s (~)4.043s (+0.8%)0.702s301.37x
💻 LocalNitro3.385s (+6.5% 🔺)4.043s (+2.5%)0.658s301.39x
💻 LocalNext.js (Turbopack)3.443s (~)4.043s (+0.8%)0.600s301.41x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro11.413s (-0.7%)13.055s (+1.0%)1.642s101.00x
▲ VercelExpress11.577s (-1.0%)13.806s (~)2.228s91.01x
▲ VercelNext.js (Turbopack)16.842s (-1.7%)18.789s (~)1.946s71.48x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.221s (~)1.017s (+1.0%)0.795s601.00x
💻 LocalExpress0.511s (-1.0%)1.005s (~)0.493s602.31x
💻 LocalNitro0.542s (+5.8% 🔺)1.005s (~)0.463s602.45x
💻 LocalNext.js (Turbopack)0.662s (+3.1%)1.039s (+1.7%)0.377s582.99x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.079s (-4.2%)2.535s (-3.5%)1.456s241.00x
▲ VercelNitro1.181s (+7.8% 🔺)2.362s (-1.6%)1.180s261.09x
▲ VercelNext.js (Turbopack)2.348s (+19.9% 🔺)3.927s (+16.9% 🔺)1.578s162.18x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.294s (-16.0% 🟢)1.007s (~)0.713s901.00x
💻 LocalExpress2.481s (-1.9%)3.010s (-1.1%)0.529s308.44x
💻 LocalNitro2.604s (+3.1%)3.011s (~)0.406s308.86x
💻 LocalNext.js (Turbopack)2.640s (-3.9%)3.042s (-3.4%)0.402s308.98x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.450s (+9.6% 🔺)2.854s (+14.6% 🔺)1.405s321.00x
▲ VercelExpress1.679s (+17.8% 🔺)3.265s (+7.0% 🔺)1.586s281.16x
▲ VercelNext.js (Turbopack)3.364s (+29.8% 🔺)5.296s (+30.5% 🔺)1.933s172.32x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.654s (+14.1% 🔺)1.248s (+15.8% 🔺)0.594s971.00x
💻 LocalExpress5.629s (-5.9% 🟢)8.739s (+2.9%)3.110s148.61x
💻 LocalNitro5.801s (-0.9%)8.669s (~)2.868s148.87x
💻 LocalNext.js (Turbopack)5.958s (-7.3% 🟢)8.955s (-3.1%)2.997s149.11x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.367s (+42.1% 🔺)3.895s (+10.0% 🔺)1.528s311.00x
▲ VercelExpress2.403s (+49.7% 🔺)4.297s (+18.1% 🔺)1.894s281.02x
▲ VercelNext.js (Turbopack)4.360s (+3.8%)6.241s (+9.0% 🔺)1.882s201.84x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.130s (-2.7%)2.001s (~)0.001s (-33.3% 🟢)2.010s (~)0.880s101.00x
💻 LocalNext.js (Turbopack)1.146s (+0.5%)1.966s (~)0.012s (+12.6% 🔺)2.019s (~)0.873s101.01x
💻 LocalNitro1.159s (~)2.005s (~)0.010s (-1.9%)2.018s (~)0.859s101.03x
💻 LocalExpress1.161s (~)2.005s (~)0.013s (+11.4% 🔺)2.020s (~)0.859s101.03x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.904s (+0.7%)3.175s (-2.0%)1.666s (+1.7%)5.326s (~)3.423s101.00x
▲ VercelNitro1.915s (~)2.975s (~)1.744s (-5.2% 🟢)5.149s (-1.4%)3.233s101.01x
▲ VercelNext.js (Turbopack)3.329s (+4.5%)4.163s (+19.0% 🔺)0.626s (-57.0% 🟢)6.073s (-5.7% 🟢)2.744s101.75x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.572s (~)2.009s (~)0.013s (+13.8% 🔺)2.026s (~)0.454s301.00x
💻 LocalNitro1.574s (-0.6%)2.010s (-1.5%)0.013s (-4.7%)2.027s (-1.6%)0.453s301.00x
💻 LocalNext.js (Turbopack)1.633s (+2.0%)1.968s (~)0.013s (+4.9%)2.026s (~)0.393s301.04x
🐘 PostgresNitro1.707s (+4.8%)2.150s (+7.3% 🔺)0.004s (-17.6% 🟢)2.179s (+7.4% 🔺)0.471s281.09x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.563s (-2.2%)6.640s (+0.7%)0.224s (-3.9%)7.298s (-1.6%)1.734s91.00x
▲ VercelExpress5.622s (+3.6%)7.114s (+0.9%)0.272s (+21.9% 🔺)7.848s (+0.9%)2.226s81.01x
▲ VercelNext.js (Turbopack)10.479s (+10.2% 🔺)11.116s (+5.5% 🔺)0.345s (+58.0% 🔺)12.762s (+10.5% 🔺)2.283s51.88x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.948s (+11.9% 🔺)1.297s (+15.5% 🔺)0.000s (+130.4% 🔺)1.322s (+15.8% 🔺)0.374s461.00x
💻 LocalExpress1.269s (-6.3% 🟢)1.948s (+1.5%)0.000s (-9.7% 🟢)1.951s (+1.5%)0.682s311.34x
💻 LocalNext.js (Turbopack)1.336s (-4.6%)1.976s (~)0.000s (-47.4% 🟢)2.017s (~)0.681s301.41x
💻 LocalNitro1.340s (-0.7%)1.948s (~)0.000s (+50.0% 🔺)1.951s (~)0.611s311.41x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.179s (-22.6% 🟢)4.222s (-19.6% 🟢)0.000s (NaN%)4.706s (-17.8% 🟢)1.527s131.00x
▲ VercelExpress3.651s (-30.1% 🟢)5.145s (-22.2% 🟢)0.000s (-18.2% 🟢)5.652s (-20.8% 🟢)2.001s111.15x
▲ VercelNext.js (Turbopack)4.812s (+7.0% 🔺)5.690s (+5.3% 🔺)0.000s (NaN%)6.759s (+9.5% 🔺)1.946s91.51x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.022s (+13.5% 🔺)2.562s (+6.0% 🔺)0.000s (+Infinity% 🔺)2.612s (+7.4% 🔺)0.590s231.00x
💻 LocalNitro3.357s (+3.5%)3.842s (-1.5%)0.001s (+90.0% 🔺)3.846s (-1.5%)0.490s161.66x
💻 LocalExpress3.375s (+1.6%)3.900s (~)0.001s (+333.3% 🔺)3.904s (~)0.529s161.67x
💻 LocalNext.js (Turbopack)3.484s (+0.7%)4.056s (+1.6%)0.001s (-23.5% 🟢)4.098s (+1.7%)0.614s151.72x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro4.513s (+3.8%)5.726s (+9.0% 🔺)0.000s (NaN%)6.125s (+8.1% 🔺)1.612s101.00x
▲ VercelExpress4.540s (+1.1%)5.856s (+2.8%)0.000s (+Infinity% 🔺)6.385s (+3.6%)1.845s101.01x
▲ VercelNext.js (Turbopack)7.675s (+4.3%)8.439s (+8.1% 🔺)0.000s (+Infinity% 🔺)9.803s (+9.6% 🔺)2.128s71.70x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro10/21
🐘 PostgresNitro21/21
▲ VercelNitro12/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local15/21
Next.js (Turbopack)💻 Local19/21
Nitro🐘 Postgres17/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)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)
  • 🌐 Platformatic: Community world (local development)

📋 View full workflow run

@github-actions

github-actionsBot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production144202301672
✅ 💻 Local Development160502191824
✅ 📦 Local Production160502191824
✅ 🐘 Local Postgres160502191824
✅ 🪟 Windows15200152
✅ 📋 Other88701771064
Total7296010648360

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro125027
✅ example125027
✅ express125027
✅ fastify125027
✅ hono125027
✅ nextjs-turbopack14903
✅ nextjs-webpack14903
✅ nitro125027
✅ nuxt125027
✅ sveltekit14408
✅ vite125027
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack15200
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable127025
✅ e2e-local-dev-tanstack-start-127025
✅ e2e-local-postgres-nest-stable127025
✅ e2e-local-postgres-tanstack-start-127025
✅ e2e-local-prod-nest-stable127025
✅ e2e-local-prod-tanstack-start-127025
✅ e2e-vercel-prod-tanstack-start125027

📋 View full workflow run

@NathanColosimo

Copy link
Copy Markdown
ContributorAuthor

CI note: after the force-push rewrite, all checks are green except E2E Local Dev Tests (nextjs-webpack - canary) and the derived E2E Required Check.

I reran the canary dev job twice on this PR; it failed the same HMR manifest update test each time (should follow Next flow-route HMR rebuild rules for body-only changes). The current mainTests workflow is failing on the same job as well: https://github.com/vercel/workflow/actions/runs/28568531186/job/84700980822

The first nextjs-turbopack - stable dev failure and the Nitro benchmark failure both passed after rerun.

@NathanColosimo

Copy link
Copy Markdown
ContributorAuthor

Fresh manual basePath smoke after the rewrite:

  • Temporary workbench config: basePath: '/v2' in workbench/nextjs-turbopack/next.config.ts.
  • Fresh Vercel preview: https://example-nextjs-workflow-turbopack-ixptnm4nf.labs.vercel.dev (dpl_FLpB9FQqLN2qZzU1BBLWiuq6nuAv).
  • Local production smoke from the /v2 build:
    • POST /.well-known/workflow/v1/flow?__health -> 404
    • POST /v2/.well-known/workflow/v1/flow?__health -> 200
    • POST /v2/api/test-direct-step-call -> 200 {"result":5}
    • POST /v2/api/trigger-pages?workflowFn=addTenWorkflow&args=123, then poll /v2/api/trigger-pages?runId=... -> 200 133
  • Vercel preview smoke:
    • POST /.well-known/workflow/v1/flow?__health -> 404
    • POST /v2/.well-known/workflow/v1/flow?__health -> 404 (same public route-table caveat noted in the PR body)
    • POST /v2/api/test-direct-step-call -> 200 {"result":5}
    • POST /v2/api/trigger-pages?workflowFn=addTenWorkflow&args=123, then poll /v2/api/trigger-pages?runId=... -> 200 133

The temporary basePath edit was removed after the smoke; the PR worktree is clean.

@NathanColosimo

Copy link
Copy Markdown
ContributorAuthor

Health-check follow-up pushed in 610c9c016.

What changed:

  • Generated workflow route modules now keep the adapter-compatible export const POST = workflowEntrypoint(...) shape and also export GET, HEAD, and OPTIONS as aliases to POST, so withHealthCheck() can actually receive direct health probes in Next App Router.
  • Kept the old public @workflow/utils URL helper exports as wrappers around the new createWorkflowUrl(...) helper, so this stays patch-compatible.
  • Re-ran the basePath queue/probe coverage and restored the utils invalid-basePath coverage.

Manual health check result from the basePath smoke:

  • Local next start with temporary basePath: '/v2' works for /v2/.well-known/workflow/v1/flow?__health using GET, HEAD, OPTIONS, and POST; root /.well-known/... remains 404 as expected.
  • Vercel preview still returns the app 404 for public direct /v2/.well-known/workflow/v1/flow?__health, even though vercel inspect --format=json shows the lambda output exists at v2/.well-known/workflow/v1/flow and other /v2/api/... routes work. That still looks like a Vercel/Next deployed routing issue around basePath + .well-known, not workflow-server and not a missing SDK route file.

Local proof after the follow-up:

  • pnpm --filter @workflow/utils test
  • pnpm --filter @workflow/builders test
  • pnpm --filter @workflow/next test
  • pnpm exec vitest run packages/world-local/src/config.test.ts packages/world-local/src/queue.test.ts packages/world-postgres/src/queue.test.ts
  • pnpm --filter @workflow/utils --filter @workflow/builders --filter @workflow/core --filter @workflow/world-local --filter @workflow/world-postgres --filter @workflow/next build
  • Autoreview panel clean: Codex gpt-5.5 xhigh + Claude claude-opus-4-8 xhigh, 0 findings.

Comment threadpackages/next/src/index.ts
…-path-local
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
# Conflicts:
#	packages/next/src/index.ts
#	packages/utils/src/index.ts

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI review: no blocking issues

| { type: 'webhook'; token: string }
| { type: 'health' };

export function createWorkflowUrl(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI Review: Note

These new URL helpers (createWorkflowUrl, createWorkflowBaseUrl, createWorkflowHealthEndpoint) are the correctness core of this PR but have no dedicated unit test — they're only exercised indirectly via the world-local / world-postgres / builders suites. A focused workflow-routes.test.ts would be worth adding, in particular to pin the subtle property that createWorkflowUrl derives the prefix from the base URL's existing pathname (not the global basePath). That's what keeps the createWorkflowBaseUrlcreateWorkflowUrl webhook path from double-prefixing (/v2/v2/...). I verified this holds locally (base URL already carrying /v2 produces a single prefix), but a regression test would lock it in.

Record<symbol, string | undefined>;

// Keep this local: @workflow/next is CommonJS, while @workflow/utils is ESM-only.
function setWorkflowBasePath(basePath: string | undefined): void {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI Review: Nit

This BASE_PATH_SYMBOL + setWorkflowBasePath pair is duplicated from @workflow/utils (the CJS-vs-ESM comment explains why). Both sides depend on the Symbol.for('@workflow/core/basePath') string staying identical — if one drifts, basePath propagation silently breaks with no build/type error. Worth a cross-reference comment on both copies pointing at workflow-routes.ts so the coupling is discoverable.

@github-actionsgithub-actionsBot mentioned this pull request Jul 6, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2791. Merge conflicts were resolved by AI — please review carefully. (backport job run)

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.

Workflow does not work well/properly when using basePath on Nextjs app

3 participants

@NathanColosimo@VaguelySerious@karthikscale3
, '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); } })(); })(); fix(next): respect basePath for workflow routes by NathanColosimo · Pull Request #2732 · vercel/workflow · GitHub
Skip to content

fix(next): respect basePath for workflow routes - #2732

Merged
NathanColosimo merged 9 commits into
mainfrom
nathanc/fix-next-base-path
Jul 6, 2026
Merged

fix(next): respect basePath for workflow routes#2732
NathanColosimo merged 9 commits into
mainfrom
nathanc/fix-next-base-path

Conversation

@NathanColosimo

@NathanColosimoNathanColosimo commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • derive Workflow's route prefix from nextConfig.basePath; users should only configure basePath in Next.js
  • pass that basePath into generated workflow entrypoints and route URL construction
  • use shared route helpers for workflow metadata, webhook URLs, manifest/health URLs, and local/postgres queue delivery URLs
  • preserve full URL overrides like WORKFLOW_LOCAL_BASE_URL as full overrides

Fixes#1864.

This is separate from #2729: that PR fixes project-root discovery, while this PR fixes runtime URL/route construction for apps served below a path prefix.

Vercel note

Runtime workflow execution works on a Vercel preview with basePath: '/v2': direct step calls and async workflow trigger/poll complete through /v2.

One platform follow-up remains: the generated Vercel/Next output serves internal workflow invocation at /v2/.well-known/workflow/v1/flow, but a public direct health probe to /v2/.well-known/workflow/v1/flow?__health still hits the app 404 route. That appears to be a Vercel/Next build-output route-table issue, not a Vercel REST API issue and not a Workflow queue/runtime URL issue.

Tests

  • pnpm --filter @workflow/utils --filter @workflow/builders --filter @workflow/core --filter @workflow/world-local --filter @workflow/world-postgres --filter @workflow/next build
  • pnpm --filter @workflow/utils test
  • pnpm --filter @workflow/next test
  • pnpm exec vitest run packages/world-local/src/config.test.ts packages/world-local/src/queue.test.ts packages/world-postgres/src/queue.test.ts packages/builders/src/constants.test.ts
  • pnpm exec biome check --max-diagnostics 12 ... on touched files (passes with existing warnings)
  • git diff --check
  • local nextjs-turbopack production smoke with basePath: '/v2': root health 404, /v2 health 200, direct step 200, workflow trigger/poll returns 133
  • Vercel preview smoke with basePath: '/v2': direct step 200, workflow trigger/poll returns 133; public /v2 health 404 as noted above
  • Codex autoreview (gpt-5.5, xhigh): clean after fixing the CommonJS/ESM issue in @workflow/next
  • Claude Opus fallback review (xhigh): no blocking findings; requested claude-opus-4.8 was unavailable

@changeset-bot

changeset-botBot commented Jun 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ce1ddb2

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

This PR includes changesets to release 21 packages
NameType
@workflow/buildersPatch
@workflow/corePatch
@workflow/nextPatch
@workflow/utilsPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/astroPatch
@workflow/cliPatch
@workflow/nestPatch
@workflow/nitroPatch
@workflow/nuxtPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/webPatch
workflowPatch
@workflow/world-testingPatch
@workflow/errorsPatch
@workflow/world-vercelPatch

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 Jun 30, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jun 30, 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🥇 Nitro0.046s (~)1.006s (~)0.959s101.00x
💻 LocalExpress0.048s (+7.2% 🔺)1.006s (~)0.958s101.03x
💻 LocalNext.js (Turbopack)0.054s (+1.3%)1.006s (~)0.952s101.16x
🐘 PostgresNitro0.128s (+95.1% 🔺)1.042s (+3.0%)0.915s102.75x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.204s (+8.7% 🔺)1.902s (-6.3% 🟢)1.697s101.00x
▲ VercelExpress0.260s (+15.6% 🔺)1.640s (-19.9% 🟢)1.380s101.27x
▲ VercelNext.js (Turbopack)0.480s (+97.6% 🔺)2.307s (-3.0%)1.826s102.35x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.081s (~)2.006s (~)0.925s101.00x
💻 LocalExpress1.083s (~)2.006s (~)0.923s101.00x
💻 LocalNext.js (Turbopack)1.089s (~)2.006s (~)0.917s101.01x
🐘 PostgresNitro1.113s (+1.4%)2.015s (~)0.901s101.03x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.390s (+2.1%)2.977s (-1.3%)1.587s101.00x
▲ VercelExpress1.402s (-1.1%)2.887s (+2.3%)1.485s101.01x
▲ VercelNext.js (Turbopack)2.120s (-9.6% 🟢)3.824s (+6.5% 🔺)1.704s101.53x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.449s (~)11.023s (~)0.574s31.00x
💻 LocalExpress10.464s (~)11.022s (~)0.557s31.00x
🐘 PostgresNitro10.509s (~)11.047s (~)0.537s31.01x
💻 LocalNext.js (Turbopack)10.516s (~)11.023s (~)0.507s31.01x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro11.723s (~)13.343s (+5.1% 🔺)1.620s31.00x
▲ VercelExpress11.886s (+1.8%)13.666s (-2.0%)1.780s31.01x
▲ VercelNext.js (Turbopack)13.087s (+1.3%)15.138s (+6.8% 🔺)2.051s21.12x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro13.549s (-1.1%)14.015s (~)0.466s51.00x
💻 LocalNitro13.663s (~)14.027s (~)0.364s51.01x
💻 LocalNext.js (Turbopack)13.781s (~)14.028s (~)0.247s51.02x
💻 LocalExpress13.798s (+0.7%)14.028s (~)0.229s51.02x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.456s (-1.3%)18.438s (-2.7%)1.983s41.00x
▲ VercelNitro16.473s (+1.8%)17.812s (+2.1%)1.339s41.00x
▲ VercelNext.js (Turbopack)17.996s (~)20.274s (+2.6%)2.278s31.09x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro11.888s (-3.6%)12.282s (-5.7% 🟢)0.394s81.00x
💻 LocalNitro12.144s (-0.7%)13.026s (~)0.882s71.02x
💻 LocalExpress12.257s (~)13.025s (~)0.767s71.03x
💻 LocalNext.js (Turbopack)12.351s (+0.9%)13.024s (~)0.673s71.04x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express17.467s (+1.0%)19.349s (+0.9%)1.881s51.00x
▲ VercelNitro17.987s (+5.3% 🔺)19.248s (+2.5%)1.261s51.03x
▲ VercelNext.js (Turbopack)19.714s (~)21.810s (+0.6%)2.096s51.13x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.201s (+1.3%)2.020s (+0.6%)0.819s151.00x
💻 LocalExpress1.398s (-3.2%)2.006s (~)0.608s151.16x
💻 LocalNext.js (Turbopack)1.412s (~)2.007s (~)0.595s151.18x
💻 LocalNitro1.461s (+3.8%)2.007s (~)0.546s151.22x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.153s (-5.9% 🟢)3.489s (-3.2%)1.336s91.00x
▲ VercelExpress2.354s (+3.6%)4.101s (+5.1% 🔺)1.747s81.09x
▲ VercelNext.js (Turbopack)4.048s (+37.8% 🔺)5.865s (+26.4% 🔺)1.817s61.88x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.284s (-8.3% 🟢)2.159s (-12.6% 🟢)0.875s141.00x
💻 LocalNext.js (Turbopack)2.345s (-5.7% 🟢)3.010s (-3.2%)0.664s101.83x
💻 LocalNitro2.384s (+2.8%)3.009s (~)0.625s101.86x
💻 LocalExpress2.412s (-9.2% 🟢)3.009s (-3.2%)0.596s101.88x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.289s (-9.5% 🟢)3.570s (~)1.281s91.00x
▲ VercelExpress2.355s (-9.6% 🟢)3.864s (-6.2% 🟢)1.509s81.03x
▲ VercelNext.js (Turbopack)3.790s (+13.8% 🔺)5.415s (+10.3% 🔺)1.625s61.66x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.665s (+2.2%)4.010s (-3.1%)2.345s81.00x
💻 LocalNext.js (Turbopack)2.870s (-38.9% 🟢)4.729s (-14.2% 🟢)1.860s71.72x
💻 LocalNitro3.678s (-14.3% 🟢)4.871s (~)1.193s72.21x
💻 LocalExpress3.833s (-13.2% 🟢)5.012s (-3.2%)1.179s72.30x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.763s (-2.4%)4.554s (+1.0%)1.792s71.00x
▲ VercelExpress2.966s (+1.6%)4.759s (+8.3% 🔺)1.793s71.07x
▲ VercelNext.js (Turbopack)4.868s (+23.2% 🔺)6.612s (+14.6% 🔺)1.744s51.76x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.226s (+2.5%)2.023s (+0.8%)0.797s151.00x
💻 LocalNitro1.407s (-0.6%)2.007s (~)0.600s151.15x
💻 LocalNext.js (Turbopack)1.472s (-1.9%)2.007s (~)0.535s151.20x
💻 LocalExpress1.480s (+1.8%)2.007s (~)0.527s151.21x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.964s (+1.6%)3.760s (+2.9%)1.796s81.00x
▲ VercelNitro2.110s (+11.1% 🔺)3.535s (+5.6% 🔺)1.424s91.07x
▲ VercelNext.js (Turbopack)3.243s (+9.1% 🔺)4.991s (+6.1% 🔺)1.748s71.65x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.298s (-1.6%)2.223s (+10.7% 🔺)0.925s141.00x
💻 LocalNitro2.572s (+5.3% 🔺)3.009s (~)0.437s101.98x
💻 LocalNext.js (Turbopack)2.634s (-6.3% 🟢)3.109s (-7.0% 🟢)0.476s102.03x
💻 LocalExpress2.799s (+12.5% 🔺)3.211s (+6.7% 🔺)0.412s102.16x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.258s (-27.2% 🟢)3.752s (-18.0% 🟢)1.493s81.00x
▲ VercelNitro2.335s (+6.3% 🔺)3.810s (+8.7% 🔺)1.475s81.03x
▲ VercelNext.js (Turbopack)4.193s (+32.9% 🔺)5.807s (+28.0% 🔺)1.614s61.86x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.886s (+15.4% 🔺)4.442s (+3.3%)2.556s71.00x
💻 LocalNext.js (Turbopack)5.512s (+2.0%)6.014s (~)0.502s52.92x
💻 LocalNitro5.845s (+5.9% 🔺)6.413s (+6.6% 🔺)0.568s53.10x
💻 LocalExpress5.863s (+64.4% 🔺)6.215s (+24.0% 🔺)0.352s53.11x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.640s (-0.9%)4.228s (-4.7%)1.588s81.00x
▲ VercelNitro2.665s (+4.6%)4.561s (+19.8% 🔺)1.895s71.01x
▲ VercelNext.js (Turbopack)4.500s (~)6.531s (+6.3% 🔺)2.031s51.70x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.530s (-12.0% 🟢)1.051s (+2.7%)0.522s581.00x
💻 LocalNitro0.587s (~)1.005s (~)0.418s601.11x
💻 LocalNext.js (Turbopack)0.631s (+5.4% 🔺)1.005s (~)0.374s601.19x
💻 LocalExpress0.638s (+5.4% 🔺)1.022s (+1.7%)0.385s591.20x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.415s (-2.9%)3.773s (-4.9%)1.357s161.00x
▲ VercelNitro2.481s (-4.8%)3.797s (-5.4% 🟢)1.316s161.03x
▲ VercelNext.js (Turbopack)3.631s (-10.4% 🟢)5.451s (-3.7%)1.819s121.50x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.228s (-11.9% 🟢)1.888s (-7.0% 🟢)0.660s481.00x
💻 LocalNitro1.522s (+5.2% 🔺)2.006s (~)0.484s451.24x
💻 LocalExpress1.560s (+4.5%)2.029s (+1.1%)0.469s451.27x
💻 LocalNext.js (Turbopack)1.595s (+1.3%)2.006s (~)0.411s451.30x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express6.086s (+4.5%)7.797s (+4.2%)1.711s121.00x
▲ VercelNitro6.312s (+8.1% 🔺)7.877s (+6.7% 🔺)1.565s121.04x
▲ VercelNext.js (Turbopack)8.166s (-1.0%)10.073s (+5.1% 🔺)1.907s101.34x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.441s (-14.2% 🟢)3.034s (-5.8% 🟢)0.593s401.00x
💻 LocalExpress3.341s (~)4.043s (+0.8%)0.702s301.37x
💻 LocalNitro3.385s (+6.5% 🔺)4.043s (+2.5%)0.658s301.39x
💻 LocalNext.js (Turbopack)3.443s (~)4.043s (+0.8%)0.600s301.41x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro11.413s (-0.7%)13.055s (+1.0%)1.642s101.00x
▲ VercelExpress11.577s (-1.0%)13.806s (~)2.228s91.01x
▲ VercelNext.js (Turbopack)16.842s (-1.7%)18.789s (~)1.946s71.48x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.221s (~)1.017s (+1.0%)0.795s601.00x
💻 LocalExpress0.511s (-1.0%)1.005s (~)0.493s602.31x
💻 LocalNitro0.542s (+5.8% 🔺)1.005s (~)0.463s602.45x
💻 LocalNext.js (Turbopack)0.662s (+3.1%)1.039s (+1.7%)0.377s582.99x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.079s (-4.2%)2.535s (-3.5%)1.456s241.00x
▲ VercelNitro1.181s (+7.8% 🔺)2.362s (-1.6%)1.180s261.09x
▲ VercelNext.js (Turbopack)2.348s (+19.9% 🔺)3.927s (+16.9% 🔺)1.578s162.18x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.294s (-16.0% 🟢)1.007s (~)0.713s901.00x
💻 LocalExpress2.481s (-1.9%)3.010s (-1.1%)0.529s308.44x
💻 LocalNitro2.604s (+3.1%)3.011s (~)0.406s308.86x
💻 LocalNext.js (Turbopack)2.640s (-3.9%)3.042s (-3.4%)0.402s308.98x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.450s (+9.6% 🔺)2.854s (+14.6% 🔺)1.405s321.00x
▲ VercelExpress1.679s (+17.8% 🔺)3.265s (+7.0% 🔺)1.586s281.16x
▲ VercelNext.js (Turbopack)3.364s (+29.8% 🔺)5.296s (+30.5% 🔺)1.933s172.32x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.654s (+14.1% 🔺)1.248s (+15.8% 🔺)0.594s971.00x
💻 LocalExpress5.629s (-5.9% 🟢)8.739s (+2.9%)3.110s148.61x
💻 LocalNitro5.801s (-0.9%)8.669s (~)2.868s148.87x
💻 LocalNext.js (Turbopack)5.958s (-7.3% 🟢)8.955s (-3.1%)2.997s149.11x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.367s (+42.1% 🔺)3.895s (+10.0% 🔺)1.528s311.00x
▲ VercelExpress2.403s (+49.7% 🔺)4.297s (+18.1% 🔺)1.894s281.02x
▲ VercelNext.js (Turbopack)4.360s (+3.8%)6.241s (+9.0% 🔺)1.882s201.84x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.130s (-2.7%)2.001s (~)0.001s (-33.3% 🟢)2.010s (~)0.880s101.00x
💻 LocalNext.js (Turbopack)1.146s (+0.5%)1.966s (~)0.012s (+12.6% 🔺)2.019s (~)0.873s101.01x
💻 LocalNitro1.159s (~)2.005s (~)0.010s (-1.9%)2.018s (~)0.859s101.03x
💻 LocalExpress1.161s (~)2.005s (~)0.013s (+11.4% 🔺)2.020s (~)0.859s101.03x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.904s (+0.7%)3.175s (-2.0%)1.666s (+1.7%)5.326s (~)3.423s101.00x
▲ VercelNitro1.915s (~)2.975s (~)1.744s (-5.2% 🟢)5.149s (-1.4%)3.233s101.01x
▲ VercelNext.js (Turbopack)3.329s (+4.5%)4.163s (+19.0% 🔺)0.626s (-57.0% 🟢)6.073s (-5.7% 🟢)2.744s101.75x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.572s (~)2.009s (~)0.013s (+13.8% 🔺)2.026s (~)0.454s301.00x
💻 LocalNitro1.574s (-0.6%)2.010s (-1.5%)0.013s (-4.7%)2.027s (-1.6%)0.453s301.00x
💻 LocalNext.js (Turbopack)1.633s (+2.0%)1.968s (~)0.013s (+4.9%)2.026s (~)0.393s301.04x
🐘 PostgresNitro1.707s (+4.8%)2.150s (+7.3% 🔺)0.004s (-17.6% 🟢)2.179s (+7.4% 🔺)0.471s281.09x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.563s (-2.2%)6.640s (+0.7%)0.224s (-3.9%)7.298s (-1.6%)1.734s91.00x
▲ VercelExpress5.622s (+3.6%)7.114s (+0.9%)0.272s (+21.9% 🔺)7.848s (+0.9%)2.226s81.01x
▲ VercelNext.js (Turbopack)10.479s (+10.2% 🔺)11.116s (+5.5% 🔺)0.345s (+58.0% 🔺)12.762s (+10.5% 🔺)2.283s51.88x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.948s (+11.9% 🔺)1.297s (+15.5% 🔺)0.000s (+130.4% 🔺)1.322s (+15.8% 🔺)0.374s461.00x
💻 LocalExpress1.269s (-6.3% 🟢)1.948s (+1.5%)0.000s (-9.7% 🟢)1.951s (+1.5%)0.682s311.34x
💻 LocalNext.js (Turbopack)1.336s (-4.6%)1.976s (~)0.000s (-47.4% 🟢)2.017s (~)0.681s301.41x
💻 LocalNitro1.340s (-0.7%)1.948s (~)0.000s (+50.0% 🔺)1.951s (~)0.611s311.41x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.179s (-22.6% 🟢)4.222s (-19.6% 🟢)0.000s (NaN%)4.706s (-17.8% 🟢)1.527s131.00x
▲ VercelExpress3.651s (-30.1% 🟢)5.145s (-22.2% 🟢)0.000s (-18.2% 🟢)5.652s (-20.8% 🟢)2.001s111.15x
▲ VercelNext.js (Turbopack)4.812s (+7.0% 🔺)5.690s (+5.3% 🔺)0.000s (NaN%)6.759s (+9.5% 🔺)1.946s91.51x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.022s (+13.5% 🔺)2.562s (+6.0% 🔺)0.000s (+Infinity% 🔺)2.612s (+7.4% 🔺)0.590s231.00x
💻 LocalNitro3.357s (+3.5%)3.842s (-1.5%)0.001s (+90.0% 🔺)3.846s (-1.5%)0.490s161.66x
💻 LocalExpress3.375s (+1.6%)3.900s (~)0.001s (+333.3% 🔺)3.904s (~)0.529s161.67x
💻 LocalNext.js (Turbopack)3.484s (+0.7%)4.056s (+1.6%)0.001s (-23.5% 🟢)4.098s (+1.7%)0.614s151.72x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro4.513s (+3.8%)5.726s (+9.0% 🔺)0.000s (NaN%)6.125s (+8.1% 🔺)1.612s101.00x
▲ VercelExpress4.540s (+1.1%)5.856s (+2.8%)0.000s (+Infinity% 🔺)6.385s (+3.6%)1.845s101.01x
▲ VercelNext.js (Turbopack)7.675s (+4.3%)8.439s (+8.1% 🔺)0.000s (+Infinity% 🔺)9.803s (+9.6% 🔺)2.128s71.70x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro10/21
🐘 PostgresNitro21/21
▲ VercelNitro12/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local15/21
Next.js (Turbopack)💻 Local19/21
Nitro🐘 Postgres17/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)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)
  • 🌐 Platformatic: Community world (local development)

📋 View full workflow run

@github-actions

github-actionsBot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production144202301672
✅ 💻 Local Development160502191824
✅ 📦 Local Production160502191824
✅ 🐘 Local Postgres160502191824
✅ 🪟 Windows15200152
✅ 📋 Other88701771064
Total7296010648360

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro125027
✅ example125027
✅ express125027
✅ fastify125027
✅ hono125027
✅ nextjs-turbopack14903
✅ nextjs-webpack14903
✅ nitro125027
✅ nuxt125027
✅ sveltekit14408
✅ vite125027
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack15200
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable127025
✅ e2e-local-dev-tanstack-start-127025
✅ e2e-local-postgres-nest-stable127025
✅ e2e-local-postgres-tanstack-start-127025
✅ e2e-local-prod-nest-stable127025
✅ e2e-local-prod-tanstack-start-127025
✅ e2e-vercel-prod-tanstack-start125027

📋 View full workflow run

@NathanColosimo

Copy link
Copy Markdown
ContributorAuthor

CI note: after the force-push rewrite, all checks are green except E2E Local Dev Tests (nextjs-webpack - canary) and the derived E2E Required Check.

I reran the canary dev job twice on this PR; it failed the same HMR manifest update test each time (should follow Next flow-route HMR rebuild rules for body-only changes). The current mainTests workflow is failing on the same job as well: https://github.com/vercel/workflow/actions/runs/28568531186/job/84700980822

The first nextjs-turbopack - stable dev failure and the Nitro benchmark failure both passed after rerun.

@NathanColosimo

Copy link
Copy Markdown
ContributorAuthor

Fresh manual basePath smoke after the rewrite:

  • Temporary workbench config: basePath: '/v2' in workbench/nextjs-turbopack/next.config.ts.
  • Fresh Vercel preview: https://example-nextjs-workflow-turbopack-ixptnm4nf.labs.vercel.dev (dpl_FLpB9FQqLN2qZzU1BBLWiuq6nuAv).
  • Local production smoke from the /v2 build:
    • POST /.well-known/workflow/v1/flow?__health -> 404
    • POST /v2/.well-known/workflow/v1/flow?__health -> 200
    • POST /v2/api/test-direct-step-call -> 200 {"result":5}
    • POST /v2/api/trigger-pages?workflowFn=addTenWorkflow&args=123, then poll /v2/api/trigger-pages?runId=... -> 200 133
  • Vercel preview smoke:
    • POST /.well-known/workflow/v1/flow?__health -> 404
    • POST /v2/.well-known/workflow/v1/flow?__health -> 404 (same public route-table caveat noted in the PR body)
    • POST /v2/api/test-direct-step-call -> 200 {"result":5}
    • POST /v2/api/trigger-pages?workflowFn=addTenWorkflow&args=123, then poll /v2/api/trigger-pages?runId=... -> 200 133

The temporary basePath edit was removed after the smoke; the PR worktree is clean.

@NathanColosimo

Copy link
Copy Markdown
ContributorAuthor

Health-check follow-up pushed in 610c9c016.

What changed:

  • Generated workflow route modules now keep the adapter-compatible export const POST = workflowEntrypoint(...) shape and also export GET, HEAD, and OPTIONS as aliases to POST, so withHealthCheck() can actually receive direct health probes in Next App Router.
  • Kept the old public @workflow/utils URL helper exports as wrappers around the new createWorkflowUrl(...) helper, so this stays patch-compatible.
  • Re-ran the basePath queue/probe coverage and restored the utils invalid-basePath coverage.

Manual health check result from the basePath smoke:

  • Local next start with temporary basePath: '/v2' works for /v2/.well-known/workflow/v1/flow?__health using GET, HEAD, OPTIONS, and POST; root /.well-known/... remains 404 as expected.
  • Vercel preview still returns the app 404 for public direct /v2/.well-known/workflow/v1/flow?__health, even though vercel inspect --format=json shows the lambda output exists at v2/.well-known/workflow/v1/flow and other /v2/api/... routes work. That still looks like a Vercel/Next deployed routing issue around basePath + .well-known, not workflow-server and not a missing SDK route file.

Local proof after the follow-up:

  • pnpm --filter @workflow/utils test
  • pnpm --filter @workflow/builders test
  • pnpm --filter @workflow/next test
  • pnpm exec vitest run packages/world-local/src/config.test.ts packages/world-local/src/queue.test.ts packages/world-postgres/src/queue.test.ts
  • pnpm --filter @workflow/utils --filter @workflow/builders --filter @workflow/core --filter @workflow/world-local --filter @workflow/world-postgres --filter @workflow/next build
  • Autoreview panel clean: Codex gpt-5.5 xhigh + Claude claude-opus-4-8 xhigh, 0 findings.

Comment threadpackages/next/src/index.ts
…-path-local
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
# Conflicts:
#	packages/next/src/index.ts
#	packages/utils/src/index.ts

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI review: no blocking issues

| { type: 'webhook'; token: string }
| { type: 'health' };

export function createWorkflowUrl(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI Review: Note

These new URL helpers (createWorkflowUrl, createWorkflowBaseUrl, createWorkflowHealthEndpoint) are the correctness core of this PR but have no dedicated unit test — they're only exercised indirectly via the world-local / world-postgres / builders suites. A focused workflow-routes.test.ts would be worth adding, in particular to pin the subtle property that createWorkflowUrl derives the prefix from the base URL's existing pathname (not the global basePath). That's what keeps the createWorkflowBaseUrlcreateWorkflowUrl webhook path from double-prefixing (/v2/v2/...). I verified this holds locally (base URL already carrying /v2 produces a single prefix), but a regression test would lock it in.

Record<symbol, string | undefined>;

// Keep this local: @workflow/next is CommonJS, while @workflow/utils is ESM-only.
function setWorkflowBasePath(basePath: string | undefined): void {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI Review: Nit

This BASE_PATH_SYMBOL + setWorkflowBasePath pair is duplicated from @workflow/utils (the CJS-vs-ESM comment explains why). Both sides depend on the Symbol.for('@workflow/core/basePath') string staying identical — if one drifts, basePath propagation silently breaks with no build/type error. Worth a cross-reference comment on both copies pointing at workflow-routes.ts so the coupling is discoverable.

@github-actionsgithub-actionsBot mentioned this pull request Jul 6, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2791. Merge conflicts were resolved by AI — please review carefully. (backport job run)

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.

Workflow does not work well/properly when using basePath on Nextjs app

3 participants

@NathanColosimo@VaguelySerious@karthikscale3