Skip to content

test: e2e coverage for run-idempotency conflict-handling strategies#2387

Merged
pranaygp merged 5 commits into
mainfrom
pranaygp/idempotency-strategy-e2e
Jun 13, 2026
Merged

test: e2e coverage for run-idempotency conflict-handling strategies#2387
pranaygp merged 5 commits into
mainfrom
pranaygp/idempotency-strategy-e2e

Conversation

@pranaygp

Copy link
Copy Markdown
Contributor

Summary

Adds e2e coverage for the run-idempotency patterns and conflict-handling strategies documented in #2011 (built on hook.getConflict() from #2373). Before this, e2e coverage proved claim-without-payload and conflict detection, but none of the documented strategies — and the purest use case (hooks purely as a run mutex, never carrying data) had no owner-side coverage.

New tests (packages/core/e2e/e2e.test.ts + workflows in workbench/example/workflows/99_e2e.ts)

  • hookClaimOnlyMutexWorkflow — pure run mutex. The owner claims the token via getConflict(), holds it through a slow step, and never awaits payload data (asserted via zero hook_received events). A duplicate started during the hold identifies the owner; after the owner completes, the token is released and a third run claims it cleanly.
  • hookAdoptOwnerResultWorkflow — adopt the owner's result. The duplicate awaits conflict.returnValue and returns the owner's exact result, proving callers can't tell which run did the work.
  • hookSignalOwnerWorkflow — signal the owner. The duplicate forwards its own input into the owner's hook via resumeHook() from a step; the owner completes with the forwarded payload.
  • hookSupersedeOwnerWorkflow — newest-wins. The duplicate cancels the owner via conflict.cancel() and reclaims the released token through the documented retry loop; asserts the owner ends cancelled and the new owner receives payloads on the reclaimed token.
  • Resume-or-start route pattern. Exercises the documented route-side flow directly from the test: resumeHook fails with HookNotFoundError before any run exists, then start() + retried resume reaches the started run without dropping the payload.

Validation

  • cd workbench/example && pnpm build (workflows compile through the SWC plugin)
  • Full hook e2e suite against local nextjs-turbopack dev server: 25 tests pass, including all 5 new ones

Changeset: patch for workflow/@workflow/core (test-only; rides along on the next bump).

Covers the patterns documented in foundations/idempotency:
- claim-only hook mutex: token claimed and held with no payload data,
  duplicate identifies the owner, token released after completion
- adopt the owner's result via conflict.returnValue
- signal the owner: duplicate forwards its payload via resumeHook
- supersede: duplicate cancels the owner and reclaims the token
- route-side resume-or-start retry pattern reaching the started run

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 12, 2026 21:30
@pranaygp pranaygp requested a review from a team as a code owner June 12, 2026 21:30
@changeset-bot

changeset-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0237347

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

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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 12, 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 12, 2026 11:31pm
example-nextjs-workflow-webpack Ready Ready Preview, Comment Jun 12, 2026 11:31pm
example-workflow Ready Ready Preview, Comment Jun 12, 2026 11:31pm
workbench-astro-workflow Ready Ready Preview, Comment Jun 12, 2026 11:31pm
workbench-express-workflow Ready Ready Preview, Comment Jun 12, 2026 11:31pm
workbench-fastify-workflow Ready Ready Preview, Comment Jun 12, 2026 11:31pm
workbench-hono-workflow Ready Ready Preview, Comment Jun 12, 2026 11:31pm
workbench-nitro-workflow Ready Ready Preview, Comment Jun 12, 2026 11:31pm
workbench-nuxt-workflow Ready Ready Preview, Comment Jun 12, 2026 11:31pm
workbench-sveltekit-workflow Ready Ready Preview, Comment Jun 12, 2026 11:31pm
workbench-tanstack-start-workflow Ready Ready Preview, Comment Jun 12, 2026 11:31pm
workbench-vite-workflow Ready Ready Preview, Comment Jun 12, 2026 11:31pm
workflow-swc-playground Ready Ready Preview, Comment Jun 12, 2026 11:31pm
workflow-tarballs Ready Ready Preview, Comment Jun 12, 2026 11:31pm
workflow-web Ready Ready Preview, Comment Jun 12, 2026 11:31pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
workflow-docs Skipped Skipped Jun 12, 2026 11:31pm

@github-actions

github-actions Bot commented Jun 12, 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.036s (-10.2% 🟢) 1.005s (~) 0.969s 10 1.00x
💻 Local Express 0.041s (+50.5% 🔺) 1.006s (~) 0.965s 10 1.14x
🐘 Postgres Express 0.048s (-15.5% 🟢) 1.011s (~) 0.963s 10 1.31x
💻 Local Next.js (Turbopack) 0.061s (+1.0%) 1.007s (~) 0.946s 10 1.69x
🐘 Postgres Nitro 0.066s (-1.8%) 1.013s (~) 0.947s 10 1.81x
🐘 Postgres Next.js (Turbopack) 0.067s (-2.1%) 1.012s (~) 0.945s 10 1.84x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 0.308s (+11.5% 🔺) 2.339s (-19.3% 🟢) 2.031s 10 1.00x
▲ Vercel Nitro 0.345s (+19.0% 🔺) 2.153s (-3.7%) 1.808s 10 1.12x
▲ Vercel Express 0.361s (+21.3% 🔺) 2.309s (-6.0% 🟢) 1.948s 10 1.17x

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

workflow with 1 step

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 1.074s (-1.7%) 2.005s (~) 0.931s 10 1.00x
💻 Local Express 1.090s (+2.6%) 2.007s (~) 0.916s 10 1.02x
🐘 Postgres Nitro 1.119s (+1.1%) 2.010s (~) 0.891s 10 1.04x
💻 Local Next.js (Turbopack) 1.140s (+0.6%) 2.007s (~) 0.867s 10 1.06x
🐘 Postgres Next.js (Turbopack) 1.143s (+0.6%) 2.009s (~) 0.866s 10 1.06x
🐘 Postgres Express 1.163s (+4.8%) 2.008s (~) 0.845s 10 1.08x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 1.622s (~) 3.642s (-2.2%) 2.021s 10 1.00x
▲ Vercel Nitro 1.730s (+7.3% 🔺) 3.407s (+1.3%) 1.677s 10 1.07x
▲ Vercel Next.js (Turbopack) 1.774s (+10.5% 🔺) 3.631s (-4.2%) 1.857s 10 1.09x

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

workflow with 10 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 10.413s (-1.3%) 11.020s (~) 0.607s 3 1.00x
💻 Local Express 10.515s (+1.3%) 11.022s (~) 0.507s 3 1.01x
🐘 Postgres Nitro 10.618s (+0.7%) 11.024s (~) 0.406s 3 1.02x
🐘 Postgres Express 10.665s (+1.1%) 11.017s (~) 0.352s 3 1.02x
🐘 Postgres Next.js (Turbopack) 10.798s (~) 11.017s (~) 0.220s 3 1.04x
💻 Local Next.js (Turbopack) 10.823s (~) 11.023s (~) 0.200s 3 1.04x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 13.885s (+3.0%) 15.740s (+4.0%) 1.855s 2 1.00x
▲ Vercel Express 14.582s (+6.8% 🔺) 16.295s (+5.3% 🔺) 1.713s 2 1.05x
▲ Vercel Next.js (Turbopack) 14.806s (+4.2%) 16.697s (+0.6%) 1.891s 2 1.07x

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

workflow with 25 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 13.499s (-1.9%) 14.026s (~) 0.527s 5 1.00x
🐘 Postgres Express 13.649s (-1.1%) 14.017s (~) 0.368s 5 1.01x
💻 Local Express 13.797s (+3.2%) 14.026s (~) 0.229s 5 1.02x
🐘 Postgres Nitro 13.912s (+0.7%) 14.223s (+1.5%) 0.310s 5 1.03x
💻 Local Next.js (Turbopack) 14.408s (~) 15.029s (~) 0.621s 4 1.07x
🐘 Postgres Next.js (Turbopack) 14.453s (~) 15.018s (~) 0.565s 4 1.07x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 23.175s (+10.3% 🔺) 24.986s (+8.3% 🔺) 1.811s 3 1.00x
▲ Vercel Nitro 24.384s (+19.5% 🔺) 26.134s (+16.2% 🔺) 1.750s 3 1.05x
▲ Vercel Next.js (Turbopack) 24.658s (+11.9% 🔺) 26.904s (+10.2% 🔺) 2.245s 3 1.06x

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

workflow with 50 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 11.955s (-3.6%) 12.146s (-6.8% 🟢) 0.191s 8 1.00x
🐘 Postgres Express 12.174s (-5.9% 🟢) 12.872s (-3.3%) 0.698s 7 1.02x
💻 Local Express 12.387s (+5.9% 🔺) 13.025s (+8.3% 🔺) 0.638s 7 1.04x
🐘 Postgres Nitro 12.708s (+1.4%) 13.021s (~) 0.313s 7 1.06x
💻 Local Next.js (Turbopack) 13.764s (+0.5%) 14.026s (~) 0.262s 7 1.15x
🐘 Postgres Next.js (Turbopack) 13.809s (~) 14.164s (+1.0%) 0.355s 7 1.16x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 34.843s (+8.6% 🔺) 36.913s (+6.6% 🔺) 2.070s 3 1.00x
▲ Vercel Next.js (Turbopack) 34.971s (-1.0%) 37.406s (~) 2.435s 3 1.00x
▲ Vercel Nitro 35.627s (+12.0% 🔺) 37.923s (+12.7% 🔺) 2.296s 3 1.02x

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

Promise.all with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 1.172s (-7.5% 🟢) 2.005s (~) 0.833s 15 1.00x
🐘 Postgres Express 1.182s (-1.8%) 2.007s (~) 0.825s 15 1.01x
💻 Local Express 1.195s (+4.7%) 2.006s (~) 0.811s 15 1.02x
🐘 Postgres Nitro 1.215s (-2.9%) 2.008s (~) 0.793s 15 1.04x
🐘 Postgres Next.js (Turbopack) 1.289s (+1.0%) 2.008s (~) 0.718s 15 1.10x
💻 Local Next.js (Turbopack) 1.363s (+2.9%) 2.006s (~) 0.643s 15 1.16x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.755s (-3.2%) 4.514s (-2.2%) 1.759s 7 1.00x
▲ Vercel Express 2.897s (-13.3% 🟢) 4.775s (-7.2% 🟢) 1.878s 7 1.05x
▲ Vercel Next.js (Turbopack) 3.148s (-31.7% 🟢) 5.036s (-24.1% 🟢) 1.888s 6 1.14x

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

Promise.all with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.449s (+7.3% 🔺) 2.475s (+3.4%) 1.026s 13 1.00x
🐘 Postgres Nitro 1.496s (+6.1% 🔺) 2.761s (+15.3% 🔺) 1.264s 12 1.03x
💻 Local Nitro 1.586s (-8.3% 🟢) 2.005s (~) 0.419s 15 1.09x
🐘 Postgres Next.js (Turbopack) 1.689s (+5.9% 🔺) 2.316s (+4.2%) 0.626s 13 1.17x
💻 Local Express 1.701s (+16.1% 🔺) 2.006s (~) 0.304s 15 1.17x
💻 Local Next.js (Turbopack) 1.851s (+12.9% 🔺) 2.316s (+11.7% 🔺) 0.464s 13 1.28x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 3.325s (-6.4% 🟢) 5.068s (-8.5% 🟢) 1.742s 6 1.00x
▲ Vercel Nitro 3.770s (+2.9%) 5.538s (+9.7% 🔺) 1.768s 6 1.13x
▲ Vercel Express 3.835s (+23.1% 🔺) 5.437s (+15.5% 🔺) 1.602s 6 1.15x

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

Promise.all with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.718s (+6.1% 🔺) 3.762s (-9.1% 🟢) 2.044s 8 1.00x
🐘 Postgres Nitro 1.756s (+11.4% 🔺) 3.885s (~) 2.129s 8 1.02x
🐘 Postgres Next.js (Turbopack) 3.293s (+4.0%) 4.445s (+7.3% 🔺) 1.152s 7 1.92x
💻 Local Nitro 3.787s (-19.8% 🟢) 4.384s (-17.3% 🟢) 0.598s 8 2.20x
💻 Local Express 4.515s (+66.2% 🔺) 5.011s (+49.9% 🔺) 0.497s 6 2.63x
💻 Local Next.js (Turbopack) 6.048s (+26.1% 🔺) 6.416s (+23.9% 🔺) 0.368s 5 3.52x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 4.175s (-15.8% 🟢) 6.372s (-7.4% 🟢) 2.198s 5 1.00x
▲ Vercel Nitro 4.379s (-16.1% 🟢) 6.127s (-3.5%) 1.747s 5 1.05x
▲ Vercel Next.js (Turbopack) 4.873s (+0.9%) 6.968s (+5.3% 🔺) 2.095s 5 1.17x

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

Promise.race with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.157s (-4.1%) 2.006s (~) 0.849s 15 1.00x
🐘 Postgres Nitro 1.229s (+2.4%) 2.007s (~) 0.778s 15 1.06x
🐘 Postgres Next.js (Turbopack) 1.285s (~) 2.007s (~) 0.721s 15 1.11x
💻 Local Nitro 1.342s (-10.8% 🟢) 2.005s (~) 0.663s 15 1.16x
💻 Local Next.js (Turbopack) 1.402s (+0.8%) 2.006s (~) 0.604s 15 1.21x
💻 Local Express 1.532s (+22.1% 🔺) 2.006s (~) 0.474s 15 1.32x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.232s (-22.3% 🟢) 3.662s (-20.5% 🟢) 1.430s 9 1.00x
▲ Vercel Nitro 2.275s (-6.7% 🟢) 3.633s (+3.7%) 1.359s 9 1.02x
▲ Vercel Next.js (Turbopack) 2.460s (+0.9%) 3.968s (-2.6%) 1.509s 8 1.10x

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

Promise.race with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.270s (-8.6% 🟢) 2.006s (-6.8% 🟢) 0.736s 15 1.00x
🐘 Postgres Nitro 1.451s (+6.3% 🔺) 2.224s (-7.1% 🟢) 0.773s 14 1.14x
🐘 Postgres Next.js (Turbopack) 1.480s (-0.5%) 2.007s (~) 0.527s 15 1.17x
💻 Local Nitro 1.685s (-19.0% 🟢) 2.005s (-18.8% 🟢) 0.320s 15 1.33x
💻 Local Express 2.031s (+27.8% 🔺) 2.470s (+23.2% 🔺) 0.439s 13 1.60x
💻 Local Next.js (Turbopack) 2.059s (+0.5%) 2.918s (+16.3% 🔺) 0.859s 11 1.62x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.909s (-44.4% 🟢) 4.438s (-33.8% 🟢) 1.529s 7 1.00x
▲ Vercel Express 3.121s (-12.0% 🟢) 4.850s (-10.7% 🟢) 1.729s 7 1.07x
▲ Vercel Next.js (Turbopack) 3.208s (-3.9%) 5.012s (-12.7% 🟢) 1.804s 6 1.10x

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

Promise.race with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.617s (-4.4%) 3.455s (-13.9% 🟢) 1.839s 9 1.00x
🐘 Postgres Nitro 1.693s (-11.0% 🟢) 4.143s (-3.7%) 2.450s 8 1.05x
🐘 Postgres Next.js (Turbopack) 4.199s (+0.9%) 5.014s (+2.9%) 0.814s 6 2.60x
💻 Local Nitro 4.480s (-22.9% 🟢) 5.016s (-24.2% 🟢) 0.536s 7 2.77x
💻 Local Express 5.236s (+34.7% 🔺) 5.681s (+33.3% 🔺) 0.445s 6 3.24x
💻 Local Next.js (Turbopack) 6.677s (+24.0% 🔺) 7.217s (+23.4% 🔺) 0.540s 5 4.13x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 3.659s (-5.7% 🟢) 5.712s (+4.5%) 2.053s 6 1.00x
▲ Vercel Express 3.935s (-11.9% 🟢) 5.860s (-9.5% 🟢) 1.925s 6 1.08x
▲ Vercel Next.js (Turbopack) 4.608s (-7.5% 🟢) 6.777s (-1.1%) 2.170s 5 1.26x

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

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 0.503s (-12.6% 🟢) 1.024s (~) 0.521s 59 1.00x
💻 Local Nitro 0.513s (-15.9% 🟢) 1.004s (~) 0.491s 60 1.02x
🐘 Postgres Nitro 0.592s (+2.4%) 1.007s (-1.6%) 0.414s 60 1.18x
💻 Local Express 0.594s (+21.6% 🔺) 1.005s (~) 0.410s 60 1.18x
🐘 Postgres Next.js (Turbopack) 0.823s (~) 1.006s (~) 0.183s 60 1.64x
💻 Local Next.js (Turbopack) 0.907s (~) 1.076s (~) 0.169s 56 1.80x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 5.452s (-14.8% 🟢) 7.026s (-11.1% 🟢) 1.575s 9 1.00x
▲ Vercel Express 5.624s (+9.3% 🔺) 7.459s (+9.2% 🔺) 1.835s 9 1.03x
▲ Vercel Next.js (Turbopack) 5.737s (+4.6%) 7.898s (+6.5% 🔺) 2.161s 8 1.05x

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

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 1.265s (-15.7% 🟢) 2.005s (~) 0.740s 45 1.00x
🐘 Postgres Nitro 1.376s (+2.0%) 2.007s (~) 0.631s 45 1.09x
🐘 Postgres Express 1.391s (+2.4%) 2.101s (+4.7%) 0.710s 43 1.10x
💻 Local Express 1.517s (+17.8% 🔺) 2.028s (+2.2%) 0.512s 45 1.20x
🐘 Postgres Next.js (Turbopack) 1.958s (+2.0%) 2.227s (+6.0% 🔺) 0.269s 41 1.55x
💻 Local Next.js (Turbopack) 2.180s (+2.7%) 3.008s (~) 0.828s 30 1.72x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 14.452s (-3.5%) 16.665s (-1.8%) 2.213s 6 1.00x
▲ Vercel Next.js (Turbopack) 14.971s (-3.5%) 17.347s (-1.5%) 2.376s 6 1.04x
▲ Vercel Nitro 15.113s (+6.1% 🔺) 16.984s (+9.1% 🔺) 1.871s 6 1.05x

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

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 2.510s (-9.9% 🟢) 3.222s (+1.9%) 0.712s 38 1.00x
🐘 Postgres Nitro 2.808s (+4.3%) 3.111s (+1.7%) 0.303s 39 1.12x
💻 Local Nitro 2.821s (-13.0% 🟢) 3.109s (-22.4% 🟢) 0.288s 39 1.12x
💻 Local Express 3.175s (+21.1% 🔺) 3.912s (+25.8% 🔺) 0.737s 31 1.26x
🐘 Postgres Next.js (Turbopack) 3.788s (-2.0%) 4.009s (-3.3%) 0.221s 30 1.51x
💻 Local Next.js (Turbopack) 4.473s (+2.7%) 5.011s (~) 0.538s 24 1.78x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 26.147s (+0.8%) 27.937s (+1.0%) 1.790s 5 1.00x
▲ Vercel Express 26.617s (-2.5%) 28.981s (~) 2.364s 5 1.02x
▲ Vercel Next.js (Turbopack) 27.124s (-8.9% 🟢) 29.042s (-8.6% 🟢) 1.918s 5 1.04x

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

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 0.214s (-15.9% 🟢) 1.007s (~) 0.793s 60 1.00x
🐘 Postgres Nitro 0.258s (+3.0%) 1.006s (~) 0.748s 60 1.20x
🐘 Postgres Next.js (Turbopack) 0.294s (~) 1.006s (~) 0.712s 60 1.37x
💻 Local Nitro 0.366s (-20.3% 🟢) 1.004s (-1.8%) 0.638s 60 1.71x
💻 Local Express 0.417s (+20.5% 🔺) 1.004s (~) 0.587s 60 1.94x
💻 Local Next.js (Turbopack) 0.515s (-8.8% 🟢) 1.005s (~) 0.491s 60 2.40x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.025s (-17.6% 🟢) 3.559s (-11.1% 🟢) 1.534s 17 1.00x
▲ Vercel Next.js (Turbopack) 2.076s (-9.8% 🟢) 4.083s (~) 2.007s 16 1.03x
▲ Vercel Express 2.238s (-12.2% 🟢) 4.065s (-5.3% 🟢) 1.827s 15 1.10x

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

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 0.338s (-17.3% 🟢) 1.008s (-3.1%) 0.670s 90 1.00x
🐘 Postgres Nitro 0.423s (+6.7% 🔺) 1.029s (+2.2%) 0.606s 88 1.25x
🐘 Postgres Next.js (Turbopack) 0.607s (+5.3% 🔺) 1.191s (+7.9% 🔺) 0.585s 76 1.79x
💻 Local Nitro 1.912s (-14.9% 🟢) 2.403s (-12.2% 🟢) 0.490s 38 5.65x
💻 Local Express 2.127s (+40.6% 🔺) 2.714s (+30.8% 🔺) 0.588s 34 6.28x
💻 Local Next.js (Turbopack) 2.659s (+11.6% 🔺) 3.332s (+8.3% 🔺) 0.673s 28 7.86x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.663s (-30.0% 🟢) 4.422s (-19.0% 🟢) 1.760s 21 1.00x
▲ Vercel Nitro 2.896s (-23.4% 🟢) 4.640s (-12.5% 🟢) 1.744s 20 1.09x
▲ Vercel Next.js (Turbopack) 3.041s (-19.9% 🟢) 4.741s (-18.4% 🟢) 1.700s 19 1.14x

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

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 0.755s (-7.3% 🟢) 1.260s (-7.1% 🟢) 0.505s 96 1.00x
🐘 Postgres Nitro 0.823s (+3.1%) 1.403s (+4.7%) 0.580s 86 1.09x
🐘 Postgres Next.js (Turbopack) 2.822s (+6.5% 🔺) 3.795s (+4.0%) 0.974s 32 3.74x
💻 Local Nitro 8.184s (-13.8% 🟢) 8.881s (-12.2% 🟢) 0.697s 14 10.85x
💻 Local Express 9.501s (+39.0% 🔺) 10.111s (+34.5% 🔺) 0.611s 12 12.59x
💻 Local Next.js (Turbopack) 11.106s (+1.0%) 12.233s (+1.7%) 1.127s 10 14.72x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 6.118s (-12.0% 🟢) 7.698s (-9.1% 🟢) 1.580s 16 1.00x
▲ Vercel Express 6.523s (-22.2% 🟢) 8.410s (-16.9% 🟢) 1.887s 15 1.07x
▲ Vercel Next.js (Turbopack) 7.696s (-5.9% 🟢) 9.626s (-4.8%) 1.930s 13 1.26x

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

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.145s (-1.8%) 2.004s (~) 0.008s (-23.1% 🟢) 2.014s (~) 0.870s 10 1.00x
💻 Local Express 1.156s (+3.9%) 2.005s (~) 0.010s (+78.6% 🔺) 2.017s (~) 0.861s 10 1.01x
🐘 Postgres Nitro 1.185s (+1.1%) 1.997s (~) 0.002s (+23.1% 🔺) 2.012s (~) 0.827s 10 1.04x
💻 Local Next.js (Turbopack) 1.212s (~) 2.005s (~) 0.013s (+33.7% 🔺) 2.022s (~) 0.810s 10 1.06x
🐘 Postgres Next.js (Turbopack) 1.226s (-2.4%) 2.001s (~) 0.001s (-8.3% 🟢) 2.010s (~) 0.783s 10 1.07x
🐘 Postgres Express 1.240s (+5.0%) 2.001s (~) 0.001s (-61.5% 🟢) 2.008s (~) 0.768s 10 1.08x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.320s (+4.8%) 3.693s (+11.2% 🔺) 0.729s (-39.8% 🟢) 4.902s (-2.9%) 2.583s 10 1.00x
▲ Vercel Nitro 2.480s (+11.9% 🔺) 3.389s (-3.2%) 1.169s (+5.9% 🔺) 5.023s (~) 2.543s 10 1.07x
▲ Vercel Next.js (Turbopack) 2.490s (+12.8% 🔺) 3.626s (-1.1%) 1.017s (~) 5.192s (~) 2.702s 10 1.07x

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

stream pipeline with 5 transform steps (1MB)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 1.476s (-6.9% 🟢) 2.008s (~) 0.009s (-26.7% 🟢) 2.020s (~) 0.544s 30 1.00x
💻 Local Express 1.566s (+11.1% 🔺) 2.010s (~) 0.013s (+36.9% 🔺) 2.025s (~) 0.458s 30 1.06x
🐘 Postgres Nitro 1.598s (~) 2.003s (~) 0.005s (+4.1%) 2.026s (~) 0.428s 30 1.08x
🐘 Postgres Express 1.673s (+4.2%) 2.071s (+3.1%) 0.004s (-21.3% 🟢) 2.093s (+3.3%) 0.420s 29 1.13x
💻 Local Next.js (Turbopack) 1.762s (+2.4%) 2.009s (~) 0.014s (+22.1% 🔺) 2.026s (~) 0.264s 30 1.19x
🐘 Postgres Next.js (Turbopack) 1.777s (~) 2.011s (~) 0.005s (+45.0% 🔺) 2.025s (~) 0.248s 30 1.20x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 5.823s (-13.3% 🟢) 7.325s (-10.2% 🟢) 0.176s (-9.5% 🟢) 8.076s (-8.6% 🟢) 2.253s 8 1.00x
▲ Vercel Nitro 5.990s (-0.8%) 7.361s (+5.1% 🔺) 0.163s (-17.9% 🟢) 8.017s (+5.1% 🔺) 2.027s 8 1.03x
▲ Vercel Next.js (Turbopack) 6.003s (-5.6% 🟢) 7.350s (-9.0% 🟢) 0.297s (-7.5% 🟢) 8.177s (-8.3% 🟢) 2.173s 8 1.03x

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

10 parallel streams (1MB each)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.792s (-2.5%) 1.046s (~) 0.000s (-100.0% 🟢) 1.060s (-1.4%) 0.268s 57 1.00x
🐘 Postgres Express 0.880s (+8.9% 🔺) 1.275s (+20.5% 🔺) 0.000s (-70.2% 🟢) 1.287s (+19.2% 🔺) 0.407s 47 1.11x
🐘 Postgres Next.js (Turbopack) 1.026s (+5.4% 🔺) 1.525s (+10.0% 🔺) 0.000s (+65.0% 🔺) 1.533s (+9.9% 🔺) 0.506s 40 1.30x
💻 Local Nitro 1.222s (-15.4% 🟢) 1.947s (-3.3%) 0.000s (-35.5% 🟢) 1.949s (-3.3%) 0.727s 31 1.54x
💻 Local Express 1.395s (+31.2% 🔺) 2.013s (+14.8% 🔺) 0.000s (+33.3% 🔺) 2.016s (+14.8% 🔺) 0.621s 30 1.76x
💻 Local Next.js (Turbopack) 1.472s (-3.2%) 2.012s (~) 0.000s (-14.3% 🟢) 2.016s (~) 0.543s 30 1.86x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.724s (-16.1% 🟢) 4.127s (-8.8% 🟢) 0.000s (NaN%) 4.609s (-7.8% 🟢) 1.885s 14 1.00x
▲ Vercel Nitro 2.788s (~) 4.050s (+1.0%) 0.000s (-100.0% 🟢) 4.603s (+5.2% 🔺) 1.815s 14 1.02x
▲ Vercel Next.js (Turbopack) 2.906s (-7.8% 🟢) 4.559s (-3.2%) 0.001s (+750.0% 🔺) 5.046s (-2.9%) 2.139s 12 1.07x

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

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.597s (~) 2.133s (~) 0.000s (-100.0% 🟢) 2.163s (~) 0.566s 29 1.00x
🐘 Postgres Express 1.860s (+15.2% 🔺) 2.372s (+10.9% 🔺) 0.000s (NaN%) 2.408s (+11.8% 🔺) 0.548s 25 1.17x
🐘 Postgres Next.js (Turbopack) 2.272s (+2.6%) 2.697s (-1.2%) 0.000s (+Infinity% 🔺) 2.746s (~) 0.474s 23 1.42x
💻 Local Nitro 2.594s (-19.2% 🟢) 3.022s (-22.6% 🟢) 0.000s (-78.7% 🟢) 3.024s (-22.6% 🟢) 0.430s 20 1.62x
💻 Local Express 2.954s (+39.7% 🔺) 3.669s (+43.4% 🔺) 0.001s (+61.3% 🔺) 3.677s (+43.4% 🔺) 0.723s 17 1.85x
💻 Local Next.js (Turbopack) 3.041s (-0.7%) 3.614s (+1.9%) 0.001s (-9.1% 🟢) 3.618s (+1.7%) 0.577s 17 1.90x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 4.253s (-9.0% 🟢) 5.863s (+3.5%) 0.000s (-100.0% 🟢) 6.454s (+6.2% 🔺) 2.200s 10 1.00x
▲ Vercel Express 4.487s (-1.3%) 5.931s (-2.4%) 0.000s (+Infinity% 🔺) 6.593s (+0.9%) 2.105s 10 1.06x
▲ Vercel Next.js (Turbopack) 4.614s (-6.4% 🟢) 6.400s (+0.9%) 0.000s (+Infinity% 🔺) 6.992s (+2.5%) 2.378s 9 1.08x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World 🥇 Fastest Framework Wins
💻 Local Nitro 21/21
🐘 Postgres Express 14/21
▲ Vercel Express 10/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework 🥇 Fastest World Wins
Express 🐘 Postgres 16/21
Next.js (Turbopack) 🐘 Postgres 15/21
Nitro 🐘 Postgres 11/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

@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

Passed Failed Skipped Total
✅ ▲ Vercel Production 1431 0 219 1650
✅ 💻 Local Development 1881 0 219 2100
✅ 📦 Local Production 1881 0 219 2100
✅ 🐘 Local Postgres 1867 0 233 2100
✅ 🪟 Windows 150 0 0 150
✅ 📋 Other 872 0 178 1050
Total 8082 0 1068 9150

Details by Category

✅ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 124 0 26
✅ example 124 0 26
✅ express 124 0 26
✅ fastify 124 0 26
✅ hono 124 0 26
✅ nextjs-turbopack 148 0 2
✅ nextjs-webpack 148 0 2
✅ nitro 124 0 26
✅ nuxt 124 0 26
✅ sveltekit 143 0 7
✅ vite 124 0 26
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 125 0 25
✅ express-stable 125 0 25
✅ fastify-stable 125 0 25
✅ hono-stable 125 0 25
✅ nextjs-turbopack-canary 131 0 19
✅ nextjs-turbopack-stable-lazy-discovery-disabled 150 0 0
✅ nextjs-turbopack-stable-lazy-discovery-enabled 150 0 0
✅ nextjs-webpack-canary 131 0 19
✅ nextjs-webpack-stable-lazy-discovery-disabled 150 0 0
✅ nextjs-webpack-stable-lazy-discovery-enabled 150 0 0
✅ nitro-stable 125 0 25
✅ nuxt-stable 125 0 25
✅ sveltekit-stable 144 0 6
✅ vite-stable 125 0 25
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 125 0 25
✅ express-stable 125 0 25
✅ fastify-stable 125 0 25
✅ hono-stable 125 0 25
✅ nextjs-turbopack-canary 131 0 19
✅ nextjs-turbopack-stable-lazy-discovery-disabled 150 0 0
✅ nextjs-turbopack-stable-lazy-discovery-enabled 150 0 0
✅ nextjs-webpack-canary 131 0 19
✅ nextjs-webpack-stable-lazy-discovery-disabled 150 0 0
✅ nextjs-webpack-stable-lazy-discovery-enabled 150 0 0
✅ nitro-stable 125 0 25
✅ nuxt-stable 125 0 25
✅ sveltekit-stable 144 0 6
✅ vite-stable 125 0 25
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 124 0 26
✅ express-stable 124 0 26
✅ fastify-stable 124 0 26
✅ hono-stable 124 0 26
✅ nextjs-turbopack-canary 130 0 20
✅ nextjs-turbopack-stable-lazy-discovery-disabled 149 0 1
✅ nextjs-turbopack-stable-lazy-discovery-enabled 149 0 1
✅ nextjs-webpack-canary 130 0 20
✅ nextjs-webpack-stable-lazy-discovery-disabled 149 0 1
✅ nextjs-webpack-stable-lazy-discovery-enabled 149 0 1
✅ nitro-stable 124 0 26
✅ nuxt-stable 124 0 26
✅ sveltekit-stable 143 0 7
✅ vite-stable 124 0 26
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 150 0 0
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 125 0 25
✅ e2e-local-dev-tanstack-start- 125 0 25
✅ e2e-local-postgres-nest-stable 124 0 26
✅ e2e-local-postgres-tanstack-start- 124 0 26
✅ e2e-local-prod-nest-stable 125 0 25
✅ e2e-local-prod-tanstack-start- 125 0 25
✅ e2e-vercel-prod-tanstack-start 124 0 26

📋 View full workflow run

Copilot AI 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

Adds new end-to-end coverage for the documented run-idempotency conflict-handling strategies built on hook.getConflict(), including “claim-only mutex”, “adopt owner result”, “signal owner”, “supersede owner”, and a route-side resume-or-start retry pattern.

Changes:

  • Add four new workflow fixtures demonstrating conflict-handling strategies (hookClaimOnlyMutexWorkflow, hookAdoptOwnerResultWorkflow, hookSignalOwnerWorkflow, hookSupersedeOwnerWorkflow).
  • Add five new e2e tests that exercise those strategies against the runtime (including event-level assertions and route-side retry behavior).
  • Wire default arguments for the new workflows into the workbench, and add a Changeset entry.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
workbench/nextjs-turbopack/app/workflows/definitions.ts Adds default args for the new e2e strategy workflows so they can be triggered from the workbench.
workbench/example/workflows/99_e2e.ts Introduces new workflow fixtures implementing the documented run-idempotency conflict-handling strategies.
packages/core/e2e/e2e.test.ts Adds e2e tests covering each strategy plus the resume-or-start retry flow.
.changeset/idempotency-strategy-e2e.md Adds a Changeset entry describing the new e2e coverage.

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

Comment thread packages/core/e2e/e2e.test.ts Outdated
Comment on lines +2077 to +2079
// The superseded owner ends up cancelled.
const { json: run1Data } = await cliInspectJson(`runs ${run1.runId}`);
expect(run1Data.status).toBe('cancelled');

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 2e9d000: the test now awaits run1.returnValue and asserts WorkflowRunCancelledError.is(error) (matching the existing cancellation tests), alongside the status check. Note returnValue is a lazy getter so no pending promise existed before — but asserting the rejection both strengthens the test and guarantees nothing can leak if that changes.

… conflict

On slow runtimes the duplicate's first invocation could land after the
owner completed and released the token, making the duplicate a fresh
owner that waits forever for a payload (90s timeout across CI matrices).
Poll the duplicate's event log for hook_conflict before resuming the
owner, and widen the test timeout for the added gate budget.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…edged in esbuild hang)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel vercel Bot temporarily deployed to Preview – workflow-docs June 12, 2026 23:05 Inactive
The 2e9d000 deployment's next build crashed in an esbuild hang but its
task (70724907c9dd3a29) was recorded into the turbo remote cache anyway,
so every subsequent build with the same input hash replays the broken
artifact (missing routes-manifest). Change a build input to force a
fresh execution.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@TooTallNate TooTallNate left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approve — the documented strategies now have teeth

Test-only PR closing the docs↔coverage gap: every conflict-handling strategy from the run-idempotency docs now has an e2e test proving it end-to-end. I ran the full hook suite (25 tests) plus the resume-or-start test against a local nextjs-turbopack dev server — all pass.

What's notably good:

  • The race-fix commit shows real understanding of the timing semantics. The adopt-owner-result test gates the owner's completion on run2 having observed the hook_conflict event — without it, a slow first invocation of run2 could land after the owner released the token, turning run2 into a fresh owner waiting forever. And the signal-owner test correctly omits that gate, because there the owner can only complete via the duplicate's forward — the dependency itself serializes the race. Gate where needed, not everywhere.
  • The claim-only mutex test asserts the negative: zero hook_received events on the owner — pinning "hooks as a pure run mutex" as a supported pattern rather than an accident, plus the full lifecycle (hold → duplicate identifies owner → release on completion → clean reclaim by a third run) with a poll-based release wait instead of a fixed sleep.
  • The supersede test handles the unhandled-rejection trap: run1.returnValue.catch(...) + WorkflowRunCancelledError.is() assertion both verifies the cancellation semantics and prevents the rejected promise from leaking out of the test — and double-checks via CLI inspect. The reclaim assertion (waitForHook filtered by run2.runId) correctly handles the disposal-propagation window.
  • The resume-or-start test exercises the documented route pattern directly — including the pre-start HookNotFoundError assertion, with a more forgiving retry budget (30s/250ms) than the docs' inline example.
  • Workflows live once in workbench/example and reach other workbenches via symlink, per convention; definitions.ts updated; empty changeset is right for test-only changes.

One process note for other reviewers: a two-dot diff against current main appears to delete #2385's reserved-attributes e2e test — that's the usual branch-point artifact (#2385 merged after this branch was cut), not a real deletion. The three-dot diff is purely additive (378+/0−) and the merge with current main is clean.

CI fully green. LGTM.

@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2402. (backport job run)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants