Skip to content

[core] Gate turbo end-of-run drain writes on the run-ready barrier#2685

Open
VaguelySerious wants to merge 2 commits into
mainfrom
peter/turbo-drain-hook-run-ready
Open

[core] Gate turbo end-of-run drain writes on the run-ready barrier#2685
VaguelySerious wants to merge 2 commits into
mainfrom
peter/turbo-drain-hook-run-ready

Conversation

@VaguelySerious

@VaguelySerious VaguelySerious commented Jun 27, 2026

Copy link
Copy Markdown
Member

Problem

Turbo mode backgrounds run_started and runs the workflow body optimistically before it is durable, gating every downstream write on a run-ready barrier so nothing reaches the server before the run exists. The awaited-hook path is already gated (the suspension handler threads the barrier).

But a workflow that creates a fire-and-forget hook (or wait/attribute) and then returns synchronously never suspends. Its *_created event is instead committed by the end-of-run drain inside runWorkflow — which runs before the runtime's terminal awaitRunReady(). In turbo, that write could race ahead of the still-in-flight run_started and hit the server before the run is created.

async function wf() {
  "use workflow";
  createHook({ token: orderId }); // never awaited
  return "done";                  // completes synchronously → drained, ungated
}

Fix

Thread the run-ready barrier through runWorkflow into drainPendingQueueItemshandleSuspension, so the drain's writes are gated exactly like the normal suspension path. No-op outside turbo (barrier undefined), and a barrier rejection is swallowed for ordering only (a genuinely failed run_started surfaces via the subsequent write).

Test

Added regression tests in workflow.test.ts that run a fire-and-forget-hook and a fire-and-forget-wait (void sleep(...)) workflow through runWorkflow with a pending barrier and assert (via a fixed-time race, robust to VM-setup latency) that runWorkflow cannot complete and the hook_created/wait_created write is withheld until the barrier resolves. Both verified to fail without the threading. attr_set is gated by the same path. Also covers the barrier-rejection (writes anyway) and no-barrier (non-turbo, writes immediately) cases.

🤖 Generated with Claude Code

A workflow that creates a fire-and-forget hook (or wait/attribute) and
then returns synchronously never suspends, so the `*_created` event is
committed by the end-of-run drain inside `runWorkflow` — before the
runtime's terminal `awaitRunReady()`. In turbo (`run_started`
backgrounded), that write could reach the server before the run exists.

Thread the run-ready barrier through `runWorkflow` into the drain's
`handleSuspension` call so these writes are gated the same way the normal
suspension path already is. No-op outside turbo (barrier undefined).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@VaguelySerious VaguelySerious requested review from a team and ijjk as code owners June 27, 2026 16:28
@changeset-bot

changeset-bot Bot commented Jun 27, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 74b443b

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

This PR includes changesets to release 16 packages
Name Type
@workflow/core Patch
@workflow/builders Patch
@workflow/cli Patch
@workflow/next Patch
@workflow/nitro Patch
@workflow/vitest Patch
@workflow/web-shared Patch
@workflow/web Patch
workflow Patch
@workflow/world-testing Patch
@workflow/astro Patch
@workflow/nest Patch
@workflow/rollup Patch
@workflow/sveltekit Patch
@workflow/vite Patch
@workflow/nuxt Patch

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

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

@vercel

vercel Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview, Comment Jun 27, 2026 4:41pm
example-nextjs-workflow-webpack Ready Ready Preview, Comment Jun 27, 2026 4:41pm
example-workflow Ready Ready Preview, Comment Jun 27, 2026 4:41pm
workbench-astro-workflow Ready Ready Preview, Comment Jun 27, 2026 4:41pm
workbench-express-workflow Ready Ready Preview, Comment Jun 27, 2026 4:41pm
workbench-fastify-workflow Ready Ready Preview, Comment Jun 27, 2026 4:41pm
workbench-hono-workflow Ready Ready Preview, Comment Jun 27, 2026 4:41pm
workbench-nitro-workflow Ready Ready Preview, Comment Jun 27, 2026 4:41pm
workbench-nuxt-workflow Ready Ready Preview, Comment Jun 27, 2026 4:41pm
workbench-sveltekit-workflow Ready Ready Preview, Comment Jun 27, 2026 4:41pm
workbench-tanstack-start-workflow Ready Ready Preview, Comment Jun 27, 2026 4:41pm
workbench-vite-workflow Building Building Preview, Comment Jun 27, 2026 4:41pm
workflow-docs Ready Ready Preview, Comment, Open in v0 Jun 27, 2026 4:41pm
workflow-swc-playground Ready Ready Preview, Comment Jun 27, 2026 4:41pm
workflow-tarballs Ready Ready Preview, Comment Jun 27, 2026 4:41pm
workflow-web Ready Ready Preview, Comment Jun 27, 2026 4:41pm

@github-actions

github-actions Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 0.046s (+1.8%) 1.006s (~) 0.960s 10 1.00x
💻 Local Express 0.051s (+9.9% 🔺) 1.006s (~) 0.955s 10 1.11x
💻 Local Next.js (Turbopack) 0.053s (+11.9% 🔺) 1.006s (~) 0.953s 10 1.13x
🐘 Postgres Next.js (Turbopack) 0.056s (-10.6% 🟢) 1.011s (~) 0.956s 10 1.20x
🐘 Postgres Nitro 0.067s (+11.1% 🔺) 1.013s (~) 0.946s 10 1.44x
🐘 Postgres Express 0.073s (+11.5% 🔺) 1.012s (~) 0.940s 10 1.56x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 0.190s (-8.9% 🟢) 1.660s (+6.1% 🔺) 1.470s 10 1.00x
▲ Vercel Nitro 0.228s (-2.7%) 1.813s (-12.2% 🟢) 1.585s 10 1.20x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

workflow with 1 step

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 1.081s (~) 2.006s (~) 0.925s 10 1.00x
💻 Local Express 1.086s (+0.8%) 2.007s (~) 0.921s 10 1.00x
💻 Local Next.js (Turbopack) 1.087s (~) 2.006s (~) 0.919s 10 1.01x
🐘 Postgres Next.js (Turbopack) 1.087s (-0.5%) 2.010s (~) 0.923s 10 1.01x
🐘 Postgres Nitro 1.099s (~) 2.012s (~) 0.913s 10 1.02x
🐘 Postgres Express 1.103s (~) 2.009s (~) 0.907s 10 1.02x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 1.367s (-0.8%) 2.853s (-4.7%) 1.486s 10 1.00x
▲ Vercel Nitro 1.544s (+11.1% 🔺) 3.595s (+20.3% 🔺) 2.051s 10 1.13x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

workflow with 10 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 10.447s (~) 11.022s (~) 0.574s 3 1.00x
💻 Local Next.js (Turbopack) 10.475s (~) 11.024s (~) 0.549s 3 1.00x
🐘 Postgres Express 10.477s (~) 11.018s (~) 0.541s 3 1.00x
🐘 Postgres Nitro 10.498s (~) 11.023s (~) 0.525s 3 1.00x
💻 Local Express 10.502s (+0.6%) 11.025s (~) 0.523s 3 1.01x
🐘 Postgres Next.js (Turbopack) 10.513s (~) 11.016s (~) 0.503s 3 1.01x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 11.845s (+1.2%) 13.082s (-4.0%) 1.237s 3 1.00x
▲ Vercel Nitro 12.455s (+7.4% 🔺) 14.383s (+14.2% 🔺) 1.928s 3 1.05x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

workflow with 25 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 13.591s (~) 14.027s (~) 0.436s 5 1.00x
💻 Local Next.js (Turbopack) 13.656s (~) 14.028s (~) 0.372s 5 1.00x
🐘 Postgres Express 13.687s (+0.6%) 14.021s (~) 0.334s 5 1.01x
💻 Local Express 13.689s (~) 14.028s (~) 0.339s 5 1.01x
🐘 Postgres Nitro 13.702s (+1.1%) 14.019s (~) 0.318s 5 1.01x
🐘 Postgres Next.js (Turbopack) 13.770s (~) 14.022s (~) 0.252s 5 1.01x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 16.761s (+0.7%) 18.216s (-2.9%) 1.455s 4 1.00x
▲ Vercel Nitro 16.966s (+5.3% 🔺) 18.854s (+9.5% 🔺) 1.888s 4 1.01x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

workflow with 50 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 12.130s (~) 13.025s (~) 0.894s 7 1.00x
🐘 Postgres Nitro 12.232s (-1.1%) 13.020s (~) 0.789s 7 1.01x
🐘 Postgres Next.js (Turbopack) 12.247s (-0.8%) 13.016s (~) 0.770s 7 1.01x
🐘 Postgres Express 12.251s (+0.9%) 13.018s (~) 0.766s 7 1.01x
💻 Local Express 12.272s (-0.5%) 13.027s (~) 0.756s 7 1.01x
💻 Local Next.js (Turbopack) 12.293s (~) 13.025s (~) 0.732s 7 1.01x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 19.875s (+14.8% 🔺) 21.286s (+10.6% 🔺) 1.411s 5 1.00x
▲ Vercel Nitro 21.045s (+22.6% 🔺) 23.060s (+26.1% 🔺) 2.015s 4 1.06x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

Promise.all with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 1.192s (-1.7%) 2.008s (~) 0.816s 15 1.00x
🐘 Postgres Express 1.199s (+2.0%) 2.008s (~) 0.809s 15 1.01x
🐘 Postgres Nitro 1.200s (+2.1%) 2.008s (~) 0.808s 15 1.01x
💻 Local Nitro 1.426s (-1.9%) 2.006s (~) 0.581s 15 1.20x
💻 Local Express 1.448s (-8.5% 🟢) 2.007s (-3.3%) 0.559s 15 1.21x
💻 Local Next.js (Turbopack) 1.518s (+3.3%) 2.073s (+3.3%) 0.555s 15 1.27x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.245s (+4.2%) 3.575s (-7.5% 🟢) 1.330s 9 1.00x
▲ Vercel Nitro 2.401s (+21.0% 🔺) 4.208s (+30.3% 🔺) 1.807s 8 1.07x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 1.304s (+0.6%) 3.010s (~) 1.706s 10 1.00x
🐘 Postgres Express 1.345s (+0.9%) 2.393s (~) 1.048s 13 1.03x
🐘 Postgres Nitro 1.346s (+1.3%) 2.509s (+8.3% 🔺) 1.163s 12 1.03x
💻 Local Nitro 2.425s (-1.2%) 2.826s (~) 0.401s 11 1.86x
💻 Local Next.js (Turbopack) 2.536s (-1.3%) 3.343s (+7.5% 🔺) 0.807s 9 1.95x
💻 Local Express 2.728s (+8.8% 🔺) 3.343s (+11.1% 🔺) 0.615s 9 2.09x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.713s (+6.0% 🔺) 4.530s (+17.7% 🔺) 1.818s 7 1.00x
▲ Vercel Express 3.067s (+20.6% 🔺) 4.747s (+18.1% 🔺) 1.680s 7 1.13x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

Promise.all with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.629s (-2.4%) 4.584s (+10.8% 🔺) 2.956s 7 1.00x
🐘 Postgres Express 1.631s (+1.2%) 4.139s (+3.2%) 2.508s 8 1.00x
🐘 Postgres Next.js (Turbopack) 2.976s (-6.3% 🟢) 5.517s (-11.2% 🟢) 2.541s 6 1.83x
💻 Local Next.js (Turbopack) 5.869s (+0.6%) 6.415s (-14.7% 🟢) 0.545s 5 3.60x
💻 Local Nitro 5.914s (-5.6% 🟢) 6.614s (-8.4% 🟢) 0.700s 5 3.63x
💻 Local Express 6.231s (+16.7% 🔺) 6.816s (+16.6% 🔺) 0.585s 5 3.83x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 3.195s (+16.0% 🔺) 4.901s (+17.1% 🔺) 1.706s 7 1.00x
▲ Vercel Nitro 3.632s (+27.2% 🔺) 5.512s (+30.5% 🔺) 1.880s 7 1.14x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 1.183s (-3.0%) 2.007s (~) 0.824s 15 1.00x
🐘 Postgres Nitro 1.185s (~) 2.008s (~) 0.823s 15 1.00x
🐘 Postgres Express 1.217s (+3.3%) 2.008s (~) 0.790s 15 1.03x
💻 Local Nitro 1.420s (-1.3%) 2.007s (~) 0.587s 15 1.20x
💻 Local Next.js (Turbopack) 1.453s (+4.5%) 2.007s (~) 0.554s 15 1.23x
💻 Local Express 1.462s (+5.3% 🔺) 2.007s (~) 0.545s 15 1.24x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.265s (+16.1% 🔺) 3.897s (+20.9% 🔺) 1.633s 8 1.00x
▲ Vercel Express 2.745s (+46.1% 🔺) 4.336s (+17.4% 🔺) 1.591s 7 1.21x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

Promise.race with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.292s (-0.9%) 2.828s (+12.8% 🔺) 1.536s 11 1.00x
🐘 Postgres Next.js (Turbopack) 1.306s (-1.1%) 3.008s (~) 1.702s 10 1.01x
🐘 Postgres Express 1.400s (+8.5% 🔺) 2.509s (~) 1.109s 12 1.08x
💻 Local Express 2.228s (-8.6% 🟢) 3.009s (-3.2%) 0.781s 10 1.72x
💻 Local Nitro 2.598s (+8.5% 🔺) 3.010s (~) 0.412s 10 2.01x
💻 Local Next.js (Turbopack) 2.603s (+7.7% 🔺) 3.454s (+22.1% 🔺) 0.851s 9 2.02x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.550s (+14.3% 🔺) 4.224s (+31.8% 🔺) 1.674s 8 1.00x
▲ Vercel Express 2.686s (+20.6% 🔺) 4.316s (+16.8% 🔺) 1.630s 7 1.05x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

Promise.race with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.663s (~) 4.298s (-3.3%) 2.635s 7 1.00x
🐘 Postgres Express 1.694s (+6.5% 🔺) 4.299s (+0.9%) 2.605s 7 1.02x
🐘 Postgres Next.js (Turbopack) 2.847s (-5.0% 🟢) 6.014s (-16.7% 🟢) 3.166s 5 1.71x
💻 Local Next.js (Turbopack) 5.883s (+28.1% 🔺) 6.413s (+19.9% 🔺) 0.530s 5 3.54x
💻 Local Nitro 6.231s (-15.5% 🟢) 7.017s (-12.5% 🟢) 0.786s 5 3.75x
💻 Local Express 7.332s (+14.5% 🔺) 8.018s (+14.2% 🔺) 0.686s 4 4.41x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 3.223s (+23.1% 🔺) 5.125s (+16.6% 🔺) 1.902s 6 1.00x
▲ Vercel Express 3.258s (+2.2%) 4.920s (+3.1%) 1.662s 7 1.01x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 0.521s (-13.3% 🟢) 1.006s (~) 0.485s 60 1.00x
💻 Local Nitro 0.549s (-4.1%) 1.005s (~) 0.457s 60 1.05x
🐘 Postgres Express 0.554s (+2.0%) 1.006s (~) 0.452s 60 1.06x
🐘 Postgres Nitro 0.566s (+5.0%) 1.023s (~) 0.457s 59 1.09x
💻 Local Next.js (Turbopack) 0.598s (+2.2%) 1.005s (~) 0.407s 60 1.15x
💻 Local Express 0.602s (~) 1.005s (~) 0.403s 60 1.16x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.967s (+21.7% 🔺) 4.640s (+30.1% 🔺) 1.672s 13 1.00x
▲ Vercel Express 2.975s (+19.5% 🔺) 4.619s (+14.2% 🔺) 1.643s 13 1.00x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 1.247s (-7.7% 🟢) 2.007s (~) 0.760s 45 1.00x
💻 Local Nitro 1.361s (-8.9% 🟢) 2.006s (-2.2%) 0.646s 45 1.09x
🐘 Postgres Express 1.371s (+7.9% 🔺) 2.007s (~) 0.636s 45 1.10x
🐘 Postgres Nitro 1.382s (+8.1% 🔺) 2.053s (+2.3%) 0.671s 44 1.11x
💻 Local Next.js (Turbopack) 1.508s (-0.8%) 2.006s (~) 0.498s 45 1.21x
💻 Local Express 1.526s (-3.3%) 2.006s (-1.1%) 0.481s 45 1.22x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 7.091s (+23.5% 🔺) 8.902s (+28.5% 🔺) 1.811s 11 1.00x
▲ Vercel Express 7.244s (+23.7% 🔺) 8.788s (+16.4% 🔺) 1.544s 11 1.02x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 2.522s (-12.6% 🟢) 3.034s (-5.8% 🟢) 0.512s 40 1.00x
🐘 Postgres Express 2.674s (+3.9%) 3.059s (~) 0.385s 40 1.06x
🐘 Postgres Nitro 2.713s (+7.3% 🔺) 3.111s (+1.7%) 0.398s 39 1.08x
💻 Local Nitro 2.984s (-4.7%) 3.370s (-12.5% 🟢) 0.386s 36 1.18x
💻 Local Express 3.215s (-4.6%) 3.977s (-0.8%) 0.762s 31 1.27x
💻 Local Next.js (Turbopack) 3.351s (+3.2%) 4.043s (+0.8%) 0.692s 30 1.33x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 13.909s (+18.0% 🔺) 15.790s (+14.5% 🔺) 1.881s 8 1.00x
▲ Vercel Nitro 13.953s (+17.9% 🔺) 16.050s (+21.0% 🔺) 2.097s 8 1.00x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 0.169s (-23.0% 🟢) 1.006s (~) 0.837s 60 1.00x
🐘 Postgres Express 0.225s (+4.8%) 1.006s (~) 0.781s 60 1.33x
🐘 Postgres Nitro 0.244s (+17.1% 🔺) 1.006s (~) 0.762s 60 1.44x
💻 Local Nitro 0.461s (+5.0%) 1.005s (~) 0.544s 60 2.73x
💻 Local Express 0.464s (-9.9% 🟢) 1.005s (~) 0.541s 60 2.74x
💻 Local Next.js (Turbopack) 0.622s (+1.8%) 1.005s (-1.7%) 0.383s 60 3.68x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 1.236s (+24.0% 🔺) 2.799s (+28.4% 🔺) 1.563s 22 1.00x
▲ Vercel Express 1.265s (+19.5% 🔺) 2.569s (-3.5%) 1.305s 24 1.02x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 0.281s (-10.9% 🟢) 1.053s (+4.5%) 0.772s 86 1.00x
🐘 Postgres Express 0.340s (-1.9%) 1.018s (~) 0.678s 89 1.21x
🐘 Postgres Nitro 0.342s (+3.5%) 1.029s (+1.2%) 0.687s 88 1.22x
💻 Local Express 2.237s (~) 2.735s (-6.1% 🟢) 0.498s 33 7.97x
💻 Local Nitro 2.243s (+4.8%) 2.821s (+5.8% 🔺) 0.578s 32 7.99x
💻 Local Next.js (Turbopack) 2.810s (+8.1% 🔺) 3.147s (~) 0.337s 29 10.01x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 1.715s (+22.4% 🔺) 3.337s (+15.9% 🔺) 1.621s 27 1.00x
▲ Vercel Nitro 1.819s (+40.3% 🔺) 3.699s (+47.4% 🔺) 1.880s 25 1.06x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 0.484s (-14.2% 🟢) 3.009s (-4.1%) 2.525s 40 1.00x
🐘 Postgres Express 0.523s (+4.8%) 1.097s (+8.1% 🔺) 0.574s 111 1.08x
🐘 Postgres Nitro 0.540s (+3.4%) 1.108s (+3.7%) 0.568s 109 1.12x
💻 Local Express 9.676s (-6.9% 🟢) 10.695s (-8.3% 🟢) 1.019s 12 20.00x
💻 Local Nitro 9.810s (-3.3%) 10.609s (-2.3%) 0.799s 12 20.28x
💻 Local Next.js (Turbopack) 10.124s (+1.0%) 11.121s (+0.8%) 0.997s 11 20.93x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.538s (+36.7% 🔺) 4.373s (+28.0% 🔺) 1.835s 28 1.00x
▲ Vercel Express 2.684s (+46.1% 🔺) 4.335s (+16.7% 🔺) 1.651s 28 1.06x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

Stream Benchmarks (includes TTFB metrics)
workflow with stream

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 1.137s (-2.6%) 2.005s (~) 0.010s (-14.9% 🟢) 2.018s (~) 0.881s 10 1.00x
💻 Local Next.js (Turbopack) 1.141s (~) 1.967s (~) 0.012s (+16.5% 🔺) 2.020s (~) 0.878s 10 1.00x
🐘 Postgres Next.js (Turbopack) 1.162s (-1.8%) 2.001s (~) 0.001s (-33.3% 🟢) 2.010s (~) 0.849s 10 1.02x
🐘 Postgres Nitro 1.164s (-1.3%) 1.999s (~) 0.001s (+20.0% 🔺) 2.010s (~) 0.846s 10 1.02x
💻 Local Express 1.170s (~) 2.005s (~) 0.012s (+12.1% 🔺) 2.020s (~) 0.850s 10 1.03x
🐘 Postgres Express 1.171s (+1.5%) 1.998s (~) 0.001s (-8.3% 🟢) 2.011s (~) 0.840s 10 1.03x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.081s (+11.3% 🔺) 3.096s (-6.0% 🟢) 2.510s (+105.0% 🔺) 6.063s (+20.9% 🔺) 3.982s 10 1.00x
▲ Vercel Nitro 2.138s (+13.8% 🔺) 3.537s (+22.4% 🔺) 1.697s (-2.2%) 5.761s (+15.3% 🔺) 3.623s 10 1.03x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - - -

🔍 Observability: Express | Nitro

stream pipeline with 5 transform steps (1MB)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 1.551s (~) 2.010s (~) 0.013s (-3.5%) 2.027s (~) 0.476s 30 1.00x
🐘 Postgres Express 1.577s (-1.1%) 2.001s (-1.6%) 0.005s (-2.0%) 2.024s (-1.6%) 0.448s 30 1.02x
💻 Local Express 1.577s (-0.7%) 2.009s (~) 0.012s (-10.5% 🟢) 2.024s (~) 0.447s 30 1.02x
🐘 Postgres Next.js (Turbopack) 1.585s (~) 2.011s (~) 0.005s (+10.8% 🔺) 2.027s (~) 0.441s 30 1.02x
🐘 Postgres Nitro 1.592s (~) 2.005s (~) 0.005s (-7.6% 🟢) 2.027s (~) 0.436s 30 1.03x
💻 Local Next.js (Turbopack) 1.603s (+2.7%) 1.970s (~) 0.011s (-7.8% 🟢) 2.024s (~) 0.421s 30 1.03x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 6.392s (+15.1% 🔺) 7.966s (+24.4% 🔺) 0.383s (-53.2% 🟢) 8.846s (+15.9% 🔺) 2.453s 7 1.00x
▲ Vercel Express 6.603s (+21.8% 🔺) 8.120s (+14.5% 🔺) 0.193s (+4.0%) 8.730s (+13.0% 🔺) 2.127s 7 1.03x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - - -

🔍 Observability: Nitro | Express

10 parallel streams (1MB each)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 0.798s (+3.2%) 1.062s (+3.3%) 0.000s (-23.7% 🟢) 1.079s (+2.0%) 0.282s 56 1.00x
🐘 Postgres Nitro 0.814s (+0.9%) 1.104s (+3.5%) 0.000s (+Infinity% 🔺) 1.120s (+3.7%) 0.306s 54 1.02x
🐘 Postgres Next.js (Turbopack) 0.963s (-5.4% 🟢) 1.394s (-3.9%) 0.000s (+Infinity% 🔺) 1.403s (-4.0%) 0.440s 43 1.21x
💻 Local Express 1.258s (-7.9% 🟢) 1.921s (-4.7%) 0.000s (+8.2% 🔺) 1.924s (-4.7%) 0.665s 32 1.58x
💻 Local Nitro 1.306s (+5.8% 🔺) 2.013s (~) 0.000s (-33.3% 🟢) 2.016s (~) 0.710s 30 1.64x
💻 Local Next.js (Turbopack) 1.404s (+5.2% 🔺) 1.979s (~) 0.000s (-6.7% 🟢) 2.016s (~) 0.613s 30 1.76x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 3.409s (+23.8% 🔺) 4.545s (+4.1%) 0.001s (+658.3% 🔺) 5.063s (+4.5%) 1.654s 12 1.00x
▲ Vercel Nitro 3.632s (+14.2% 🔺) 4.835s (+13.4% 🔺) 0.000s (NaN%) 5.362s (+15.0% 🔺) 1.731s 12 1.07x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - - -

🔍 Observability: Express | Nitro

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

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.656s (-8.7% 🟢) 2.173s (-9.2% 🟢) 0.000s (-100.0% 🟢) 2.193s (-9.0% 🟢) 0.537s 28 1.00x
🐘 Postgres Express 1.726s (-6.5% 🟢) 2.264s (-4.8%) 0.000s (-100.0% 🟢) 2.354s (-1.7%) 0.628s 26 1.04x
🐘 Postgres Next.js (Turbopack) 2.457s (-19.6% 🟢) 2.953s (-17.8% 🟢) 0.000s (-100.0% 🟢) 2.966s (-17.6% 🟢) 0.509s 21 1.48x
💻 Local Nitro 3.384s (+3.5%) 4.023s (+1.5%) 0.001s (+21.9% 🔺) 4.029s (+1.6%) 0.645s 15 2.04x
💻 Local Express 3.531s (-12.8% 🟢) 4.160s (-8.2% 🟢) 0.001s (-32.1% 🟢) 4.163s (-8.2% 🟢) 0.632s 15 2.13x
💻 Local Next.js (Turbopack) 3.608s (-4.4%) 4.057s (-4.8%) 0.001s (~) 4.103s (-4.6%) 0.495s 15 2.18x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 4.968s (+21.4% 🔺) 6.352s (+23.2% 🔺) 0.000s (-100.0% 🟢) 6.822s (+23.0% 🔺) 1.853s 9 1.00x
▲ Vercel Express 5.403s (+27.8% 🔺) 6.551s (+12.7% 🔺) 0.000s (+Infinity% 🔺) 7.026s (+12.0% 🔺) 1.623s 9 1.09x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - - -

🔍 Observability: Nitro | Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World 🥇 Fastest Framework Wins
💻 Local Nitro 15/21
🐘 Postgres Next.js (Turbopack) 12/21
▲ Vercel Express 11/21
Fastest World by Framework

Winner determined by most benchmark wins

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

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)
  • 🌐 Platformatic: Community world (local development)

📋 View full workflow run


Some benchmark jobs failed:

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

Check the workflow run for details.

@github-actions

github-actions Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

Passed Failed Skipped Total
✅ ▲ Vercel Production 1442 0 230 1672
✅ 💻 Local Development 1605 0 219 1824
✅ 📦 Local Production 1605 0 219 1824
✅ 🐘 Local Postgres 1593 0 231 1824
✅ 🪟 Windows 152 0 0 152
✅ 📋 Other 885 0 179 1064
Total 7282 0 1078 8360

Details by Category

✅ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 125 0 27
✅ example 125 0 27
✅ express 125 0 27
✅ fastify 125 0 27
✅ hono 125 0 27
✅ nextjs-turbopack 149 0 3
✅ nextjs-webpack 149 0 3
✅ nitro 125 0 27
✅ nuxt 125 0 27
✅ sveltekit 144 0 8
✅ vite 125 0 27
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 127 0 25
✅ express-stable 127 0 25
✅ fastify-stable 127 0 25
✅ hono-stable 127 0 25
✅ nextjs-turbopack-canary 133 0 19
✅ nextjs-turbopack-stable 152 0 0
✅ nextjs-webpack-canary 133 0 19
✅ nextjs-webpack-stable 152 0 0
✅ nitro-stable 127 0 25
✅ nuxt-stable 127 0 25
✅ sveltekit-stable 146 0 6
✅ vite-stable 127 0 25
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 127 0 25
✅ express-stable 127 0 25
✅ fastify-stable 127 0 25
✅ hono-stable 127 0 25
✅ nextjs-turbopack-canary 133 0 19
✅ nextjs-turbopack-stable 152 0 0
✅ nextjs-webpack-canary 133 0 19
✅ nextjs-webpack-stable 152 0 0
✅ nitro-stable 127 0 25
✅ nuxt-stable 127 0 25
✅ sveltekit-stable 146 0 6
✅ vite-stable 127 0 25
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 126 0 26
✅ express-stable 126 0 26
✅ fastify-stable 126 0 26
✅ hono-stable 126 0 26
✅ nextjs-turbopack-canary 132 0 20
✅ nextjs-turbopack-stable 151 0 1
✅ nextjs-webpack-canary 132 0 20
✅ nextjs-webpack-stable 151 0 1
✅ nitro-stable 126 0 26
✅ nuxt-stable 126 0 26
✅ sveltekit-stable 145 0 7
✅ vite-stable 126 0 26
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 152 0 0
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 127 0 25
✅ e2e-local-dev-tanstack-start- 127 0 25
✅ e2e-local-postgres-nest-stable 126 0 26
✅ e2e-local-postgres-tanstack-start- 126 0 26
✅ e2e-local-prod-nest-stable 127 0 25
✅ e2e-local-prod-tanstack-start- 127 0 25
✅ e2e-vercel-prod-tanstack-start 125 0 27

📋 View full workflow run

The barrier threaded into the end-of-run drain gates every write the
suspension handler performs, including wait_created. Add explicit
coverage mirroring the hook case: a fire-and-forget `void sleep(...)`
that completes synchronously must not write wait_created before the
backgrounded run_started lands.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant