Skip to content

[core] Remove duplicate waitUntil for suspension handler async operations - #2345

Merged
VaguelySerious merged 3 commits into
mainfrom
fix/ack-after-step-enqueue
Jun 11, 2026
Merged

[core] Remove duplicate waitUntil for suspension handler async operations#2345
VaguelySerious merged 3 commits into
mainfrom
fix/ack-after-step-enqueue

Conversation

@pranaygp

@pranaygppranaygp commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Peter: Ignore all the below, this PR is smaller in scope than it leads on. Read the code, it's a few lines.


The invariant

Never ack the orchestrator's queue message until all work that makes the run progress is durably complete — including creating AND enqueueing subsequent steps. Queue sends are idempotent (idempotency keys), so a crash before ack yields a redelivery → replay → safe re-send, recovering within the VQS ~300s lease instead of orphaning the step. The codebase already states this principle for timeout re-enqueues (packages/world-vercel/src/queue.ts: "Send new message BEFORE acknowledging current message. This ensures crash safety…"); this PR makes it hold for the suspension-handler's progress-critical event writes.

Production evidence

Run wrun_01KTSMXMKD7C544YFHX0GNPEG1 (prod, codeReviewWorkflowV2, dpl dpl_F4kcruzPhU3EY6Mbo3vqvEPAvRYM, 2026-06-10): the deployment was crash-looping with exit-128 (unhandled-rejection; fix in open PR #2336). step_created committed at 21:03:32.611; VQS shows zero step-queue [SEND]s for the run for 4h35m (the dispatch never happened); no lease redeliveries fired in the gap — the orchestrator message chain had concluded (= acked). A PR webhook at 01:38:40 finally re-drove the orchestrator, which rediscovered and dispatched the step in ~1s. ~130 warnings/day across 89 runs on one team share the signature, with orphan windows up to ~24h.

What changed

packages/core/src/runtime/suspension-handler.ts previously registered the step_created / wait_created event writes (ops) on a detached waitUntil(Promise.all(ops))in addition to awaiting them on the next line. The detached copy:

  1. framed those progress-critical writes as droppable background work the platform may discard after the response/ack, and
  2. re-threw send failures into a promise nothing consumes → unhandled rejection → process exit 128.

The fix removes the detached waitUntil registration and keeps only the strict await Promise.all(ops). On this branch the step-dispatch queueMessage sends already live in runtime.ts (workflowEntrypoint) and are awaited there before the handler returns; this change ensures the step_created events those dispatches depend on are likewise strictly awaited, so the whole progress-critical chain completes before the queue handler acks the orchestrator message.

What stayed background (and why)

The waitUntil(Promise.all(ops)) registrations in step-handler.ts, start.ts, and resume-hook.ts were not touched: their ops are stream-flush writes (not progress-gating), have no awaited copy, and legitimately need waitUntil to keep the function alive. The orchestrator re-trigger / step-continuation queueMessage sends in those files are already awaited. PR #2336 hardens those background sites with a safeWaitUntil helper.

Test coverage

Adds an ack ordering suite to packages/core/src/runtime.test.ts driving the real workflowEntrypoint against a workflow that suspends on a step + sleep (so the step is queued, not run inline):

  • the step-dispatch queue() send completes before the ack sentinel (and step_created precedes the dispatch);
  • a hanging dispatch send keeps the handler from resolving (no ack);
  • a failing dispatch send rejects the handler (no ack → VQS redelivers) without rejecting any promise handed to waitUntil.

Relationship to #2336

Orthogonal and complementary. #2336 stops the crash class (rejected waitUntil promises → exit 128) so the queue can re-drive normally. This PR guarantees crash recovery via redelivery regardless of why the process crashed by enforcing the ack-ordering invariant. Both edit suspension-handler.ts; #2336 also drops the same waitUntil registration there, so expect a trivial rebase overlap (the resolution is identical — drop the registration, keep the await).

…lete
The suspension handler registered the step_created / wait_created event
writes on a detached waitUntil(Promise.all(ops)) in addition to awaiting
them. The detached copy framed those progress-critical writes as droppable
background work and re-threw send failures into a promise nothing consumes
(unhandled rejection -> process exit 128). It now strictly awaits the writes
only, preserving the ack-ordering invariant: the orchestrator message is not
acked until the writes (and the dispatch sends the caller makes afterward)
complete, so a crash before then leaves the message un-acked for VQS to
redeliver instead of orphaning the step.
Adds runtime.test.ts ack-ordering tests: the dispatch send must complete
before ack, a hanging send must not ack, and a failing send must reject the
handler (no ack) without rejecting any waitUntil promise.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@pranaygp
pranaygp requested a review from a team as a code ownerJune 11, 2026 06:10
CopilotAI review requested due to automatic review settings June 11, 2026 06:10
@changeset-bot

changeset-botBot commented Jun 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 07fd5f4

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

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

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercelBot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production126602191485
✅ 💻 Local Development167102191890
✅ 📦 Local Production167102191890
✅ 🐘 Local Postgres167102191890
✅ 🪟 Windows13500135
✅ 📋 Other7690176945
Total7183010528235

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro109026
✅ example109026
✅ express109026
✅ fastify109026
✅ hono109026
✅ nextjs-turbopack13302
✅ nextjs-webpack13302
✅ nitro109026
✅ nuxt109026
✅ sveltekit12807
✅ vite109026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack13500
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable110025
✅ e2e-local-dev-tanstack-start-110025
✅ e2e-local-postgres-nest-stable110025
✅ e2e-local-postgres-tanstack-start-110025
✅ e2e-local-prod-nest-stable110025
✅ e2e-local-prod-tanstack-start-110025
✅ e2e-vercel-prod-tanstack-start109026

📋 View full workflow run

@github-actions

github-actionsBot commented Jun 11, 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.042s (-1.2%)1.007s (~)0.964s101.00x
💻 LocalExpress0.044s (+1.9%)1.006s (~)0.962s101.04x
💻 LocalNext.js (Turbopack)0.060s (+9.6% 🔺)1.006s (~)0.946s101.43x
🐘 PostgresNitro0.064s (~)1.012s (~)0.949s101.50x
🐘 PostgresNext.js (Turbopack)0.070s (-0.7%)1.013s (~)0.944s101.64x
🐘 PostgresExpress0.125s (+88.5% 🔺)1.054s (+3.9%)0.929s102.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.281s (+7.7% 🔺)2.724s (+11.8% 🔺)2.442s101.00x
▲ VercelNext.js (Turbopack)0.287s (-12.9% 🟢)2.246s (-4.1%)1.960s101.02x
▲ VercelExpress0.311s (+14.3% 🔺)2.400s (-11.5% 🟢)2.089s101.11x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.093s (~)2.006s (~)0.913s101.00x
💻 LocalExpress1.101s (~)2.006s (~)0.905s101.01x
🐘 PostgresNitro1.102s (-1.1%)2.010s (~)0.908s101.01x
💻 LocalNext.js (Turbopack)1.135s (+2.4%)2.007s (~)0.871s101.04x
🐘 PostgresNext.js (Turbopack)1.161s (+1.7%)2.011s (~)0.850s101.06x
🐘 PostgresExpress1.262s (+15.6% 🔺)2.092s (+4.0%)0.829s101.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.820s (+9.3% 🔺)3.699s (-9.3% 🟢)1.879s101.00x
▲ VercelExpress1.833s (+15.7% 🔺)3.828s (+7.2% 🔺)1.996s101.01x
▲ VercelNitro1.973s (+26.0% 🔺)4.298s (+21.8% 🔺)2.324s101.08x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.512s (~)11.021s (~)0.509s31.00x
🐘 PostgresNitro10.542s (~)11.020s (~)0.478s31.00x
💻 LocalExpress10.552s (~)11.023s (~)0.471s31.00x
💻 LocalNext.js (Turbopack)10.768s (+1.5%)11.022s (~)0.254s31.02x
🐘 PostgresExpress10.855s (+1.3%)11.423s (+0.6%)0.568s31.03x
🐘 PostgresNext.js (Turbopack)10.855s (~)11.020s (~)0.164s31.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)14.575s (+8.0% 🔺)16.665s (+3.5%)2.090s21.00x
▲ VercelExpress14.855s (+12.9% 🔺)16.492s (+6.7% 🔺)1.636s21.02x
▲ VercelNitro16.093s (+20.8% 🔺)18.277s (+17.2% 🔺)2.183s21.10x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro13.716s (~)14.027s (~)0.310s51.00x
🐘 PostgresNitro13.733s (-0.8%)14.020s (~)0.287s51.00x
💻 LocalExpress13.795s (-0.8%)14.027s (-1.4%)0.232s51.01x
💻 LocalNext.js (Turbopack)14.382s (+2.5%)15.031s (+2.8%)0.648s41.05x
🐘 PostgresExpress14.472s (+4.6%)15.021s (+5.5% 🔺)0.548s41.06x
🐘 PostgresNext.js (Turbopack)14.794s (+1.4%)15.270s (+1.7%)0.476s41.08x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro23.738s (-7.0% 🟢)27.387s (-0.8%)3.649s31.00x
▲ VercelExpress24.834s (-2.5%)26.672s (-2.1%)1.838s31.05x
▲ VercelNext.js (Turbopack)25.661s (+0.6%)27.005s (-0.7%)1.344s31.08x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro12.399s (~)13.024s (~)0.625s71.00x
🐘 PostgresNitro12.525s (-1.7%)13.018s (~)0.493s71.01x
💻 LocalExpress12.531s (-0.5%)13.025s (~)0.494s71.01x
💻 LocalNext.js (Turbopack)13.663s (+5.5% 🔺)14.027s (+5.4% 🔺)0.364s71.10x
🐘 PostgresNext.js (Turbopack)13.733s (~)14.019s (~)0.286s71.11x
🐘 PostgresExpress13.775s (+8.2% 🔺)14.307s (+7.5% 🔺)0.532s71.11x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express29.132s (-9.1% 🟢)31.079s (-9.2% 🟢)1.947s31.00x
▲ VercelNitro30.472s (+4.9%)33.068s (+5.3% 🔺)2.597s31.05x
▲ VercelNext.js (Turbopack)31.623s (+6.8% 🔺)32.793s (+2.9%)1.170s31.09x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.179s (-1.7%)2.007s (~)0.828s151.00x
💻 LocalNitro1.186s (-2.3%)2.007s (~)0.821s151.01x
🐘 PostgresNext.js (Turbopack)1.259s (+0.6%)2.007s (~)0.748s151.07x
💻 LocalNext.js (Turbopack)1.320s (+7.9% 🔺)2.006s (~)0.686s151.12x
💻 LocalExpress1.340s (+6.1% 🔺)2.007s (~)0.667s151.14x
🐘 PostgresExpress1.408s (+17.4% 🔺)2.018s (~)0.610s151.19x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.510s (-9.4% 🟢)4.773s (+10.0% 🔺)2.263s71.00x
▲ VercelNext.js (Turbopack)2.679s (~)4.255s (+0.9%)1.576s81.07x
▲ VercelExpress2.800s (+1.1%)4.533s (-4.0%)1.734s71.12x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.252s (-0.6%)2.008s (~)0.756s151.00x
🐘 PostgresNext.js (Turbopack)1.394s (-1.1%)2.008s (~)0.614s151.11x
🐘 PostgresExpress1.615s (+21.8% 🔺)2.410s (+19.5% 🔺)0.795s131.29x
💻 LocalNitro1.771s (+3.9%)2.006s (-3.2%)0.234s151.42x
💻 LocalNext.js (Turbopack)1.864s (+8.0% 🔺)2.150s (+7.2% 🔺)0.286s141.49x
💻 LocalExpress1.920s (+2.0%)2.294s (+3.3%)0.374s141.53x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.601s (-11.8% 🟢)5.376s (-12.9% 🟢)1.775s61.00x
▲ VercelNext.js (Turbopack)3.895s (-5.2% 🟢)5.557s (-9.5% 🟢)1.663s61.08x
▲ VercelNitro3.909s (-4.0%)5.743s (-7.5% 🟢)1.834s61.09x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.402s (~)2.009s (~)0.607s151.00x
🐘 PostgresNext.js (Turbopack)1.753s (~)2.075s (-9.6% 🟢)0.322s151.25x
🐘 PostgresExpress2.096s (+50.4% 🔺)3.371s (+67.7% 🔺)1.274s91.50x
💻 LocalNitro4.863s (+3.1%)5.347s (+6.7% 🔺)0.484s63.47x
💻 LocalExpress5.361s (+1.2%)5.846s (-2.8%)0.485s63.82x
💻 LocalNext.js (Turbopack)5.901s (+34.2% 🔺)6.214s (+24.0% 🔺)0.313s54.21x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.264s (-21.9% 🟢)8.049s (-7.6% 🟢)2.785s41.00x
▲ VercelExpress6.176s (+4.6%)7.914s (~)1.739s41.17x
▲ VercelNext.js (Turbopack)6.496s (+10.6% 🔺)8.160s (+4.9%)1.664s41.23x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.195s (~)2.009s (~)0.814s151.00x
🐘 PostgresNext.js (Turbopack)1.258s (-0.6%)2.008s (~)0.750s151.05x
💻 LocalNext.js (Turbopack)1.375s (+5.3% 🔺)2.007s (~)0.632s151.15x
🐘 PostgresExpress1.533s (+27.5% 🔺)2.116s (+5.4% 🔺)0.583s151.28x
💻 LocalNitro1.577s (+2.2%)2.006s (~)0.429s151.32x
💻 LocalExpress1.582s (-4.5%)2.007s (-3.2%)0.424s151.32x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.457s (-8.1% 🟢)4.342s (~)1.886s71.00x
▲ VercelExpress2.756s (+7.4% 🔺)4.461s (+6.3% 🔺)1.705s71.12x
▲ VercelNext.js (Turbopack)2.913s (-33.4% 🟢)4.470s (-29.0% 🟢)1.557s71.19x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.261s (-1.1%)2.008s (~)0.748s151.00x
🐘 PostgresNext.js (Turbopack)1.399s (~)2.008s (~)0.609s151.11x
🐘 PostgresExpress1.783s (+43.4% 🔺)2.592s (+28.8% 🔺)0.809s121.41x
💻 LocalNext.js (Turbopack)2.031s (+0.5%)2.591s (+3.4%)0.560s121.61x
💻 LocalNitro2.054s (+16.9% 🔺)2.591s (+25.0% 🔺)0.537s121.63x
💻 LocalExpress2.170s (+2.1%)2.592s (~)0.422s121.72x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.771s (-16.6% 🟢)5.273s (-14.5% 🟢)1.502s61.00x
▲ VercelExpress3.779s (+2.8%)5.293s (-5.7% 🟢)1.514s61.00x
▲ VercelNitro3.919s (-4.3%)5.803s (-3.3%)1.884s61.04x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.420s (-2.9%)2.009s (~)0.589s151.00x
🐘 PostgresExpress1.529s (+1.9%)2.494s (+4.0%)0.965s131.08x
🐘 PostgresNext.js (Turbopack)1.710s (+3.3%)2.396s (+15.5% 🔺)0.686s131.20x
💻 LocalNitro5.589s (+17.8% 🔺)6.179s (+15.6% 🔺)0.590s63.94x
💻 LocalExpress5.770s (-1.6%)6.218s (~)0.448s54.06x
💻 LocalNext.js (Turbopack)6.049s (+17.2% 🔺)6.417s (+6.6% 🔺)0.369s54.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.371s (+9.0% 🔺)7.241s (+7.5% 🔺)1.870s51.00x
▲ VercelExpress5.651s (+11.4% 🔺)7.590s (+14.5% 🔺)1.939s41.05x
▲ VercelNext.js (Turbopack)6.282s (+8.5% 🔺)7.842s (+3.5%)1.560s41.17x

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

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.580s (-4.8%)1.024s (+1.6%)0.444s591.00x
💻 LocalNitro0.595s (-26.1% 🟢)1.005s (-16.6% 🟢)0.410s601.03x
💻 LocalExpress0.640s (-2.4%)1.040s (~)0.400s581.10x
🐘 PostgresExpress0.687s (+3.0%)1.113s (+6.2% 🔺)0.426s541.19x
🐘 PostgresNext.js (Turbopack)0.811s (~)1.006s (~)0.196s601.40x
💻 LocalNext.js (Turbopack)0.872s (+25.3% 🔺)1.005s (~)0.132s601.50x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.418s (-27.4% 🟢)7.331s (-23.0% 🟢)1.912s91.00x
▲ VercelExpress5.616s (+2.1%)7.496s (+5.4% 🔺)1.880s91.04x
▲ VercelNext.js (Turbopack)6.210s (+23.0% 🔺)8.016s (+17.0% 🔺)1.806s81.15x

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

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.340s (-5.4% 🟢)2.008s (~)0.668s451.00x
💻 LocalNitro1.510s (+3.2%)2.006s (~)0.496s451.13x
💻 LocalExpress1.591s (~)2.029s (~)0.438s451.19x
🐘 PostgresExpress1.857s (+20.8% 🔺)2.468s (+14.7% 🔺)0.612s381.39x
🐘 PostgresNext.js (Turbopack)1.976s (+1.7%)2.175s (~)0.199s421.48x
💻 LocalNext.js (Turbopack)2.089s (+20.8% 🔺)3.009s (+48.4% 🔺)0.920s301.56x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro12.352s (-6.6% 🟢)14.557s (-6.0% 🟢)2.205s71.00x
▲ VercelExpress12.448s (-24.0% 🟢)14.495s (-20.9% 🟢)2.048s71.01x
▲ VercelNext.js (Turbopack)13.582s (-8.1% 🟢)15.436s (-8.8% 🟢)1.853s61.10x

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

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.652s (-9.0% 🟢)3.086s (-5.9% 🟢)0.434s391.00x
🐘 PostgresExpress3.102s (+6.5% 🔺)3.575s (+1.0%)0.473s341.17x
💻 LocalNitro3.279s (+2.3%)4.010s (~)0.731s301.24x
💻 LocalExpress3.368s (-1.5%)4.010s (~)0.642s301.27x
🐘 PostgresNext.js (Turbopack)3.863s (~)4.148s (+1.8%)0.285s291.46x
💻 LocalNext.js (Turbopack)4.305s (+15.5% 🔺)5.011s (+21.9% 🔺)0.705s241.62x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express25.530s (-11.5% 🟢)27.480s (-11.1% 🟢)1.950s51.00x
▲ VercelNitro26.148s (-12.2% 🟢)28.275s (-11.6% 🟢)2.128s51.02x
▲ VercelNext.js (Turbopack)28.133s (+4.2%)29.722s (+1.6%)1.589s51.10x

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

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.216s (-8.4% 🟢)1.006s (~)0.790s601.00x
🐘 PostgresExpress0.239s (-5.1% 🟢)1.008s (~)0.769s601.11x
🐘 PostgresNext.js (Turbopack)0.264s (-6.5% 🟢)1.006s (~)0.743s601.22x
💻 LocalNitro0.421s (-0.9%)1.005s (~)0.584s601.95x
💻 LocalExpress0.444s (-4.5%)1.005s (~)0.561s602.06x
💻 LocalNext.js (Turbopack)0.561s (-8.2% 🟢)1.005s (-3.3%)0.444s602.60x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.371s (+7.2% 🔺)4.155s (+1.4%)1.784s151.00x
▲ VercelNext.js (Turbopack)2.653s (+20.6% 🔺)4.408s (+4.4%)1.755s141.12x
▲ VercelNitro3.840s (+63.8% 🔺)6.061s (+39.9% 🔺)2.222s101.62x

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

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.347s (-6.4% 🟢)1.007s (~)0.660s901.00x
🐘 PostgresNext.js (Turbopack)0.468s (-3.0%)1.006s (~)0.538s901.35x
🐘 PostgresExpress0.623s (+83.9% 🔺)1.176s (+16.7% 🔺)0.552s771.80x
💻 LocalNitro2.111s (+2.3%)2.637s (~)0.526s356.08x
💻 LocalExpress2.146s (-2.1%)2.797s (-0.9%)0.651s336.18x
💻 LocalNext.js (Turbopack)2.394s (-2.3%)3.113s (~)0.720s296.90x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.157s (-88.2% 🟢)7.065s (-84.6% 🟢)1.908s131.00x
▲ VercelExpress5.318s (-87.7% 🟢)7.335s (-83.8% 🟢)2.017s131.03x
▲ VercelNext.js (Turbopack)5.576s (-11.1% 🟢)7.259s (-14.6% 🟢)1.683s131.08x

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

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.651s (-7.9% 🟢)1.006s (~)0.355s1201.00x
🐘 PostgresNext.js (Turbopack)0.940s (-4.0%)1.371s (-14.7% 🟢)0.431s881.44x
🐘 PostgresExpress1.064s (+70.0% 🔺)1.568s (+48.7% 🔺)0.504s771.63x
💻 LocalNitro9.624s (+10.5% 🔺)10.197s (+9.3% 🔺)0.572s1214.78x
💻 LocalExpress10.242s (-0.7%)10.696s (-1.6%)0.455s1215.73x
💻 LocalNext.js (Turbopack)10.590s (+2.7%)11.394s (+0.8%)0.804s1116.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.861s (-91.3% 🟢)15.465s (-90.5% 🟢)1.605s81.00x
▲ VercelNitro15.439s (-95.0% 🟢)17.739s (-94.3% 🟢)2.299s71.11x
▲ VercelExpress16.562s (+8.6% 🔺)18.445s (+5.5% 🔺)1.883s71.19x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.158s (-1.9%)2.001s (~)0.001s (-7.1% 🟢)2.011s (~)0.853s101.00x
💻 LocalNitro1.163s (+1.1%)2.005s (~)0.012s (+19.0% 🔺)2.019s (~)0.856s101.00x
💻 LocalExpress1.168s (~)2.006s (~)0.012s (-5.5% 🟢)2.020s (~)0.852s101.01x
💻 LocalNext.js (Turbopack)1.203s (+3.0%)2.004s (~)0.013s (+24.8% 🔺)2.020s (~)0.817s101.04x
🐘 PostgresNext.js (Turbopack)1.240s (~)2.001s (~)0.001s (-33.3% 🟢)2.010s (~)0.771s101.07x
🐘 PostgresExpress1.325s (+11.0% 🔺)1.985s (-0.8%)0.059s (+72.3% 🔺)2.105s (+3.0%)0.779s101.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.198s (-2.0%)3.164s (-10.9% 🟢)1.002s (-91.9% 🟢)4.538s (-72.5% 🟢)2.340s101.00x
▲ VercelExpress2.230s (+4.0%)3.256s (-4.5%)0.822s (+56.4% 🔺)4.538s (+2.1%)2.308s101.01x
▲ VercelNitro2.305s (+6.5% 🔺)3.514s (+2.8%)0.722s (+39.9% 🔺)4.840s (+8.3% 🔺)2.536s101.05x

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

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.580s (-5.0%)2.001s (~)0.005s (+37.6% 🔺)2.027s (~)0.447s301.00x
💻 LocalNitro1.586s (-9.0% 🟢)2.011s (~)0.013s (+38.4% 🔺)2.025s (-7.9% 🟢)0.439s301.00x
💻 LocalExpress1.611s (-1.6%)2.012s (~)0.013s (+17.5% 🔺)2.027s (~)0.416s301.02x
🐘 PostgresNext.js (Turbopack)1.722s (-2.4%)2.009s (~)0.005s (+33.9% 🔺)2.027s (~)0.305s301.09x
💻 LocalNext.js (Turbopack)1.723s (+5.0% 🔺)2.010s (~)0.013s (+33.3% 🔺)2.026s (~)0.303s301.09x
🐘 PostgresExpress2.073s (+19.3% 🔺)2.501s (+16.7% 🔺)0.004s (+39.6% 🔺)2.553s (+18.2% 🔺)0.479s241.31x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.803s (+0.8%)6.817s (-8.3% 🟢)0.235s (-33.7% 🟢)7.461s (-11.2% 🟢)1.659s91.00x
▲ VercelNitro5.905s (+2.8%)7.730s (+1.7%)0.222s (-34.4% 🟢)8.452s (~)2.548s81.02x
▲ VercelNext.js (Turbopack)5.965s (-6.4% 🟢)7.035s (-11.4% 🟢)0.234s (-35.2% 🟢)7.715s (-13.0% 🟢)1.749s81.03x

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

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.706s (-2.4%)1.013s (-1.8%)0.000s (-100.0% 🟢)1.025s (-2.2%)0.320s591.00x
🐘 PostgresNext.js (Turbopack)0.807s (-3.1%)1.035s (-3.4%)0.000s (-3.4%)1.042s (-3.5%)0.235s581.14x
🐘 PostgresExpress1.322s (+35.2% 🔺)1.661s (+16.3% 🔺)0.000s (-100.0% 🟢)1.692s (+16.8% 🔺)0.370s361.87x
💻 LocalNitro1.370s (+1.3%)2.013s (~)0.000s (-53.3% 🟢)2.015s (~)0.645s301.94x
💻 LocalExpress1.438s (-3.0%)2.013s (~)0.000s (-46.7% 🟢)2.015s (~)0.577s302.04x
💻 LocalNext.js (Turbopack)1.485s (+2.6%)2.013s (~)0.000s (+75.0% 🔺)2.017s (~)0.532s302.10x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.237s (-20.3% 🟢)4.574s (-14.3% 🟢)0.000s (-95.1% 🟢)5.153s (-16.5% 🟢)1.916s121.00x
▲ VercelNext.js (Turbopack)3.305s (~)4.605s (-5.9% 🟢)0.000s (NaN%)5.009s (-8.3% 🟢)1.704s121.02x
▲ VercelNitro3.342s (-7.2% 🟢)5.136s (+1.3%)0.001s (+Infinity% 🔺)5.650s (~)2.308s111.03x

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

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.395s (-1.1%)2.065s (+3.4%)0.000s (NaN%)2.081s (+3.4%)0.686s291.00x
🐘 PostgresNext.js (Turbopack)1.694s (-1.9%)2.225s (-1.6%)0.000s (+Infinity% 🔺)2.249s (-0.9%)0.554s271.21x
💻 LocalNext.js (Turbopack)2.800s (-12.9% 🟢)3.360s (-13.8% 🟢)0.001s (+202.2% 🔺)3.364s (-13.7% 🟢)0.564s182.01x
💻 LocalNitro3.048s (-2.2%)3.774s (-3.1%)0.001s (+225.0% 🔺)3.779s (-3.1%)0.731s162.18x
💻 LocalExpress3.267s (-2.0%)3.895s (+1.5%)0.001s (+50.0% 🔺)3.906s (+1.6%)0.639s162.34x
🐘 PostgresExpress3.436s (+112.8% 🔺)3.945s (+75.1% 🔺)0.000s (NaN%)3.985s (+74.8% 🔺)0.549s162.46x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.809s (-23.9% 🟢)5.989s (-21.5% 🟢)0.000s (-100.0% 🟢)6.430s (-21.4% 🟢)1.622s101.00x
▲ VercelNitro4.836s (-31.3% 🟢)6.013s (-29.8% 🟢)0.000s (NaN%)6.783s (-25.4% 🟢)1.947s91.01x
▲ VercelNext.js (Turbopack)5.061s (-2.0%)6.498s (-2.7%)0.000s (-100.0% 🟢)6.933s (-3.7%)1.872s91.05x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro18/21
🐘 PostgresNitro21/21
▲ VercelNitro9/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local11/21
Next.js (Turbopack)🐘 Postgres15/21
Nitro🐘 Postgres16/21
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)
  • 🌐 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)

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR enforces a crash-safety invariant in the core runtime: the orchestrator’s queue message must not be acked until all progress-critical work is durably complete (notably step_created / wait_created event writes), so redelivery/replay can safely recover from crashes without orphaning steps.

Changes:

  • handleSuspension() no longer registers progress-critical event writes on a detached waitUntil(Promise.all(...)); it strictly awaits them.
  • Adds a new workflowEntrypoint step-dispatch ack ordering test suite to ensure step-dispatch sends complete (or fail/hang) before the handler resolves (ack).
  • Adds a changeset documenting the behavioral fix for @workflow/core.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

FileDescription
packages/core/src/runtime/suspension-handler.tsRemoves detached waitUntil usage for progress-gating event writes; keeps strict await to preserve ack ordering.
packages/core/src/runtime.test.tsAdds ack-ordering regression tests around step dispatch and waitUntil behavior.
.changeset/ack-after-step-dispatch.mdDocuments the patch-level behavioral fix and rationale.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +636 to +638
}) {
const workflowRun = await makeRunningRun(opts.runId);
const order: string[] = [];

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Done — waitUntilPromises.length = 0 now runs at the start of driveHandler(), so the rejection check only ever observes promises that invocation registered (robust against reordering/.only, not just the per-test afterEach). Fixed in 8d28013.

Comment on lines 21 to 25
vi.mock('@vercel/functions', () => ({
waitUntil: vi.fn(),
waitUntil: vi.fn((p: Promise<unknown>) => {
waitUntilPromises.push(p);
}),
}));

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Good catch. The mock now attaches a no-op .catch() to each promise the instant it's recorded, while still pushing the original promise into waitUntilPromises for later allSettled inspection — so a rejection can never surface as a real unhandled rejection in the test process before anyWaitUntilPromiseRejected() runs. Fixed in 8d28013.

'@workflow/core': patch
---

Never ack the orchestrator's queue message before the events that make the run progress are durably written. The suspension handler used to register the `step_created` / `wait_created` writes on a detached `waitUntil(Promise.all(ops))` in addition to awaiting them; the detached copy framed those progress-critical writes as droppable background work and re-threw send failures into a promise nothing consumes (unhandled rejection → process exit 128). It now strictly awaits the writes only, so the orchestrator message is never acked until they complete — a crash before then leaves the message un-acked and VQS redelivers within the lease, re-creating the (idempotent) entities and re-dispatching instead of orphaning the step. Complements the crash fix in #2336.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

too verbose. match the format/terseness of other changesets

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Trimmed to match the sibling changesets (now ~4 lines, in line with abort-e2e-flakes.md etc). Fixed in 8d28013.

- Trim the changeset to match the terseness of sibling changesets.
- Attach a no-op .catch() to each promise the waitUntil mock records so a
rejecting promise can never surface as a real unhandled rejection in the
test process; keep the original promise for allSettled inspection.
- Reset waitUntilPromises at the start of driveHandler() so the rejection
check only observes this invocation's promises (robust to reordering/.only).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@VaguelySeriousVaguelySerious changed the title [core] Never ack orchestrator message before step dispatch sends complete[core] Fix unhandled rejection when step_created/wait_created calls fail in waitUntilJun 11, 2026
@VaguelySeriousVaguelySerious changed the title [core] Fix unhandled rejection when step_created/wait_created calls fail in waitUntil[core] Remove duplicate waitUntil for suspension handler async operationsJun 11, 2026
@VaguelySerious
VaguelySerious merged commit bf44d4d into mainJun 11, 2026
187 of 193 checks passed
@VaguelySerious
VaguelySerious deleted the fix/ack-after-step-enqueue branch June 11, 2026 08:36
@github-actionsgithub-actionsBot mentioned this pull request Jun 11, 2026
github-actionsBot added a commit that referenced this pull request Jun 11, 2026
…ations (#2345)
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Pranay Prakash <pranay.gp@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

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

VaguelySerious added a commit that referenced this pull request Jun 11, 2026
…ations (#2345) (#2353)
Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
@github-actionsgithub-actionsBot mentioned this pull request Jun 11, 2026
pranaygp added a commit that referenced this pull request Jun 11, 2026
…hook-ready
* origin-https/main: (119 commits)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
Patch vulnerable package dependencies (#2301)
Deprecate DurableAgent and update it with WorkflowAgent in v5 docs (#2285)
[codex] Fix partial world-local exclusive writes (#2296)
...
# Conflicts:
#	packages/core/src/runtime.ts
#	packages/core/src/runtime/suspension-handler.ts
pranaygp added a commit that referenced this pull request Jun 11, 2026
…t-race-eager-wait
* origin/main:
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
pranaygp added a commit that referenced this pull request Jun 11, 2026
…docs-run-idempotency
* origin-https/main: (115 commits)
[core] V2: unify wait+step queue dispatch in suspension processing (#1925)
fix(world-local,world-postgres): make duplicate hook_created idempotent (#2295)
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
...
# Conflicts:
#	docs/content/docs/v4/cookbook/advanced/child-workflows.mdx
#	docs/content/docs/v5/cookbook/advanced/child-workflows.mdx
#	docs/content/docs/v5/cookbook/agent-patterns/durable-agent.mdx
pranaygp added a commit that referenced this pull request Jun 11, 2026
* origin/main:
[core] V2: unify wait+step queue dispatch in suspension processing (#1925)
fix(world-local,world-postgres): make duplicate hook_created idempotent (#2295)
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
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.

3 participants

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

[core] Remove duplicate waitUntil for suspension handler async operations - #2345

Merged
VaguelySerious merged 3 commits into
mainfrom
fix/ack-after-step-enqueue
Jun 11, 2026
Merged

[core] Remove duplicate waitUntil for suspension handler async operations#2345
VaguelySerious merged 3 commits into
mainfrom
fix/ack-after-step-enqueue

Conversation

@pranaygp

@pranaygppranaygp commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Peter: Ignore all the below, this PR is smaller in scope than it leads on. Read the code, it's a few lines.


The invariant

Never ack the orchestrator's queue message until all work that makes the run progress is durably complete — including creating AND enqueueing subsequent steps. Queue sends are idempotent (idempotency keys), so a crash before ack yields a redelivery → replay → safe re-send, recovering within the VQS ~300s lease instead of orphaning the step. The codebase already states this principle for timeout re-enqueues (packages/world-vercel/src/queue.ts: "Send new message BEFORE acknowledging current message. This ensures crash safety…"); this PR makes it hold for the suspension-handler's progress-critical event writes.

Production evidence

Run wrun_01KTSMXMKD7C544YFHX0GNPEG1 (prod, codeReviewWorkflowV2, dpl dpl_F4kcruzPhU3EY6Mbo3vqvEPAvRYM, 2026-06-10): the deployment was crash-looping with exit-128 (unhandled-rejection; fix in open PR #2336). step_created committed at 21:03:32.611; VQS shows zero step-queue [SEND]s for the run for 4h35m (the dispatch never happened); no lease redeliveries fired in the gap — the orchestrator message chain had concluded (= acked). A PR webhook at 01:38:40 finally re-drove the orchestrator, which rediscovered and dispatched the step in ~1s. ~130 warnings/day across 89 runs on one team share the signature, with orphan windows up to ~24h.

What changed

packages/core/src/runtime/suspension-handler.ts previously registered the step_created / wait_created event writes (ops) on a detached waitUntil(Promise.all(ops))in addition to awaiting them on the next line. The detached copy:

  1. framed those progress-critical writes as droppable background work the platform may discard after the response/ack, and
  2. re-threw send failures into a promise nothing consumes → unhandled rejection → process exit 128.

The fix removes the detached waitUntil registration and keeps only the strict await Promise.all(ops). On this branch the step-dispatch queueMessage sends already live in runtime.ts (workflowEntrypoint) and are awaited there before the handler returns; this change ensures the step_created events those dispatches depend on are likewise strictly awaited, so the whole progress-critical chain completes before the queue handler acks the orchestrator message.

What stayed background (and why)

The waitUntil(Promise.all(ops)) registrations in step-handler.ts, start.ts, and resume-hook.ts were not touched: their ops are stream-flush writes (not progress-gating), have no awaited copy, and legitimately need waitUntil to keep the function alive. The orchestrator re-trigger / step-continuation queueMessage sends in those files are already awaited. PR #2336 hardens those background sites with a safeWaitUntil helper.

Test coverage

Adds an ack ordering suite to packages/core/src/runtime.test.ts driving the real workflowEntrypoint against a workflow that suspends on a step + sleep (so the step is queued, not run inline):

  • the step-dispatch queue() send completes before the ack sentinel (and step_created precedes the dispatch);
  • a hanging dispatch send keeps the handler from resolving (no ack);
  • a failing dispatch send rejects the handler (no ack → VQS redelivers) without rejecting any promise handed to waitUntil.

Relationship to #2336

Orthogonal and complementary. #2336 stops the crash class (rejected waitUntil promises → exit 128) so the queue can re-drive normally. This PR guarantees crash recovery via redelivery regardless of why the process crashed by enforcing the ack-ordering invariant. Both edit suspension-handler.ts; #2336 also drops the same waitUntil registration there, so expect a trivial rebase overlap (the resolution is identical — drop the registration, keep the await).

…lete
The suspension handler registered the step_created / wait_created event
writes on a detached waitUntil(Promise.all(ops)) in addition to awaiting
them. The detached copy framed those progress-critical writes as droppable
background work and re-threw send failures into a promise nothing consumes
(unhandled rejection -> process exit 128). It now strictly awaits the writes
only, preserving the ack-ordering invariant: the orchestrator message is not
acked until the writes (and the dispatch sends the caller makes afterward)
complete, so a crash before then leaves the message un-acked for VQS to
redeliver instead of orphaning the step.
Adds runtime.test.ts ack-ordering tests: the dispatch send must complete
before ack, a hanging send must not ack, and a failing send must reject the
handler (no ack) without rejecting any waitUntil promise.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@pranaygp
pranaygp requested a review from a team as a code ownerJune 11, 2026 06:10
CopilotAI review requested due to automatic review settings June 11, 2026 06:10
@changeset-bot

changeset-botBot commented Jun 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 07fd5f4

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

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

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercelBot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production126602191485
✅ 💻 Local Development167102191890
✅ 📦 Local Production167102191890
✅ 🐘 Local Postgres167102191890
✅ 🪟 Windows13500135
✅ 📋 Other7690176945
Total7183010528235

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro109026
✅ example109026
✅ express109026
✅ fastify109026
✅ hono109026
✅ nextjs-turbopack13302
✅ nextjs-webpack13302
✅ nitro109026
✅ nuxt109026
✅ sveltekit12807
✅ vite109026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack13500
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable110025
✅ e2e-local-dev-tanstack-start-110025
✅ e2e-local-postgres-nest-stable110025
✅ e2e-local-postgres-tanstack-start-110025
✅ e2e-local-prod-nest-stable110025
✅ e2e-local-prod-tanstack-start-110025
✅ e2e-vercel-prod-tanstack-start109026

📋 View full workflow run

@github-actions

github-actionsBot commented Jun 11, 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.042s (-1.2%)1.007s (~)0.964s101.00x
💻 LocalExpress0.044s (+1.9%)1.006s (~)0.962s101.04x
💻 LocalNext.js (Turbopack)0.060s (+9.6% 🔺)1.006s (~)0.946s101.43x
🐘 PostgresNitro0.064s (~)1.012s (~)0.949s101.50x
🐘 PostgresNext.js (Turbopack)0.070s (-0.7%)1.013s (~)0.944s101.64x
🐘 PostgresExpress0.125s (+88.5% 🔺)1.054s (+3.9%)0.929s102.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.281s (+7.7% 🔺)2.724s (+11.8% 🔺)2.442s101.00x
▲ VercelNext.js (Turbopack)0.287s (-12.9% 🟢)2.246s (-4.1%)1.960s101.02x
▲ VercelExpress0.311s (+14.3% 🔺)2.400s (-11.5% 🟢)2.089s101.11x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.093s (~)2.006s (~)0.913s101.00x
💻 LocalExpress1.101s (~)2.006s (~)0.905s101.01x
🐘 PostgresNitro1.102s (-1.1%)2.010s (~)0.908s101.01x
💻 LocalNext.js (Turbopack)1.135s (+2.4%)2.007s (~)0.871s101.04x
🐘 PostgresNext.js (Turbopack)1.161s (+1.7%)2.011s (~)0.850s101.06x
🐘 PostgresExpress1.262s (+15.6% 🔺)2.092s (+4.0%)0.829s101.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.820s (+9.3% 🔺)3.699s (-9.3% 🟢)1.879s101.00x
▲ VercelExpress1.833s (+15.7% 🔺)3.828s (+7.2% 🔺)1.996s101.01x
▲ VercelNitro1.973s (+26.0% 🔺)4.298s (+21.8% 🔺)2.324s101.08x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.512s (~)11.021s (~)0.509s31.00x
🐘 PostgresNitro10.542s (~)11.020s (~)0.478s31.00x
💻 LocalExpress10.552s (~)11.023s (~)0.471s31.00x
💻 LocalNext.js (Turbopack)10.768s (+1.5%)11.022s (~)0.254s31.02x
🐘 PostgresExpress10.855s (+1.3%)11.423s (+0.6%)0.568s31.03x
🐘 PostgresNext.js (Turbopack)10.855s (~)11.020s (~)0.164s31.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)14.575s (+8.0% 🔺)16.665s (+3.5%)2.090s21.00x
▲ VercelExpress14.855s (+12.9% 🔺)16.492s (+6.7% 🔺)1.636s21.02x
▲ VercelNitro16.093s (+20.8% 🔺)18.277s (+17.2% 🔺)2.183s21.10x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro13.716s (~)14.027s (~)0.310s51.00x
🐘 PostgresNitro13.733s (-0.8%)14.020s (~)0.287s51.00x
💻 LocalExpress13.795s (-0.8%)14.027s (-1.4%)0.232s51.01x
💻 LocalNext.js (Turbopack)14.382s (+2.5%)15.031s (+2.8%)0.648s41.05x
🐘 PostgresExpress14.472s (+4.6%)15.021s (+5.5% 🔺)0.548s41.06x
🐘 PostgresNext.js (Turbopack)14.794s (+1.4%)15.270s (+1.7%)0.476s41.08x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro23.738s (-7.0% 🟢)27.387s (-0.8%)3.649s31.00x
▲ VercelExpress24.834s (-2.5%)26.672s (-2.1%)1.838s31.05x
▲ VercelNext.js (Turbopack)25.661s (+0.6%)27.005s (-0.7%)1.344s31.08x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro12.399s (~)13.024s (~)0.625s71.00x
🐘 PostgresNitro12.525s (-1.7%)13.018s (~)0.493s71.01x
💻 LocalExpress12.531s (-0.5%)13.025s (~)0.494s71.01x
💻 LocalNext.js (Turbopack)13.663s (+5.5% 🔺)14.027s (+5.4% 🔺)0.364s71.10x
🐘 PostgresNext.js (Turbopack)13.733s (~)14.019s (~)0.286s71.11x
🐘 PostgresExpress13.775s (+8.2% 🔺)14.307s (+7.5% 🔺)0.532s71.11x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express29.132s (-9.1% 🟢)31.079s (-9.2% 🟢)1.947s31.00x
▲ VercelNitro30.472s (+4.9%)33.068s (+5.3% 🔺)2.597s31.05x
▲ VercelNext.js (Turbopack)31.623s (+6.8% 🔺)32.793s (+2.9%)1.170s31.09x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.179s (-1.7%)2.007s (~)0.828s151.00x
💻 LocalNitro1.186s (-2.3%)2.007s (~)0.821s151.01x
🐘 PostgresNext.js (Turbopack)1.259s (+0.6%)2.007s (~)0.748s151.07x
💻 LocalNext.js (Turbopack)1.320s (+7.9% 🔺)2.006s (~)0.686s151.12x
💻 LocalExpress1.340s (+6.1% 🔺)2.007s (~)0.667s151.14x
🐘 PostgresExpress1.408s (+17.4% 🔺)2.018s (~)0.610s151.19x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.510s (-9.4% 🟢)4.773s (+10.0% 🔺)2.263s71.00x
▲ VercelNext.js (Turbopack)2.679s (~)4.255s (+0.9%)1.576s81.07x
▲ VercelExpress2.800s (+1.1%)4.533s (-4.0%)1.734s71.12x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.252s (-0.6%)2.008s (~)0.756s151.00x
🐘 PostgresNext.js (Turbopack)1.394s (-1.1%)2.008s (~)0.614s151.11x
🐘 PostgresExpress1.615s (+21.8% 🔺)2.410s (+19.5% 🔺)0.795s131.29x
💻 LocalNitro1.771s (+3.9%)2.006s (-3.2%)0.234s151.42x
💻 LocalNext.js (Turbopack)1.864s (+8.0% 🔺)2.150s (+7.2% 🔺)0.286s141.49x
💻 LocalExpress1.920s (+2.0%)2.294s (+3.3%)0.374s141.53x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.601s (-11.8% 🟢)5.376s (-12.9% 🟢)1.775s61.00x
▲ VercelNext.js (Turbopack)3.895s (-5.2% 🟢)5.557s (-9.5% 🟢)1.663s61.08x
▲ VercelNitro3.909s (-4.0%)5.743s (-7.5% 🟢)1.834s61.09x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.402s (~)2.009s (~)0.607s151.00x
🐘 PostgresNext.js (Turbopack)1.753s (~)2.075s (-9.6% 🟢)0.322s151.25x
🐘 PostgresExpress2.096s (+50.4% 🔺)3.371s (+67.7% 🔺)1.274s91.50x
💻 LocalNitro4.863s (+3.1%)5.347s (+6.7% 🔺)0.484s63.47x
💻 LocalExpress5.361s (+1.2%)5.846s (-2.8%)0.485s63.82x
💻 LocalNext.js (Turbopack)5.901s (+34.2% 🔺)6.214s (+24.0% 🔺)0.313s54.21x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.264s (-21.9% 🟢)8.049s (-7.6% 🟢)2.785s41.00x
▲ VercelExpress6.176s (+4.6%)7.914s (~)1.739s41.17x
▲ VercelNext.js (Turbopack)6.496s (+10.6% 🔺)8.160s (+4.9%)1.664s41.23x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.195s (~)2.009s (~)0.814s151.00x
🐘 PostgresNext.js (Turbopack)1.258s (-0.6%)2.008s (~)0.750s151.05x
💻 LocalNext.js (Turbopack)1.375s (+5.3% 🔺)2.007s (~)0.632s151.15x
🐘 PostgresExpress1.533s (+27.5% 🔺)2.116s (+5.4% 🔺)0.583s151.28x
💻 LocalNitro1.577s (+2.2%)2.006s (~)0.429s151.32x
💻 LocalExpress1.582s (-4.5%)2.007s (-3.2%)0.424s151.32x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.457s (-8.1% 🟢)4.342s (~)1.886s71.00x
▲ VercelExpress2.756s (+7.4% 🔺)4.461s (+6.3% 🔺)1.705s71.12x
▲ VercelNext.js (Turbopack)2.913s (-33.4% 🟢)4.470s (-29.0% 🟢)1.557s71.19x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.261s (-1.1%)2.008s (~)0.748s151.00x
🐘 PostgresNext.js (Turbopack)1.399s (~)2.008s (~)0.609s151.11x
🐘 PostgresExpress1.783s (+43.4% 🔺)2.592s (+28.8% 🔺)0.809s121.41x
💻 LocalNext.js (Turbopack)2.031s (+0.5%)2.591s (+3.4%)0.560s121.61x
💻 LocalNitro2.054s (+16.9% 🔺)2.591s (+25.0% 🔺)0.537s121.63x
💻 LocalExpress2.170s (+2.1%)2.592s (~)0.422s121.72x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.771s (-16.6% 🟢)5.273s (-14.5% 🟢)1.502s61.00x
▲ VercelExpress3.779s (+2.8%)5.293s (-5.7% 🟢)1.514s61.00x
▲ VercelNitro3.919s (-4.3%)5.803s (-3.3%)1.884s61.04x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.420s (-2.9%)2.009s (~)0.589s151.00x
🐘 PostgresExpress1.529s (+1.9%)2.494s (+4.0%)0.965s131.08x
🐘 PostgresNext.js (Turbopack)1.710s (+3.3%)2.396s (+15.5% 🔺)0.686s131.20x
💻 LocalNitro5.589s (+17.8% 🔺)6.179s (+15.6% 🔺)0.590s63.94x
💻 LocalExpress5.770s (-1.6%)6.218s (~)0.448s54.06x
💻 LocalNext.js (Turbopack)6.049s (+17.2% 🔺)6.417s (+6.6% 🔺)0.369s54.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.371s (+9.0% 🔺)7.241s (+7.5% 🔺)1.870s51.00x
▲ VercelExpress5.651s (+11.4% 🔺)7.590s (+14.5% 🔺)1.939s41.05x
▲ VercelNext.js (Turbopack)6.282s (+8.5% 🔺)7.842s (+3.5%)1.560s41.17x

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

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.580s (-4.8%)1.024s (+1.6%)0.444s591.00x
💻 LocalNitro0.595s (-26.1% 🟢)1.005s (-16.6% 🟢)0.410s601.03x
💻 LocalExpress0.640s (-2.4%)1.040s (~)0.400s581.10x
🐘 PostgresExpress0.687s (+3.0%)1.113s (+6.2% 🔺)0.426s541.19x
🐘 PostgresNext.js (Turbopack)0.811s (~)1.006s (~)0.196s601.40x
💻 LocalNext.js (Turbopack)0.872s (+25.3% 🔺)1.005s (~)0.132s601.50x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.418s (-27.4% 🟢)7.331s (-23.0% 🟢)1.912s91.00x
▲ VercelExpress5.616s (+2.1%)7.496s (+5.4% 🔺)1.880s91.04x
▲ VercelNext.js (Turbopack)6.210s (+23.0% 🔺)8.016s (+17.0% 🔺)1.806s81.15x

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

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.340s (-5.4% 🟢)2.008s (~)0.668s451.00x
💻 LocalNitro1.510s (+3.2%)2.006s (~)0.496s451.13x
💻 LocalExpress1.591s (~)2.029s (~)0.438s451.19x
🐘 PostgresExpress1.857s (+20.8% 🔺)2.468s (+14.7% 🔺)0.612s381.39x
🐘 PostgresNext.js (Turbopack)1.976s (+1.7%)2.175s (~)0.199s421.48x
💻 LocalNext.js (Turbopack)2.089s (+20.8% 🔺)3.009s (+48.4% 🔺)0.920s301.56x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro12.352s (-6.6% 🟢)14.557s (-6.0% 🟢)2.205s71.00x
▲ VercelExpress12.448s (-24.0% 🟢)14.495s (-20.9% 🟢)2.048s71.01x
▲ VercelNext.js (Turbopack)13.582s (-8.1% 🟢)15.436s (-8.8% 🟢)1.853s61.10x

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

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.652s (-9.0% 🟢)3.086s (-5.9% 🟢)0.434s391.00x
🐘 PostgresExpress3.102s (+6.5% 🔺)3.575s (+1.0%)0.473s341.17x
💻 LocalNitro3.279s (+2.3%)4.010s (~)0.731s301.24x
💻 LocalExpress3.368s (-1.5%)4.010s (~)0.642s301.27x
🐘 PostgresNext.js (Turbopack)3.863s (~)4.148s (+1.8%)0.285s291.46x
💻 LocalNext.js (Turbopack)4.305s (+15.5% 🔺)5.011s (+21.9% 🔺)0.705s241.62x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express25.530s (-11.5% 🟢)27.480s (-11.1% 🟢)1.950s51.00x
▲ VercelNitro26.148s (-12.2% 🟢)28.275s (-11.6% 🟢)2.128s51.02x
▲ VercelNext.js (Turbopack)28.133s (+4.2%)29.722s (+1.6%)1.589s51.10x

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

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.216s (-8.4% 🟢)1.006s (~)0.790s601.00x
🐘 PostgresExpress0.239s (-5.1% 🟢)1.008s (~)0.769s601.11x
🐘 PostgresNext.js (Turbopack)0.264s (-6.5% 🟢)1.006s (~)0.743s601.22x
💻 LocalNitro0.421s (-0.9%)1.005s (~)0.584s601.95x
💻 LocalExpress0.444s (-4.5%)1.005s (~)0.561s602.06x
💻 LocalNext.js (Turbopack)0.561s (-8.2% 🟢)1.005s (-3.3%)0.444s602.60x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.371s (+7.2% 🔺)4.155s (+1.4%)1.784s151.00x
▲ VercelNext.js (Turbopack)2.653s (+20.6% 🔺)4.408s (+4.4%)1.755s141.12x
▲ VercelNitro3.840s (+63.8% 🔺)6.061s (+39.9% 🔺)2.222s101.62x

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

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.347s (-6.4% 🟢)1.007s (~)0.660s901.00x
🐘 PostgresNext.js (Turbopack)0.468s (-3.0%)1.006s (~)0.538s901.35x
🐘 PostgresExpress0.623s (+83.9% 🔺)1.176s (+16.7% 🔺)0.552s771.80x
💻 LocalNitro2.111s (+2.3%)2.637s (~)0.526s356.08x
💻 LocalExpress2.146s (-2.1%)2.797s (-0.9%)0.651s336.18x
💻 LocalNext.js (Turbopack)2.394s (-2.3%)3.113s (~)0.720s296.90x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.157s (-88.2% 🟢)7.065s (-84.6% 🟢)1.908s131.00x
▲ VercelExpress5.318s (-87.7% 🟢)7.335s (-83.8% 🟢)2.017s131.03x
▲ VercelNext.js (Turbopack)5.576s (-11.1% 🟢)7.259s (-14.6% 🟢)1.683s131.08x

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

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.651s (-7.9% 🟢)1.006s (~)0.355s1201.00x
🐘 PostgresNext.js (Turbopack)0.940s (-4.0%)1.371s (-14.7% 🟢)0.431s881.44x
🐘 PostgresExpress1.064s (+70.0% 🔺)1.568s (+48.7% 🔺)0.504s771.63x
💻 LocalNitro9.624s (+10.5% 🔺)10.197s (+9.3% 🔺)0.572s1214.78x
💻 LocalExpress10.242s (-0.7%)10.696s (-1.6%)0.455s1215.73x
💻 LocalNext.js (Turbopack)10.590s (+2.7%)11.394s (+0.8%)0.804s1116.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.861s (-91.3% 🟢)15.465s (-90.5% 🟢)1.605s81.00x
▲ VercelNitro15.439s (-95.0% 🟢)17.739s (-94.3% 🟢)2.299s71.11x
▲ VercelExpress16.562s (+8.6% 🔺)18.445s (+5.5% 🔺)1.883s71.19x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.158s (-1.9%)2.001s (~)0.001s (-7.1% 🟢)2.011s (~)0.853s101.00x
💻 LocalNitro1.163s (+1.1%)2.005s (~)0.012s (+19.0% 🔺)2.019s (~)0.856s101.00x
💻 LocalExpress1.168s (~)2.006s (~)0.012s (-5.5% 🟢)2.020s (~)0.852s101.01x
💻 LocalNext.js (Turbopack)1.203s (+3.0%)2.004s (~)0.013s (+24.8% 🔺)2.020s (~)0.817s101.04x
🐘 PostgresNext.js (Turbopack)1.240s (~)2.001s (~)0.001s (-33.3% 🟢)2.010s (~)0.771s101.07x
🐘 PostgresExpress1.325s (+11.0% 🔺)1.985s (-0.8%)0.059s (+72.3% 🔺)2.105s (+3.0%)0.779s101.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.198s (-2.0%)3.164s (-10.9% 🟢)1.002s (-91.9% 🟢)4.538s (-72.5% 🟢)2.340s101.00x
▲ VercelExpress2.230s (+4.0%)3.256s (-4.5%)0.822s (+56.4% 🔺)4.538s (+2.1%)2.308s101.01x
▲ VercelNitro2.305s (+6.5% 🔺)3.514s (+2.8%)0.722s (+39.9% 🔺)4.840s (+8.3% 🔺)2.536s101.05x

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

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.580s (-5.0%)2.001s (~)0.005s (+37.6% 🔺)2.027s (~)0.447s301.00x
💻 LocalNitro1.586s (-9.0% 🟢)2.011s (~)0.013s (+38.4% 🔺)2.025s (-7.9% 🟢)0.439s301.00x
💻 LocalExpress1.611s (-1.6%)2.012s (~)0.013s (+17.5% 🔺)2.027s (~)0.416s301.02x
🐘 PostgresNext.js (Turbopack)1.722s (-2.4%)2.009s (~)0.005s (+33.9% 🔺)2.027s (~)0.305s301.09x
💻 LocalNext.js (Turbopack)1.723s (+5.0% 🔺)2.010s (~)0.013s (+33.3% 🔺)2.026s (~)0.303s301.09x
🐘 PostgresExpress2.073s (+19.3% 🔺)2.501s (+16.7% 🔺)0.004s (+39.6% 🔺)2.553s (+18.2% 🔺)0.479s241.31x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.803s (+0.8%)6.817s (-8.3% 🟢)0.235s (-33.7% 🟢)7.461s (-11.2% 🟢)1.659s91.00x
▲ VercelNitro5.905s (+2.8%)7.730s (+1.7%)0.222s (-34.4% 🟢)8.452s (~)2.548s81.02x
▲ VercelNext.js (Turbopack)5.965s (-6.4% 🟢)7.035s (-11.4% 🟢)0.234s (-35.2% 🟢)7.715s (-13.0% 🟢)1.749s81.03x

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

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.706s (-2.4%)1.013s (-1.8%)0.000s (-100.0% 🟢)1.025s (-2.2%)0.320s591.00x
🐘 PostgresNext.js (Turbopack)0.807s (-3.1%)1.035s (-3.4%)0.000s (-3.4%)1.042s (-3.5%)0.235s581.14x
🐘 PostgresExpress1.322s (+35.2% 🔺)1.661s (+16.3% 🔺)0.000s (-100.0% 🟢)1.692s (+16.8% 🔺)0.370s361.87x
💻 LocalNitro1.370s (+1.3%)2.013s (~)0.000s (-53.3% 🟢)2.015s (~)0.645s301.94x
💻 LocalExpress1.438s (-3.0%)2.013s (~)0.000s (-46.7% 🟢)2.015s (~)0.577s302.04x
💻 LocalNext.js (Turbopack)1.485s (+2.6%)2.013s (~)0.000s (+75.0% 🔺)2.017s (~)0.532s302.10x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.237s (-20.3% 🟢)4.574s (-14.3% 🟢)0.000s (-95.1% 🟢)5.153s (-16.5% 🟢)1.916s121.00x
▲ VercelNext.js (Turbopack)3.305s (~)4.605s (-5.9% 🟢)0.000s (NaN%)5.009s (-8.3% 🟢)1.704s121.02x
▲ VercelNitro3.342s (-7.2% 🟢)5.136s (+1.3%)0.001s (+Infinity% 🔺)5.650s (~)2.308s111.03x

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

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.395s (-1.1%)2.065s (+3.4%)0.000s (NaN%)2.081s (+3.4%)0.686s291.00x
🐘 PostgresNext.js (Turbopack)1.694s (-1.9%)2.225s (-1.6%)0.000s (+Infinity% 🔺)2.249s (-0.9%)0.554s271.21x
💻 LocalNext.js (Turbopack)2.800s (-12.9% 🟢)3.360s (-13.8% 🟢)0.001s (+202.2% 🔺)3.364s (-13.7% 🟢)0.564s182.01x
💻 LocalNitro3.048s (-2.2%)3.774s (-3.1%)0.001s (+225.0% 🔺)3.779s (-3.1%)0.731s162.18x
💻 LocalExpress3.267s (-2.0%)3.895s (+1.5%)0.001s (+50.0% 🔺)3.906s (+1.6%)0.639s162.34x
🐘 PostgresExpress3.436s (+112.8% 🔺)3.945s (+75.1% 🔺)0.000s (NaN%)3.985s (+74.8% 🔺)0.549s162.46x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.809s (-23.9% 🟢)5.989s (-21.5% 🟢)0.000s (-100.0% 🟢)6.430s (-21.4% 🟢)1.622s101.00x
▲ VercelNitro4.836s (-31.3% 🟢)6.013s (-29.8% 🟢)0.000s (NaN%)6.783s (-25.4% 🟢)1.947s91.01x
▲ VercelNext.js (Turbopack)5.061s (-2.0%)6.498s (-2.7%)0.000s (-100.0% 🟢)6.933s (-3.7%)1.872s91.05x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro18/21
🐘 PostgresNitro21/21
▲ VercelNitro9/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local11/21
Next.js (Turbopack)🐘 Postgres15/21
Nitro🐘 Postgres16/21
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)
  • 🌐 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)

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR enforces a crash-safety invariant in the core runtime: the orchestrator’s queue message must not be acked until all progress-critical work is durably complete (notably step_created / wait_created event writes), so redelivery/replay can safely recover from crashes without orphaning steps.

Changes:

  • handleSuspension() no longer registers progress-critical event writes on a detached waitUntil(Promise.all(...)); it strictly awaits them.
  • Adds a new workflowEntrypoint step-dispatch ack ordering test suite to ensure step-dispatch sends complete (or fail/hang) before the handler resolves (ack).
  • Adds a changeset documenting the behavioral fix for @workflow/core.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

FileDescription
packages/core/src/runtime/suspension-handler.tsRemoves detached waitUntil usage for progress-gating event writes; keeps strict await to preserve ack ordering.
packages/core/src/runtime.test.tsAdds ack-ordering regression tests around step dispatch and waitUntil behavior.
.changeset/ack-after-step-dispatch.mdDocuments the patch-level behavioral fix and rationale.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +636 to +638
}) {
const workflowRun = await makeRunningRun(opts.runId);
const order: string[] = [];

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Done — waitUntilPromises.length = 0 now runs at the start of driveHandler(), so the rejection check only ever observes promises that invocation registered (robust against reordering/.only, not just the per-test afterEach). Fixed in 8d28013.

Comment on lines 21 to 25
vi.mock('@vercel/functions', () => ({
waitUntil: vi.fn(),
waitUntil: vi.fn((p: Promise<unknown>) => {
waitUntilPromises.push(p);
}),
}));

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Good catch. The mock now attaches a no-op .catch() to each promise the instant it's recorded, while still pushing the original promise into waitUntilPromises for later allSettled inspection — so a rejection can never surface as a real unhandled rejection in the test process before anyWaitUntilPromiseRejected() runs. Fixed in 8d28013.

'@workflow/core': patch
---

Never ack the orchestrator's queue message before the events that make the run progress are durably written. The suspension handler used to register the `step_created` / `wait_created` writes on a detached `waitUntil(Promise.all(ops))` in addition to awaiting them; the detached copy framed those progress-critical writes as droppable background work and re-threw send failures into a promise nothing consumes (unhandled rejection → process exit 128). It now strictly awaits the writes only, so the orchestrator message is never acked until they complete — a crash before then leaves the message un-acked and VQS redelivers within the lease, re-creating the (idempotent) entities and re-dispatching instead of orphaning the step. Complements the crash fix in #2336.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

too verbose. match the format/terseness of other changesets

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Trimmed to match the sibling changesets (now ~4 lines, in line with abort-e2e-flakes.md etc). Fixed in 8d28013.

- Trim the changeset to match the terseness of sibling changesets.
- Attach a no-op .catch() to each promise the waitUntil mock records so a
rejecting promise can never surface as a real unhandled rejection in the
test process; keep the original promise for allSettled inspection.
- Reset waitUntilPromises at the start of driveHandler() so the rejection
check only observes this invocation's promises (robust to reordering/.only).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@VaguelySeriousVaguelySerious changed the title [core] Never ack orchestrator message before step dispatch sends complete[core] Fix unhandled rejection when step_created/wait_created calls fail in waitUntilJun 11, 2026
@VaguelySeriousVaguelySerious changed the title [core] Fix unhandled rejection when step_created/wait_created calls fail in waitUntil[core] Remove duplicate waitUntil for suspension handler async operationsJun 11, 2026
@VaguelySerious
VaguelySerious merged commit bf44d4d into mainJun 11, 2026
187 of 193 checks passed
@VaguelySerious
VaguelySerious deleted the fix/ack-after-step-enqueue branch June 11, 2026 08:36
@github-actionsgithub-actionsBot mentioned this pull request Jun 11, 2026
github-actionsBot added a commit that referenced this pull request Jun 11, 2026
…ations (#2345)
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Pranay Prakash <pranay.gp@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

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

VaguelySerious added a commit that referenced this pull request Jun 11, 2026
…ations (#2345) (#2353)
Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
@github-actionsgithub-actionsBot mentioned this pull request Jun 11, 2026
pranaygp added a commit that referenced this pull request Jun 11, 2026
…hook-ready
* origin-https/main: (119 commits)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
Patch vulnerable package dependencies (#2301)
Deprecate DurableAgent and update it with WorkflowAgent in v5 docs (#2285)
[codex] Fix partial world-local exclusive writes (#2296)
...
# Conflicts:
#	packages/core/src/runtime.ts
#	packages/core/src/runtime/suspension-handler.ts
pranaygp added a commit that referenced this pull request Jun 11, 2026
…t-race-eager-wait
* origin/main:
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
pranaygp added a commit that referenced this pull request Jun 11, 2026
…docs-run-idempotency
* origin-https/main: (115 commits)
[core] V2: unify wait+step queue dispatch in suspension processing (#1925)
fix(world-local,world-postgres): make duplicate hook_created idempotent (#2295)
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
...
# Conflicts:
#	docs/content/docs/v4/cookbook/advanced/child-workflows.mdx
#	docs/content/docs/v5/cookbook/advanced/child-workflows.mdx
#	docs/content/docs/v5/cookbook/agent-patterns/durable-agent.mdx
pranaygp added a commit that referenced this pull request Jun 11, 2026
* origin/main:
[core] V2: unify wait+step queue dispatch in suspension processing (#1925)
fix(world-local,world-postgres): make duplicate hook_created idempotent (#2295)
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
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.

3 participants

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

[core] Remove duplicate waitUntil for suspension handler async operations - #2345

Merged
VaguelySerious merged 3 commits into
mainfrom
fix/ack-after-step-enqueue
Jun 11, 2026
Merged

[core] Remove duplicate waitUntil for suspension handler async operations#2345
VaguelySerious merged 3 commits into
mainfrom
fix/ack-after-step-enqueue

Conversation

@pranaygp

@pranaygppranaygp commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Peter: Ignore all the below, this PR is smaller in scope than it leads on. Read the code, it's a few lines.


The invariant

Never ack the orchestrator's queue message until all work that makes the run progress is durably complete — including creating AND enqueueing subsequent steps. Queue sends are idempotent (idempotency keys), so a crash before ack yields a redelivery → replay → safe re-send, recovering within the VQS ~300s lease instead of orphaning the step. The codebase already states this principle for timeout re-enqueues (packages/world-vercel/src/queue.ts: "Send new message BEFORE acknowledging current message. This ensures crash safety…"); this PR makes it hold for the suspension-handler's progress-critical event writes.

Production evidence

Run wrun_01KTSMXMKD7C544YFHX0GNPEG1 (prod, codeReviewWorkflowV2, dpl dpl_F4kcruzPhU3EY6Mbo3vqvEPAvRYM, 2026-06-10): the deployment was crash-looping with exit-128 (unhandled-rejection; fix in open PR #2336). step_created committed at 21:03:32.611; VQS shows zero step-queue [SEND]s for the run for 4h35m (the dispatch never happened); no lease redeliveries fired in the gap — the orchestrator message chain had concluded (= acked). A PR webhook at 01:38:40 finally re-drove the orchestrator, which rediscovered and dispatched the step in ~1s. ~130 warnings/day across 89 runs on one team share the signature, with orphan windows up to ~24h.

What changed

packages/core/src/runtime/suspension-handler.ts previously registered the step_created / wait_created event writes (ops) on a detached waitUntil(Promise.all(ops))in addition to awaiting them on the next line. The detached copy:

  1. framed those progress-critical writes as droppable background work the platform may discard after the response/ack, and
  2. re-threw send failures into a promise nothing consumes → unhandled rejection → process exit 128.

The fix removes the detached waitUntil registration and keeps only the strict await Promise.all(ops). On this branch the step-dispatch queueMessage sends already live in runtime.ts (workflowEntrypoint) and are awaited there before the handler returns; this change ensures the step_created events those dispatches depend on are likewise strictly awaited, so the whole progress-critical chain completes before the queue handler acks the orchestrator message.

What stayed background (and why)

The waitUntil(Promise.all(ops)) registrations in step-handler.ts, start.ts, and resume-hook.ts were not touched: their ops are stream-flush writes (not progress-gating), have no awaited copy, and legitimately need waitUntil to keep the function alive. The orchestrator re-trigger / step-continuation queueMessage sends in those files are already awaited. PR #2336 hardens those background sites with a safeWaitUntil helper.

Test coverage

Adds an ack ordering suite to packages/core/src/runtime.test.ts driving the real workflowEntrypoint against a workflow that suspends on a step + sleep (so the step is queued, not run inline):

  • the step-dispatch queue() send completes before the ack sentinel (and step_created precedes the dispatch);
  • a hanging dispatch send keeps the handler from resolving (no ack);
  • a failing dispatch send rejects the handler (no ack → VQS redelivers) without rejecting any promise handed to waitUntil.

Relationship to #2336

Orthogonal and complementary. #2336 stops the crash class (rejected waitUntil promises → exit 128) so the queue can re-drive normally. This PR guarantees crash recovery via redelivery regardless of why the process crashed by enforcing the ack-ordering invariant. Both edit suspension-handler.ts; #2336 also drops the same waitUntil registration there, so expect a trivial rebase overlap (the resolution is identical — drop the registration, keep the await).

…lete
The suspension handler registered the step_created / wait_created event
writes on a detached waitUntil(Promise.all(ops)) in addition to awaiting
them. The detached copy framed those progress-critical writes as droppable
background work and re-threw send failures into a promise nothing consumes
(unhandled rejection -> process exit 128). It now strictly awaits the writes
only, preserving the ack-ordering invariant: the orchestrator message is not
acked until the writes (and the dispatch sends the caller makes afterward)
complete, so a crash before then leaves the message un-acked for VQS to
redeliver instead of orphaning the step.
Adds runtime.test.ts ack-ordering tests: the dispatch send must complete
before ack, a hanging send must not ack, and a failing send must reject the
handler (no ack) without rejecting any waitUntil promise.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@pranaygp
pranaygp requested a review from a team as a code ownerJune 11, 2026 06:10
CopilotAI review requested due to automatic review settings June 11, 2026 06:10
@changeset-bot

changeset-botBot commented Jun 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 07fd5f4

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

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

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercelBot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production126602191485
✅ 💻 Local Development167102191890
✅ 📦 Local Production167102191890
✅ 🐘 Local Postgres167102191890
✅ 🪟 Windows13500135
✅ 📋 Other7690176945
Total7183010528235

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro109026
✅ example109026
✅ express109026
✅ fastify109026
✅ hono109026
✅ nextjs-turbopack13302
✅ nextjs-webpack13302
✅ nitro109026
✅ nuxt109026
✅ sveltekit12807
✅ vite109026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack13500
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable110025
✅ e2e-local-dev-tanstack-start-110025
✅ e2e-local-postgres-nest-stable110025
✅ e2e-local-postgres-tanstack-start-110025
✅ e2e-local-prod-nest-stable110025
✅ e2e-local-prod-tanstack-start-110025
✅ e2e-vercel-prod-tanstack-start109026

📋 View full workflow run

@github-actions

github-actionsBot commented Jun 11, 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.042s (-1.2%)1.007s (~)0.964s101.00x
💻 LocalExpress0.044s (+1.9%)1.006s (~)0.962s101.04x
💻 LocalNext.js (Turbopack)0.060s (+9.6% 🔺)1.006s (~)0.946s101.43x
🐘 PostgresNitro0.064s (~)1.012s (~)0.949s101.50x
🐘 PostgresNext.js (Turbopack)0.070s (-0.7%)1.013s (~)0.944s101.64x
🐘 PostgresExpress0.125s (+88.5% 🔺)1.054s (+3.9%)0.929s102.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.281s (+7.7% 🔺)2.724s (+11.8% 🔺)2.442s101.00x
▲ VercelNext.js (Turbopack)0.287s (-12.9% 🟢)2.246s (-4.1%)1.960s101.02x
▲ VercelExpress0.311s (+14.3% 🔺)2.400s (-11.5% 🟢)2.089s101.11x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.093s (~)2.006s (~)0.913s101.00x
💻 LocalExpress1.101s (~)2.006s (~)0.905s101.01x
🐘 PostgresNitro1.102s (-1.1%)2.010s (~)0.908s101.01x
💻 LocalNext.js (Turbopack)1.135s (+2.4%)2.007s (~)0.871s101.04x
🐘 PostgresNext.js (Turbopack)1.161s (+1.7%)2.011s (~)0.850s101.06x
🐘 PostgresExpress1.262s (+15.6% 🔺)2.092s (+4.0%)0.829s101.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.820s (+9.3% 🔺)3.699s (-9.3% 🟢)1.879s101.00x
▲ VercelExpress1.833s (+15.7% 🔺)3.828s (+7.2% 🔺)1.996s101.01x
▲ VercelNitro1.973s (+26.0% 🔺)4.298s (+21.8% 🔺)2.324s101.08x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.512s (~)11.021s (~)0.509s31.00x
🐘 PostgresNitro10.542s (~)11.020s (~)0.478s31.00x
💻 LocalExpress10.552s (~)11.023s (~)0.471s31.00x
💻 LocalNext.js (Turbopack)10.768s (+1.5%)11.022s (~)0.254s31.02x
🐘 PostgresExpress10.855s (+1.3%)11.423s (+0.6%)0.568s31.03x
🐘 PostgresNext.js (Turbopack)10.855s (~)11.020s (~)0.164s31.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)14.575s (+8.0% 🔺)16.665s (+3.5%)2.090s21.00x
▲ VercelExpress14.855s (+12.9% 🔺)16.492s (+6.7% 🔺)1.636s21.02x
▲ VercelNitro16.093s (+20.8% 🔺)18.277s (+17.2% 🔺)2.183s21.10x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro13.716s (~)14.027s (~)0.310s51.00x
🐘 PostgresNitro13.733s (-0.8%)14.020s (~)0.287s51.00x
💻 LocalExpress13.795s (-0.8%)14.027s (-1.4%)0.232s51.01x
💻 LocalNext.js (Turbopack)14.382s (+2.5%)15.031s (+2.8%)0.648s41.05x
🐘 PostgresExpress14.472s (+4.6%)15.021s (+5.5% 🔺)0.548s41.06x
🐘 PostgresNext.js (Turbopack)14.794s (+1.4%)15.270s (+1.7%)0.476s41.08x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro23.738s (-7.0% 🟢)27.387s (-0.8%)3.649s31.00x
▲ VercelExpress24.834s (-2.5%)26.672s (-2.1%)1.838s31.05x
▲ VercelNext.js (Turbopack)25.661s (+0.6%)27.005s (-0.7%)1.344s31.08x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro12.399s (~)13.024s (~)0.625s71.00x
🐘 PostgresNitro12.525s (-1.7%)13.018s (~)0.493s71.01x
💻 LocalExpress12.531s (-0.5%)13.025s (~)0.494s71.01x
💻 LocalNext.js (Turbopack)13.663s (+5.5% 🔺)14.027s (+5.4% 🔺)0.364s71.10x
🐘 PostgresNext.js (Turbopack)13.733s (~)14.019s (~)0.286s71.11x
🐘 PostgresExpress13.775s (+8.2% 🔺)14.307s (+7.5% 🔺)0.532s71.11x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express29.132s (-9.1% 🟢)31.079s (-9.2% 🟢)1.947s31.00x
▲ VercelNitro30.472s (+4.9%)33.068s (+5.3% 🔺)2.597s31.05x
▲ VercelNext.js (Turbopack)31.623s (+6.8% 🔺)32.793s (+2.9%)1.170s31.09x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.179s (-1.7%)2.007s (~)0.828s151.00x
💻 LocalNitro1.186s (-2.3%)2.007s (~)0.821s151.01x
🐘 PostgresNext.js (Turbopack)1.259s (+0.6%)2.007s (~)0.748s151.07x
💻 LocalNext.js (Turbopack)1.320s (+7.9% 🔺)2.006s (~)0.686s151.12x
💻 LocalExpress1.340s (+6.1% 🔺)2.007s (~)0.667s151.14x
🐘 PostgresExpress1.408s (+17.4% 🔺)2.018s (~)0.610s151.19x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.510s (-9.4% 🟢)4.773s (+10.0% 🔺)2.263s71.00x
▲ VercelNext.js (Turbopack)2.679s (~)4.255s (+0.9%)1.576s81.07x
▲ VercelExpress2.800s (+1.1%)4.533s (-4.0%)1.734s71.12x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.252s (-0.6%)2.008s (~)0.756s151.00x
🐘 PostgresNext.js (Turbopack)1.394s (-1.1%)2.008s (~)0.614s151.11x
🐘 PostgresExpress1.615s (+21.8% 🔺)2.410s (+19.5% 🔺)0.795s131.29x
💻 LocalNitro1.771s (+3.9%)2.006s (-3.2%)0.234s151.42x
💻 LocalNext.js (Turbopack)1.864s (+8.0% 🔺)2.150s (+7.2% 🔺)0.286s141.49x
💻 LocalExpress1.920s (+2.0%)2.294s (+3.3%)0.374s141.53x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.601s (-11.8% 🟢)5.376s (-12.9% 🟢)1.775s61.00x
▲ VercelNext.js (Turbopack)3.895s (-5.2% 🟢)5.557s (-9.5% 🟢)1.663s61.08x
▲ VercelNitro3.909s (-4.0%)5.743s (-7.5% 🟢)1.834s61.09x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.402s (~)2.009s (~)0.607s151.00x
🐘 PostgresNext.js (Turbopack)1.753s (~)2.075s (-9.6% 🟢)0.322s151.25x
🐘 PostgresExpress2.096s (+50.4% 🔺)3.371s (+67.7% 🔺)1.274s91.50x
💻 LocalNitro4.863s (+3.1%)5.347s (+6.7% 🔺)0.484s63.47x
💻 LocalExpress5.361s (+1.2%)5.846s (-2.8%)0.485s63.82x
💻 LocalNext.js (Turbopack)5.901s (+34.2% 🔺)6.214s (+24.0% 🔺)0.313s54.21x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.264s (-21.9% 🟢)8.049s (-7.6% 🟢)2.785s41.00x
▲ VercelExpress6.176s (+4.6%)7.914s (~)1.739s41.17x
▲ VercelNext.js (Turbopack)6.496s (+10.6% 🔺)8.160s (+4.9%)1.664s41.23x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.195s (~)2.009s (~)0.814s151.00x
🐘 PostgresNext.js (Turbopack)1.258s (-0.6%)2.008s (~)0.750s151.05x
💻 LocalNext.js (Turbopack)1.375s (+5.3% 🔺)2.007s (~)0.632s151.15x
🐘 PostgresExpress1.533s (+27.5% 🔺)2.116s (+5.4% 🔺)0.583s151.28x
💻 LocalNitro1.577s (+2.2%)2.006s (~)0.429s151.32x
💻 LocalExpress1.582s (-4.5%)2.007s (-3.2%)0.424s151.32x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.457s (-8.1% 🟢)4.342s (~)1.886s71.00x
▲ VercelExpress2.756s (+7.4% 🔺)4.461s (+6.3% 🔺)1.705s71.12x
▲ VercelNext.js (Turbopack)2.913s (-33.4% 🟢)4.470s (-29.0% 🟢)1.557s71.19x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.261s (-1.1%)2.008s (~)0.748s151.00x
🐘 PostgresNext.js (Turbopack)1.399s (~)2.008s (~)0.609s151.11x
🐘 PostgresExpress1.783s (+43.4% 🔺)2.592s (+28.8% 🔺)0.809s121.41x
💻 LocalNext.js (Turbopack)2.031s (+0.5%)2.591s (+3.4%)0.560s121.61x
💻 LocalNitro2.054s (+16.9% 🔺)2.591s (+25.0% 🔺)0.537s121.63x
💻 LocalExpress2.170s (+2.1%)2.592s (~)0.422s121.72x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.771s (-16.6% 🟢)5.273s (-14.5% 🟢)1.502s61.00x
▲ VercelExpress3.779s (+2.8%)5.293s (-5.7% 🟢)1.514s61.00x
▲ VercelNitro3.919s (-4.3%)5.803s (-3.3%)1.884s61.04x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.420s (-2.9%)2.009s (~)0.589s151.00x
🐘 PostgresExpress1.529s (+1.9%)2.494s (+4.0%)0.965s131.08x
🐘 PostgresNext.js (Turbopack)1.710s (+3.3%)2.396s (+15.5% 🔺)0.686s131.20x
💻 LocalNitro5.589s (+17.8% 🔺)6.179s (+15.6% 🔺)0.590s63.94x
💻 LocalExpress5.770s (-1.6%)6.218s (~)0.448s54.06x
💻 LocalNext.js (Turbopack)6.049s (+17.2% 🔺)6.417s (+6.6% 🔺)0.369s54.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.371s (+9.0% 🔺)7.241s (+7.5% 🔺)1.870s51.00x
▲ VercelExpress5.651s (+11.4% 🔺)7.590s (+14.5% 🔺)1.939s41.05x
▲ VercelNext.js (Turbopack)6.282s (+8.5% 🔺)7.842s (+3.5%)1.560s41.17x

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

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.580s (-4.8%)1.024s (+1.6%)0.444s591.00x
💻 LocalNitro0.595s (-26.1% 🟢)1.005s (-16.6% 🟢)0.410s601.03x
💻 LocalExpress0.640s (-2.4%)1.040s (~)0.400s581.10x
🐘 PostgresExpress0.687s (+3.0%)1.113s (+6.2% 🔺)0.426s541.19x
🐘 PostgresNext.js (Turbopack)0.811s (~)1.006s (~)0.196s601.40x
💻 LocalNext.js (Turbopack)0.872s (+25.3% 🔺)1.005s (~)0.132s601.50x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.418s (-27.4% 🟢)7.331s (-23.0% 🟢)1.912s91.00x
▲ VercelExpress5.616s (+2.1%)7.496s (+5.4% 🔺)1.880s91.04x
▲ VercelNext.js (Turbopack)6.210s (+23.0% 🔺)8.016s (+17.0% 🔺)1.806s81.15x

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

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.340s (-5.4% 🟢)2.008s (~)0.668s451.00x
💻 LocalNitro1.510s (+3.2%)2.006s (~)0.496s451.13x
💻 LocalExpress1.591s (~)2.029s (~)0.438s451.19x
🐘 PostgresExpress1.857s (+20.8% 🔺)2.468s (+14.7% 🔺)0.612s381.39x
🐘 PostgresNext.js (Turbopack)1.976s (+1.7%)2.175s (~)0.199s421.48x
💻 LocalNext.js (Turbopack)2.089s (+20.8% 🔺)3.009s (+48.4% 🔺)0.920s301.56x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro12.352s (-6.6% 🟢)14.557s (-6.0% 🟢)2.205s71.00x
▲ VercelExpress12.448s (-24.0% 🟢)14.495s (-20.9% 🟢)2.048s71.01x
▲ VercelNext.js (Turbopack)13.582s (-8.1% 🟢)15.436s (-8.8% 🟢)1.853s61.10x

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

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.652s (-9.0% 🟢)3.086s (-5.9% 🟢)0.434s391.00x
🐘 PostgresExpress3.102s (+6.5% 🔺)3.575s (+1.0%)0.473s341.17x
💻 LocalNitro3.279s (+2.3%)4.010s (~)0.731s301.24x
💻 LocalExpress3.368s (-1.5%)4.010s (~)0.642s301.27x
🐘 PostgresNext.js (Turbopack)3.863s (~)4.148s (+1.8%)0.285s291.46x
💻 LocalNext.js (Turbopack)4.305s (+15.5% 🔺)5.011s (+21.9% 🔺)0.705s241.62x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express25.530s (-11.5% 🟢)27.480s (-11.1% 🟢)1.950s51.00x
▲ VercelNitro26.148s (-12.2% 🟢)28.275s (-11.6% 🟢)2.128s51.02x
▲ VercelNext.js (Turbopack)28.133s (+4.2%)29.722s (+1.6%)1.589s51.10x

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

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.216s (-8.4% 🟢)1.006s (~)0.790s601.00x
🐘 PostgresExpress0.239s (-5.1% 🟢)1.008s (~)0.769s601.11x
🐘 PostgresNext.js (Turbopack)0.264s (-6.5% 🟢)1.006s (~)0.743s601.22x
💻 LocalNitro0.421s (-0.9%)1.005s (~)0.584s601.95x
💻 LocalExpress0.444s (-4.5%)1.005s (~)0.561s602.06x
💻 LocalNext.js (Turbopack)0.561s (-8.2% 🟢)1.005s (-3.3%)0.444s602.60x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.371s (+7.2% 🔺)4.155s (+1.4%)1.784s151.00x
▲ VercelNext.js (Turbopack)2.653s (+20.6% 🔺)4.408s (+4.4%)1.755s141.12x
▲ VercelNitro3.840s (+63.8% 🔺)6.061s (+39.9% 🔺)2.222s101.62x

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

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.347s (-6.4% 🟢)1.007s (~)0.660s901.00x
🐘 PostgresNext.js (Turbopack)0.468s (-3.0%)1.006s (~)0.538s901.35x
🐘 PostgresExpress0.623s (+83.9% 🔺)1.176s (+16.7% 🔺)0.552s771.80x
💻 LocalNitro2.111s (+2.3%)2.637s (~)0.526s356.08x
💻 LocalExpress2.146s (-2.1%)2.797s (-0.9%)0.651s336.18x
💻 LocalNext.js (Turbopack)2.394s (-2.3%)3.113s (~)0.720s296.90x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.157s (-88.2% 🟢)7.065s (-84.6% 🟢)1.908s131.00x
▲ VercelExpress5.318s (-87.7% 🟢)7.335s (-83.8% 🟢)2.017s131.03x
▲ VercelNext.js (Turbopack)5.576s (-11.1% 🟢)7.259s (-14.6% 🟢)1.683s131.08x

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

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.651s (-7.9% 🟢)1.006s (~)0.355s1201.00x
🐘 PostgresNext.js (Turbopack)0.940s (-4.0%)1.371s (-14.7% 🟢)0.431s881.44x
🐘 PostgresExpress1.064s (+70.0% 🔺)1.568s (+48.7% 🔺)0.504s771.63x
💻 LocalNitro9.624s (+10.5% 🔺)10.197s (+9.3% 🔺)0.572s1214.78x
💻 LocalExpress10.242s (-0.7%)10.696s (-1.6%)0.455s1215.73x
💻 LocalNext.js (Turbopack)10.590s (+2.7%)11.394s (+0.8%)0.804s1116.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.861s (-91.3% 🟢)15.465s (-90.5% 🟢)1.605s81.00x
▲ VercelNitro15.439s (-95.0% 🟢)17.739s (-94.3% 🟢)2.299s71.11x
▲ VercelExpress16.562s (+8.6% 🔺)18.445s (+5.5% 🔺)1.883s71.19x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.158s (-1.9%)2.001s (~)0.001s (-7.1% 🟢)2.011s (~)0.853s101.00x
💻 LocalNitro1.163s (+1.1%)2.005s (~)0.012s (+19.0% 🔺)2.019s (~)0.856s101.00x
💻 LocalExpress1.168s (~)2.006s (~)0.012s (-5.5% 🟢)2.020s (~)0.852s101.01x
💻 LocalNext.js (Turbopack)1.203s (+3.0%)2.004s (~)0.013s (+24.8% 🔺)2.020s (~)0.817s101.04x
🐘 PostgresNext.js (Turbopack)1.240s (~)2.001s (~)0.001s (-33.3% 🟢)2.010s (~)0.771s101.07x
🐘 PostgresExpress1.325s (+11.0% 🔺)1.985s (-0.8%)0.059s (+72.3% 🔺)2.105s (+3.0%)0.779s101.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.198s (-2.0%)3.164s (-10.9% 🟢)1.002s (-91.9% 🟢)4.538s (-72.5% 🟢)2.340s101.00x
▲ VercelExpress2.230s (+4.0%)3.256s (-4.5%)0.822s (+56.4% 🔺)4.538s (+2.1%)2.308s101.01x
▲ VercelNitro2.305s (+6.5% 🔺)3.514s (+2.8%)0.722s (+39.9% 🔺)4.840s (+8.3% 🔺)2.536s101.05x

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

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.580s (-5.0%)2.001s (~)0.005s (+37.6% 🔺)2.027s (~)0.447s301.00x
💻 LocalNitro1.586s (-9.0% 🟢)2.011s (~)0.013s (+38.4% 🔺)2.025s (-7.9% 🟢)0.439s301.00x
💻 LocalExpress1.611s (-1.6%)2.012s (~)0.013s (+17.5% 🔺)2.027s (~)0.416s301.02x
🐘 PostgresNext.js (Turbopack)1.722s (-2.4%)2.009s (~)0.005s (+33.9% 🔺)2.027s (~)0.305s301.09x
💻 LocalNext.js (Turbopack)1.723s (+5.0% 🔺)2.010s (~)0.013s (+33.3% 🔺)2.026s (~)0.303s301.09x
🐘 PostgresExpress2.073s (+19.3% 🔺)2.501s (+16.7% 🔺)0.004s (+39.6% 🔺)2.553s (+18.2% 🔺)0.479s241.31x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.803s (+0.8%)6.817s (-8.3% 🟢)0.235s (-33.7% 🟢)7.461s (-11.2% 🟢)1.659s91.00x
▲ VercelNitro5.905s (+2.8%)7.730s (+1.7%)0.222s (-34.4% 🟢)8.452s (~)2.548s81.02x
▲ VercelNext.js (Turbopack)5.965s (-6.4% 🟢)7.035s (-11.4% 🟢)0.234s (-35.2% 🟢)7.715s (-13.0% 🟢)1.749s81.03x

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

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.706s (-2.4%)1.013s (-1.8%)0.000s (-100.0% 🟢)1.025s (-2.2%)0.320s591.00x
🐘 PostgresNext.js (Turbopack)0.807s (-3.1%)1.035s (-3.4%)0.000s (-3.4%)1.042s (-3.5%)0.235s581.14x
🐘 PostgresExpress1.322s (+35.2% 🔺)1.661s (+16.3% 🔺)0.000s (-100.0% 🟢)1.692s (+16.8% 🔺)0.370s361.87x
💻 LocalNitro1.370s (+1.3%)2.013s (~)0.000s (-53.3% 🟢)2.015s (~)0.645s301.94x
💻 LocalExpress1.438s (-3.0%)2.013s (~)0.000s (-46.7% 🟢)2.015s (~)0.577s302.04x
💻 LocalNext.js (Turbopack)1.485s (+2.6%)2.013s (~)0.000s (+75.0% 🔺)2.017s (~)0.532s302.10x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.237s (-20.3% 🟢)4.574s (-14.3% 🟢)0.000s (-95.1% 🟢)5.153s (-16.5% 🟢)1.916s121.00x
▲ VercelNext.js (Turbopack)3.305s (~)4.605s (-5.9% 🟢)0.000s (NaN%)5.009s (-8.3% 🟢)1.704s121.02x
▲ VercelNitro3.342s (-7.2% 🟢)5.136s (+1.3%)0.001s (+Infinity% 🔺)5.650s (~)2.308s111.03x

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

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.395s (-1.1%)2.065s (+3.4%)0.000s (NaN%)2.081s (+3.4%)0.686s291.00x
🐘 PostgresNext.js (Turbopack)1.694s (-1.9%)2.225s (-1.6%)0.000s (+Infinity% 🔺)2.249s (-0.9%)0.554s271.21x
💻 LocalNext.js (Turbopack)2.800s (-12.9% 🟢)3.360s (-13.8% 🟢)0.001s (+202.2% 🔺)3.364s (-13.7% 🟢)0.564s182.01x
💻 LocalNitro3.048s (-2.2%)3.774s (-3.1%)0.001s (+225.0% 🔺)3.779s (-3.1%)0.731s162.18x
💻 LocalExpress3.267s (-2.0%)3.895s (+1.5%)0.001s (+50.0% 🔺)3.906s (+1.6%)0.639s162.34x
🐘 PostgresExpress3.436s (+112.8% 🔺)3.945s (+75.1% 🔺)0.000s (NaN%)3.985s (+74.8% 🔺)0.549s162.46x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.809s (-23.9% 🟢)5.989s (-21.5% 🟢)0.000s (-100.0% 🟢)6.430s (-21.4% 🟢)1.622s101.00x
▲ VercelNitro4.836s (-31.3% 🟢)6.013s (-29.8% 🟢)0.000s (NaN%)6.783s (-25.4% 🟢)1.947s91.01x
▲ VercelNext.js (Turbopack)5.061s (-2.0%)6.498s (-2.7%)0.000s (-100.0% 🟢)6.933s (-3.7%)1.872s91.05x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro18/21
🐘 PostgresNitro21/21
▲ VercelNitro9/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local11/21
Next.js (Turbopack)🐘 Postgres15/21
Nitro🐘 Postgres16/21
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)
  • 🌐 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)

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR enforces a crash-safety invariant in the core runtime: the orchestrator’s queue message must not be acked until all progress-critical work is durably complete (notably step_created / wait_created event writes), so redelivery/replay can safely recover from crashes without orphaning steps.

Changes:

  • handleSuspension() no longer registers progress-critical event writes on a detached waitUntil(Promise.all(...)); it strictly awaits them.
  • Adds a new workflowEntrypoint step-dispatch ack ordering test suite to ensure step-dispatch sends complete (or fail/hang) before the handler resolves (ack).
  • Adds a changeset documenting the behavioral fix for @workflow/core.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

FileDescription
packages/core/src/runtime/suspension-handler.tsRemoves detached waitUntil usage for progress-gating event writes; keeps strict await to preserve ack ordering.
packages/core/src/runtime.test.tsAdds ack-ordering regression tests around step dispatch and waitUntil behavior.
.changeset/ack-after-step-dispatch.mdDocuments the patch-level behavioral fix and rationale.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +636 to +638
}) {
const workflowRun = await makeRunningRun(opts.runId);
const order: string[] = [];

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Done — waitUntilPromises.length = 0 now runs at the start of driveHandler(), so the rejection check only ever observes promises that invocation registered (robust against reordering/.only, not just the per-test afterEach). Fixed in 8d28013.

Comment on lines 21 to 25
vi.mock('@vercel/functions', () => ({
waitUntil: vi.fn(),
waitUntil: vi.fn((p: Promise<unknown>) => {
waitUntilPromises.push(p);
}),
}));

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Good catch. The mock now attaches a no-op .catch() to each promise the instant it's recorded, while still pushing the original promise into waitUntilPromises for later allSettled inspection — so a rejection can never surface as a real unhandled rejection in the test process before anyWaitUntilPromiseRejected() runs. Fixed in 8d28013.

'@workflow/core': patch
---

Never ack the orchestrator's queue message before the events that make the run progress are durably written. The suspension handler used to register the `step_created` / `wait_created` writes on a detached `waitUntil(Promise.all(ops))` in addition to awaiting them; the detached copy framed those progress-critical writes as droppable background work and re-threw send failures into a promise nothing consumes (unhandled rejection → process exit 128). It now strictly awaits the writes only, so the orchestrator message is never acked until they complete — a crash before then leaves the message un-acked and VQS redelivers within the lease, re-creating the (idempotent) entities and re-dispatching instead of orphaning the step. Complements the crash fix in #2336.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

too verbose. match the format/terseness of other changesets

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Trimmed to match the sibling changesets (now ~4 lines, in line with abort-e2e-flakes.md etc). Fixed in 8d28013.

- Trim the changeset to match the terseness of sibling changesets.
- Attach a no-op .catch() to each promise the waitUntil mock records so a
rejecting promise can never surface as a real unhandled rejection in the
test process; keep the original promise for allSettled inspection.
- Reset waitUntilPromises at the start of driveHandler() so the rejection
check only observes this invocation's promises (robust to reordering/.only).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@VaguelySeriousVaguelySerious changed the title [core] Never ack orchestrator message before step dispatch sends complete[core] Fix unhandled rejection when step_created/wait_created calls fail in waitUntilJun 11, 2026
@VaguelySeriousVaguelySerious changed the title [core] Fix unhandled rejection when step_created/wait_created calls fail in waitUntil[core] Remove duplicate waitUntil for suspension handler async operationsJun 11, 2026
@VaguelySerious
VaguelySerious merged commit bf44d4d into mainJun 11, 2026
187 of 193 checks passed
@VaguelySerious
VaguelySerious deleted the fix/ack-after-step-enqueue branch June 11, 2026 08:36
@github-actionsgithub-actionsBot mentioned this pull request Jun 11, 2026
github-actionsBot added a commit that referenced this pull request Jun 11, 2026
…ations (#2345)
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Pranay Prakash <pranay.gp@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

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

VaguelySerious added a commit that referenced this pull request Jun 11, 2026
…ations (#2345) (#2353)
Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
@github-actionsgithub-actionsBot mentioned this pull request Jun 11, 2026
pranaygp added a commit that referenced this pull request Jun 11, 2026
…hook-ready
* origin-https/main: (119 commits)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
Patch vulnerable package dependencies (#2301)
Deprecate DurableAgent and update it with WorkflowAgent in v5 docs (#2285)
[codex] Fix partial world-local exclusive writes (#2296)
...
# Conflicts:
#	packages/core/src/runtime.ts
#	packages/core/src/runtime/suspension-handler.ts
pranaygp added a commit that referenced this pull request Jun 11, 2026
…t-race-eager-wait
* origin/main:
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
pranaygp added a commit that referenced this pull request Jun 11, 2026
…docs-run-idempotency
* origin-https/main: (115 commits)
[core] V2: unify wait+step queue dispatch in suspension processing (#1925)
fix(world-local,world-postgres): make duplicate hook_created idempotent (#2295)
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
...
# Conflicts:
#	docs/content/docs/v4/cookbook/advanced/child-workflows.mdx
#	docs/content/docs/v5/cookbook/advanced/child-workflows.mdx
#	docs/content/docs/v5/cookbook/agent-patterns/durable-agent.mdx
pranaygp added a commit that referenced this pull request Jun 11, 2026
* origin/main:
[core] V2: unify wait+step queue dispatch in suspension processing (#1925)
fix(world-local,world-postgres): make duplicate hook_created idempotent (#2295)
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
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.

3 participants

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

[core] Remove duplicate waitUntil for suspension handler async operations - #2345

Merged
VaguelySerious merged 3 commits into
mainfrom
fix/ack-after-step-enqueue
Jun 11, 2026
Merged

[core] Remove duplicate waitUntil for suspension handler async operations#2345
VaguelySerious merged 3 commits into
mainfrom
fix/ack-after-step-enqueue

Conversation

@pranaygp

@pranaygppranaygp commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Peter: Ignore all the below, this PR is smaller in scope than it leads on. Read the code, it's a few lines.


The invariant

Never ack the orchestrator's queue message until all work that makes the run progress is durably complete — including creating AND enqueueing subsequent steps. Queue sends are idempotent (idempotency keys), so a crash before ack yields a redelivery → replay → safe re-send, recovering within the VQS ~300s lease instead of orphaning the step. The codebase already states this principle for timeout re-enqueues (packages/world-vercel/src/queue.ts: "Send new message BEFORE acknowledging current message. This ensures crash safety…"); this PR makes it hold for the suspension-handler's progress-critical event writes.

Production evidence

Run wrun_01KTSMXMKD7C544YFHX0GNPEG1 (prod, codeReviewWorkflowV2, dpl dpl_F4kcruzPhU3EY6Mbo3vqvEPAvRYM, 2026-06-10): the deployment was crash-looping with exit-128 (unhandled-rejection; fix in open PR #2336). step_created committed at 21:03:32.611; VQS shows zero step-queue [SEND]s for the run for 4h35m (the dispatch never happened); no lease redeliveries fired in the gap — the orchestrator message chain had concluded (= acked). A PR webhook at 01:38:40 finally re-drove the orchestrator, which rediscovered and dispatched the step in ~1s. ~130 warnings/day across 89 runs on one team share the signature, with orphan windows up to ~24h.

What changed

packages/core/src/runtime/suspension-handler.ts previously registered the step_created / wait_created event writes (ops) on a detached waitUntil(Promise.all(ops))in addition to awaiting them on the next line. The detached copy:

  1. framed those progress-critical writes as droppable background work the platform may discard after the response/ack, and
  2. re-threw send failures into a promise nothing consumes → unhandled rejection → process exit 128.

The fix removes the detached waitUntil registration and keeps only the strict await Promise.all(ops). On this branch the step-dispatch queueMessage sends already live in runtime.ts (workflowEntrypoint) and are awaited there before the handler returns; this change ensures the step_created events those dispatches depend on are likewise strictly awaited, so the whole progress-critical chain completes before the queue handler acks the orchestrator message.

What stayed background (and why)

The waitUntil(Promise.all(ops)) registrations in step-handler.ts, start.ts, and resume-hook.ts were not touched: their ops are stream-flush writes (not progress-gating), have no awaited copy, and legitimately need waitUntil to keep the function alive. The orchestrator re-trigger / step-continuation queueMessage sends in those files are already awaited. PR #2336 hardens those background sites with a safeWaitUntil helper.

Test coverage

Adds an ack ordering suite to packages/core/src/runtime.test.ts driving the real workflowEntrypoint against a workflow that suspends on a step + sleep (so the step is queued, not run inline):

  • the step-dispatch queue() send completes before the ack sentinel (and step_created precedes the dispatch);
  • a hanging dispatch send keeps the handler from resolving (no ack);
  • a failing dispatch send rejects the handler (no ack → VQS redelivers) without rejecting any promise handed to waitUntil.

Relationship to #2336

Orthogonal and complementary. #2336 stops the crash class (rejected waitUntil promises → exit 128) so the queue can re-drive normally. This PR guarantees crash recovery via redelivery regardless of why the process crashed by enforcing the ack-ordering invariant. Both edit suspension-handler.ts; #2336 also drops the same waitUntil registration there, so expect a trivial rebase overlap (the resolution is identical — drop the registration, keep the await).

…lete
The suspension handler registered the step_created / wait_created event
writes on a detached waitUntil(Promise.all(ops)) in addition to awaiting
them. The detached copy framed those progress-critical writes as droppable
background work and re-threw send failures into a promise nothing consumes
(unhandled rejection -> process exit 128). It now strictly awaits the writes
only, preserving the ack-ordering invariant: the orchestrator message is not
acked until the writes (and the dispatch sends the caller makes afterward)
complete, so a crash before then leaves the message un-acked for VQS to
redeliver instead of orphaning the step.
Adds runtime.test.ts ack-ordering tests: the dispatch send must complete
before ack, a hanging send must not ack, and a failing send must reject the
handler (no ack) without rejecting any waitUntil promise.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@pranaygp
pranaygp requested a review from a team as a code ownerJune 11, 2026 06:10
CopilotAI review requested due to automatic review settings June 11, 2026 06:10
@changeset-bot

changeset-botBot commented Jun 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 07fd5f4

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

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

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercelBot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production126602191485
✅ 💻 Local Development167102191890
✅ 📦 Local Production167102191890
✅ 🐘 Local Postgres167102191890
✅ 🪟 Windows13500135
✅ 📋 Other7690176945
Total7183010528235

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro109026
✅ example109026
✅ express109026
✅ fastify109026
✅ hono109026
✅ nextjs-turbopack13302
✅ nextjs-webpack13302
✅ nitro109026
✅ nuxt109026
✅ sveltekit12807
✅ vite109026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack13500
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable110025
✅ e2e-local-dev-tanstack-start-110025
✅ e2e-local-postgres-nest-stable110025
✅ e2e-local-postgres-tanstack-start-110025
✅ e2e-local-prod-nest-stable110025
✅ e2e-local-prod-tanstack-start-110025
✅ e2e-vercel-prod-tanstack-start109026

📋 View full workflow run

@github-actions

github-actionsBot commented Jun 11, 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.042s (-1.2%)1.007s (~)0.964s101.00x
💻 LocalExpress0.044s (+1.9%)1.006s (~)0.962s101.04x
💻 LocalNext.js (Turbopack)0.060s (+9.6% 🔺)1.006s (~)0.946s101.43x
🐘 PostgresNitro0.064s (~)1.012s (~)0.949s101.50x
🐘 PostgresNext.js (Turbopack)0.070s (-0.7%)1.013s (~)0.944s101.64x
🐘 PostgresExpress0.125s (+88.5% 🔺)1.054s (+3.9%)0.929s102.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.281s (+7.7% 🔺)2.724s (+11.8% 🔺)2.442s101.00x
▲ VercelNext.js (Turbopack)0.287s (-12.9% 🟢)2.246s (-4.1%)1.960s101.02x
▲ VercelExpress0.311s (+14.3% 🔺)2.400s (-11.5% 🟢)2.089s101.11x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.093s (~)2.006s (~)0.913s101.00x
💻 LocalExpress1.101s (~)2.006s (~)0.905s101.01x
🐘 PostgresNitro1.102s (-1.1%)2.010s (~)0.908s101.01x
💻 LocalNext.js (Turbopack)1.135s (+2.4%)2.007s (~)0.871s101.04x
🐘 PostgresNext.js (Turbopack)1.161s (+1.7%)2.011s (~)0.850s101.06x
🐘 PostgresExpress1.262s (+15.6% 🔺)2.092s (+4.0%)0.829s101.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.820s (+9.3% 🔺)3.699s (-9.3% 🟢)1.879s101.00x
▲ VercelExpress1.833s (+15.7% 🔺)3.828s (+7.2% 🔺)1.996s101.01x
▲ VercelNitro1.973s (+26.0% 🔺)4.298s (+21.8% 🔺)2.324s101.08x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.512s (~)11.021s (~)0.509s31.00x
🐘 PostgresNitro10.542s (~)11.020s (~)0.478s31.00x
💻 LocalExpress10.552s (~)11.023s (~)0.471s31.00x
💻 LocalNext.js (Turbopack)10.768s (+1.5%)11.022s (~)0.254s31.02x
🐘 PostgresExpress10.855s (+1.3%)11.423s (+0.6%)0.568s31.03x
🐘 PostgresNext.js (Turbopack)10.855s (~)11.020s (~)0.164s31.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)14.575s (+8.0% 🔺)16.665s (+3.5%)2.090s21.00x
▲ VercelExpress14.855s (+12.9% 🔺)16.492s (+6.7% 🔺)1.636s21.02x
▲ VercelNitro16.093s (+20.8% 🔺)18.277s (+17.2% 🔺)2.183s21.10x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro13.716s (~)14.027s (~)0.310s51.00x
🐘 PostgresNitro13.733s (-0.8%)14.020s (~)0.287s51.00x
💻 LocalExpress13.795s (-0.8%)14.027s (-1.4%)0.232s51.01x
💻 LocalNext.js (Turbopack)14.382s (+2.5%)15.031s (+2.8%)0.648s41.05x
🐘 PostgresExpress14.472s (+4.6%)15.021s (+5.5% 🔺)0.548s41.06x
🐘 PostgresNext.js (Turbopack)14.794s (+1.4%)15.270s (+1.7%)0.476s41.08x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro23.738s (-7.0% 🟢)27.387s (-0.8%)3.649s31.00x
▲ VercelExpress24.834s (-2.5%)26.672s (-2.1%)1.838s31.05x
▲ VercelNext.js (Turbopack)25.661s (+0.6%)27.005s (-0.7%)1.344s31.08x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro12.399s (~)13.024s (~)0.625s71.00x
🐘 PostgresNitro12.525s (-1.7%)13.018s (~)0.493s71.01x
💻 LocalExpress12.531s (-0.5%)13.025s (~)0.494s71.01x
💻 LocalNext.js (Turbopack)13.663s (+5.5% 🔺)14.027s (+5.4% 🔺)0.364s71.10x
🐘 PostgresNext.js (Turbopack)13.733s (~)14.019s (~)0.286s71.11x
🐘 PostgresExpress13.775s (+8.2% 🔺)14.307s (+7.5% 🔺)0.532s71.11x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express29.132s (-9.1% 🟢)31.079s (-9.2% 🟢)1.947s31.00x
▲ VercelNitro30.472s (+4.9%)33.068s (+5.3% 🔺)2.597s31.05x
▲ VercelNext.js (Turbopack)31.623s (+6.8% 🔺)32.793s (+2.9%)1.170s31.09x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.179s (-1.7%)2.007s (~)0.828s151.00x
💻 LocalNitro1.186s (-2.3%)2.007s (~)0.821s151.01x
🐘 PostgresNext.js (Turbopack)1.259s (+0.6%)2.007s (~)0.748s151.07x
💻 LocalNext.js (Turbopack)1.320s (+7.9% 🔺)2.006s (~)0.686s151.12x
💻 LocalExpress1.340s (+6.1% 🔺)2.007s (~)0.667s151.14x
🐘 PostgresExpress1.408s (+17.4% 🔺)2.018s (~)0.610s151.19x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.510s (-9.4% 🟢)4.773s (+10.0% 🔺)2.263s71.00x
▲ VercelNext.js (Turbopack)2.679s (~)4.255s (+0.9%)1.576s81.07x
▲ VercelExpress2.800s (+1.1%)4.533s (-4.0%)1.734s71.12x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.252s (-0.6%)2.008s (~)0.756s151.00x
🐘 PostgresNext.js (Turbopack)1.394s (-1.1%)2.008s (~)0.614s151.11x
🐘 PostgresExpress1.615s (+21.8% 🔺)2.410s (+19.5% 🔺)0.795s131.29x
💻 LocalNitro1.771s (+3.9%)2.006s (-3.2%)0.234s151.42x
💻 LocalNext.js (Turbopack)1.864s (+8.0% 🔺)2.150s (+7.2% 🔺)0.286s141.49x
💻 LocalExpress1.920s (+2.0%)2.294s (+3.3%)0.374s141.53x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.601s (-11.8% 🟢)5.376s (-12.9% 🟢)1.775s61.00x
▲ VercelNext.js (Turbopack)3.895s (-5.2% 🟢)5.557s (-9.5% 🟢)1.663s61.08x
▲ VercelNitro3.909s (-4.0%)5.743s (-7.5% 🟢)1.834s61.09x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.402s (~)2.009s (~)0.607s151.00x
🐘 PostgresNext.js (Turbopack)1.753s (~)2.075s (-9.6% 🟢)0.322s151.25x
🐘 PostgresExpress2.096s (+50.4% 🔺)3.371s (+67.7% 🔺)1.274s91.50x
💻 LocalNitro4.863s (+3.1%)5.347s (+6.7% 🔺)0.484s63.47x
💻 LocalExpress5.361s (+1.2%)5.846s (-2.8%)0.485s63.82x
💻 LocalNext.js (Turbopack)5.901s (+34.2% 🔺)6.214s (+24.0% 🔺)0.313s54.21x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.264s (-21.9% 🟢)8.049s (-7.6% 🟢)2.785s41.00x
▲ VercelExpress6.176s (+4.6%)7.914s (~)1.739s41.17x
▲ VercelNext.js (Turbopack)6.496s (+10.6% 🔺)8.160s (+4.9%)1.664s41.23x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.195s (~)2.009s (~)0.814s151.00x
🐘 PostgresNext.js (Turbopack)1.258s (-0.6%)2.008s (~)0.750s151.05x
💻 LocalNext.js (Turbopack)1.375s (+5.3% 🔺)2.007s (~)0.632s151.15x
🐘 PostgresExpress1.533s (+27.5% 🔺)2.116s (+5.4% 🔺)0.583s151.28x
💻 LocalNitro1.577s (+2.2%)2.006s (~)0.429s151.32x
💻 LocalExpress1.582s (-4.5%)2.007s (-3.2%)0.424s151.32x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.457s (-8.1% 🟢)4.342s (~)1.886s71.00x
▲ VercelExpress2.756s (+7.4% 🔺)4.461s (+6.3% 🔺)1.705s71.12x
▲ VercelNext.js (Turbopack)2.913s (-33.4% 🟢)4.470s (-29.0% 🟢)1.557s71.19x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.261s (-1.1%)2.008s (~)0.748s151.00x
🐘 PostgresNext.js (Turbopack)1.399s (~)2.008s (~)0.609s151.11x
🐘 PostgresExpress1.783s (+43.4% 🔺)2.592s (+28.8% 🔺)0.809s121.41x
💻 LocalNext.js (Turbopack)2.031s (+0.5%)2.591s (+3.4%)0.560s121.61x
💻 LocalNitro2.054s (+16.9% 🔺)2.591s (+25.0% 🔺)0.537s121.63x
💻 LocalExpress2.170s (+2.1%)2.592s (~)0.422s121.72x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.771s (-16.6% 🟢)5.273s (-14.5% 🟢)1.502s61.00x
▲ VercelExpress3.779s (+2.8%)5.293s (-5.7% 🟢)1.514s61.00x
▲ VercelNitro3.919s (-4.3%)5.803s (-3.3%)1.884s61.04x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.420s (-2.9%)2.009s (~)0.589s151.00x
🐘 PostgresExpress1.529s (+1.9%)2.494s (+4.0%)0.965s131.08x
🐘 PostgresNext.js (Turbopack)1.710s (+3.3%)2.396s (+15.5% 🔺)0.686s131.20x
💻 LocalNitro5.589s (+17.8% 🔺)6.179s (+15.6% 🔺)0.590s63.94x
💻 LocalExpress5.770s (-1.6%)6.218s (~)0.448s54.06x
💻 LocalNext.js (Turbopack)6.049s (+17.2% 🔺)6.417s (+6.6% 🔺)0.369s54.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.371s (+9.0% 🔺)7.241s (+7.5% 🔺)1.870s51.00x
▲ VercelExpress5.651s (+11.4% 🔺)7.590s (+14.5% 🔺)1.939s41.05x
▲ VercelNext.js (Turbopack)6.282s (+8.5% 🔺)7.842s (+3.5%)1.560s41.17x

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

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.580s (-4.8%)1.024s (+1.6%)0.444s591.00x
💻 LocalNitro0.595s (-26.1% 🟢)1.005s (-16.6% 🟢)0.410s601.03x
💻 LocalExpress0.640s (-2.4%)1.040s (~)0.400s581.10x
🐘 PostgresExpress0.687s (+3.0%)1.113s (+6.2% 🔺)0.426s541.19x
🐘 PostgresNext.js (Turbopack)0.811s (~)1.006s (~)0.196s601.40x
💻 LocalNext.js (Turbopack)0.872s (+25.3% 🔺)1.005s (~)0.132s601.50x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.418s (-27.4% 🟢)7.331s (-23.0% 🟢)1.912s91.00x
▲ VercelExpress5.616s (+2.1%)7.496s (+5.4% 🔺)1.880s91.04x
▲ VercelNext.js (Turbopack)6.210s (+23.0% 🔺)8.016s (+17.0% 🔺)1.806s81.15x

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

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.340s (-5.4% 🟢)2.008s (~)0.668s451.00x
💻 LocalNitro1.510s (+3.2%)2.006s (~)0.496s451.13x
💻 LocalExpress1.591s (~)2.029s (~)0.438s451.19x
🐘 PostgresExpress1.857s (+20.8% 🔺)2.468s (+14.7% 🔺)0.612s381.39x
🐘 PostgresNext.js (Turbopack)1.976s (+1.7%)2.175s (~)0.199s421.48x
💻 LocalNext.js (Turbopack)2.089s (+20.8% 🔺)3.009s (+48.4% 🔺)0.920s301.56x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro12.352s (-6.6% 🟢)14.557s (-6.0% 🟢)2.205s71.00x
▲ VercelExpress12.448s (-24.0% 🟢)14.495s (-20.9% 🟢)2.048s71.01x
▲ VercelNext.js (Turbopack)13.582s (-8.1% 🟢)15.436s (-8.8% 🟢)1.853s61.10x

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

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.652s (-9.0% 🟢)3.086s (-5.9% 🟢)0.434s391.00x
🐘 PostgresExpress3.102s (+6.5% 🔺)3.575s (+1.0%)0.473s341.17x
💻 LocalNitro3.279s (+2.3%)4.010s (~)0.731s301.24x
💻 LocalExpress3.368s (-1.5%)4.010s (~)0.642s301.27x
🐘 PostgresNext.js (Turbopack)3.863s (~)4.148s (+1.8%)0.285s291.46x
💻 LocalNext.js (Turbopack)4.305s (+15.5% 🔺)5.011s (+21.9% 🔺)0.705s241.62x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express25.530s (-11.5% 🟢)27.480s (-11.1% 🟢)1.950s51.00x
▲ VercelNitro26.148s (-12.2% 🟢)28.275s (-11.6% 🟢)2.128s51.02x
▲ VercelNext.js (Turbopack)28.133s (+4.2%)29.722s (+1.6%)1.589s51.10x

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

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.216s (-8.4% 🟢)1.006s (~)0.790s601.00x
🐘 PostgresExpress0.239s (-5.1% 🟢)1.008s (~)0.769s601.11x
🐘 PostgresNext.js (Turbopack)0.264s (-6.5% 🟢)1.006s (~)0.743s601.22x
💻 LocalNitro0.421s (-0.9%)1.005s (~)0.584s601.95x
💻 LocalExpress0.444s (-4.5%)1.005s (~)0.561s602.06x
💻 LocalNext.js (Turbopack)0.561s (-8.2% 🟢)1.005s (-3.3%)0.444s602.60x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.371s (+7.2% 🔺)4.155s (+1.4%)1.784s151.00x
▲ VercelNext.js (Turbopack)2.653s (+20.6% 🔺)4.408s (+4.4%)1.755s141.12x
▲ VercelNitro3.840s (+63.8% 🔺)6.061s (+39.9% 🔺)2.222s101.62x

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

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.347s (-6.4% 🟢)1.007s (~)0.660s901.00x
🐘 PostgresNext.js (Turbopack)0.468s (-3.0%)1.006s (~)0.538s901.35x
🐘 PostgresExpress0.623s (+83.9% 🔺)1.176s (+16.7% 🔺)0.552s771.80x
💻 LocalNitro2.111s (+2.3%)2.637s (~)0.526s356.08x
💻 LocalExpress2.146s (-2.1%)2.797s (-0.9%)0.651s336.18x
💻 LocalNext.js (Turbopack)2.394s (-2.3%)3.113s (~)0.720s296.90x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.157s (-88.2% 🟢)7.065s (-84.6% 🟢)1.908s131.00x
▲ VercelExpress5.318s (-87.7% 🟢)7.335s (-83.8% 🟢)2.017s131.03x
▲ VercelNext.js (Turbopack)5.576s (-11.1% 🟢)7.259s (-14.6% 🟢)1.683s131.08x

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

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.651s (-7.9% 🟢)1.006s (~)0.355s1201.00x
🐘 PostgresNext.js (Turbopack)0.940s (-4.0%)1.371s (-14.7% 🟢)0.431s881.44x
🐘 PostgresExpress1.064s (+70.0% 🔺)1.568s (+48.7% 🔺)0.504s771.63x
💻 LocalNitro9.624s (+10.5% 🔺)10.197s (+9.3% 🔺)0.572s1214.78x
💻 LocalExpress10.242s (-0.7%)10.696s (-1.6%)0.455s1215.73x
💻 LocalNext.js (Turbopack)10.590s (+2.7%)11.394s (+0.8%)0.804s1116.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.861s (-91.3% 🟢)15.465s (-90.5% 🟢)1.605s81.00x
▲ VercelNitro15.439s (-95.0% 🟢)17.739s (-94.3% 🟢)2.299s71.11x
▲ VercelExpress16.562s (+8.6% 🔺)18.445s (+5.5% 🔺)1.883s71.19x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.158s (-1.9%)2.001s (~)0.001s (-7.1% 🟢)2.011s (~)0.853s101.00x
💻 LocalNitro1.163s (+1.1%)2.005s (~)0.012s (+19.0% 🔺)2.019s (~)0.856s101.00x
💻 LocalExpress1.168s (~)2.006s (~)0.012s (-5.5% 🟢)2.020s (~)0.852s101.01x
💻 LocalNext.js (Turbopack)1.203s (+3.0%)2.004s (~)0.013s (+24.8% 🔺)2.020s (~)0.817s101.04x
🐘 PostgresNext.js (Turbopack)1.240s (~)2.001s (~)0.001s (-33.3% 🟢)2.010s (~)0.771s101.07x
🐘 PostgresExpress1.325s (+11.0% 🔺)1.985s (-0.8%)0.059s (+72.3% 🔺)2.105s (+3.0%)0.779s101.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.198s (-2.0%)3.164s (-10.9% 🟢)1.002s (-91.9% 🟢)4.538s (-72.5% 🟢)2.340s101.00x
▲ VercelExpress2.230s (+4.0%)3.256s (-4.5%)0.822s (+56.4% 🔺)4.538s (+2.1%)2.308s101.01x
▲ VercelNitro2.305s (+6.5% 🔺)3.514s (+2.8%)0.722s (+39.9% 🔺)4.840s (+8.3% 🔺)2.536s101.05x

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

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.580s (-5.0%)2.001s (~)0.005s (+37.6% 🔺)2.027s (~)0.447s301.00x
💻 LocalNitro1.586s (-9.0% 🟢)2.011s (~)0.013s (+38.4% 🔺)2.025s (-7.9% 🟢)0.439s301.00x
💻 LocalExpress1.611s (-1.6%)2.012s (~)0.013s (+17.5% 🔺)2.027s (~)0.416s301.02x
🐘 PostgresNext.js (Turbopack)1.722s (-2.4%)2.009s (~)0.005s (+33.9% 🔺)2.027s (~)0.305s301.09x
💻 LocalNext.js (Turbopack)1.723s (+5.0% 🔺)2.010s (~)0.013s (+33.3% 🔺)2.026s (~)0.303s301.09x
🐘 PostgresExpress2.073s (+19.3% 🔺)2.501s (+16.7% 🔺)0.004s (+39.6% 🔺)2.553s (+18.2% 🔺)0.479s241.31x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.803s (+0.8%)6.817s (-8.3% 🟢)0.235s (-33.7% 🟢)7.461s (-11.2% 🟢)1.659s91.00x
▲ VercelNitro5.905s (+2.8%)7.730s (+1.7%)0.222s (-34.4% 🟢)8.452s (~)2.548s81.02x
▲ VercelNext.js (Turbopack)5.965s (-6.4% 🟢)7.035s (-11.4% 🟢)0.234s (-35.2% 🟢)7.715s (-13.0% 🟢)1.749s81.03x

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

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.706s (-2.4%)1.013s (-1.8%)0.000s (-100.0% 🟢)1.025s (-2.2%)0.320s591.00x
🐘 PostgresNext.js (Turbopack)0.807s (-3.1%)1.035s (-3.4%)0.000s (-3.4%)1.042s (-3.5%)0.235s581.14x
🐘 PostgresExpress1.322s (+35.2% 🔺)1.661s (+16.3% 🔺)0.000s (-100.0% 🟢)1.692s (+16.8% 🔺)0.370s361.87x
💻 LocalNitro1.370s (+1.3%)2.013s (~)0.000s (-53.3% 🟢)2.015s (~)0.645s301.94x
💻 LocalExpress1.438s (-3.0%)2.013s (~)0.000s (-46.7% 🟢)2.015s (~)0.577s302.04x
💻 LocalNext.js (Turbopack)1.485s (+2.6%)2.013s (~)0.000s (+75.0% 🔺)2.017s (~)0.532s302.10x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.237s (-20.3% 🟢)4.574s (-14.3% 🟢)0.000s (-95.1% 🟢)5.153s (-16.5% 🟢)1.916s121.00x
▲ VercelNext.js (Turbopack)3.305s (~)4.605s (-5.9% 🟢)0.000s (NaN%)5.009s (-8.3% 🟢)1.704s121.02x
▲ VercelNitro3.342s (-7.2% 🟢)5.136s (+1.3%)0.001s (+Infinity% 🔺)5.650s (~)2.308s111.03x

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

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.395s (-1.1%)2.065s (+3.4%)0.000s (NaN%)2.081s (+3.4%)0.686s291.00x
🐘 PostgresNext.js (Turbopack)1.694s (-1.9%)2.225s (-1.6%)0.000s (+Infinity% 🔺)2.249s (-0.9%)0.554s271.21x
💻 LocalNext.js (Turbopack)2.800s (-12.9% 🟢)3.360s (-13.8% 🟢)0.001s (+202.2% 🔺)3.364s (-13.7% 🟢)0.564s182.01x
💻 LocalNitro3.048s (-2.2%)3.774s (-3.1%)0.001s (+225.0% 🔺)3.779s (-3.1%)0.731s162.18x
💻 LocalExpress3.267s (-2.0%)3.895s (+1.5%)0.001s (+50.0% 🔺)3.906s (+1.6%)0.639s162.34x
🐘 PostgresExpress3.436s (+112.8% 🔺)3.945s (+75.1% 🔺)0.000s (NaN%)3.985s (+74.8% 🔺)0.549s162.46x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.809s (-23.9% 🟢)5.989s (-21.5% 🟢)0.000s (-100.0% 🟢)6.430s (-21.4% 🟢)1.622s101.00x
▲ VercelNitro4.836s (-31.3% 🟢)6.013s (-29.8% 🟢)0.000s (NaN%)6.783s (-25.4% 🟢)1.947s91.01x
▲ VercelNext.js (Turbopack)5.061s (-2.0%)6.498s (-2.7%)0.000s (-100.0% 🟢)6.933s (-3.7%)1.872s91.05x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro18/21
🐘 PostgresNitro21/21
▲ VercelNitro9/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local11/21
Next.js (Turbopack)🐘 Postgres15/21
Nitro🐘 Postgres16/21
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)
  • 🌐 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)

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR enforces a crash-safety invariant in the core runtime: the orchestrator’s queue message must not be acked until all progress-critical work is durably complete (notably step_created / wait_created event writes), so redelivery/replay can safely recover from crashes without orphaning steps.

Changes:

  • handleSuspension() no longer registers progress-critical event writes on a detached waitUntil(Promise.all(...)); it strictly awaits them.
  • Adds a new workflowEntrypoint step-dispatch ack ordering test suite to ensure step-dispatch sends complete (or fail/hang) before the handler resolves (ack).
  • Adds a changeset documenting the behavioral fix for @workflow/core.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

FileDescription
packages/core/src/runtime/suspension-handler.tsRemoves detached waitUntil usage for progress-gating event writes; keeps strict await to preserve ack ordering.
packages/core/src/runtime.test.tsAdds ack-ordering regression tests around step dispatch and waitUntil behavior.
.changeset/ack-after-step-dispatch.mdDocuments the patch-level behavioral fix and rationale.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +636 to +638
}) {
const workflowRun = await makeRunningRun(opts.runId);
const order: string[] = [];

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Done — waitUntilPromises.length = 0 now runs at the start of driveHandler(), so the rejection check only ever observes promises that invocation registered (robust against reordering/.only, not just the per-test afterEach). Fixed in 8d28013.

Comment on lines 21 to 25
vi.mock('@vercel/functions', () => ({
waitUntil: vi.fn(),
waitUntil: vi.fn((p: Promise<unknown>) => {
waitUntilPromises.push(p);
}),
}));

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Good catch. The mock now attaches a no-op .catch() to each promise the instant it's recorded, while still pushing the original promise into waitUntilPromises for later allSettled inspection — so a rejection can never surface as a real unhandled rejection in the test process before anyWaitUntilPromiseRejected() runs. Fixed in 8d28013.

'@workflow/core': patch
---

Never ack the orchestrator's queue message before the events that make the run progress are durably written. The suspension handler used to register the `step_created` / `wait_created` writes on a detached `waitUntil(Promise.all(ops))` in addition to awaiting them; the detached copy framed those progress-critical writes as droppable background work and re-threw send failures into a promise nothing consumes (unhandled rejection → process exit 128). It now strictly awaits the writes only, so the orchestrator message is never acked until they complete — a crash before then leaves the message un-acked and VQS redelivers within the lease, re-creating the (idempotent) entities and re-dispatching instead of orphaning the step. Complements the crash fix in #2336.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

too verbose. match the format/terseness of other changesets

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Trimmed to match the sibling changesets (now ~4 lines, in line with abort-e2e-flakes.md etc). Fixed in 8d28013.

- Trim the changeset to match the terseness of sibling changesets.
- Attach a no-op .catch() to each promise the waitUntil mock records so a
rejecting promise can never surface as a real unhandled rejection in the
test process; keep the original promise for allSettled inspection.
- Reset waitUntilPromises at the start of driveHandler() so the rejection
check only observes this invocation's promises (robust to reordering/.only).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@VaguelySeriousVaguelySerious changed the title [core] Never ack orchestrator message before step dispatch sends complete[core] Fix unhandled rejection when step_created/wait_created calls fail in waitUntilJun 11, 2026
@VaguelySeriousVaguelySerious changed the title [core] Fix unhandled rejection when step_created/wait_created calls fail in waitUntil[core] Remove duplicate waitUntil for suspension handler async operationsJun 11, 2026
@VaguelySerious
VaguelySerious merged commit bf44d4d into mainJun 11, 2026
187 of 193 checks passed
@VaguelySerious
VaguelySerious deleted the fix/ack-after-step-enqueue branch June 11, 2026 08:36
@github-actionsgithub-actionsBot mentioned this pull request Jun 11, 2026
github-actionsBot added a commit that referenced this pull request Jun 11, 2026
…ations (#2345)
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Pranay Prakash <pranay.gp@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

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

VaguelySerious added a commit that referenced this pull request Jun 11, 2026
…ations (#2345) (#2353)
Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
@github-actionsgithub-actionsBot mentioned this pull request Jun 11, 2026
pranaygp added a commit that referenced this pull request Jun 11, 2026
…hook-ready
* origin-https/main: (119 commits)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
Patch vulnerable package dependencies (#2301)
Deprecate DurableAgent and update it with WorkflowAgent in v5 docs (#2285)
[codex] Fix partial world-local exclusive writes (#2296)
...
# Conflicts:
#	packages/core/src/runtime.ts
#	packages/core/src/runtime/suspension-handler.ts
pranaygp added a commit that referenced this pull request Jun 11, 2026
…t-race-eager-wait
* origin/main:
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
pranaygp added a commit that referenced this pull request Jun 11, 2026
…docs-run-idempotency
* origin-https/main: (115 commits)
[core] V2: unify wait+step queue dispatch in suspension processing (#1925)
fix(world-local,world-postgres): make duplicate hook_created idempotent (#2295)
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
...
# Conflicts:
#	docs/content/docs/v4/cookbook/advanced/child-workflows.mdx
#	docs/content/docs/v5/cookbook/advanced/child-workflows.mdx
#	docs/content/docs/v5/cookbook/agent-patterns/durable-agent.mdx
pranaygp added a commit that referenced this pull request Jun 11, 2026
* origin/main:
[core] V2: unify wait+step queue dispatch in suspension processing (#1925)
fix(world-local,world-postgres): make duplicate hook_created idempotent (#2295)
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
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.

3 participants

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

[core] Remove duplicate waitUntil for suspension handler async operations - #2345

Merged
VaguelySerious merged 3 commits into
mainfrom
fix/ack-after-step-enqueue
Jun 11, 2026
Merged

[core] Remove duplicate waitUntil for suspension handler async operations#2345
VaguelySerious merged 3 commits into
mainfrom
fix/ack-after-step-enqueue

Conversation

@pranaygp

@pranaygppranaygp commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Peter: Ignore all the below, this PR is smaller in scope than it leads on. Read the code, it's a few lines.


The invariant

Never ack the orchestrator's queue message until all work that makes the run progress is durably complete — including creating AND enqueueing subsequent steps. Queue sends are idempotent (idempotency keys), so a crash before ack yields a redelivery → replay → safe re-send, recovering within the VQS ~300s lease instead of orphaning the step. The codebase already states this principle for timeout re-enqueues (packages/world-vercel/src/queue.ts: "Send new message BEFORE acknowledging current message. This ensures crash safety…"); this PR makes it hold for the suspension-handler's progress-critical event writes.

Production evidence

Run wrun_01KTSMXMKD7C544YFHX0GNPEG1 (prod, codeReviewWorkflowV2, dpl dpl_F4kcruzPhU3EY6Mbo3vqvEPAvRYM, 2026-06-10): the deployment was crash-looping with exit-128 (unhandled-rejection; fix in open PR #2336). step_created committed at 21:03:32.611; VQS shows zero step-queue [SEND]s for the run for 4h35m (the dispatch never happened); no lease redeliveries fired in the gap — the orchestrator message chain had concluded (= acked). A PR webhook at 01:38:40 finally re-drove the orchestrator, which rediscovered and dispatched the step in ~1s. ~130 warnings/day across 89 runs on one team share the signature, with orphan windows up to ~24h.

What changed

packages/core/src/runtime/suspension-handler.ts previously registered the step_created / wait_created event writes (ops) on a detached waitUntil(Promise.all(ops))in addition to awaiting them on the next line. The detached copy:

  1. framed those progress-critical writes as droppable background work the platform may discard after the response/ack, and
  2. re-threw send failures into a promise nothing consumes → unhandled rejection → process exit 128.

The fix removes the detached waitUntil registration and keeps only the strict await Promise.all(ops). On this branch the step-dispatch queueMessage sends already live in runtime.ts (workflowEntrypoint) and are awaited there before the handler returns; this change ensures the step_created events those dispatches depend on are likewise strictly awaited, so the whole progress-critical chain completes before the queue handler acks the orchestrator message.

What stayed background (and why)

The waitUntil(Promise.all(ops)) registrations in step-handler.ts, start.ts, and resume-hook.ts were not touched: their ops are stream-flush writes (not progress-gating), have no awaited copy, and legitimately need waitUntil to keep the function alive. The orchestrator re-trigger / step-continuation queueMessage sends in those files are already awaited. PR #2336 hardens those background sites with a safeWaitUntil helper.

Test coverage

Adds an ack ordering suite to packages/core/src/runtime.test.ts driving the real workflowEntrypoint against a workflow that suspends on a step + sleep (so the step is queued, not run inline):

  • the step-dispatch queue() send completes before the ack sentinel (and step_created precedes the dispatch);
  • a hanging dispatch send keeps the handler from resolving (no ack);
  • a failing dispatch send rejects the handler (no ack → VQS redelivers) without rejecting any promise handed to waitUntil.

Relationship to #2336

Orthogonal and complementary. #2336 stops the crash class (rejected waitUntil promises → exit 128) so the queue can re-drive normally. This PR guarantees crash recovery via redelivery regardless of why the process crashed by enforcing the ack-ordering invariant. Both edit suspension-handler.ts; #2336 also drops the same waitUntil registration there, so expect a trivial rebase overlap (the resolution is identical — drop the registration, keep the await).

…lete
The suspension handler registered the step_created / wait_created event
writes on a detached waitUntil(Promise.all(ops)) in addition to awaiting
them. The detached copy framed those progress-critical writes as droppable
background work and re-threw send failures into a promise nothing consumes
(unhandled rejection -> process exit 128). It now strictly awaits the writes
only, preserving the ack-ordering invariant: the orchestrator message is not
acked until the writes (and the dispatch sends the caller makes afterward)
complete, so a crash before then leaves the message un-acked for VQS to
redeliver instead of orphaning the step.
Adds runtime.test.ts ack-ordering tests: the dispatch send must complete
before ack, a hanging send must not ack, and a failing send must reject the
handler (no ack) without rejecting any waitUntil promise.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@pranaygp
pranaygp requested a review from a team as a code ownerJune 11, 2026 06:10
CopilotAI review requested due to automatic review settings June 11, 2026 06:10
@changeset-bot

changeset-botBot commented Jun 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 07fd5f4

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

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

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercelBot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production126602191485
✅ 💻 Local Development167102191890
✅ 📦 Local Production167102191890
✅ 🐘 Local Postgres167102191890
✅ 🪟 Windows13500135
✅ 📋 Other7690176945
Total7183010528235

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro109026
✅ example109026
✅ express109026
✅ fastify109026
✅ hono109026
✅ nextjs-turbopack13302
✅ nextjs-webpack13302
✅ nitro109026
✅ nuxt109026
✅ sveltekit12807
✅ vite109026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack13500
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable110025
✅ e2e-local-dev-tanstack-start-110025
✅ e2e-local-postgres-nest-stable110025
✅ e2e-local-postgres-tanstack-start-110025
✅ e2e-local-prod-nest-stable110025
✅ e2e-local-prod-tanstack-start-110025
✅ e2e-vercel-prod-tanstack-start109026

📋 View full workflow run

@github-actions

github-actionsBot commented Jun 11, 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.042s (-1.2%)1.007s (~)0.964s101.00x
💻 LocalExpress0.044s (+1.9%)1.006s (~)0.962s101.04x
💻 LocalNext.js (Turbopack)0.060s (+9.6% 🔺)1.006s (~)0.946s101.43x
🐘 PostgresNitro0.064s (~)1.012s (~)0.949s101.50x
🐘 PostgresNext.js (Turbopack)0.070s (-0.7%)1.013s (~)0.944s101.64x
🐘 PostgresExpress0.125s (+88.5% 🔺)1.054s (+3.9%)0.929s102.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.281s (+7.7% 🔺)2.724s (+11.8% 🔺)2.442s101.00x
▲ VercelNext.js (Turbopack)0.287s (-12.9% 🟢)2.246s (-4.1%)1.960s101.02x
▲ VercelExpress0.311s (+14.3% 🔺)2.400s (-11.5% 🟢)2.089s101.11x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.093s (~)2.006s (~)0.913s101.00x
💻 LocalExpress1.101s (~)2.006s (~)0.905s101.01x
🐘 PostgresNitro1.102s (-1.1%)2.010s (~)0.908s101.01x
💻 LocalNext.js (Turbopack)1.135s (+2.4%)2.007s (~)0.871s101.04x
🐘 PostgresNext.js (Turbopack)1.161s (+1.7%)2.011s (~)0.850s101.06x
🐘 PostgresExpress1.262s (+15.6% 🔺)2.092s (+4.0%)0.829s101.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.820s (+9.3% 🔺)3.699s (-9.3% 🟢)1.879s101.00x
▲ VercelExpress1.833s (+15.7% 🔺)3.828s (+7.2% 🔺)1.996s101.01x
▲ VercelNitro1.973s (+26.0% 🔺)4.298s (+21.8% 🔺)2.324s101.08x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.512s (~)11.021s (~)0.509s31.00x
🐘 PostgresNitro10.542s (~)11.020s (~)0.478s31.00x
💻 LocalExpress10.552s (~)11.023s (~)0.471s31.00x
💻 LocalNext.js (Turbopack)10.768s (+1.5%)11.022s (~)0.254s31.02x
🐘 PostgresExpress10.855s (+1.3%)11.423s (+0.6%)0.568s31.03x
🐘 PostgresNext.js (Turbopack)10.855s (~)11.020s (~)0.164s31.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)14.575s (+8.0% 🔺)16.665s (+3.5%)2.090s21.00x
▲ VercelExpress14.855s (+12.9% 🔺)16.492s (+6.7% 🔺)1.636s21.02x
▲ VercelNitro16.093s (+20.8% 🔺)18.277s (+17.2% 🔺)2.183s21.10x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro13.716s (~)14.027s (~)0.310s51.00x
🐘 PostgresNitro13.733s (-0.8%)14.020s (~)0.287s51.00x
💻 LocalExpress13.795s (-0.8%)14.027s (-1.4%)0.232s51.01x
💻 LocalNext.js (Turbopack)14.382s (+2.5%)15.031s (+2.8%)0.648s41.05x
🐘 PostgresExpress14.472s (+4.6%)15.021s (+5.5% 🔺)0.548s41.06x
🐘 PostgresNext.js (Turbopack)14.794s (+1.4%)15.270s (+1.7%)0.476s41.08x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro23.738s (-7.0% 🟢)27.387s (-0.8%)3.649s31.00x
▲ VercelExpress24.834s (-2.5%)26.672s (-2.1%)1.838s31.05x
▲ VercelNext.js (Turbopack)25.661s (+0.6%)27.005s (-0.7%)1.344s31.08x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro12.399s (~)13.024s (~)0.625s71.00x
🐘 PostgresNitro12.525s (-1.7%)13.018s (~)0.493s71.01x
💻 LocalExpress12.531s (-0.5%)13.025s (~)0.494s71.01x
💻 LocalNext.js (Turbopack)13.663s (+5.5% 🔺)14.027s (+5.4% 🔺)0.364s71.10x
🐘 PostgresNext.js (Turbopack)13.733s (~)14.019s (~)0.286s71.11x
🐘 PostgresExpress13.775s (+8.2% 🔺)14.307s (+7.5% 🔺)0.532s71.11x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express29.132s (-9.1% 🟢)31.079s (-9.2% 🟢)1.947s31.00x
▲ VercelNitro30.472s (+4.9%)33.068s (+5.3% 🔺)2.597s31.05x
▲ VercelNext.js (Turbopack)31.623s (+6.8% 🔺)32.793s (+2.9%)1.170s31.09x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.179s (-1.7%)2.007s (~)0.828s151.00x
💻 LocalNitro1.186s (-2.3%)2.007s (~)0.821s151.01x
🐘 PostgresNext.js (Turbopack)1.259s (+0.6%)2.007s (~)0.748s151.07x
💻 LocalNext.js (Turbopack)1.320s (+7.9% 🔺)2.006s (~)0.686s151.12x
💻 LocalExpress1.340s (+6.1% 🔺)2.007s (~)0.667s151.14x
🐘 PostgresExpress1.408s (+17.4% 🔺)2.018s (~)0.610s151.19x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.510s (-9.4% 🟢)4.773s (+10.0% 🔺)2.263s71.00x
▲ VercelNext.js (Turbopack)2.679s (~)4.255s (+0.9%)1.576s81.07x
▲ VercelExpress2.800s (+1.1%)4.533s (-4.0%)1.734s71.12x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.252s (-0.6%)2.008s (~)0.756s151.00x
🐘 PostgresNext.js (Turbopack)1.394s (-1.1%)2.008s (~)0.614s151.11x
🐘 PostgresExpress1.615s (+21.8% 🔺)2.410s (+19.5% 🔺)0.795s131.29x
💻 LocalNitro1.771s (+3.9%)2.006s (-3.2%)0.234s151.42x
💻 LocalNext.js (Turbopack)1.864s (+8.0% 🔺)2.150s (+7.2% 🔺)0.286s141.49x
💻 LocalExpress1.920s (+2.0%)2.294s (+3.3%)0.374s141.53x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.601s (-11.8% 🟢)5.376s (-12.9% 🟢)1.775s61.00x
▲ VercelNext.js (Turbopack)3.895s (-5.2% 🟢)5.557s (-9.5% 🟢)1.663s61.08x
▲ VercelNitro3.909s (-4.0%)5.743s (-7.5% 🟢)1.834s61.09x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.402s (~)2.009s (~)0.607s151.00x
🐘 PostgresNext.js (Turbopack)1.753s (~)2.075s (-9.6% 🟢)0.322s151.25x
🐘 PostgresExpress2.096s (+50.4% 🔺)3.371s (+67.7% 🔺)1.274s91.50x
💻 LocalNitro4.863s (+3.1%)5.347s (+6.7% 🔺)0.484s63.47x
💻 LocalExpress5.361s (+1.2%)5.846s (-2.8%)0.485s63.82x
💻 LocalNext.js (Turbopack)5.901s (+34.2% 🔺)6.214s (+24.0% 🔺)0.313s54.21x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.264s (-21.9% 🟢)8.049s (-7.6% 🟢)2.785s41.00x
▲ VercelExpress6.176s (+4.6%)7.914s (~)1.739s41.17x
▲ VercelNext.js (Turbopack)6.496s (+10.6% 🔺)8.160s (+4.9%)1.664s41.23x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.195s (~)2.009s (~)0.814s151.00x
🐘 PostgresNext.js (Turbopack)1.258s (-0.6%)2.008s (~)0.750s151.05x
💻 LocalNext.js (Turbopack)1.375s (+5.3% 🔺)2.007s (~)0.632s151.15x
🐘 PostgresExpress1.533s (+27.5% 🔺)2.116s (+5.4% 🔺)0.583s151.28x
💻 LocalNitro1.577s (+2.2%)2.006s (~)0.429s151.32x
💻 LocalExpress1.582s (-4.5%)2.007s (-3.2%)0.424s151.32x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.457s (-8.1% 🟢)4.342s (~)1.886s71.00x
▲ VercelExpress2.756s (+7.4% 🔺)4.461s (+6.3% 🔺)1.705s71.12x
▲ VercelNext.js (Turbopack)2.913s (-33.4% 🟢)4.470s (-29.0% 🟢)1.557s71.19x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.261s (-1.1%)2.008s (~)0.748s151.00x
🐘 PostgresNext.js (Turbopack)1.399s (~)2.008s (~)0.609s151.11x
🐘 PostgresExpress1.783s (+43.4% 🔺)2.592s (+28.8% 🔺)0.809s121.41x
💻 LocalNext.js (Turbopack)2.031s (+0.5%)2.591s (+3.4%)0.560s121.61x
💻 LocalNitro2.054s (+16.9% 🔺)2.591s (+25.0% 🔺)0.537s121.63x
💻 LocalExpress2.170s (+2.1%)2.592s (~)0.422s121.72x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.771s (-16.6% 🟢)5.273s (-14.5% 🟢)1.502s61.00x
▲ VercelExpress3.779s (+2.8%)5.293s (-5.7% 🟢)1.514s61.00x
▲ VercelNitro3.919s (-4.3%)5.803s (-3.3%)1.884s61.04x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.420s (-2.9%)2.009s (~)0.589s151.00x
🐘 PostgresExpress1.529s (+1.9%)2.494s (+4.0%)0.965s131.08x
🐘 PostgresNext.js (Turbopack)1.710s (+3.3%)2.396s (+15.5% 🔺)0.686s131.20x
💻 LocalNitro5.589s (+17.8% 🔺)6.179s (+15.6% 🔺)0.590s63.94x
💻 LocalExpress5.770s (-1.6%)6.218s (~)0.448s54.06x
💻 LocalNext.js (Turbopack)6.049s (+17.2% 🔺)6.417s (+6.6% 🔺)0.369s54.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.371s (+9.0% 🔺)7.241s (+7.5% 🔺)1.870s51.00x
▲ VercelExpress5.651s (+11.4% 🔺)7.590s (+14.5% 🔺)1.939s41.05x
▲ VercelNext.js (Turbopack)6.282s (+8.5% 🔺)7.842s (+3.5%)1.560s41.17x

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

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.580s (-4.8%)1.024s (+1.6%)0.444s591.00x
💻 LocalNitro0.595s (-26.1% 🟢)1.005s (-16.6% 🟢)0.410s601.03x
💻 LocalExpress0.640s (-2.4%)1.040s (~)0.400s581.10x
🐘 PostgresExpress0.687s (+3.0%)1.113s (+6.2% 🔺)0.426s541.19x
🐘 PostgresNext.js (Turbopack)0.811s (~)1.006s (~)0.196s601.40x
💻 LocalNext.js (Turbopack)0.872s (+25.3% 🔺)1.005s (~)0.132s601.50x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.418s (-27.4% 🟢)7.331s (-23.0% 🟢)1.912s91.00x
▲ VercelExpress5.616s (+2.1%)7.496s (+5.4% 🔺)1.880s91.04x
▲ VercelNext.js (Turbopack)6.210s (+23.0% 🔺)8.016s (+17.0% 🔺)1.806s81.15x

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

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.340s (-5.4% 🟢)2.008s (~)0.668s451.00x
💻 LocalNitro1.510s (+3.2%)2.006s (~)0.496s451.13x
💻 LocalExpress1.591s (~)2.029s (~)0.438s451.19x
🐘 PostgresExpress1.857s (+20.8% 🔺)2.468s (+14.7% 🔺)0.612s381.39x
🐘 PostgresNext.js (Turbopack)1.976s (+1.7%)2.175s (~)0.199s421.48x
💻 LocalNext.js (Turbopack)2.089s (+20.8% 🔺)3.009s (+48.4% 🔺)0.920s301.56x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro12.352s (-6.6% 🟢)14.557s (-6.0% 🟢)2.205s71.00x
▲ VercelExpress12.448s (-24.0% 🟢)14.495s (-20.9% 🟢)2.048s71.01x
▲ VercelNext.js (Turbopack)13.582s (-8.1% 🟢)15.436s (-8.8% 🟢)1.853s61.10x

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

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.652s (-9.0% 🟢)3.086s (-5.9% 🟢)0.434s391.00x
🐘 PostgresExpress3.102s (+6.5% 🔺)3.575s (+1.0%)0.473s341.17x
💻 LocalNitro3.279s (+2.3%)4.010s (~)0.731s301.24x
💻 LocalExpress3.368s (-1.5%)4.010s (~)0.642s301.27x
🐘 PostgresNext.js (Turbopack)3.863s (~)4.148s (+1.8%)0.285s291.46x
💻 LocalNext.js (Turbopack)4.305s (+15.5% 🔺)5.011s (+21.9% 🔺)0.705s241.62x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express25.530s (-11.5% 🟢)27.480s (-11.1% 🟢)1.950s51.00x
▲ VercelNitro26.148s (-12.2% 🟢)28.275s (-11.6% 🟢)2.128s51.02x
▲ VercelNext.js (Turbopack)28.133s (+4.2%)29.722s (+1.6%)1.589s51.10x

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

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.216s (-8.4% 🟢)1.006s (~)0.790s601.00x
🐘 PostgresExpress0.239s (-5.1% 🟢)1.008s (~)0.769s601.11x
🐘 PostgresNext.js (Turbopack)0.264s (-6.5% 🟢)1.006s (~)0.743s601.22x
💻 LocalNitro0.421s (-0.9%)1.005s (~)0.584s601.95x
💻 LocalExpress0.444s (-4.5%)1.005s (~)0.561s602.06x
💻 LocalNext.js (Turbopack)0.561s (-8.2% 🟢)1.005s (-3.3%)0.444s602.60x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.371s (+7.2% 🔺)4.155s (+1.4%)1.784s151.00x
▲ VercelNext.js (Turbopack)2.653s (+20.6% 🔺)4.408s (+4.4%)1.755s141.12x
▲ VercelNitro3.840s (+63.8% 🔺)6.061s (+39.9% 🔺)2.222s101.62x

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

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.347s (-6.4% 🟢)1.007s (~)0.660s901.00x
🐘 PostgresNext.js (Turbopack)0.468s (-3.0%)1.006s (~)0.538s901.35x
🐘 PostgresExpress0.623s (+83.9% 🔺)1.176s (+16.7% 🔺)0.552s771.80x
💻 LocalNitro2.111s (+2.3%)2.637s (~)0.526s356.08x
💻 LocalExpress2.146s (-2.1%)2.797s (-0.9%)0.651s336.18x
💻 LocalNext.js (Turbopack)2.394s (-2.3%)3.113s (~)0.720s296.90x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.157s (-88.2% 🟢)7.065s (-84.6% 🟢)1.908s131.00x
▲ VercelExpress5.318s (-87.7% 🟢)7.335s (-83.8% 🟢)2.017s131.03x
▲ VercelNext.js (Turbopack)5.576s (-11.1% 🟢)7.259s (-14.6% 🟢)1.683s131.08x

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

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.651s (-7.9% 🟢)1.006s (~)0.355s1201.00x
🐘 PostgresNext.js (Turbopack)0.940s (-4.0%)1.371s (-14.7% 🟢)0.431s881.44x
🐘 PostgresExpress1.064s (+70.0% 🔺)1.568s (+48.7% 🔺)0.504s771.63x
💻 LocalNitro9.624s (+10.5% 🔺)10.197s (+9.3% 🔺)0.572s1214.78x
💻 LocalExpress10.242s (-0.7%)10.696s (-1.6%)0.455s1215.73x
💻 LocalNext.js (Turbopack)10.590s (+2.7%)11.394s (+0.8%)0.804s1116.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.861s (-91.3% 🟢)15.465s (-90.5% 🟢)1.605s81.00x
▲ VercelNitro15.439s (-95.0% 🟢)17.739s (-94.3% 🟢)2.299s71.11x
▲ VercelExpress16.562s (+8.6% 🔺)18.445s (+5.5% 🔺)1.883s71.19x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.158s (-1.9%)2.001s (~)0.001s (-7.1% 🟢)2.011s (~)0.853s101.00x
💻 LocalNitro1.163s (+1.1%)2.005s (~)0.012s (+19.0% 🔺)2.019s (~)0.856s101.00x
💻 LocalExpress1.168s (~)2.006s (~)0.012s (-5.5% 🟢)2.020s (~)0.852s101.01x
💻 LocalNext.js (Turbopack)1.203s (+3.0%)2.004s (~)0.013s (+24.8% 🔺)2.020s (~)0.817s101.04x
🐘 PostgresNext.js (Turbopack)1.240s (~)2.001s (~)0.001s (-33.3% 🟢)2.010s (~)0.771s101.07x
🐘 PostgresExpress1.325s (+11.0% 🔺)1.985s (-0.8%)0.059s (+72.3% 🔺)2.105s (+3.0%)0.779s101.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.198s (-2.0%)3.164s (-10.9% 🟢)1.002s (-91.9% 🟢)4.538s (-72.5% 🟢)2.340s101.00x
▲ VercelExpress2.230s (+4.0%)3.256s (-4.5%)0.822s (+56.4% 🔺)4.538s (+2.1%)2.308s101.01x
▲ VercelNitro2.305s (+6.5% 🔺)3.514s (+2.8%)0.722s (+39.9% 🔺)4.840s (+8.3% 🔺)2.536s101.05x

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

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.580s (-5.0%)2.001s (~)0.005s (+37.6% 🔺)2.027s (~)0.447s301.00x
💻 LocalNitro1.586s (-9.0% 🟢)2.011s (~)0.013s (+38.4% 🔺)2.025s (-7.9% 🟢)0.439s301.00x
💻 LocalExpress1.611s (-1.6%)2.012s (~)0.013s (+17.5% 🔺)2.027s (~)0.416s301.02x
🐘 PostgresNext.js (Turbopack)1.722s (-2.4%)2.009s (~)0.005s (+33.9% 🔺)2.027s (~)0.305s301.09x
💻 LocalNext.js (Turbopack)1.723s (+5.0% 🔺)2.010s (~)0.013s (+33.3% 🔺)2.026s (~)0.303s301.09x
🐘 PostgresExpress2.073s (+19.3% 🔺)2.501s (+16.7% 🔺)0.004s (+39.6% 🔺)2.553s (+18.2% 🔺)0.479s241.31x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.803s (+0.8%)6.817s (-8.3% 🟢)0.235s (-33.7% 🟢)7.461s (-11.2% 🟢)1.659s91.00x
▲ VercelNitro5.905s (+2.8%)7.730s (+1.7%)0.222s (-34.4% 🟢)8.452s (~)2.548s81.02x
▲ VercelNext.js (Turbopack)5.965s (-6.4% 🟢)7.035s (-11.4% 🟢)0.234s (-35.2% 🟢)7.715s (-13.0% 🟢)1.749s81.03x

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

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.706s (-2.4%)1.013s (-1.8%)0.000s (-100.0% 🟢)1.025s (-2.2%)0.320s591.00x
🐘 PostgresNext.js (Turbopack)0.807s (-3.1%)1.035s (-3.4%)0.000s (-3.4%)1.042s (-3.5%)0.235s581.14x
🐘 PostgresExpress1.322s (+35.2% 🔺)1.661s (+16.3% 🔺)0.000s (-100.0% 🟢)1.692s (+16.8% 🔺)0.370s361.87x
💻 LocalNitro1.370s (+1.3%)2.013s (~)0.000s (-53.3% 🟢)2.015s (~)0.645s301.94x
💻 LocalExpress1.438s (-3.0%)2.013s (~)0.000s (-46.7% 🟢)2.015s (~)0.577s302.04x
💻 LocalNext.js (Turbopack)1.485s (+2.6%)2.013s (~)0.000s (+75.0% 🔺)2.017s (~)0.532s302.10x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.237s (-20.3% 🟢)4.574s (-14.3% 🟢)0.000s (-95.1% 🟢)5.153s (-16.5% 🟢)1.916s121.00x
▲ VercelNext.js (Turbopack)3.305s (~)4.605s (-5.9% 🟢)0.000s (NaN%)5.009s (-8.3% 🟢)1.704s121.02x
▲ VercelNitro3.342s (-7.2% 🟢)5.136s (+1.3%)0.001s (+Infinity% 🔺)5.650s (~)2.308s111.03x

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

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.395s (-1.1%)2.065s (+3.4%)0.000s (NaN%)2.081s (+3.4%)0.686s291.00x
🐘 PostgresNext.js (Turbopack)1.694s (-1.9%)2.225s (-1.6%)0.000s (+Infinity% 🔺)2.249s (-0.9%)0.554s271.21x
💻 LocalNext.js (Turbopack)2.800s (-12.9% 🟢)3.360s (-13.8% 🟢)0.001s (+202.2% 🔺)3.364s (-13.7% 🟢)0.564s182.01x
💻 LocalNitro3.048s (-2.2%)3.774s (-3.1%)0.001s (+225.0% 🔺)3.779s (-3.1%)0.731s162.18x
💻 LocalExpress3.267s (-2.0%)3.895s (+1.5%)0.001s (+50.0% 🔺)3.906s (+1.6%)0.639s162.34x
🐘 PostgresExpress3.436s (+112.8% 🔺)3.945s (+75.1% 🔺)0.000s (NaN%)3.985s (+74.8% 🔺)0.549s162.46x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.809s (-23.9% 🟢)5.989s (-21.5% 🟢)0.000s (-100.0% 🟢)6.430s (-21.4% 🟢)1.622s101.00x
▲ VercelNitro4.836s (-31.3% 🟢)6.013s (-29.8% 🟢)0.000s (NaN%)6.783s (-25.4% 🟢)1.947s91.01x
▲ VercelNext.js (Turbopack)5.061s (-2.0%)6.498s (-2.7%)0.000s (-100.0% 🟢)6.933s (-3.7%)1.872s91.05x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro18/21
🐘 PostgresNitro21/21
▲ VercelNitro9/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local11/21
Next.js (Turbopack)🐘 Postgres15/21
Nitro🐘 Postgres16/21
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)
  • 🌐 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)

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR enforces a crash-safety invariant in the core runtime: the orchestrator’s queue message must not be acked until all progress-critical work is durably complete (notably step_created / wait_created event writes), so redelivery/replay can safely recover from crashes without orphaning steps.

Changes:

  • handleSuspension() no longer registers progress-critical event writes on a detached waitUntil(Promise.all(...)); it strictly awaits them.
  • Adds a new workflowEntrypoint step-dispatch ack ordering test suite to ensure step-dispatch sends complete (or fail/hang) before the handler resolves (ack).
  • Adds a changeset documenting the behavioral fix for @workflow/core.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

FileDescription
packages/core/src/runtime/suspension-handler.tsRemoves detached waitUntil usage for progress-gating event writes; keeps strict await to preserve ack ordering.
packages/core/src/runtime.test.tsAdds ack-ordering regression tests around step dispatch and waitUntil behavior.
.changeset/ack-after-step-dispatch.mdDocuments the patch-level behavioral fix and rationale.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +636 to +638
}) {
const workflowRun = await makeRunningRun(opts.runId);
const order: string[] = [];

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Done — waitUntilPromises.length = 0 now runs at the start of driveHandler(), so the rejection check only ever observes promises that invocation registered (robust against reordering/.only, not just the per-test afterEach). Fixed in 8d28013.

Comment on lines 21 to 25
vi.mock('@vercel/functions', () => ({
waitUntil: vi.fn(),
waitUntil: vi.fn((p: Promise<unknown>) => {
waitUntilPromises.push(p);
}),
}));

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Good catch. The mock now attaches a no-op .catch() to each promise the instant it's recorded, while still pushing the original promise into waitUntilPromises for later allSettled inspection — so a rejection can never surface as a real unhandled rejection in the test process before anyWaitUntilPromiseRejected() runs. Fixed in 8d28013.

'@workflow/core': patch
---

Never ack the orchestrator's queue message before the events that make the run progress are durably written. The suspension handler used to register the `step_created` / `wait_created` writes on a detached `waitUntil(Promise.all(ops))` in addition to awaiting them; the detached copy framed those progress-critical writes as droppable background work and re-threw send failures into a promise nothing consumes (unhandled rejection → process exit 128). It now strictly awaits the writes only, so the orchestrator message is never acked until they complete — a crash before then leaves the message un-acked and VQS redelivers within the lease, re-creating the (idempotent) entities and re-dispatching instead of orphaning the step. Complements the crash fix in #2336.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

too verbose. match the format/terseness of other changesets

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Trimmed to match the sibling changesets (now ~4 lines, in line with abort-e2e-flakes.md etc). Fixed in 8d28013.

- Trim the changeset to match the terseness of sibling changesets.
- Attach a no-op .catch() to each promise the waitUntil mock records so a
rejecting promise can never surface as a real unhandled rejection in the
test process; keep the original promise for allSettled inspection.
- Reset waitUntilPromises at the start of driveHandler() so the rejection
check only observes this invocation's promises (robust to reordering/.only).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@VaguelySeriousVaguelySerious changed the title [core] Never ack orchestrator message before step dispatch sends complete[core] Fix unhandled rejection when step_created/wait_created calls fail in waitUntilJun 11, 2026
@VaguelySeriousVaguelySerious changed the title [core] Fix unhandled rejection when step_created/wait_created calls fail in waitUntil[core] Remove duplicate waitUntil for suspension handler async operationsJun 11, 2026
@VaguelySerious
VaguelySerious merged commit bf44d4d into mainJun 11, 2026
187 of 193 checks passed
@VaguelySerious
VaguelySerious deleted the fix/ack-after-step-enqueue branch June 11, 2026 08:36
@github-actionsgithub-actionsBot mentioned this pull request Jun 11, 2026
github-actionsBot added a commit that referenced this pull request Jun 11, 2026
…ations (#2345)
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Pranay Prakash <pranay.gp@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

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

VaguelySerious added a commit that referenced this pull request Jun 11, 2026
…ations (#2345) (#2353)
Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
@github-actionsgithub-actionsBot mentioned this pull request Jun 11, 2026
pranaygp added a commit that referenced this pull request Jun 11, 2026
…hook-ready
* origin-https/main: (119 commits)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
Patch vulnerable package dependencies (#2301)
Deprecate DurableAgent and update it with WorkflowAgent in v5 docs (#2285)
[codex] Fix partial world-local exclusive writes (#2296)
...
# Conflicts:
#	packages/core/src/runtime.ts
#	packages/core/src/runtime/suspension-handler.ts
pranaygp added a commit that referenced this pull request Jun 11, 2026
…t-race-eager-wait
* origin/main:
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
pranaygp added a commit that referenced this pull request Jun 11, 2026
…docs-run-idempotency
* origin-https/main: (115 commits)
[core] V2: unify wait+step queue dispatch in suspension processing (#1925)
fix(world-local,world-postgres): make duplicate hook_created idempotent (#2295)
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
...
# Conflicts:
#	docs/content/docs/v4/cookbook/advanced/child-workflows.mdx
#	docs/content/docs/v5/cookbook/advanced/child-workflows.mdx
#	docs/content/docs/v5/cookbook/agent-patterns/durable-agent.mdx
pranaygp added a commit that referenced this pull request Jun 11, 2026
* origin/main:
[core] V2: unify wait+step queue dispatch in suspension processing (#1925)
fix(world-local,world-postgres): make duplicate hook_created idempotent (#2295)
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
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.

3 participants

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

[core] Remove duplicate waitUntil for suspension handler async operations - #2345

Merged
VaguelySerious merged 3 commits into
mainfrom
fix/ack-after-step-enqueue
Jun 11, 2026
Merged

[core] Remove duplicate waitUntil for suspension handler async operations#2345
VaguelySerious merged 3 commits into
mainfrom
fix/ack-after-step-enqueue

Conversation

@pranaygp

@pranaygppranaygp commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Peter: Ignore all the below, this PR is smaller in scope than it leads on. Read the code, it's a few lines.


The invariant

Never ack the orchestrator's queue message until all work that makes the run progress is durably complete — including creating AND enqueueing subsequent steps. Queue sends are idempotent (idempotency keys), so a crash before ack yields a redelivery → replay → safe re-send, recovering within the VQS ~300s lease instead of orphaning the step. The codebase already states this principle for timeout re-enqueues (packages/world-vercel/src/queue.ts: "Send new message BEFORE acknowledging current message. This ensures crash safety…"); this PR makes it hold for the suspension-handler's progress-critical event writes.

Production evidence

Run wrun_01KTSMXMKD7C544YFHX0GNPEG1 (prod, codeReviewWorkflowV2, dpl dpl_F4kcruzPhU3EY6Mbo3vqvEPAvRYM, 2026-06-10): the deployment was crash-looping with exit-128 (unhandled-rejection; fix in open PR #2336). step_created committed at 21:03:32.611; VQS shows zero step-queue [SEND]s for the run for 4h35m (the dispatch never happened); no lease redeliveries fired in the gap — the orchestrator message chain had concluded (= acked). A PR webhook at 01:38:40 finally re-drove the orchestrator, which rediscovered and dispatched the step in ~1s. ~130 warnings/day across 89 runs on one team share the signature, with orphan windows up to ~24h.

What changed

packages/core/src/runtime/suspension-handler.ts previously registered the step_created / wait_created event writes (ops) on a detached waitUntil(Promise.all(ops))in addition to awaiting them on the next line. The detached copy:

  1. framed those progress-critical writes as droppable background work the platform may discard after the response/ack, and
  2. re-threw send failures into a promise nothing consumes → unhandled rejection → process exit 128.

The fix removes the detached waitUntil registration and keeps only the strict await Promise.all(ops). On this branch the step-dispatch queueMessage sends already live in runtime.ts (workflowEntrypoint) and are awaited there before the handler returns; this change ensures the step_created events those dispatches depend on are likewise strictly awaited, so the whole progress-critical chain completes before the queue handler acks the orchestrator message.

What stayed background (and why)

The waitUntil(Promise.all(ops)) registrations in step-handler.ts, start.ts, and resume-hook.ts were not touched: their ops are stream-flush writes (not progress-gating), have no awaited copy, and legitimately need waitUntil to keep the function alive. The orchestrator re-trigger / step-continuation queueMessage sends in those files are already awaited. PR #2336 hardens those background sites with a safeWaitUntil helper.

Test coverage

Adds an ack ordering suite to packages/core/src/runtime.test.ts driving the real workflowEntrypoint against a workflow that suspends on a step + sleep (so the step is queued, not run inline):

  • the step-dispatch queue() send completes before the ack sentinel (and step_created precedes the dispatch);
  • a hanging dispatch send keeps the handler from resolving (no ack);
  • a failing dispatch send rejects the handler (no ack → VQS redelivers) without rejecting any promise handed to waitUntil.

Relationship to #2336

Orthogonal and complementary. #2336 stops the crash class (rejected waitUntil promises → exit 128) so the queue can re-drive normally. This PR guarantees crash recovery via redelivery regardless of why the process crashed by enforcing the ack-ordering invariant. Both edit suspension-handler.ts; #2336 also drops the same waitUntil registration there, so expect a trivial rebase overlap (the resolution is identical — drop the registration, keep the await).

…lete
The suspension handler registered the step_created / wait_created event
writes on a detached waitUntil(Promise.all(ops)) in addition to awaiting
them. The detached copy framed those progress-critical writes as droppable
background work and re-threw send failures into a promise nothing consumes
(unhandled rejection -> process exit 128). It now strictly awaits the writes
only, preserving the ack-ordering invariant: the orchestrator message is not
acked until the writes (and the dispatch sends the caller makes afterward)
complete, so a crash before then leaves the message un-acked for VQS to
redeliver instead of orphaning the step.
Adds runtime.test.ts ack-ordering tests: the dispatch send must complete
before ack, a hanging send must not ack, and a failing send must reject the
handler (no ack) without rejecting any waitUntil promise.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@pranaygp
pranaygp requested a review from a team as a code ownerJune 11, 2026 06:10
CopilotAI review requested due to automatic review settings June 11, 2026 06:10
@changeset-bot

changeset-botBot commented Jun 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 07fd5f4

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

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

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercelBot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production126602191485
✅ 💻 Local Development167102191890
✅ 📦 Local Production167102191890
✅ 🐘 Local Postgres167102191890
✅ 🪟 Windows13500135
✅ 📋 Other7690176945
Total7183010528235

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro109026
✅ example109026
✅ express109026
✅ fastify109026
✅ hono109026
✅ nextjs-turbopack13302
✅ nextjs-webpack13302
✅ nitro109026
✅ nuxt109026
✅ sveltekit12807
✅ vite109026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack13500
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable110025
✅ e2e-local-dev-tanstack-start-110025
✅ e2e-local-postgres-nest-stable110025
✅ e2e-local-postgres-tanstack-start-110025
✅ e2e-local-prod-nest-stable110025
✅ e2e-local-prod-tanstack-start-110025
✅ e2e-vercel-prod-tanstack-start109026

📋 View full workflow run

@github-actions

github-actionsBot commented Jun 11, 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.042s (-1.2%)1.007s (~)0.964s101.00x
💻 LocalExpress0.044s (+1.9%)1.006s (~)0.962s101.04x
💻 LocalNext.js (Turbopack)0.060s (+9.6% 🔺)1.006s (~)0.946s101.43x
🐘 PostgresNitro0.064s (~)1.012s (~)0.949s101.50x
🐘 PostgresNext.js (Turbopack)0.070s (-0.7%)1.013s (~)0.944s101.64x
🐘 PostgresExpress0.125s (+88.5% 🔺)1.054s (+3.9%)0.929s102.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.281s (+7.7% 🔺)2.724s (+11.8% 🔺)2.442s101.00x
▲ VercelNext.js (Turbopack)0.287s (-12.9% 🟢)2.246s (-4.1%)1.960s101.02x
▲ VercelExpress0.311s (+14.3% 🔺)2.400s (-11.5% 🟢)2.089s101.11x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.093s (~)2.006s (~)0.913s101.00x
💻 LocalExpress1.101s (~)2.006s (~)0.905s101.01x
🐘 PostgresNitro1.102s (-1.1%)2.010s (~)0.908s101.01x
💻 LocalNext.js (Turbopack)1.135s (+2.4%)2.007s (~)0.871s101.04x
🐘 PostgresNext.js (Turbopack)1.161s (+1.7%)2.011s (~)0.850s101.06x
🐘 PostgresExpress1.262s (+15.6% 🔺)2.092s (+4.0%)0.829s101.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.820s (+9.3% 🔺)3.699s (-9.3% 🟢)1.879s101.00x
▲ VercelExpress1.833s (+15.7% 🔺)3.828s (+7.2% 🔺)1.996s101.01x
▲ VercelNitro1.973s (+26.0% 🔺)4.298s (+21.8% 🔺)2.324s101.08x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.512s (~)11.021s (~)0.509s31.00x
🐘 PostgresNitro10.542s (~)11.020s (~)0.478s31.00x
💻 LocalExpress10.552s (~)11.023s (~)0.471s31.00x
💻 LocalNext.js (Turbopack)10.768s (+1.5%)11.022s (~)0.254s31.02x
🐘 PostgresExpress10.855s (+1.3%)11.423s (+0.6%)0.568s31.03x
🐘 PostgresNext.js (Turbopack)10.855s (~)11.020s (~)0.164s31.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)14.575s (+8.0% 🔺)16.665s (+3.5%)2.090s21.00x
▲ VercelExpress14.855s (+12.9% 🔺)16.492s (+6.7% 🔺)1.636s21.02x
▲ VercelNitro16.093s (+20.8% 🔺)18.277s (+17.2% 🔺)2.183s21.10x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro13.716s (~)14.027s (~)0.310s51.00x
🐘 PostgresNitro13.733s (-0.8%)14.020s (~)0.287s51.00x
💻 LocalExpress13.795s (-0.8%)14.027s (-1.4%)0.232s51.01x
💻 LocalNext.js (Turbopack)14.382s (+2.5%)15.031s (+2.8%)0.648s41.05x
🐘 PostgresExpress14.472s (+4.6%)15.021s (+5.5% 🔺)0.548s41.06x
🐘 PostgresNext.js (Turbopack)14.794s (+1.4%)15.270s (+1.7%)0.476s41.08x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro23.738s (-7.0% 🟢)27.387s (-0.8%)3.649s31.00x
▲ VercelExpress24.834s (-2.5%)26.672s (-2.1%)1.838s31.05x
▲ VercelNext.js (Turbopack)25.661s (+0.6%)27.005s (-0.7%)1.344s31.08x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro12.399s (~)13.024s (~)0.625s71.00x
🐘 PostgresNitro12.525s (-1.7%)13.018s (~)0.493s71.01x
💻 LocalExpress12.531s (-0.5%)13.025s (~)0.494s71.01x
💻 LocalNext.js (Turbopack)13.663s (+5.5% 🔺)14.027s (+5.4% 🔺)0.364s71.10x
🐘 PostgresNext.js (Turbopack)13.733s (~)14.019s (~)0.286s71.11x
🐘 PostgresExpress13.775s (+8.2% 🔺)14.307s (+7.5% 🔺)0.532s71.11x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express29.132s (-9.1% 🟢)31.079s (-9.2% 🟢)1.947s31.00x
▲ VercelNitro30.472s (+4.9%)33.068s (+5.3% 🔺)2.597s31.05x
▲ VercelNext.js (Turbopack)31.623s (+6.8% 🔺)32.793s (+2.9%)1.170s31.09x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.179s (-1.7%)2.007s (~)0.828s151.00x
💻 LocalNitro1.186s (-2.3%)2.007s (~)0.821s151.01x
🐘 PostgresNext.js (Turbopack)1.259s (+0.6%)2.007s (~)0.748s151.07x
💻 LocalNext.js (Turbopack)1.320s (+7.9% 🔺)2.006s (~)0.686s151.12x
💻 LocalExpress1.340s (+6.1% 🔺)2.007s (~)0.667s151.14x
🐘 PostgresExpress1.408s (+17.4% 🔺)2.018s (~)0.610s151.19x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.510s (-9.4% 🟢)4.773s (+10.0% 🔺)2.263s71.00x
▲ VercelNext.js (Turbopack)2.679s (~)4.255s (+0.9%)1.576s81.07x
▲ VercelExpress2.800s (+1.1%)4.533s (-4.0%)1.734s71.12x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.252s (-0.6%)2.008s (~)0.756s151.00x
🐘 PostgresNext.js (Turbopack)1.394s (-1.1%)2.008s (~)0.614s151.11x
🐘 PostgresExpress1.615s (+21.8% 🔺)2.410s (+19.5% 🔺)0.795s131.29x
💻 LocalNitro1.771s (+3.9%)2.006s (-3.2%)0.234s151.42x
💻 LocalNext.js (Turbopack)1.864s (+8.0% 🔺)2.150s (+7.2% 🔺)0.286s141.49x
💻 LocalExpress1.920s (+2.0%)2.294s (+3.3%)0.374s141.53x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.601s (-11.8% 🟢)5.376s (-12.9% 🟢)1.775s61.00x
▲ VercelNext.js (Turbopack)3.895s (-5.2% 🟢)5.557s (-9.5% 🟢)1.663s61.08x
▲ VercelNitro3.909s (-4.0%)5.743s (-7.5% 🟢)1.834s61.09x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.402s (~)2.009s (~)0.607s151.00x
🐘 PostgresNext.js (Turbopack)1.753s (~)2.075s (-9.6% 🟢)0.322s151.25x
🐘 PostgresExpress2.096s (+50.4% 🔺)3.371s (+67.7% 🔺)1.274s91.50x
💻 LocalNitro4.863s (+3.1%)5.347s (+6.7% 🔺)0.484s63.47x
💻 LocalExpress5.361s (+1.2%)5.846s (-2.8%)0.485s63.82x
💻 LocalNext.js (Turbopack)5.901s (+34.2% 🔺)6.214s (+24.0% 🔺)0.313s54.21x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.264s (-21.9% 🟢)8.049s (-7.6% 🟢)2.785s41.00x
▲ VercelExpress6.176s (+4.6%)7.914s (~)1.739s41.17x
▲ VercelNext.js (Turbopack)6.496s (+10.6% 🔺)8.160s (+4.9%)1.664s41.23x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.195s (~)2.009s (~)0.814s151.00x
🐘 PostgresNext.js (Turbopack)1.258s (-0.6%)2.008s (~)0.750s151.05x
💻 LocalNext.js (Turbopack)1.375s (+5.3% 🔺)2.007s (~)0.632s151.15x
🐘 PostgresExpress1.533s (+27.5% 🔺)2.116s (+5.4% 🔺)0.583s151.28x
💻 LocalNitro1.577s (+2.2%)2.006s (~)0.429s151.32x
💻 LocalExpress1.582s (-4.5%)2.007s (-3.2%)0.424s151.32x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.457s (-8.1% 🟢)4.342s (~)1.886s71.00x
▲ VercelExpress2.756s (+7.4% 🔺)4.461s (+6.3% 🔺)1.705s71.12x
▲ VercelNext.js (Turbopack)2.913s (-33.4% 🟢)4.470s (-29.0% 🟢)1.557s71.19x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.261s (-1.1%)2.008s (~)0.748s151.00x
🐘 PostgresNext.js (Turbopack)1.399s (~)2.008s (~)0.609s151.11x
🐘 PostgresExpress1.783s (+43.4% 🔺)2.592s (+28.8% 🔺)0.809s121.41x
💻 LocalNext.js (Turbopack)2.031s (+0.5%)2.591s (+3.4%)0.560s121.61x
💻 LocalNitro2.054s (+16.9% 🔺)2.591s (+25.0% 🔺)0.537s121.63x
💻 LocalExpress2.170s (+2.1%)2.592s (~)0.422s121.72x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.771s (-16.6% 🟢)5.273s (-14.5% 🟢)1.502s61.00x
▲ VercelExpress3.779s (+2.8%)5.293s (-5.7% 🟢)1.514s61.00x
▲ VercelNitro3.919s (-4.3%)5.803s (-3.3%)1.884s61.04x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.420s (-2.9%)2.009s (~)0.589s151.00x
🐘 PostgresExpress1.529s (+1.9%)2.494s (+4.0%)0.965s131.08x
🐘 PostgresNext.js (Turbopack)1.710s (+3.3%)2.396s (+15.5% 🔺)0.686s131.20x
💻 LocalNitro5.589s (+17.8% 🔺)6.179s (+15.6% 🔺)0.590s63.94x
💻 LocalExpress5.770s (-1.6%)6.218s (~)0.448s54.06x
💻 LocalNext.js (Turbopack)6.049s (+17.2% 🔺)6.417s (+6.6% 🔺)0.369s54.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.371s (+9.0% 🔺)7.241s (+7.5% 🔺)1.870s51.00x
▲ VercelExpress5.651s (+11.4% 🔺)7.590s (+14.5% 🔺)1.939s41.05x
▲ VercelNext.js (Turbopack)6.282s (+8.5% 🔺)7.842s (+3.5%)1.560s41.17x

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

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.580s (-4.8%)1.024s (+1.6%)0.444s591.00x
💻 LocalNitro0.595s (-26.1% 🟢)1.005s (-16.6% 🟢)0.410s601.03x
💻 LocalExpress0.640s (-2.4%)1.040s (~)0.400s581.10x
🐘 PostgresExpress0.687s (+3.0%)1.113s (+6.2% 🔺)0.426s541.19x
🐘 PostgresNext.js (Turbopack)0.811s (~)1.006s (~)0.196s601.40x
💻 LocalNext.js (Turbopack)0.872s (+25.3% 🔺)1.005s (~)0.132s601.50x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.418s (-27.4% 🟢)7.331s (-23.0% 🟢)1.912s91.00x
▲ VercelExpress5.616s (+2.1%)7.496s (+5.4% 🔺)1.880s91.04x
▲ VercelNext.js (Turbopack)6.210s (+23.0% 🔺)8.016s (+17.0% 🔺)1.806s81.15x

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

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.340s (-5.4% 🟢)2.008s (~)0.668s451.00x
💻 LocalNitro1.510s (+3.2%)2.006s (~)0.496s451.13x
💻 LocalExpress1.591s (~)2.029s (~)0.438s451.19x
🐘 PostgresExpress1.857s (+20.8% 🔺)2.468s (+14.7% 🔺)0.612s381.39x
🐘 PostgresNext.js (Turbopack)1.976s (+1.7%)2.175s (~)0.199s421.48x
💻 LocalNext.js (Turbopack)2.089s (+20.8% 🔺)3.009s (+48.4% 🔺)0.920s301.56x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro12.352s (-6.6% 🟢)14.557s (-6.0% 🟢)2.205s71.00x
▲ VercelExpress12.448s (-24.0% 🟢)14.495s (-20.9% 🟢)2.048s71.01x
▲ VercelNext.js (Turbopack)13.582s (-8.1% 🟢)15.436s (-8.8% 🟢)1.853s61.10x

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

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.652s (-9.0% 🟢)3.086s (-5.9% 🟢)0.434s391.00x
🐘 PostgresExpress3.102s (+6.5% 🔺)3.575s (+1.0%)0.473s341.17x
💻 LocalNitro3.279s (+2.3%)4.010s (~)0.731s301.24x
💻 LocalExpress3.368s (-1.5%)4.010s (~)0.642s301.27x
🐘 PostgresNext.js (Turbopack)3.863s (~)4.148s (+1.8%)0.285s291.46x
💻 LocalNext.js (Turbopack)4.305s (+15.5% 🔺)5.011s (+21.9% 🔺)0.705s241.62x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express25.530s (-11.5% 🟢)27.480s (-11.1% 🟢)1.950s51.00x
▲ VercelNitro26.148s (-12.2% 🟢)28.275s (-11.6% 🟢)2.128s51.02x
▲ VercelNext.js (Turbopack)28.133s (+4.2%)29.722s (+1.6%)1.589s51.10x

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

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.216s (-8.4% 🟢)1.006s (~)0.790s601.00x
🐘 PostgresExpress0.239s (-5.1% 🟢)1.008s (~)0.769s601.11x
🐘 PostgresNext.js (Turbopack)0.264s (-6.5% 🟢)1.006s (~)0.743s601.22x
💻 LocalNitro0.421s (-0.9%)1.005s (~)0.584s601.95x
💻 LocalExpress0.444s (-4.5%)1.005s (~)0.561s602.06x
💻 LocalNext.js (Turbopack)0.561s (-8.2% 🟢)1.005s (-3.3%)0.444s602.60x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.371s (+7.2% 🔺)4.155s (+1.4%)1.784s151.00x
▲ VercelNext.js (Turbopack)2.653s (+20.6% 🔺)4.408s (+4.4%)1.755s141.12x
▲ VercelNitro3.840s (+63.8% 🔺)6.061s (+39.9% 🔺)2.222s101.62x

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

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.347s (-6.4% 🟢)1.007s (~)0.660s901.00x
🐘 PostgresNext.js (Turbopack)0.468s (-3.0%)1.006s (~)0.538s901.35x
🐘 PostgresExpress0.623s (+83.9% 🔺)1.176s (+16.7% 🔺)0.552s771.80x
💻 LocalNitro2.111s (+2.3%)2.637s (~)0.526s356.08x
💻 LocalExpress2.146s (-2.1%)2.797s (-0.9%)0.651s336.18x
💻 LocalNext.js (Turbopack)2.394s (-2.3%)3.113s (~)0.720s296.90x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.157s (-88.2% 🟢)7.065s (-84.6% 🟢)1.908s131.00x
▲ VercelExpress5.318s (-87.7% 🟢)7.335s (-83.8% 🟢)2.017s131.03x
▲ VercelNext.js (Turbopack)5.576s (-11.1% 🟢)7.259s (-14.6% 🟢)1.683s131.08x

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

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.651s (-7.9% 🟢)1.006s (~)0.355s1201.00x
🐘 PostgresNext.js (Turbopack)0.940s (-4.0%)1.371s (-14.7% 🟢)0.431s881.44x
🐘 PostgresExpress1.064s (+70.0% 🔺)1.568s (+48.7% 🔺)0.504s771.63x
💻 LocalNitro9.624s (+10.5% 🔺)10.197s (+9.3% 🔺)0.572s1214.78x
💻 LocalExpress10.242s (-0.7%)10.696s (-1.6%)0.455s1215.73x
💻 LocalNext.js (Turbopack)10.590s (+2.7%)11.394s (+0.8%)0.804s1116.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.861s (-91.3% 🟢)15.465s (-90.5% 🟢)1.605s81.00x
▲ VercelNitro15.439s (-95.0% 🟢)17.739s (-94.3% 🟢)2.299s71.11x
▲ VercelExpress16.562s (+8.6% 🔺)18.445s (+5.5% 🔺)1.883s71.19x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.158s (-1.9%)2.001s (~)0.001s (-7.1% 🟢)2.011s (~)0.853s101.00x
💻 LocalNitro1.163s (+1.1%)2.005s (~)0.012s (+19.0% 🔺)2.019s (~)0.856s101.00x
💻 LocalExpress1.168s (~)2.006s (~)0.012s (-5.5% 🟢)2.020s (~)0.852s101.01x
💻 LocalNext.js (Turbopack)1.203s (+3.0%)2.004s (~)0.013s (+24.8% 🔺)2.020s (~)0.817s101.04x
🐘 PostgresNext.js (Turbopack)1.240s (~)2.001s (~)0.001s (-33.3% 🟢)2.010s (~)0.771s101.07x
🐘 PostgresExpress1.325s (+11.0% 🔺)1.985s (-0.8%)0.059s (+72.3% 🔺)2.105s (+3.0%)0.779s101.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.198s (-2.0%)3.164s (-10.9% 🟢)1.002s (-91.9% 🟢)4.538s (-72.5% 🟢)2.340s101.00x
▲ VercelExpress2.230s (+4.0%)3.256s (-4.5%)0.822s (+56.4% 🔺)4.538s (+2.1%)2.308s101.01x
▲ VercelNitro2.305s (+6.5% 🔺)3.514s (+2.8%)0.722s (+39.9% 🔺)4.840s (+8.3% 🔺)2.536s101.05x

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

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.580s (-5.0%)2.001s (~)0.005s (+37.6% 🔺)2.027s (~)0.447s301.00x
💻 LocalNitro1.586s (-9.0% 🟢)2.011s (~)0.013s (+38.4% 🔺)2.025s (-7.9% 🟢)0.439s301.00x
💻 LocalExpress1.611s (-1.6%)2.012s (~)0.013s (+17.5% 🔺)2.027s (~)0.416s301.02x
🐘 PostgresNext.js (Turbopack)1.722s (-2.4%)2.009s (~)0.005s (+33.9% 🔺)2.027s (~)0.305s301.09x
💻 LocalNext.js (Turbopack)1.723s (+5.0% 🔺)2.010s (~)0.013s (+33.3% 🔺)2.026s (~)0.303s301.09x
🐘 PostgresExpress2.073s (+19.3% 🔺)2.501s (+16.7% 🔺)0.004s (+39.6% 🔺)2.553s (+18.2% 🔺)0.479s241.31x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.803s (+0.8%)6.817s (-8.3% 🟢)0.235s (-33.7% 🟢)7.461s (-11.2% 🟢)1.659s91.00x
▲ VercelNitro5.905s (+2.8%)7.730s (+1.7%)0.222s (-34.4% 🟢)8.452s (~)2.548s81.02x
▲ VercelNext.js (Turbopack)5.965s (-6.4% 🟢)7.035s (-11.4% 🟢)0.234s (-35.2% 🟢)7.715s (-13.0% 🟢)1.749s81.03x

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

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.706s (-2.4%)1.013s (-1.8%)0.000s (-100.0% 🟢)1.025s (-2.2%)0.320s591.00x
🐘 PostgresNext.js (Turbopack)0.807s (-3.1%)1.035s (-3.4%)0.000s (-3.4%)1.042s (-3.5%)0.235s581.14x
🐘 PostgresExpress1.322s (+35.2% 🔺)1.661s (+16.3% 🔺)0.000s (-100.0% 🟢)1.692s (+16.8% 🔺)0.370s361.87x
💻 LocalNitro1.370s (+1.3%)2.013s (~)0.000s (-53.3% 🟢)2.015s (~)0.645s301.94x
💻 LocalExpress1.438s (-3.0%)2.013s (~)0.000s (-46.7% 🟢)2.015s (~)0.577s302.04x
💻 LocalNext.js (Turbopack)1.485s (+2.6%)2.013s (~)0.000s (+75.0% 🔺)2.017s (~)0.532s302.10x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.237s (-20.3% 🟢)4.574s (-14.3% 🟢)0.000s (-95.1% 🟢)5.153s (-16.5% 🟢)1.916s121.00x
▲ VercelNext.js (Turbopack)3.305s (~)4.605s (-5.9% 🟢)0.000s (NaN%)5.009s (-8.3% 🟢)1.704s121.02x
▲ VercelNitro3.342s (-7.2% 🟢)5.136s (+1.3%)0.001s (+Infinity% 🔺)5.650s (~)2.308s111.03x

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

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.395s (-1.1%)2.065s (+3.4%)0.000s (NaN%)2.081s (+3.4%)0.686s291.00x
🐘 PostgresNext.js (Turbopack)1.694s (-1.9%)2.225s (-1.6%)0.000s (+Infinity% 🔺)2.249s (-0.9%)0.554s271.21x
💻 LocalNext.js (Turbopack)2.800s (-12.9% 🟢)3.360s (-13.8% 🟢)0.001s (+202.2% 🔺)3.364s (-13.7% 🟢)0.564s182.01x
💻 LocalNitro3.048s (-2.2%)3.774s (-3.1%)0.001s (+225.0% 🔺)3.779s (-3.1%)0.731s162.18x
💻 LocalExpress3.267s (-2.0%)3.895s (+1.5%)0.001s (+50.0% 🔺)3.906s (+1.6%)0.639s162.34x
🐘 PostgresExpress3.436s (+112.8% 🔺)3.945s (+75.1% 🔺)0.000s (NaN%)3.985s (+74.8% 🔺)0.549s162.46x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.809s (-23.9% 🟢)5.989s (-21.5% 🟢)0.000s (-100.0% 🟢)6.430s (-21.4% 🟢)1.622s101.00x
▲ VercelNitro4.836s (-31.3% 🟢)6.013s (-29.8% 🟢)0.000s (NaN%)6.783s (-25.4% 🟢)1.947s91.01x
▲ VercelNext.js (Turbopack)5.061s (-2.0%)6.498s (-2.7%)0.000s (-100.0% 🟢)6.933s (-3.7%)1.872s91.05x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro18/21
🐘 PostgresNitro21/21
▲ VercelNitro9/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local11/21
Next.js (Turbopack)🐘 Postgres15/21
Nitro🐘 Postgres16/21
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)
  • 🌐 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)

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR enforces a crash-safety invariant in the core runtime: the orchestrator’s queue message must not be acked until all progress-critical work is durably complete (notably step_created / wait_created event writes), so redelivery/replay can safely recover from crashes without orphaning steps.

Changes:

  • handleSuspension() no longer registers progress-critical event writes on a detached waitUntil(Promise.all(...)); it strictly awaits them.
  • Adds a new workflowEntrypoint step-dispatch ack ordering test suite to ensure step-dispatch sends complete (or fail/hang) before the handler resolves (ack).
  • Adds a changeset documenting the behavioral fix for @workflow/core.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

FileDescription
packages/core/src/runtime/suspension-handler.tsRemoves detached waitUntil usage for progress-gating event writes; keeps strict await to preserve ack ordering.
packages/core/src/runtime.test.tsAdds ack-ordering regression tests around step dispatch and waitUntil behavior.
.changeset/ack-after-step-dispatch.mdDocuments the patch-level behavioral fix and rationale.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +636 to +638
}) {
const workflowRun = await makeRunningRun(opts.runId);
const order: string[] = [];

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Done — waitUntilPromises.length = 0 now runs at the start of driveHandler(), so the rejection check only ever observes promises that invocation registered (robust against reordering/.only, not just the per-test afterEach). Fixed in 8d28013.

Comment on lines 21 to 25
vi.mock('@vercel/functions', () => ({
waitUntil: vi.fn(),
waitUntil: vi.fn((p: Promise<unknown>) => {
waitUntilPromises.push(p);
}),
}));

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Good catch. The mock now attaches a no-op .catch() to each promise the instant it's recorded, while still pushing the original promise into waitUntilPromises for later allSettled inspection — so a rejection can never surface as a real unhandled rejection in the test process before anyWaitUntilPromiseRejected() runs. Fixed in 8d28013.

'@workflow/core': patch
---

Never ack the orchestrator's queue message before the events that make the run progress are durably written. The suspension handler used to register the `step_created` / `wait_created` writes on a detached `waitUntil(Promise.all(ops))` in addition to awaiting them; the detached copy framed those progress-critical writes as droppable background work and re-threw send failures into a promise nothing consumes (unhandled rejection → process exit 128). It now strictly awaits the writes only, so the orchestrator message is never acked until they complete — a crash before then leaves the message un-acked and VQS redelivers within the lease, re-creating the (idempotent) entities and re-dispatching instead of orphaning the step. Complements the crash fix in #2336.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

too verbose. match the format/terseness of other changesets

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Trimmed to match the sibling changesets (now ~4 lines, in line with abort-e2e-flakes.md etc). Fixed in 8d28013.

- Trim the changeset to match the terseness of sibling changesets.
- Attach a no-op .catch() to each promise the waitUntil mock records so a
rejecting promise can never surface as a real unhandled rejection in the
test process; keep the original promise for allSettled inspection.
- Reset waitUntilPromises at the start of driveHandler() so the rejection
check only observes this invocation's promises (robust to reordering/.only).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@VaguelySeriousVaguelySerious changed the title [core] Never ack orchestrator message before step dispatch sends complete[core] Fix unhandled rejection when step_created/wait_created calls fail in waitUntilJun 11, 2026
@VaguelySeriousVaguelySerious changed the title [core] Fix unhandled rejection when step_created/wait_created calls fail in waitUntil[core] Remove duplicate waitUntil for suspension handler async operationsJun 11, 2026
@VaguelySerious
VaguelySerious merged commit bf44d4d into mainJun 11, 2026
187 of 193 checks passed
@VaguelySerious
VaguelySerious deleted the fix/ack-after-step-enqueue branch June 11, 2026 08:36
@github-actionsgithub-actionsBot mentioned this pull request Jun 11, 2026
github-actionsBot added a commit that referenced this pull request Jun 11, 2026
…ations (#2345)
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Pranay Prakash <pranay.gp@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

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

VaguelySerious added a commit that referenced this pull request Jun 11, 2026
…ations (#2345) (#2353)
Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
@github-actionsgithub-actionsBot mentioned this pull request Jun 11, 2026
pranaygp added a commit that referenced this pull request Jun 11, 2026
…hook-ready
* origin-https/main: (119 commits)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
Patch vulnerable package dependencies (#2301)
Deprecate DurableAgent and update it with WorkflowAgent in v5 docs (#2285)
[codex] Fix partial world-local exclusive writes (#2296)
...
# Conflicts:
#	packages/core/src/runtime.ts
#	packages/core/src/runtime/suspension-handler.ts
pranaygp added a commit that referenced this pull request Jun 11, 2026
…t-race-eager-wait
* origin/main:
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
pranaygp added a commit that referenced this pull request Jun 11, 2026
…docs-run-idempotency
* origin-https/main: (115 commits)
[core] V2: unify wait+step queue dispatch in suspension processing (#1925)
fix(world-local,world-postgres): make duplicate hook_created idempotent (#2295)
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
...
# Conflicts:
#	docs/content/docs/v4/cookbook/advanced/child-workflows.mdx
#	docs/content/docs/v5/cookbook/advanced/child-workflows.mdx
#	docs/content/docs/v5/cookbook/agent-patterns/durable-agent.mdx
pranaygp added a commit that referenced this pull request Jun 11, 2026
* origin/main:
[core] V2: unify wait+step queue dispatch in suspension processing (#1925)
fix(world-local,world-postgres): make duplicate hook_created idempotent (#2295)
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
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.

3 participants

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

[core] Remove duplicate waitUntil for suspension handler async operations - #2345

Merged
VaguelySerious merged 3 commits into
mainfrom
fix/ack-after-step-enqueue
Jun 11, 2026
Merged

[core] Remove duplicate waitUntil for suspension handler async operations#2345
VaguelySerious merged 3 commits into
mainfrom
fix/ack-after-step-enqueue

Conversation

@pranaygp

@pranaygppranaygp commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Peter: Ignore all the below, this PR is smaller in scope than it leads on. Read the code, it's a few lines.


The invariant

Never ack the orchestrator's queue message until all work that makes the run progress is durably complete — including creating AND enqueueing subsequent steps. Queue sends are idempotent (idempotency keys), so a crash before ack yields a redelivery → replay → safe re-send, recovering within the VQS ~300s lease instead of orphaning the step. The codebase already states this principle for timeout re-enqueues (packages/world-vercel/src/queue.ts: "Send new message BEFORE acknowledging current message. This ensures crash safety…"); this PR makes it hold for the suspension-handler's progress-critical event writes.

Production evidence

Run wrun_01KTSMXMKD7C544YFHX0GNPEG1 (prod, codeReviewWorkflowV2, dpl dpl_F4kcruzPhU3EY6Mbo3vqvEPAvRYM, 2026-06-10): the deployment was crash-looping with exit-128 (unhandled-rejection; fix in open PR #2336). step_created committed at 21:03:32.611; VQS shows zero step-queue [SEND]s for the run for 4h35m (the dispatch never happened); no lease redeliveries fired in the gap — the orchestrator message chain had concluded (= acked). A PR webhook at 01:38:40 finally re-drove the orchestrator, which rediscovered and dispatched the step in ~1s. ~130 warnings/day across 89 runs on one team share the signature, with orphan windows up to ~24h.

What changed

packages/core/src/runtime/suspension-handler.ts previously registered the step_created / wait_created event writes (ops) on a detached waitUntil(Promise.all(ops))in addition to awaiting them on the next line. The detached copy:

  1. framed those progress-critical writes as droppable background work the platform may discard after the response/ack, and
  2. re-threw send failures into a promise nothing consumes → unhandled rejection → process exit 128.

The fix removes the detached waitUntil registration and keeps only the strict await Promise.all(ops). On this branch the step-dispatch queueMessage sends already live in runtime.ts (workflowEntrypoint) and are awaited there before the handler returns; this change ensures the step_created events those dispatches depend on are likewise strictly awaited, so the whole progress-critical chain completes before the queue handler acks the orchestrator message.

What stayed background (and why)

The waitUntil(Promise.all(ops)) registrations in step-handler.ts, start.ts, and resume-hook.ts were not touched: their ops are stream-flush writes (not progress-gating), have no awaited copy, and legitimately need waitUntil to keep the function alive. The orchestrator re-trigger / step-continuation queueMessage sends in those files are already awaited. PR #2336 hardens those background sites with a safeWaitUntil helper.

Test coverage

Adds an ack ordering suite to packages/core/src/runtime.test.ts driving the real workflowEntrypoint against a workflow that suspends on a step + sleep (so the step is queued, not run inline):

  • the step-dispatch queue() send completes before the ack sentinel (and step_created precedes the dispatch);
  • a hanging dispatch send keeps the handler from resolving (no ack);
  • a failing dispatch send rejects the handler (no ack → VQS redelivers) without rejecting any promise handed to waitUntil.

Relationship to #2336

Orthogonal and complementary. #2336 stops the crash class (rejected waitUntil promises → exit 128) so the queue can re-drive normally. This PR guarantees crash recovery via redelivery regardless of why the process crashed by enforcing the ack-ordering invariant. Both edit suspension-handler.ts; #2336 also drops the same waitUntil registration there, so expect a trivial rebase overlap (the resolution is identical — drop the registration, keep the await).

…lete
The suspension handler registered the step_created / wait_created event
writes on a detached waitUntil(Promise.all(ops)) in addition to awaiting
them. The detached copy framed those progress-critical writes as droppable
background work and re-threw send failures into a promise nothing consumes
(unhandled rejection -> process exit 128). It now strictly awaits the writes
only, preserving the ack-ordering invariant: the orchestrator message is not
acked until the writes (and the dispatch sends the caller makes afterward)
complete, so a crash before then leaves the message un-acked for VQS to
redeliver instead of orphaning the step.
Adds runtime.test.ts ack-ordering tests: the dispatch send must complete
before ack, a hanging send must not ack, and a failing send must reject the
handler (no ack) without rejecting any waitUntil promise.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@pranaygp
pranaygp requested a review from a team as a code ownerJune 11, 2026 06:10
CopilotAI review requested due to automatic review settings June 11, 2026 06:10
@changeset-bot

changeset-botBot commented Jun 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 07fd5f4

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

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

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercelBot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production126602191485
✅ 💻 Local Development167102191890
✅ 📦 Local Production167102191890
✅ 🐘 Local Postgres167102191890
✅ 🪟 Windows13500135
✅ 📋 Other7690176945
Total7183010528235

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro109026
✅ example109026
✅ express109026
✅ fastify109026
✅ hono109026
✅ nextjs-turbopack13302
✅ nextjs-webpack13302
✅ nitro109026
✅ nuxt109026
✅ sveltekit12807
✅ vite109026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack13500
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable110025
✅ e2e-local-dev-tanstack-start-110025
✅ e2e-local-postgres-nest-stable110025
✅ e2e-local-postgres-tanstack-start-110025
✅ e2e-local-prod-nest-stable110025
✅ e2e-local-prod-tanstack-start-110025
✅ e2e-vercel-prod-tanstack-start109026

📋 View full workflow run

@github-actions

github-actionsBot commented Jun 11, 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.042s (-1.2%)1.007s (~)0.964s101.00x
💻 LocalExpress0.044s (+1.9%)1.006s (~)0.962s101.04x
💻 LocalNext.js (Turbopack)0.060s (+9.6% 🔺)1.006s (~)0.946s101.43x
🐘 PostgresNitro0.064s (~)1.012s (~)0.949s101.50x
🐘 PostgresNext.js (Turbopack)0.070s (-0.7%)1.013s (~)0.944s101.64x
🐘 PostgresExpress0.125s (+88.5% 🔺)1.054s (+3.9%)0.929s102.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.281s (+7.7% 🔺)2.724s (+11.8% 🔺)2.442s101.00x
▲ VercelNext.js (Turbopack)0.287s (-12.9% 🟢)2.246s (-4.1%)1.960s101.02x
▲ VercelExpress0.311s (+14.3% 🔺)2.400s (-11.5% 🟢)2.089s101.11x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.093s (~)2.006s (~)0.913s101.00x
💻 LocalExpress1.101s (~)2.006s (~)0.905s101.01x
🐘 PostgresNitro1.102s (-1.1%)2.010s (~)0.908s101.01x
💻 LocalNext.js (Turbopack)1.135s (+2.4%)2.007s (~)0.871s101.04x
🐘 PostgresNext.js (Turbopack)1.161s (+1.7%)2.011s (~)0.850s101.06x
🐘 PostgresExpress1.262s (+15.6% 🔺)2.092s (+4.0%)0.829s101.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.820s (+9.3% 🔺)3.699s (-9.3% 🟢)1.879s101.00x
▲ VercelExpress1.833s (+15.7% 🔺)3.828s (+7.2% 🔺)1.996s101.01x
▲ VercelNitro1.973s (+26.0% 🔺)4.298s (+21.8% 🔺)2.324s101.08x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.512s (~)11.021s (~)0.509s31.00x
🐘 PostgresNitro10.542s (~)11.020s (~)0.478s31.00x
💻 LocalExpress10.552s (~)11.023s (~)0.471s31.00x
💻 LocalNext.js (Turbopack)10.768s (+1.5%)11.022s (~)0.254s31.02x
🐘 PostgresExpress10.855s (+1.3%)11.423s (+0.6%)0.568s31.03x
🐘 PostgresNext.js (Turbopack)10.855s (~)11.020s (~)0.164s31.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)14.575s (+8.0% 🔺)16.665s (+3.5%)2.090s21.00x
▲ VercelExpress14.855s (+12.9% 🔺)16.492s (+6.7% 🔺)1.636s21.02x
▲ VercelNitro16.093s (+20.8% 🔺)18.277s (+17.2% 🔺)2.183s21.10x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro13.716s (~)14.027s (~)0.310s51.00x
🐘 PostgresNitro13.733s (-0.8%)14.020s (~)0.287s51.00x
💻 LocalExpress13.795s (-0.8%)14.027s (-1.4%)0.232s51.01x
💻 LocalNext.js (Turbopack)14.382s (+2.5%)15.031s (+2.8%)0.648s41.05x
🐘 PostgresExpress14.472s (+4.6%)15.021s (+5.5% 🔺)0.548s41.06x
🐘 PostgresNext.js (Turbopack)14.794s (+1.4%)15.270s (+1.7%)0.476s41.08x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro23.738s (-7.0% 🟢)27.387s (-0.8%)3.649s31.00x
▲ VercelExpress24.834s (-2.5%)26.672s (-2.1%)1.838s31.05x
▲ VercelNext.js (Turbopack)25.661s (+0.6%)27.005s (-0.7%)1.344s31.08x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro12.399s (~)13.024s (~)0.625s71.00x
🐘 PostgresNitro12.525s (-1.7%)13.018s (~)0.493s71.01x
💻 LocalExpress12.531s (-0.5%)13.025s (~)0.494s71.01x
💻 LocalNext.js (Turbopack)13.663s (+5.5% 🔺)14.027s (+5.4% 🔺)0.364s71.10x
🐘 PostgresNext.js (Turbopack)13.733s (~)14.019s (~)0.286s71.11x
🐘 PostgresExpress13.775s (+8.2% 🔺)14.307s (+7.5% 🔺)0.532s71.11x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express29.132s (-9.1% 🟢)31.079s (-9.2% 🟢)1.947s31.00x
▲ VercelNitro30.472s (+4.9%)33.068s (+5.3% 🔺)2.597s31.05x
▲ VercelNext.js (Turbopack)31.623s (+6.8% 🔺)32.793s (+2.9%)1.170s31.09x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.179s (-1.7%)2.007s (~)0.828s151.00x
💻 LocalNitro1.186s (-2.3%)2.007s (~)0.821s151.01x
🐘 PostgresNext.js (Turbopack)1.259s (+0.6%)2.007s (~)0.748s151.07x
💻 LocalNext.js (Turbopack)1.320s (+7.9% 🔺)2.006s (~)0.686s151.12x
💻 LocalExpress1.340s (+6.1% 🔺)2.007s (~)0.667s151.14x
🐘 PostgresExpress1.408s (+17.4% 🔺)2.018s (~)0.610s151.19x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.510s (-9.4% 🟢)4.773s (+10.0% 🔺)2.263s71.00x
▲ VercelNext.js (Turbopack)2.679s (~)4.255s (+0.9%)1.576s81.07x
▲ VercelExpress2.800s (+1.1%)4.533s (-4.0%)1.734s71.12x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.252s (-0.6%)2.008s (~)0.756s151.00x
🐘 PostgresNext.js (Turbopack)1.394s (-1.1%)2.008s (~)0.614s151.11x
🐘 PostgresExpress1.615s (+21.8% 🔺)2.410s (+19.5% 🔺)0.795s131.29x
💻 LocalNitro1.771s (+3.9%)2.006s (-3.2%)0.234s151.42x
💻 LocalNext.js (Turbopack)1.864s (+8.0% 🔺)2.150s (+7.2% 🔺)0.286s141.49x
💻 LocalExpress1.920s (+2.0%)2.294s (+3.3%)0.374s141.53x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.601s (-11.8% 🟢)5.376s (-12.9% 🟢)1.775s61.00x
▲ VercelNext.js (Turbopack)3.895s (-5.2% 🟢)5.557s (-9.5% 🟢)1.663s61.08x
▲ VercelNitro3.909s (-4.0%)5.743s (-7.5% 🟢)1.834s61.09x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.402s (~)2.009s (~)0.607s151.00x
🐘 PostgresNext.js (Turbopack)1.753s (~)2.075s (-9.6% 🟢)0.322s151.25x
🐘 PostgresExpress2.096s (+50.4% 🔺)3.371s (+67.7% 🔺)1.274s91.50x
💻 LocalNitro4.863s (+3.1%)5.347s (+6.7% 🔺)0.484s63.47x
💻 LocalExpress5.361s (+1.2%)5.846s (-2.8%)0.485s63.82x
💻 LocalNext.js (Turbopack)5.901s (+34.2% 🔺)6.214s (+24.0% 🔺)0.313s54.21x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.264s (-21.9% 🟢)8.049s (-7.6% 🟢)2.785s41.00x
▲ VercelExpress6.176s (+4.6%)7.914s (~)1.739s41.17x
▲ VercelNext.js (Turbopack)6.496s (+10.6% 🔺)8.160s (+4.9%)1.664s41.23x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.195s (~)2.009s (~)0.814s151.00x
🐘 PostgresNext.js (Turbopack)1.258s (-0.6%)2.008s (~)0.750s151.05x
💻 LocalNext.js (Turbopack)1.375s (+5.3% 🔺)2.007s (~)0.632s151.15x
🐘 PostgresExpress1.533s (+27.5% 🔺)2.116s (+5.4% 🔺)0.583s151.28x
💻 LocalNitro1.577s (+2.2%)2.006s (~)0.429s151.32x
💻 LocalExpress1.582s (-4.5%)2.007s (-3.2%)0.424s151.32x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.457s (-8.1% 🟢)4.342s (~)1.886s71.00x
▲ VercelExpress2.756s (+7.4% 🔺)4.461s (+6.3% 🔺)1.705s71.12x
▲ VercelNext.js (Turbopack)2.913s (-33.4% 🟢)4.470s (-29.0% 🟢)1.557s71.19x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.261s (-1.1%)2.008s (~)0.748s151.00x
🐘 PostgresNext.js (Turbopack)1.399s (~)2.008s (~)0.609s151.11x
🐘 PostgresExpress1.783s (+43.4% 🔺)2.592s (+28.8% 🔺)0.809s121.41x
💻 LocalNext.js (Turbopack)2.031s (+0.5%)2.591s (+3.4%)0.560s121.61x
💻 LocalNitro2.054s (+16.9% 🔺)2.591s (+25.0% 🔺)0.537s121.63x
💻 LocalExpress2.170s (+2.1%)2.592s (~)0.422s121.72x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.771s (-16.6% 🟢)5.273s (-14.5% 🟢)1.502s61.00x
▲ VercelExpress3.779s (+2.8%)5.293s (-5.7% 🟢)1.514s61.00x
▲ VercelNitro3.919s (-4.3%)5.803s (-3.3%)1.884s61.04x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.420s (-2.9%)2.009s (~)0.589s151.00x
🐘 PostgresExpress1.529s (+1.9%)2.494s (+4.0%)0.965s131.08x
🐘 PostgresNext.js (Turbopack)1.710s (+3.3%)2.396s (+15.5% 🔺)0.686s131.20x
💻 LocalNitro5.589s (+17.8% 🔺)6.179s (+15.6% 🔺)0.590s63.94x
💻 LocalExpress5.770s (-1.6%)6.218s (~)0.448s54.06x
💻 LocalNext.js (Turbopack)6.049s (+17.2% 🔺)6.417s (+6.6% 🔺)0.369s54.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.371s (+9.0% 🔺)7.241s (+7.5% 🔺)1.870s51.00x
▲ VercelExpress5.651s (+11.4% 🔺)7.590s (+14.5% 🔺)1.939s41.05x
▲ VercelNext.js (Turbopack)6.282s (+8.5% 🔺)7.842s (+3.5%)1.560s41.17x

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

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.580s (-4.8%)1.024s (+1.6%)0.444s591.00x
💻 LocalNitro0.595s (-26.1% 🟢)1.005s (-16.6% 🟢)0.410s601.03x
💻 LocalExpress0.640s (-2.4%)1.040s (~)0.400s581.10x
🐘 PostgresExpress0.687s (+3.0%)1.113s (+6.2% 🔺)0.426s541.19x
🐘 PostgresNext.js (Turbopack)0.811s (~)1.006s (~)0.196s601.40x
💻 LocalNext.js (Turbopack)0.872s (+25.3% 🔺)1.005s (~)0.132s601.50x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.418s (-27.4% 🟢)7.331s (-23.0% 🟢)1.912s91.00x
▲ VercelExpress5.616s (+2.1%)7.496s (+5.4% 🔺)1.880s91.04x
▲ VercelNext.js (Turbopack)6.210s (+23.0% 🔺)8.016s (+17.0% 🔺)1.806s81.15x

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

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.340s (-5.4% 🟢)2.008s (~)0.668s451.00x
💻 LocalNitro1.510s (+3.2%)2.006s (~)0.496s451.13x
💻 LocalExpress1.591s (~)2.029s (~)0.438s451.19x
🐘 PostgresExpress1.857s (+20.8% 🔺)2.468s (+14.7% 🔺)0.612s381.39x
🐘 PostgresNext.js (Turbopack)1.976s (+1.7%)2.175s (~)0.199s421.48x
💻 LocalNext.js (Turbopack)2.089s (+20.8% 🔺)3.009s (+48.4% 🔺)0.920s301.56x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro12.352s (-6.6% 🟢)14.557s (-6.0% 🟢)2.205s71.00x
▲ VercelExpress12.448s (-24.0% 🟢)14.495s (-20.9% 🟢)2.048s71.01x
▲ VercelNext.js (Turbopack)13.582s (-8.1% 🟢)15.436s (-8.8% 🟢)1.853s61.10x

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

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.652s (-9.0% 🟢)3.086s (-5.9% 🟢)0.434s391.00x
🐘 PostgresExpress3.102s (+6.5% 🔺)3.575s (+1.0%)0.473s341.17x
💻 LocalNitro3.279s (+2.3%)4.010s (~)0.731s301.24x
💻 LocalExpress3.368s (-1.5%)4.010s (~)0.642s301.27x
🐘 PostgresNext.js (Turbopack)3.863s (~)4.148s (+1.8%)0.285s291.46x
💻 LocalNext.js (Turbopack)4.305s (+15.5% 🔺)5.011s (+21.9% 🔺)0.705s241.62x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express25.530s (-11.5% 🟢)27.480s (-11.1% 🟢)1.950s51.00x
▲ VercelNitro26.148s (-12.2% 🟢)28.275s (-11.6% 🟢)2.128s51.02x
▲ VercelNext.js (Turbopack)28.133s (+4.2%)29.722s (+1.6%)1.589s51.10x

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

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.216s (-8.4% 🟢)1.006s (~)0.790s601.00x
🐘 PostgresExpress0.239s (-5.1% 🟢)1.008s (~)0.769s601.11x
🐘 PostgresNext.js (Turbopack)0.264s (-6.5% 🟢)1.006s (~)0.743s601.22x
💻 LocalNitro0.421s (-0.9%)1.005s (~)0.584s601.95x
💻 LocalExpress0.444s (-4.5%)1.005s (~)0.561s602.06x
💻 LocalNext.js (Turbopack)0.561s (-8.2% 🟢)1.005s (-3.3%)0.444s602.60x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.371s (+7.2% 🔺)4.155s (+1.4%)1.784s151.00x
▲ VercelNext.js (Turbopack)2.653s (+20.6% 🔺)4.408s (+4.4%)1.755s141.12x
▲ VercelNitro3.840s (+63.8% 🔺)6.061s (+39.9% 🔺)2.222s101.62x

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

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.347s (-6.4% 🟢)1.007s (~)0.660s901.00x
🐘 PostgresNext.js (Turbopack)0.468s (-3.0%)1.006s (~)0.538s901.35x
🐘 PostgresExpress0.623s (+83.9% 🔺)1.176s (+16.7% 🔺)0.552s771.80x
💻 LocalNitro2.111s (+2.3%)2.637s (~)0.526s356.08x
💻 LocalExpress2.146s (-2.1%)2.797s (-0.9%)0.651s336.18x
💻 LocalNext.js (Turbopack)2.394s (-2.3%)3.113s (~)0.720s296.90x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.157s (-88.2% 🟢)7.065s (-84.6% 🟢)1.908s131.00x
▲ VercelExpress5.318s (-87.7% 🟢)7.335s (-83.8% 🟢)2.017s131.03x
▲ VercelNext.js (Turbopack)5.576s (-11.1% 🟢)7.259s (-14.6% 🟢)1.683s131.08x

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

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.651s (-7.9% 🟢)1.006s (~)0.355s1201.00x
🐘 PostgresNext.js (Turbopack)0.940s (-4.0%)1.371s (-14.7% 🟢)0.431s881.44x
🐘 PostgresExpress1.064s (+70.0% 🔺)1.568s (+48.7% 🔺)0.504s771.63x
💻 LocalNitro9.624s (+10.5% 🔺)10.197s (+9.3% 🔺)0.572s1214.78x
💻 LocalExpress10.242s (-0.7%)10.696s (-1.6%)0.455s1215.73x
💻 LocalNext.js (Turbopack)10.590s (+2.7%)11.394s (+0.8%)0.804s1116.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.861s (-91.3% 🟢)15.465s (-90.5% 🟢)1.605s81.00x
▲ VercelNitro15.439s (-95.0% 🟢)17.739s (-94.3% 🟢)2.299s71.11x
▲ VercelExpress16.562s (+8.6% 🔺)18.445s (+5.5% 🔺)1.883s71.19x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.158s (-1.9%)2.001s (~)0.001s (-7.1% 🟢)2.011s (~)0.853s101.00x
💻 LocalNitro1.163s (+1.1%)2.005s (~)0.012s (+19.0% 🔺)2.019s (~)0.856s101.00x
💻 LocalExpress1.168s (~)2.006s (~)0.012s (-5.5% 🟢)2.020s (~)0.852s101.01x
💻 LocalNext.js (Turbopack)1.203s (+3.0%)2.004s (~)0.013s (+24.8% 🔺)2.020s (~)0.817s101.04x
🐘 PostgresNext.js (Turbopack)1.240s (~)2.001s (~)0.001s (-33.3% 🟢)2.010s (~)0.771s101.07x
🐘 PostgresExpress1.325s (+11.0% 🔺)1.985s (-0.8%)0.059s (+72.3% 🔺)2.105s (+3.0%)0.779s101.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.198s (-2.0%)3.164s (-10.9% 🟢)1.002s (-91.9% 🟢)4.538s (-72.5% 🟢)2.340s101.00x
▲ VercelExpress2.230s (+4.0%)3.256s (-4.5%)0.822s (+56.4% 🔺)4.538s (+2.1%)2.308s101.01x
▲ VercelNitro2.305s (+6.5% 🔺)3.514s (+2.8%)0.722s (+39.9% 🔺)4.840s (+8.3% 🔺)2.536s101.05x

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

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.580s (-5.0%)2.001s (~)0.005s (+37.6% 🔺)2.027s (~)0.447s301.00x
💻 LocalNitro1.586s (-9.0% 🟢)2.011s (~)0.013s (+38.4% 🔺)2.025s (-7.9% 🟢)0.439s301.00x
💻 LocalExpress1.611s (-1.6%)2.012s (~)0.013s (+17.5% 🔺)2.027s (~)0.416s301.02x
🐘 PostgresNext.js (Turbopack)1.722s (-2.4%)2.009s (~)0.005s (+33.9% 🔺)2.027s (~)0.305s301.09x
💻 LocalNext.js (Turbopack)1.723s (+5.0% 🔺)2.010s (~)0.013s (+33.3% 🔺)2.026s (~)0.303s301.09x
🐘 PostgresExpress2.073s (+19.3% 🔺)2.501s (+16.7% 🔺)0.004s (+39.6% 🔺)2.553s (+18.2% 🔺)0.479s241.31x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.803s (+0.8%)6.817s (-8.3% 🟢)0.235s (-33.7% 🟢)7.461s (-11.2% 🟢)1.659s91.00x
▲ VercelNitro5.905s (+2.8%)7.730s (+1.7%)0.222s (-34.4% 🟢)8.452s (~)2.548s81.02x
▲ VercelNext.js (Turbopack)5.965s (-6.4% 🟢)7.035s (-11.4% 🟢)0.234s (-35.2% 🟢)7.715s (-13.0% 🟢)1.749s81.03x

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

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.706s (-2.4%)1.013s (-1.8%)0.000s (-100.0% 🟢)1.025s (-2.2%)0.320s591.00x
🐘 PostgresNext.js (Turbopack)0.807s (-3.1%)1.035s (-3.4%)0.000s (-3.4%)1.042s (-3.5%)0.235s581.14x
🐘 PostgresExpress1.322s (+35.2% 🔺)1.661s (+16.3% 🔺)0.000s (-100.0% 🟢)1.692s (+16.8% 🔺)0.370s361.87x
💻 LocalNitro1.370s (+1.3%)2.013s (~)0.000s (-53.3% 🟢)2.015s (~)0.645s301.94x
💻 LocalExpress1.438s (-3.0%)2.013s (~)0.000s (-46.7% 🟢)2.015s (~)0.577s302.04x
💻 LocalNext.js (Turbopack)1.485s (+2.6%)2.013s (~)0.000s (+75.0% 🔺)2.017s (~)0.532s302.10x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.237s (-20.3% 🟢)4.574s (-14.3% 🟢)0.000s (-95.1% 🟢)5.153s (-16.5% 🟢)1.916s121.00x
▲ VercelNext.js (Turbopack)3.305s (~)4.605s (-5.9% 🟢)0.000s (NaN%)5.009s (-8.3% 🟢)1.704s121.02x
▲ VercelNitro3.342s (-7.2% 🟢)5.136s (+1.3%)0.001s (+Infinity% 🔺)5.650s (~)2.308s111.03x

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

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.395s (-1.1%)2.065s (+3.4%)0.000s (NaN%)2.081s (+3.4%)0.686s291.00x
🐘 PostgresNext.js (Turbopack)1.694s (-1.9%)2.225s (-1.6%)0.000s (+Infinity% 🔺)2.249s (-0.9%)0.554s271.21x
💻 LocalNext.js (Turbopack)2.800s (-12.9% 🟢)3.360s (-13.8% 🟢)0.001s (+202.2% 🔺)3.364s (-13.7% 🟢)0.564s182.01x
💻 LocalNitro3.048s (-2.2%)3.774s (-3.1%)0.001s (+225.0% 🔺)3.779s (-3.1%)0.731s162.18x
💻 LocalExpress3.267s (-2.0%)3.895s (+1.5%)0.001s (+50.0% 🔺)3.906s (+1.6%)0.639s162.34x
🐘 PostgresExpress3.436s (+112.8% 🔺)3.945s (+75.1% 🔺)0.000s (NaN%)3.985s (+74.8% 🔺)0.549s162.46x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.809s (-23.9% 🟢)5.989s (-21.5% 🟢)0.000s (-100.0% 🟢)6.430s (-21.4% 🟢)1.622s101.00x
▲ VercelNitro4.836s (-31.3% 🟢)6.013s (-29.8% 🟢)0.000s (NaN%)6.783s (-25.4% 🟢)1.947s91.01x
▲ VercelNext.js (Turbopack)5.061s (-2.0%)6.498s (-2.7%)0.000s (-100.0% 🟢)6.933s (-3.7%)1.872s91.05x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro18/21
🐘 PostgresNitro21/21
▲ VercelNitro9/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local11/21
Next.js (Turbopack)🐘 Postgres15/21
Nitro🐘 Postgres16/21
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)
  • 🌐 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)

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR enforces a crash-safety invariant in the core runtime: the orchestrator’s queue message must not be acked until all progress-critical work is durably complete (notably step_created / wait_created event writes), so redelivery/replay can safely recover from crashes without orphaning steps.

Changes:

  • handleSuspension() no longer registers progress-critical event writes on a detached waitUntil(Promise.all(...)); it strictly awaits them.
  • Adds a new workflowEntrypoint step-dispatch ack ordering test suite to ensure step-dispatch sends complete (or fail/hang) before the handler resolves (ack).
  • Adds a changeset documenting the behavioral fix for @workflow/core.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

FileDescription
packages/core/src/runtime/suspension-handler.tsRemoves detached waitUntil usage for progress-gating event writes; keeps strict await to preserve ack ordering.
packages/core/src/runtime.test.tsAdds ack-ordering regression tests around step dispatch and waitUntil behavior.
.changeset/ack-after-step-dispatch.mdDocuments the patch-level behavioral fix and rationale.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +636 to +638
}) {
const workflowRun = await makeRunningRun(opts.runId);
const order: string[] = [];

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Done — waitUntilPromises.length = 0 now runs at the start of driveHandler(), so the rejection check only ever observes promises that invocation registered (robust against reordering/.only, not just the per-test afterEach). Fixed in 8d28013.

Comment on lines 21 to 25
vi.mock('@vercel/functions', () => ({
waitUntil: vi.fn(),
waitUntil: vi.fn((p: Promise<unknown>) => {
waitUntilPromises.push(p);
}),
}));

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Good catch. The mock now attaches a no-op .catch() to each promise the instant it's recorded, while still pushing the original promise into waitUntilPromises for later allSettled inspection — so a rejection can never surface as a real unhandled rejection in the test process before anyWaitUntilPromiseRejected() runs. Fixed in 8d28013.

'@workflow/core': patch
---

Never ack the orchestrator's queue message before the events that make the run progress are durably written. The suspension handler used to register the `step_created` / `wait_created` writes on a detached `waitUntil(Promise.all(ops))` in addition to awaiting them; the detached copy framed those progress-critical writes as droppable background work and re-threw send failures into a promise nothing consumes (unhandled rejection → process exit 128). It now strictly awaits the writes only, so the orchestrator message is never acked until they complete — a crash before then leaves the message un-acked and VQS redelivers within the lease, re-creating the (idempotent) entities and re-dispatching instead of orphaning the step. Complements the crash fix in #2336.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

too verbose. match the format/terseness of other changesets

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Trimmed to match the sibling changesets (now ~4 lines, in line with abort-e2e-flakes.md etc). Fixed in 8d28013.

- Trim the changeset to match the terseness of sibling changesets.
- Attach a no-op .catch() to each promise the waitUntil mock records so a
rejecting promise can never surface as a real unhandled rejection in the
test process; keep the original promise for allSettled inspection.
- Reset waitUntilPromises at the start of driveHandler() so the rejection
check only observes this invocation's promises (robust to reordering/.only).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@VaguelySeriousVaguelySerious changed the title [core] Never ack orchestrator message before step dispatch sends complete[core] Fix unhandled rejection when step_created/wait_created calls fail in waitUntilJun 11, 2026
@VaguelySeriousVaguelySerious changed the title [core] Fix unhandled rejection when step_created/wait_created calls fail in waitUntil[core] Remove duplicate waitUntil for suspension handler async operationsJun 11, 2026
@VaguelySerious
VaguelySerious merged commit bf44d4d into mainJun 11, 2026
187 of 193 checks passed
@VaguelySerious
VaguelySerious deleted the fix/ack-after-step-enqueue branch June 11, 2026 08:36
@github-actionsgithub-actionsBot mentioned this pull request Jun 11, 2026
github-actionsBot added a commit that referenced this pull request Jun 11, 2026
…ations (#2345)
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Pranay Prakash <pranay.gp@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

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

VaguelySerious added a commit that referenced this pull request Jun 11, 2026
…ations (#2345) (#2353)
Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
@github-actionsgithub-actionsBot mentioned this pull request Jun 11, 2026
pranaygp added a commit that referenced this pull request Jun 11, 2026
…hook-ready
* origin-https/main: (119 commits)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
Patch vulnerable package dependencies (#2301)
Deprecate DurableAgent and update it with WorkflowAgent in v5 docs (#2285)
[codex] Fix partial world-local exclusive writes (#2296)
...
# Conflicts:
#	packages/core/src/runtime.ts
#	packages/core/src/runtime/suspension-handler.ts
pranaygp added a commit that referenced this pull request Jun 11, 2026
…t-race-eager-wait
* origin/main:
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
pranaygp added a commit that referenced this pull request Jun 11, 2026
…docs-run-idempotency
* origin-https/main: (115 commits)
[core] V2: unify wait+step queue dispatch in suspension processing (#1925)
fix(world-local,world-postgres): make duplicate hook_created idempotent (#2295)
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
...
# Conflicts:
#	docs/content/docs/v4/cookbook/advanced/child-workflows.mdx
#	docs/content/docs/v5/cookbook/advanced/child-workflows.mdx
#	docs/content/docs/v5/cookbook/agent-patterns/durable-agent.mdx
pranaygp added a commit that referenced this pull request Jun 11, 2026
* origin/main:
[core] V2: unify wait+step queue dispatch in suspension processing (#1925)
fix(world-local,world-postgres): make duplicate hook_created idempotent (#2295)
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
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.

3 participants

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

[core] Remove duplicate waitUntil for suspension handler async operations - #2345

Merged
VaguelySerious merged 3 commits into
mainfrom
fix/ack-after-step-enqueue
Jun 11, 2026
Merged

[core] Remove duplicate waitUntil for suspension handler async operations#2345
VaguelySerious merged 3 commits into
mainfrom
fix/ack-after-step-enqueue

Conversation

@pranaygp

@pranaygppranaygp commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Peter: Ignore all the below, this PR is smaller in scope than it leads on. Read the code, it's a few lines.


The invariant

Never ack the orchestrator's queue message until all work that makes the run progress is durably complete — including creating AND enqueueing subsequent steps. Queue sends are idempotent (idempotency keys), so a crash before ack yields a redelivery → replay → safe re-send, recovering within the VQS ~300s lease instead of orphaning the step. The codebase already states this principle for timeout re-enqueues (packages/world-vercel/src/queue.ts: "Send new message BEFORE acknowledging current message. This ensures crash safety…"); this PR makes it hold for the suspension-handler's progress-critical event writes.

Production evidence

Run wrun_01KTSMXMKD7C544YFHX0GNPEG1 (prod, codeReviewWorkflowV2, dpl dpl_F4kcruzPhU3EY6Mbo3vqvEPAvRYM, 2026-06-10): the deployment was crash-looping with exit-128 (unhandled-rejection; fix in open PR #2336). step_created committed at 21:03:32.611; VQS shows zero step-queue [SEND]s for the run for 4h35m (the dispatch never happened); no lease redeliveries fired in the gap — the orchestrator message chain had concluded (= acked). A PR webhook at 01:38:40 finally re-drove the orchestrator, which rediscovered and dispatched the step in ~1s. ~130 warnings/day across 89 runs on one team share the signature, with orphan windows up to ~24h.

What changed

packages/core/src/runtime/suspension-handler.ts previously registered the step_created / wait_created event writes (ops) on a detached waitUntil(Promise.all(ops))in addition to awaiting them on the next line. The detached copy:

  1. framed those progress-critical writes as droppable background work the platform may discard after the response/ack, and
  2. re-threw send failures into a promise nothing consumes → unhandled rejection → process exit 128.

The fix removes the detached waitUntil registration and keeps only the strict await Promise.all(ops). On this branch the step-dispatch queueMessage sends already live in runtime.ts (workflowEntrypoint) and are awaited there before the handler returns; this change ensures the step_created events those dispatches depend on are likewise strictly awaited, so the whole progress-critical chain completes before the queue handler acks the orchestrator message.

What stayed background (and why)

The waitUntil(Promise.all(ops)) registrations in step-handler.ts, start.ts, and resume-hook.ts were not touched: their ops are stream-flush writes (not progress-gating), have no awaited copy, and legitimately need waitUntil to keep the function alive. The orchestrator re-trigger / step-continuation queueMessage sends in those files are already awaited. PR #2336 hardens those background sites with a safeWaitUntil helper.

Test coverage

Adds an ack ordering suite to packages/core/src/runtime.test.ts driving the real workflowEntrypoint against a workflow that suspends on a step + sleep (so the step is queued, not run inline):

  • the step-dispatch queue() send completes before the ack sentinel (and step_created precedes the dispatch);
  • a hanging dispatch send keeps the handler from resolving (no ack);
  • a failing dispatch send rejects the handler (no ack → VQS redelivers) without rejecting any promise handed to waitUntil.

Relationship to #2336

Orthogonal and complementary. #2336 stops the crash class (rejected waitUntil promises → exit 128) so the queue can re-drive normally. This PR guarantees crash recovery via redelivery regardless of why the process crashed by enforcing the ack-ordering invariant. Both edit suspension-handler.ts; #2336 also drops the same waitUntil registration there, so expect a trivial rebase overlap (the resolution is identical — drop the registration, keep the await).

…lete
The suspension handler registered the step_created / wait_created event
writes on a detached waitUntil(Promise.all(ops)) in addition to awaiting
them. The detached copy framed those progress-critical writes as droppable
background work and re-threw send failures into a promise nothing consumes
(unhandled rejection -> process exit 128). It now strictly awaits the writes
only, preserving the ack-ordering invariant: the orchestrator message is not
acked until the writes (and the dispatch sends the caller makes afterward)
complete, so a crash before then leaves the message un-acked for VQS to
redeliver instead of orphaning the step.
Adds runtime.test.ts ack-ordering tests: the dispatch send must complete
before ack, a hanging send must not ack, and a failing send must reject the
handler (no ack) without rejecting any waitUntil promise.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@pranaygp
pranaygp requested a review from a team as a code ownerJune 11, 2026 06:10
CopilotAI review requested due to automatic review settings June 11, 2026 06:10
@changeset-bot

changeset-botBot commented Jun 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 07fd5f4

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

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

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercelBot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production126602191485
✅ 💻 Local Development167102191890
✅ 📦 Local Production167102191890
✅ 🐘 Local Postgres167102191890
✅ 🪟 Windows13500135
✅ 📋 Other7690176945
Total7183010528235

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro109026
✅ example109026
✅ express109026
✅ fastify109026
✅ hono109026
✅ nextjs-turbopack13302
✅ nextjs-webpack13302
✅ nitro109026
✅ nuxt109026
✅ sveltekit12807
✅ vite109026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable110025
✅ express-stable110025
✅ fastify-stable110025
✅ hono-stable110025
✅ nextjs-turbopack-canary116019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13500
✅ nextjs-turbopack-stable-lazy-discovery-enabled13500
✅ nextjs-webpack-canary116019
✅ nextjs-webpack-stable-lazy-discovery-disabled13500
✅ nextjs-webpack-stable-lazy-discovery-enabled13500
✅ nitro-stable110025
✅ nuxt-stable110025
✅ sveltekit-stable12906
✅ vite-stable110025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack13500
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable110025
✅ e2e-local-dev-tanstack-start-110025
✅ e2e-local-postgres-nest-stable110025
✅ e2e-local-postgres-tanstack-start-110025
✅ e2e-local-prod-nest-stable110025
✅ e2e-local-prod-tanstack-start-110025
✅ e2e-vercel-prod-tanstack-start109026

📋 View full workflow run

@github-actions

github-actionsBot commented Jun 11, 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.042s (-1.2%)1.007s (~)0.964s101.00x
💻 LocalExpress0.044s (+1.9%)1.006s (~)0.962s101.04x
💻 LocalNext.js (Turbopack)0.060s (+9.6% 🔺)1.006s (~)0.946s101.43x
🐘 PostgresNitro0.064s (~)1.012s (~)0.949s101.50x
🐘 PostgresNext.js (Turbopack)0.070s (-0.7%)1.013s (~)0.944s101.64x
🐘 PostgresExpress0.125s (+88.5% 🔺)1.054s (+3.9%)0.929s102.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.281s (+7.7% 🔺)2.724s (+11.8% 🔺)2.442s101.00x
▲ VercelNext.js (Turbopack)0.287s (-12.9% 🟢)2.246s (-4.1%)1.960s101.02x
▲ VercelExpress0.311s (+14.3% 🔺)2.400s (-11.5% 🟢)2.089s101.11x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.093s (~)2.006s (~)0.913s101.00x
💻 LocalExpress1.101s (~)2.006s (~)0.905s101.01x
🐘 PostgresNitro1.102s (-1.1%)2.010s (~)0.908s101.01x
💻 LocalNext.js (Turbopack)1.135s (+2.4%)2.007s (~)0.871s101.04x
🐘 PostgresNext.js (Turbopack)1.161s (+1.7%)2.011s (~)0.850s101.06x
🐘 PostgresExpress1.262s (+15.6% 🔺)2.092s (+4.0%)0.829s101.15x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.820s (+9.3% 🔺)3.699s (-9.3% 🟢)1.879s101.00x
▲ VercelExpress1.833s (+15.7% 🔺)3.828s (+7.2% 🔺)1.996s101.01x
▲ VercelNitro1.973s (+26.0% 🔺)4.298s (+21.8% 🔺)2.324s101.08x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.512s (~)11.021s (~)0.509s31.00x
🐘 PostgresNitro10.542s (~)11.020s (~)0.478s31.00x
💻 LocalExpress10.552s (~)11.023s (~)0.471s31.00x
💻 LocalNext.js (Turbopack)10.768s (+1.5%)11.022s (~)0.254s31.02x
🐘 PostgresExpress10.855s (+1.3%)11.423s (+0.6%)0.568s31.03x
🐘 PostgresNext.js (Turbopack)10.855s (~)11.020s (~)0.164s31.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)14.575s (+8.0% 🔺)16.665s (+3.5%)2.090s21.00x
▲ VercelExpress14.855s (+12.9% 🔺)16.492s (+6.7% 🔺)1.636s21.02x
▲ VercelNitro16.093s (+20.8% 🔺)18.277s (+17.2% 🔺)2.183s21.10x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro13.716s (~)14.027s (~)0.310s51.00x
🐘 PostgresNitro13.733s (-0.8%)14.020s (~)0.287s51.00x
💻 LocalExpress13.795s (-0.8%)14.027s (-1.4%)0.232s51.01x
💻 LocalNext.js (Turbopack)14.382s (+2.5%)15.031s (+2.8%)0.648s41.05x
🐘 PostgresExpress14.472s (+4.6%)15.021s (+5.5% 🔺)0.548s41.06x
🐘 PostgresNext.js (Turbopack)14.794s (+1.4%)15.270s (+1.7%)0.476s41.08x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro23.738s (-7.0% 🟢)27.387s (-0.8%)3.649s31.00x
▲ VercelExpress24.834s (-2.5%)26.672s (-2.1%)1.838s31.05x
▲ VercelNext.js (Turbopack)25.661s (+0.6%)27.005s (-0.7%)1.344s31.08x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro12.399s (~)13.024s (~)0.625s71.00x
🐘 PostgresNitro12.525s (-1.7%)13.018s (~)0.493s71.01x
💻 LocalExpress12.531s (-0.5%)13.025s (~)0.494s71.01x
💻 LocalNext.js (Turbopack)13.663s (+5.5% 🔺)14.027s (+5.4% 🔺)0.364s71.10x
🐘 PostgresNext.js (Turbopack)13.733s (~)14.019s (~)0.286s71.11x
🐘 PostgresExpress13.775s (+8.2% 🔺)14.307s (+7.5% 🔺)0.532s71.11x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express29.132s (-9.1% 🟢)31.079s (-9.2% 🟢)1.947s31.00x
▲ VercelNitro30.472s (+4.9%)33.068s (+5.3% 🔺)2.597s31.05x
▲ VercelNext.js (Turbopack)31.623s (+6.8% 🔺)32.793s (+2.9%)1.170s31.09x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.179s (-1.7%)2.007s (~)0.828s151.00x
💻 LocalNitro1.186s (-2.3%)2.007s (~)0.821s151.01x
🐘 PostgresNext.js (Turbopack)1.259s (+0.6%)2.007s (~)0.748s151.07x
💻 LocalNext.js (Turbopack)1.320s (+7.9% 🔺)2.006s (~)0.686s151.12x
💻 LocalExpress1.340s (+6.1% 🔺)2.007s (~)0.667s151.14x
🐘 PostgresExpress1.408s (+17.4% 🔺)2.018s (~)0.610s151.19x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.510s (-9.4% 🟢)4.773s (+10.0% 🔺)2.263s71.00x
▲ VercelNext.js (Turbopack)2.679s (~)4.255s (+0.9%)1.576s81.07x
▲ VercelExpress2.800s (+1.1%)4.533s (-4.0%)1.734s71.12x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.252s (-0.6%)2.008s (~)0.756s151.00x
🐘 PostgresNext.js (Turbopack)1.394s (-1.1%)2.008s (~)0.614s151.11x
🐘 PostgresExpress1.615s (+21.8% 🔺)2.410s (+19.5% 🔺)0.795s131.29x
💻 LocalNitro1.771s (+3.9%)2.006s (-3.2%)0.234s151.42x
💻 LocalNext.js (Turbopack)1.864s (+8.0% 🔺)2.150s (+7.2% 🔺)0.286s141.49x
💻 LocalExpress1.920s (+2.0%)2.294s (+3.3%)0.374s141.53x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.601s (-11.8% 🟢)5.376s (-12.9% 🟢)1.775s61.00x
▲ VercelNext.js (Turbopack)3.895s (-5.2% 🟢)5.557s (-9.5% 🟢)1.663s61.08x
▲ VercelNitro3.909s (-4.0%)5.743s (-7.5% 🟢)1.834s61.09x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.402s (~)2.009s (~)0.607s151.00x
🐘 PostgresNext.js (Turbopack)1.753s (~)2.075s (-9.6% 🟢)0.322s151.25x
🐘 PostgresExpress2.096s (+50.4% 🔺)3.371s (+67.7% 🔺)1.274s91.50x
💻 LocalNitro4.863s (+3.1%)5.347s (+6.7% 🔺)0.484s63.47x
💻 LocalExpress5.361s (+1.2%)5.846s (-2.8%)0.485s63.82x
💻 LocalNext.js (Turbopack)5.901s (+34.2% 🔺)6.214s (+24.0% 🔺)0.313s54.21x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.264s (-21.9% 🟢)8.049s (-7.6% 🟢)2.785s41.00x
▲ VercelExpress6.176s (+4.6%)7.914s (~)1.739s41.17x
▲ VercelNext.js (Turbopack)6.496s (+10.6% 🔺)8.160s (+4.9%)1.664s41.23x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.195s (~)2.009s (~)0.814s151.00x
🐘 PostgresNext.js (Turbopack)1.258s (-0.6%)2.008s (~)0.750s151.05x
💻 LocalNext.js (Turbopack)1.375s (+5.3% 🔺)2.007s (~)0.632s151.15x
🐘 PostgresExpress1.533s (+27.5% 🔺)2.116s (+5.4% 🔺)0.583s151.28x
💻 LocalNitro1.577s (+2.2%)2.006s (~)0.429s151.32x
💻 LocalExpress1.582s (-4.5%)2.007s (-3.2%)0.424s151.32x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.457s (-8.1% 🟢)4.342s (~)1.886s71.00x
▲ VercelExpress2.756s (+7.4% 🔺)4.461s (+6.3% 🔺)1.705s71.12x
▲ VercelNext.js (Turbopack)2.913s (-33.4% 🟢)4.470s (-29.0% 🟢)1.557s71.19x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.261s (-1.1%)2.008s (~)0.748s151.00x
🐘 PostgresNext.js (Turbopack)1.399s (~)2.008s (~)0.609s151.11x
🐘 PostgresExpress1.783s (+43.4% 🔺)2.592s (+28.8% 🔺)0.809s121.41x
💻 LocalNext.js (Turbopack)2.031s (+0.5%)2.591s (+3.4%)0.560s121.61x
💻 LocalNitro2.054s (+16.9% 🔺)2.591s (+25.0% 🔺)0.537s121.63x
💻 LocalExpress2.170s (+2.1%)2.592s (~)0.422s121.72x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.771s (-16.6% 🟢)5.273s (-14.5% 🟢)1.502s61.00x
▲ VercelExpress3.779s (+2.8%)5.293s (-5.7% 🟢)1.514s61.00x
▲ VercelNitro3.919s (-4.3%)5.803s (-3.3%)1.884s61.04x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.420s (-2.9%)2.009s (~)0.589s151.00x
🐘 PostgresExpress1.529s (+1.9%)2.494s (+4.0%)0.965s131.08x
🐘 PostgresNext.js (Turbopack)1.710s (+3.3%)2.396s (+15.5% 🔺)0.686s131.20x
💻 LocalNitro5.589s (+17.8% 🔺)6.179s (+15.6% 🔺)0.590s63.94x
💻 LocalExpress5.770s (-1.6%)6.218s (~)0.448s54.06x
💻 LocalNext.js (Turbopack)6.049s (+17.2% 🔺)6.417s (+6.6% 🔺)0.369s54.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.371s (+9.0% 🔺)7.241s (+7.5% 🔺)1.870s51.00x
▲ VercelExpress5.651s (+11.4% 🔺)7.590s (+14.5% 🔺)1.939s41.05x
▲ VercelNext.js (Turbopack)6.282s (+8.5% 🔺)7.842s (+3.5%)1.560s41.17x

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

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.580s (-4.8%)1.024s (+1.6%)0.444s591.00x
💻 LocalNitro0.595s (-26.1% 🟢)1.005s (-16.6% 🟢)0.410s601.03x
💻 LocalExpress0.640s (-2.4%)1.040s (~)0.400s581.10x
🐘 PostgresExpress0.687s (+3.0%)1.113s (+6.2% 🔺)0.426s541.19x
🐘 PostgresNext.js (Turbopack)0.811s (~)1.006s (~)0.196s601.40x
💻 LocalNext.js (Turbopack)0.872s (+25.3% 🔺)1.005s (~)0.132s601.50x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.418s (-27.4% 🟢)7.331s (-23.0% 🟢)1.912s91.00x
▲ VercelExpress5.616s (+2.1%)7.496s (+5.4% 🔺)1.880s91.04x
▲ VercelNext.js (Turbopack)6.210s (+23.0% 🔺)8.016s (+17.0% 🔺)1.806s81.15x

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

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.340s (-5.4% 🟢)2.008s (~)0.668s451.00x
💻 LocalNitro1.510s (+3.2%)2.006s (~)0.496s451.13x
💻 LocalExpress1.591s (~)2.029s (~)0.438s451.19x
🐘 PostgresExpress1.857s (+20.8% 🔺)2.468s (+14.7% 🔺)0.612s381.39x
🐘 PostgresNext.js (Turbopack)1.976s (+1.7%)2.175s (~)0.199s421.48x
💻 LocalNext.js (Turbopack)2.089s (+20.8% 🔺)3.009s (+48.4% 🔺)0.920s301.56x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro12.352s (-6.6% 🟢)14.557s (-6.0% 🟢)2.205s71.00x
▲ VercelExpress12.448s (-24.0% 🟢)14.495s (-20.9% 🟢)2.048s71.01x
▲ VercelNext.js (Turbopack)13.582s (-8.1% 🟢)15.436s (-8.8% 🟢)1.853s61.10x

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

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.652s (-9.0% 🟢)3.086s (-5.9% 🟢)0.434s391.00x
🐘 PostgresExpress3.102s (+6.5% 🔺)3.575s (+1.0%)0.473s341.17x
💻 LocalNitro3.279s (+2.3%)4.010s (~)0.731s301.24x
💻 LocalExpress3.368s (-1.5%)4.010s (~)0.642s301.27x
🐘 PostgresNext.js (Turbopack)3.863s (~)4.148s (+1.8%)0.285s291.46x
💻 LocalNext.js (Turbopack)4.305s (+15.5% 🔺)5.011s (+21.9% 🔺)0.705s241.62x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express25.530s (-11.5% 🟢)27.480s (-11.1% 🟢)1.950s51.00x
▲ VercelNitro26.148s (-12.2% 🟢)28.275s (-11.6% 🟢)2.128s51.02x
▲ VercelNext.js (Turbopack)28.133s (+4.2%)29.722s (+1.6%)1.589s51.10x

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

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.216s (-8.4% 🟢)1.006s (~)0.790s601.00x
🐘 PostgresExpress0.239s (-5.1% 🟢)1.008s (~)0.769s601.11x
🐘 PostgresNext.js (Turbopack)0.264s (-6.5% 🟢)1.006s (~)0.743s601.22x
💻 LocalNitro0.421s (-0.9%)1.005s (~)0.584s601.95x
💻 LocalExpress0.444s (-4.5%)1.005s (~)0.561s602.06x
💻 LocalNext.js (Turbopack)0.561s (-8.2% 🟢)1.005s (-3.3%)0.444s602.60x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.371s (+7.2% 🔺)4.155s (+1.4%)1.784s151.00x
▲ VercelNext.js (Turbopack)2.653s (+20.6% 🔺)4.408s (+4.4%)1.755s141.12x
▲ VercelNitro3.840s (+63.8% 🔺)6.061s (+39.9% 🔺)2.222s101.62x

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

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.347s (-6.4% 🟢)1.007s (~)0.660s901.00x
🐘 PostgresNext.js (Turbopack)0.468s (-3.0%)1.006s (~)0.538s901.35x
🐘 PostgresExpress0.623s (+83.9% 🔺)1.176s (+16.7% 🔺)0.552s771.80x
💻 LocalNitro2.111s (+2.3%)2.637s (~)0.526s356.08x
💻 LocalExpress2.146s (-2.1%)2.797s (-0.9%)0.651s336.18x
💻 LocalNext.js (Turbopack)2.394s (-2.3%)3.113s (~)0.720s296.90x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro5.157s (-88.2% 🟢)7.065s (-84.6% 🟢)1.908s131.00x
▲ VercelExpress5.318s (-87.7% 🟢)7.335s (-83.8% 🟢)2.017s131.03x
▲ VercelNext.js (Turbopack)5.576s (-11.1% 🟢)7.259s (-14.6% 🟢)1.683s131.08x

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

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.651s (-7.9% 🟢)1.006s (~)0.355s1201.00x
🐘 PostgresNext.js (Turbopack)0.940s (-4.0%)1.371s (-14.7% 🟢)0.431s881.44x
🐘 PostgresExpress1.064s (+70.0% 🔺)1.568s (+48.7% 🔺)0.504s771.63x
💻 LocalNitro9.624s (+10.5% 🔺)10.197s (+9.3% 🔺)0.572s1214.78x
💻 LocalExpress10.242s (-0.7%)10.696s (-1.6%)0.455s1215.73x
💻 LocalNext.js (Turbopack)10.590s (+2.7%)11.394s (+0.8%)0.804s1116.26x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.861s (-91.3% 🟢)15.465s (-90.5% 🟢)1.605s81.00x
▲ VercelNitro15.439s (-95.0% 🟢)17.739s (-94.3% 🟢)2.299s71.11x
▲ VercelExpress16.562s (+8.6% 🔺)18.445s (+5.5% 🔺)1.883s71.19x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.158s (-1.9%)2.001s (~)0.001s (-7.1% 🟢)2.011s (~)0.853s101.00x
💻 LocalNitro1.163s (+1.1%)2.005s (~)0.012s (+19.0% 🔺)2.019s (~)0.856s101.00x
💻 LocalExpress1.168s (~)2.006s (~)0.012s (-5.5% 🟢)2.020s (~)0.852s101.01x
💻 LocalNext.js (Turbopack)1.203s (+3.0%)2.004s (~)0.013s (+24.8% 🔺)2.020s (~)0.817s101.04x
🐘 PostgresNext.js (Turbopack)1.240s (~)2.001s (~)0.001s (-33.3% 🟢)2.010s (~)0.771s101.07x
🐘 PostgresExpress1.325s (+11.0% 🔺)1.985s (-0.8%)0.059s (+72.3% 🔺)2.105s (+3.0%)0.779s101.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.198s (-2.0%)3.164s (-10.9% 🟢)1.002s (-91.9% 🟢)4.538s (-72.5% 🟢)2.340s101.00x
▲ VercelExpress2.230s (+4.0%)3.256s (-4.5%)0.822s (+56.4% 🔺)4.538s (+2.1%)2.308s101.01x
▲ VercelNitro2.305s (+6.5% 🔺)3.514s (+2.8%)0.722s (+39.9% 🔺)4.840s (+8.3% 🔺)2.536s101.05x

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

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.580s (-5.0%)2.001s (~)0.005s (+37.6% 🔺)2.027s (~)0.447s301.00x
💻 LocalNitro1.586s (-9.0% 🟢)2.011s (~)0.013s (+38.4% 🔺)2.025s (-7.9% 🟢)0.439s301.00x
💻 LocalExpress1.611s (-1.6%)2.012s (~)0.013s (+17.5% 🔺)2.027s (~)0.416s301.02x
🐘 PostgresNext.js (Turbopack)1.722s (-2.4%)2.009s (~)0.005s (+33.9% 🔺)2.027s (~)0.305s301.09x
💻 LocalNext.js (Turbopack)1.723s (+5.0% 🔺)2.010s (~)0.013s (+33.3% 🔺)2.026s (~)0.303s301.09x
🐘 PostgresExpress2.073s (+19.3% 🔺)2.501s (+16.7% 🔺)0.004s (+39.6% 🔺)2.553s (+18.2% 🔺)0.479s241.31x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.803s (+0.8%)6.817s (-8.3% 🟢)0.235s (-33.7% 🟢)7.461s (-11.2% 🟢)1.659s91.00x
▲ VercelNitro5.905s (+2.8%)7.730s (+1.7%)0.222s (-34.4% 🟢)8.452s (~)2.548s81.02x
▲ VercelNext.js (Turbopack)5.965s (-6.4% 🟢)7.035s (-11.4% 🟢)0.234s (-35.2% 🟢)7.715s (-13.0% 🟢)1.749s81.03x

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

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.706s (-2.4%)1.013s (-1.8%)0.000s (-100.0% 🟢)1.025s (-2.2%)0.320s591.00x
🐘 PostgresNext.js (Turbopack)0.807s (-3.1%)1.035s (-3.4%)0.000s (-3.4%)1.042s (-3.5%)0.235s581.14x
🐘 PostgresExpress1.322s (+35.2% 🔺)1.661s (+16.3% 🔺)0.000s (-100.0% 🟢)1.692s (+16.8% 🔺)0.370s361.87x
💻 LocalNitro1.370s (+1.3%)2.013s (~)0.000s (-53.3% 🟢)2.015s (~)0.645s301.94x
💻 LocalExpress1.438s (-3.0%)2.013s (~)0.000s (-46.7% 🟢)2.015s (~)0.577s302.04x
💻 LocalNext.js (Turbopack)1.485s (+2.6%)2.013s (~)0.000s (+75.0% 🔺)2.017s (~)0.532s302.10x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.237s (-20.3% 🟢)4.574s (-14.3% 🟢)0.000s (-95.1% 🟢)5.153s (-16.5% 🟢)1.916s121.00x
▲ VercelNext.js (Turbopack)3.305s (~)4.605s (-5.9% 🟢)0.000s (NaN%)5.009s (-8.3% 🟢)1.704s121.02x
▲ VercelNitro3.342s (-7.2% 🟢)5.136s (+1.3%)0.001s (+Infinity% 🔺)5.650s (~)2.308s111.03x

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

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.395s (-1.1%)2.065s (+3.4%)0.000s (NaN%)2.081s (+3.4%)0.686s291.00x
🐘 PostgresNext.js (Turbopack)1.694s (-1.9%)2.225s (-1.6%)0.000s (+Infinity% 🔺)2.249s (-0.9%)0.554s271.21x
💻 LocalNext.js (Turbopack)2.800s (-12.9% 🟢)3.360s (-13.8% 🟢)0.001s (+202.2% 🔺)3.364s (-13.7% 🟢)0.564s182.01x
💻 LocalNitro3.048s (-2.2%)3.774s (-3.1%)0.001s (+225.0% 🔺)3.779s (-3.1%)0.731s162.18x
💻 LocalExpress3.267s (-2.0%)3.895s (+1.5%)0.001s (+50.0% 🔺)3.906s (+1.6%)0.639s162.34x
🐘 PostgresExpress3.436s (+112.8% 🔺)3.945s (+75.1% 🔺)0.000s (NaN%)3.985s (+74.8% 🔺)0.549s162.46x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.809s (-23.9% 🟢)5.989s (-21.5% 🟢)0.000s (-100.0% 🟢)6.430s (-21.4% 🟢)1.622s101.00x
▲ VercelNitro4.836s (-31.3% 🟢)6.013s (-29.8% 🟢)0.000s (NaN%)6.783s (-25.4% 🟢)1.947s91.01x
▲ VercelNext.js (Turbopack)5.061s (-2.0%)6.498s (-2.7%)0.000s (-100.0% 🟢)6.933s (-3.7%)1.872s91.05x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro18/21
🐘 PostgresNitro21/21
▲ VercelNitro9/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local11/21
Next.js (Turbopack)🐘 Postgres15/21
Nitro🐘 Postgres16/21
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)
  • 🌐 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)

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR enforces a crash-safety invariant in the core runtime: the orchestrator’s queue message must not be acked until all progress-critical work is durably complete (notably step_created / wait_created event writes), so redelivery/replay can safely recover from crashes without orphaning steps.

Changes:

  • handleSuspension() no longer registers progress-critical event writes on a detached waitUntil(Promise.all(...)); it strictly awaits them.
  • Adds a new workflowEntrypoint step-dispatch ack ordering test suite to ensure step-dispatch sends complete (or fail/hang) before the handler resolves (ack).
  • Adds a changeset documenting the behavioral fix for @workflow/core.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

FileDescription
packages/core/src/runtime/suspension-handler.tsRemoves detached waitUntil usage for progress-gating event writes; keeps strict await to preserve ack ordering.
packages/core/src/runtime.test.tsAdds ack-ordering regression tests around step dispatch and waitUntil behavior.
.changeset/ack-after-step-dispatch.mdDocuments the patch-level behavioral fix and rationale.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +636 to +638
}) {
const workflowRun = await makeRunningRun(opts.runId);
const order: string[] = [];

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Done — waitUntilPromises.length = 0 now runs at the start of driveHandler(), so the rejection check only ever observes promises that invocation registered (robust against reordering/.only, not just the per-test afterEach). Fixed in 8d28013.

Comment on lines 21 to 25
vi.mock('@vercel/functions', () => ({
waitUntil: vi.fn(),
waitUntil: vi.fn((p: Promise<unknown>) => {
waitUntilPromises.push(p);
}),
}));

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Good catch. The mock now attaches a no-op .catch() to each promise the instant it's recorded, while still pushing the original promise into waitUntilPromises for later allSettled inspection — so a rejection can never surface as a real unhandled rejection in the test process before anyWaitUntilPromiseRejected() runs. Fixed in 8d28013.

'@workflow/core': patch
---

Never ack the orchestrator's queue message before the events that make the run progress are durably written. The suspension handler used to register the `step_created` / `wait_created` writes on a detached `waitUntil(Promise.all(ops))` in addition to awaiting them; the detached copy framed those progress-critical writes as droppable background work and re-threw send failures into a promise nothing consumes (unhandled rejection → process exit 128). It now strictly awaits the writes only, so the orchestrator message is never acked until they complete — a crash before then leaves the message un-acked and VQS redelivers within the lease, re-creating the (idempotent) entities and re-dispatching instead of orphaning the step. Complements the crash fix in #2336.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

too verbose. match the format/terseness of other changesets

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Trimmed to match the sibling changesets (now ~4 lines, in line with abort-e2e-flakes.md etc). Fixed in 8d28013.

- Trim the changeset to match the terseness of sibling changesets.
- Attach a no-op .catch() to each promise the waitUntil mock records so a
rejecting promise can never surface as a real unhandled rejection in the
test process; keep the original promise for allSettled inspection.
- Reset waitUntilPromises at the start of driveHandler() so the rejection
check only observes this invocation's promises (robust to reordering/.only).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@VaguelySeriousVaguelySerious changed the title [core] Never ack orchestrator message before step dispatch sends complete[core] Fix unhandled rejection when step_created/wait_created calls fail in waitUntilJun 11, 2026
@VaguelySeriousVaguelySerious changed the title [core] Fix unhandled rejection when step_created/wait_created calls fail in waitUntil[core] Remove duplicate waitUntil for suspension handler async operationsJun 11, 2026
@VaguelySerious
VaguelySerious merged commit bf44d4d into mainJun 11, 2026
187 of 193 checks passed
@VaguelySerious
VaguelySerious deleted the fix/ack-after-step-enqueue branch June 11, 2026 08:36
@github-actionsgithub-actionsBot mentioned this pull request Jun 11, 2026
github-actionsBot added a commit that referenced this pull request Jun 11, 2026
…ations (#2345)
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Pranay Prakash <pranay.gp@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

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

VaguelySerious added a commit that referenced this pull request Jun 11, 2026
…ations (#2345) (#2353)
Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
@github-actionsgithub-actionsBot mentioned this pull request Jun 11, 2026
pranaygp added a commit that referenced this pull request Jun 11, 2026
…hook-ready
* origin-https/main: (119 commits)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
Patch vulnerable package dependencies (#2301)
Deprecate DurableAgent and update it with WorkflowAgent in v5 docs (#2285)
[codex] Fix partial world-local exclusive writes (#2296)
...
# Conflicts:
#	packages/core/src/runtime.ts
#	packages/core/src/runtime/suspension-handler.ts
pranaygp added a commit that referenced this pull request Jun 11, 2026
…t-race-eager-wait
* origin/main:
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
pranaygp added a commit that referenced this pull request Jun 11, 2026
…docs-run-idempotency
* origin-https/main: (115 commits)
[core] V2: unify wait+step queue dispatch in suspension processing (#1925)
fix(world-local,world-postgres): make duplicate hook_created idempotent (#2295)
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
...
# Conflicts:
#	docs/content/docs/v4/cookbook/advanced/child-workflows.mdx
#	docs/content/docs/v5/cookbook/advanced/child-workflows.mdx
#	docs/content/docs/v5/cookbook/agent-patterns/durable-agent.mdx
pranaygp added a commit that referenced this pull request Jun 11, 2026
* origin/main:
[core] V2: unify wait+step queue dispatch in suspension processing (#1925)
fix(world-local,world-postgres): make duplicate hook_created idempotent (#2295)
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
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.

3 participants

@pranaygp@VaguelySerious