Fix race condition allowing duplicate hook_disposed events - #1523

Merged
pranaygp merged 4 commits into
mainfrom
fix/duplicate-hook-disposed-race
Mar 26, 2026
Merged

Fix race condition allowing duplicate hook_disposed events#1523
pranaygp merged 4 commits into
mainfrom
fix/duplicate-hook-disposed-race

Conversation

@pranaygp

Copy link
Copy Markdown
Contributor

Summary

  • Fixes a race condition where concurrent workflow invocations could both post hook_disposed for the same hook, corrupting the event log with duplicate events and causing Unconsumed event in event log: eventType=hook_disposed errors on replay
  • world-local: Adds writeExclusive lock file guard before hook deletion (same pattern as wait_completed from [world-postgres, world-local] Fix TOCTOU races in entity state transitions #1434)
  • world-postgres: Uses DELETE ... RETURNING so only one concurrent caller succeeds — second gets EntityConflictError
  • world-vercel: No client changes needed — server-side fix in vercel/workflow-server#356 returns 409, which is already translated to EntityConflictError by makeRequest
  • suspension-handler: Separates EntityConflictError (hook already disposed) from RunExpiredError (run completed) log messages

Fixes#1266

Test plan

  • Added should reject concurrent hook_disposed for the same hook test (mirrors existing wait_completed race test)
  • Verify all existing tests pass
  • E2E test with parallel tool calls triggering concurrent hook disposal

🤖 Generated with Claude Code

Concurrent workflow invocations could both post hook_disposed for the
same hook, corrupting the event log with duplicate events. This mirrors
the wait_completed race condition fixed in #1057/#1434.
- world-local: Add writeExclusive lock file for hook_disposed (same
pattern as wait_completed and step terminal states)
- world-postgres: Use DELETE ... RETURNING to atomically detect if
another caller already deleted the hook entity
- suspension-handler: Improve log messages to distinguish hook-already-
disposed (EntityConflictError) from run-already-completed (RunExpiredError)
Fixes#1266
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pranaygp
pranaygp requested a review from a team as a code ownerMarch 25, 2026 23:00
CopilotAI review requested due to automatic review settings March 25, 2026 23:00
@vercel

vercelBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
example-nextjs-workflow-turbopackReadyReadyPreview, CommentMar 26, 2026 10:18pm
example-nextjs-workflow-webpackReadyReadyPreview, CommentMar 26, 2026 10:18pm
example-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-astro-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-express-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-fastify-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-hono-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-nitro-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-nuxt-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-sveltekit-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-vite-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workflow-docsReadyReadyPreview, Comment, Open in v0Mar 26, 2026 10:18pm
workflow-swc-playgroundReadyReadyPreview, CommentMar 26, 2026 10:18pm

@changeset-bot

changeset-botBot commented Mar 25, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 960f3b3

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

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

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

@github-actions

github-actionsBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.045s (-4.5%)1.006s (~)0.961s101.00x
🐘 PostgresExpress0.061s (+1.2%)1.011s (~)0.950s101.36x
🐘 PostgresNitro0.070s (-3.2%)1.016s (~)0.946s101.56x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.511s (-8.1% 🟢)2.661s (+12.4% 🔺)2.151s101.00x
▲ VercelNext.js (Turbopack)0.539s (-19.9% 🟢)2.277s (-15.0% 🟢)1.738s101.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.127s (-0.5%)2.006s (~)0.879s101.00x
🐘 PostgresExpress1.142s (~)2.014s (~)0.871s101.01x
🐘 PostgresNitro1.151s (+0.8%)2.012s (~)0.861s101.02x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.053s (-10.5% 🟢)3.848s (-2.3%)1.795s101.00x
▲ VercelNitro2.106s (+2.0%)3.910s (+5.3% 🔺)1.804s101.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro10.848s (~)11.021s (~)0.173s31.00x
🐘 PostgresExpress10.879s (~)11.020s (~)0.141s31.00x
💻 LocalExpress10.920s (~)11.023s (~)0.103s31.01x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.163s (-3.9%)22.341s (+16.9% 🔺)5.178s21.00x
▲ VercelNext.js (Turbopack)18.070s (+4.5%)19.086s (+2.2%)1.016s21.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro14.470s (~)15.020s (~)0.550s41.00x
🐘 PostgresExpress14.536s (~)15.027s (~)0.491s41.00x
💻 LocalExpress14.940s (~)15.028s (~)0.088s41.03x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro33.849s (+6.7% 🔺)35.772s (+8.6% 🔺)1.922s21.00x
▲ VercelNext.js (Turbopack)33.946s (+1.0%)35.584s (+0.5%)1.638s21.00x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express13.879s (~)14.166s (~)0.287s71.00x
🐘 PostgresNitro13.937s (+1.0%)14.166s (+1.0%)0.230s71.00x
💻 LocalExpress16.569s (~)17.030s (~)0.461s61.19x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro58.115s (-5.6% 🟢)60.163s (-5.2% 🟢)2.047s21.00x
▲ VercelNext.js (Turbopack)59.047s (+5.4% 🔺)60.159s (+5.0% 🔺)1.111s21.02x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.260s (~)2.011s (~)0.751s151.00x
🐘 PostgresNitro1.264s (~)2.011s (~)0.746s151.00x
💻 LocalExpress1.505s (+2.0%)2.005s (~)0.500s151.19x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.522s (+6.5% 🔺)4.127s (+6.2% 🔺)1.605s81.00x
▲ VercelNext.js (Turbopack)2.731s (+18.6% 🔺)3.869s (+4.8%)1.138s81.08x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.322s (-0.8%)3.011s (~)0.689s101.00x
🐘 PostgresExpress2.327s (~)3.010s (~)0.683s101.00x
💻 LocalExpress2.954s (-1.4%)3.452s (+3.3%)0.498s91.27x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.612s (+0.6%)4.180s (+8.8% 🔺)1.568s81.00x
▲ VercelNext.js (Turbopack)2.785s (+3.5%)3.832s (~)1.046s81.07x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.452s (-0.5%)4.011s (~)0.559s81.00x
🐘 PostgresNitro3.466s (~)4.013s (~)0.547s81.00x
💻 LocalExpress9.137s (+13.3% 🔺)9.521s (+8.6% 🔺)0.385s42.65x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.333s (+18.3% 🔺)4.743s (+16.9% 🔺)1.410s71.00x
▲ VercelNext.js (Turbopack)4.034s (+18.0% 🔺)5.330s (+5.1% 🔺)1.296s61.21x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.258s (~)2.010s (~)0.752s151.00x
🐘 PostgresNitro1.260s (~)2.010s (~)0.750s151.00x
💻 LocalExpress1.558s (+1.3%)2.006s (~)0.448s151.24x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.311s (+13.2% 🔺)3.862s (+6.2% 🔺)1.551s81.00x
▲ VercelNext.js (Turbopack)2.564s (+9.9% 🔺)3.886s (+8.0% 🔺)1.322s81.11x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.321s (~)3.011s (~)0.690s101.00x
🐘 PostgresNitro2.325s (-0.5%)3.012s (~)0.687s101.00x
💻 LocalExpress3.022s (+0.6%)3.885s (+12.5% 🔺)0.862s81.30x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.405s (+5.1% 🔺)3.890s (+13.1% 🔺)1.485s81.00x
▲ VercelNext.js (Turbopack)2.675s (-7.0% 🟢)4.224s (-1.6%)1.548s81.11x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.448s (~)4.010s (~)0.563s81.00x
🐘 PostgresNitro3.458s (~)4.013s (~)0.555s81.00x
💻 LocalExpress9.102s (+4.1%)9.773s (+8.3% 🔺)0.671s42.64x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.185s (+12.2% 🔺)4.845s (+15.7% 🔺)1.660s71.00x
▲ VercelNext.js (Turbopack)3.332s (-5.1% 🟢)4.572s (-9.6% 🟢)1.239s71.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.789s (-2.4%)1.007s (~)0.217s601.00x
🐘 PostgresNitro0.800s (-2.7%)1.007s (-1.7%)0.207s601.01x
💻 LocalExpress0.996s (+0.6%)1.281s (+10.9% 🔺)0.285s471.26x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro9.752s (-0.6%)11.566s (-1.5%)1.814s61.00x
▲ VercelNext.js (Turbopack)9.815s (-10.1% 🟢)11.637s (-5.6% 🟢)1.822s61.01x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.853s (-1.6%)2.008s (-1.1%)0.155s451.00x
🐘 PostgresNitro1.884s (+0.6%)2.031s (-1.1%)0.147s451.02x
💻 LocalExpress2.996s (~)3.453s (+2.2%)0.456s271.62x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro30.623s (-6.1% 🟢)32.663s (-4.2%)2.040s31.00x
▲ VercelNext.js (Turbopack)32.159s (~)33.570s (~)1.411s31.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.848s (~)4.113s (+1.7%)0.265s301.00x
🐘 PostgresNitro3.896s (+1.5%)4.111s (+2.5%)0.215s301.01x
💻 LocalExpress9.131s (+0.5%)9.864s (+3.2%)0.732s132.37x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro91.712s (-85.6% 🟢)93.952s (-85.3% 🟢)2.241s21.00x
▲ VercelNext.js (Turbopack)99.318s (+16.3% 🔺)100.959s (+15.9% 🔺)1.641s21.08x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.272s (-2.2%)1.009s (~)0.736s601.00x
🐘 PostgresExpress0.276s (+1.4%)1.008s (~)0.731s601.01x
💻 LocalExpress0.613s (+2.1%)1.004s (~)0.392s602.25x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.713s (-4.3%)3.256s (-8.7% 🟢)1.543s191.00x
▲ VercelNext.js (Turbopack)1.841s (-9.2% 🟢)3.533s (-4.9%)1.692s171.07x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.495s (-0.6%)1.008s (~)0.513s901.00x
🐘 PostgresExpress0.531s (+8.0% 🔺)1.010s (~)0.480s901.07x
💻 LocalExpress2.602s (+4.2%)3.008s (~)0.406s305.26x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.933s (+2.8%)4.556s (+5.7% 🔺)1.623s201.00x
▲ VercelNext.js (Turbopack)3.540s (-90.6% 🟢)4.913s (-87.4% 🟢)1.374s191.21x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.765s (-0.9%)1.008s (~)0.243s1201.00x
🐘 PostgresExpress0.980s (+27.8% 🔺)1.488s (+47.6% 🔺)0.507s811.28x
💻 LocalExpress11.309s (+2.5%)11.936s (+2.3%)0.626s1114.79x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro6.151s (-24.5% 🟢)8.076s (-15.6% 🟢)1.925s151.00x
▲ VercelNext.js (Turbopack)6.986s (-10.7% 🟢)8.464s (-11.8% 🟢)1.478s151.14x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.197s (-0.9%)0.994s (~)0.001s (~)1.010s (~)0.813s101.00x
🐘 PostgresNitro0.204s (~)0.997s (~)0.002s (+15.4% 🔺)1.013s (~)0.809s101.04x
💻 LocalExpress0.206s (-1.1%)1.003s (~)0.011s (-2.6%)1.017s (~)0.811s101.05x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----
💻 LocalNitro⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.613s (~)2.974s (+16.9% 🔺)0.194s (-65.9% 🟢)3.715s (~)2.103s101.00x
▲ VercelNitro1.728s (+10.4% 🔺)2.793s (+7.8% 🔺)0.389s (-26.1% 🟢)3.897s (+7.1% 🔺)2.168s101.07x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.600s (+1.8%)1.002s (~)0.004s (-0.8%)1.024s (~)0.423s591.00x
🐘 PostgresExpress0.607s (+1.9%)1.002s (~)0.004s (~)1.024s (~)0.417s591.01x
💻 LocalExpress0.737s (+1.5%)1.009s (~)0.010s (+2.1%)1.024s (~)0.287s591.23x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----
💻 LocalNitro⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.382s (-1.6%)5.429s (-2.5%)0.207s (-20.5% 🟢)6.188s (-9.6% 🟢)1.806s101.00x
▲ VercelNitro4.477s (+4.5%)5.760s (+5.7% 🔺)0.233s (+4.2%)6.658s (+4.5%)2.181s101.02x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.941s (-2.4%)1.104s (-11.0% 🟢)0.000s (-41.8% 🟢)1.118s (-11.3% 🟢)0.177s551.00x
🐘 PostgresExpress0.998s (+6.4% 🔺)1.387s (+11.8% 🔺)0.000s (-44.2% 🟢)1.405s (+11.6% 🔺)0.407s431.06x
💻 LocalExpress1.254s (~)2.021s (~)0.000s (+9.1% 🔺)2.024s (~)0.770s301.33x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----
💻 LocalNitro⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.195s (+8.3% 🔺)4.109s (~)0.000s (NaN%)4.738s (+1.3%)1.543s131.00x
▲ VercelNitro3.488s (+19.1% 🔺)4.339s (+18.0% 🔺)0.000s (+16.7% 🔺)5.064s (+14.9% 🔺)1.576s121.09x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.758s (+2.7%)2.134s (+1.6%)0.000s (~)2.154s (+1.8%)0.396s291.00x
🐘 PostgresNitro1.809s (+4.3%)2.175s (~)0.000s (-65.5% 🟢)2.189s (~)0.379s281.03x
💻 LocalExpress3.508s (-2.5%)4.032s (-1.6%)0.001s (+25.0% 🔺)4.037s (-1.6%)0.529s152.00x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----
💻 LocalNitro⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.959s (+6.2% 🔺)5.146s (+4.9%)0.000s (+400.0% 🔺)5.855s (+6.4% 🔺)1.896s111.00x
▲ VercelNext.js (Turbopack)4.150s (-92.4% 🟢)5.240s (+6.1% 🔺)0.000s (+Infinity% 🔺)5.807s (-89.7% 🟢)1.657s111.05x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress21/21
🐘 PostgresExpress13/21
▲ VercelNitro17/21
Fastest World by Framework

Winner determined by most benchmark wins

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

Worlds:

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

📋 View full workflow run


Some benchmark jobs failed:

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

Check the workflow run for details.

@github-actions

github-actionsBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production844267913
✅ 💻 Local Development8180178996
✅ 📦 Local Production8180178996
✅ 🐘 Local Postgres8180178996
✅ 🪟 Windows750883
❌ 🌍 Community Worlds1305924213
✅ 📋 Other207042249
Total3710616754446

❌ Failed Tests

▲ Vercel Production (2 failed)

nextjs-turbopack (2 failed):

  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMP3ZN0JX4ZHGZDA2JKQX386 | 🔍 observability
🌍 Community Worlds (59 failed)

mongodb (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMP3N85D905YXMZ5EJ87SA0N
  • webhookWorkflow | wrun_01KMP3NH16VE34DN3VAKG8D5J9
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMP3XG613FV6M6SR0EY31X5G

redis (2 failed):

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

turso (54 failed):

  • addTenWorkflow | wrun_01KMP3M2PQWNFJSYZ8CZZD147D
  • addTenWorkflow | wrun_01KMP3M2PQWNFJSYZ8CZZD147D
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KMP3NQGY1V13G5FMKM76Z111
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KMP3M96QNS23ZMSBSZ19RX9D
  • promiseRaceWorkflow | wrun_01KMP3MCEVR5JYNKCDEP212SKW
  • promiseAnyWorkflow | wrun_01KMP3MER50ENQMK1DZC54B5J2
  • importedStepOnlyWorkflow | wrun_01KMP3P3E51J7221QT48Q8Y02H
  • hookWorkflow | wrun_01KMP3MXH1WCBBVA0QDQPWZYK3
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMP3N85D905YXMZ5EJ87SA0N
  • webhookWorkflow | wrun_01KMP3NH16VE34DN3VAKG8D5J9
  • sleepingWorkflow | wrun_01KMP3NQJBECVWABNGMAW4N069
  • parallelSleepWorkflow | wrun_01KMP3P3YCN5RD5NS1CNRS8A2C
  • nullByteWorkflow | wrun_01KMP3P88KHNPFQF09S5K88P7S
  • workflowAndStepMetadataWorkflow | wrun_01KMP3PAEYDSDGFAYRBHPV6FR0
  • fetchWorkflow | wrun_01KMP3SFQMB97MQVT17YZJ184S
  • promiseRaceStressTestWorkflow | wrun_01KMP3SJAT0A768PW6JP1Z5K4J
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KMP3WW5AY965ZVK70DRZC0N4
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMP3XG613FV6M6SR0EY31X5G
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMP3Y46NTSFRFQSFK8JEXCNM
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KMP3YQ2DF1PTS6B6MAAQ3Z4E
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KMP3YZ6QQTF6EKNTB8J42DF6
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KMP3Z4F0BHCBF9AJZAA2KVJA
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KMP3Z6WCJ8EDGDQZ2DS43YSK
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMP3ZN0JX4ZHGZDA2JKQX386
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KMP3ZT85HPBSRP420Y2DAR80
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KMP400X8DMN36VKN2N97A15Y
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KMP4078PZYYGXMA0184A4WNE
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KMP40DGYFBY797DC2JMJ5Q0Z
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KMP40KP7Y7NWPPGKC5JZCFQK
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KMP40T385HCAN8SXA3S2YJ03
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KMP414CQMBZBT6C2R4R0K6ZS
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KMP41BRX5XVN3BKN6QD922FG
  • cancelRun - cancelling a running workflow | wrun_01KMP41HZNYWKH1TTHGMPRWGGS
  • cancelRun via CLI - cancelling a running workflow | wrun_01KMP41TTC5FPX9214EGHNV94S
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KMP4267XGTF4PE1Z7TWH7F9R
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KMP42SMX58BBB9GK092DZYFZ
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KMP4352MY53SSYAH4YFSZD87

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro7607
✅ example7607
✅ express7607
✅ fastify7607
✅ hono7607
❌ nextjs-turbopack7922
✅ nextjs-webpack8102
✅ nitro7607
✅ nuxt7607
✅ sveltekit7607
✅ vite7607
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable69014
✅ express-stable69014
✅ fastify-stable69014
✅ hono-stable69014
✅ nextjs-turbopack-canary58025
✅ nextjs-turbopack-stable7508
✅ nextjs-webpack-canary58025
✅ nextjs-webpack-stable7508
✅ nitro-stable69014
✅ nuxt-stable69014
✅ sveltekit-stable69014
✅ vite-stable69014
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable69014
✅ express-stable69014
✅ fastify-stable69014
✅ hono-stable69014
✅ nextjs-turbopack-canary58025
✅ nextjs-turbopack-stable7508
✅ nextjs-webpack-canary58025
✅ nextjs-webpack-stable7508
✅ nitro-stable69014
✅ nuxt-stable69014
✅ sveltekit-stable69014
✅ vite-stable69014
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable69014
✅ express-stable69014
✅ fastify-stable69014
✅ hono-stable69014
✅ nextjs-turbopack-canary58025
✅ nextjs-turbopack-stable7508
✅ nextjs-webpack-canary58025
✅ nextjs-webpack-stable7508
✅ nitro-stable69014
✅ nuxt-stable69014
✅ sveltekit-stable69014
✅ vite-stable69014
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack7508
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev500
❌ mongodb5538
✅ redis-dev500
❌ redis5628
✅ turso-dev500
❌ turso4548
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable69014
✅ e2e-local-postgres-nest-stable69014
✅ e2e-local-prod-nest-stable69014

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: success
  • Windows: success

Check the workflow run for details.

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

Fixes a race where concurrent workflow invocations could both emit hook_disposed for the same hook, leading to duplicate events and replay corruption. The changes make hook disposal atomic in each World implementation and refine runtime logging for the expected “already disposed” case.

Changes:

  • world-postgres: make hook disposal atomic via DELETE ... RETURNING, throwing EntityConflictError on concurrent duplicate disposal.
  • world-local: add a writeExclusive lock file guard to prevent concurrent duplicate hook_disposed.
  • core: split logging paths for EntityConflictError vs RunExpiredError during hook disposal; add changeset.

Reviewed changes

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

Show a summary per file
FileDescription
packages/world-postgres/src/storage.tsAtomically deletes hooks on hook_disposed and detects concurrent duplicates.
packages/world-local/src/storage/events-storage.tsAdds exclusive lock file for hook disposal to prevent TOCTOU duplicates.
packages/world-local/src/storage.test.tsAdds a concurrency regression test for duplicate hook_disposed.
packages/core/src/runtime/suspension-handler.tsImproves logging differentiation for duplicate disposal vs expired runs.
.changeset/fix-duplicate-hook-disposed-race.mdDeclares patch releases for affected packages.

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

Comment on lines +1972 to +1974
expect((rejected[0] as PromiseRejectedResult).reason).toMatchObject({
name: 'EntityConflictError',
});

CopilotAIMar 25, 2026

Copy link

Choose a reason for hiding this comment

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

This concurrency test can be flaky: disposeHook() may reject with HookNotFoundError (not EntityConflictError) if one disposal deletes the hook file before the other call reaches the hook existence validation in events-storage. Consider broadening the assertion to accept either error, or introduce a barrier so both calls reach the disposal section before one completes.

Suggested change
expect((rejected[0]asPromiseRejectedResult).reason).toMatchObject({
name: 'EntityConflictError',
});
constreason=(rejected[0]asPromiseRejectedResult).reasonas{
name?: string;
};
expect(['EntityConflictError','HookNotFoundError']).toContain(reason.name);

Copilot uses AI. Check for mistakes.

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.

Already addressed in e604643 — the test now accepts both EntityConflictError and HookNotFoundError.

The concurrent hook_disposed race has two possible orderings: the loser
may hit the lock file (EntityConflictError) or find the hook entity
already deleted by the winner (HookNotFoundError). Both are correct.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pranaygp

Copy link
Copy Markdown
ContributorAuthor

failings tests are confirmed flaky from unrelated race conditions and queue timeout issues. merging this and investigating those

@pranaygp
pranaygp merged commit d1391e1 into mainMar 26, 2026
160 of 166 checks passed
@pranaygp
pranaygp deleted the fix/duplicate-hook-disposed-race branch March 26, 2026 22:51
@ghostghost mentioned this pull request Mar 26, 2026
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.

sleep() causes 'Unconsumed event in event log' when called concurrently via Promise.all

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" + '
Skip to content

Fix race condition allowing duplicate hook_disposed events - #1523

Merged
pranaygp merged 4 commits into
mainfrom
fix/duplicate-hook-disposed-race
Mar 26, 2026
Merged

Fix race condition allowing duplicate hook_disposed events#1523
pranaygp merged 4 commits into
mainfrom
fix/duplicate-hook-disposed-race

Conversation

@pranaygp

Copy link
Copy Markdown
Contributor

Summary

  • Fixes a race condition where concurrent workflow invocations could both post hook_disposed for the same hook, corrupting the event log with duplicate events and causing Unconsumed event in event log: eventType=hook_disposed errors on replay
  • world-local: Adds writeExclusive lock file guard before hook deletion (same pattern as wait_completed from [world-postgres, world-local] Fix TOCTOU races in entity state transitions #1434)
  • world-postgres: Uses DELETE ... RETURNING so only one concurrent caller succeeds — second gets EntityConflictError
  • world-vercel: No client changes needed — server-side fix in vercel/workflow-server#356 returns 409, which is already translated to EntityConflictError by makeRequest
  • suspension-handler: Separates EntityConflictError (hook already disposed) from RunExpiredError (run completed) log messages

Fixes#1266

Test plan

  • Added should reject concurrent hook_disposed for the same hook test (mirrors existing wait_completed race test)
  • Verify all existing tests pass
  • E2E test with parallel tool calls triggering concurrent hook disposal

🤖 Generated with Claude Code

Concurrent workflow invocations could both post hook_disposed for the
same hook, corrupting the event log with duplicate events. This mirrors
the wait_completed race condition fixed in #1057/#1434.
- world-local: Add writeExclusive lock file for hook_disposed (same
pattern as wait_completed and step terminal states)
- world-postgres: Use DELETE ... RETURNING to atomically detect if
another caller already deleted the hook entity
- suspension-handler: Improve log messages to distinguish hook-already-
disposed (EntityConflictError) from run-already-completed (RunExpiredError)
Fixes#1266
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pranaygp
pranaygp requested a review from a team as a code ownerMarch 25, 2026 23:00
CopilotAI review requested due to automatic review settings March 25, 2026 23:00
@vercel

vercelBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
example-nextjs-workflow-turbopackReadyReadyPreview, CommentMar 26, 2026 10:18pm
example-nextjs-workflow-webpackReadyReadyPreview, CommentMar 26, 2026 10:18pm
example-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-astro-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-express-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-fastify-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-hono-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-nitro-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-nuxt-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-sveltekit-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-vite-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workflow-docsReadyReadyPreview, Comment, Open in v0Mar 26, 2026 10:18pm
workflow-swc-playgroundReadyReadyPreview, CommentMar 26, 2026 10:18pm

@changeset-bot

changeset-botBot commented Mar 25, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 960f3b3

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

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

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

@github-actions

github-actionsBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.045s (-4.5%)1.006s (~)0.961s101.00x
🐘 PostgresExpress0.061s (+1.2%)1.011s (~)0.950s101.36x
🐘 PostgresNitro0.070s (-3.2%)1.016s (~)0.946s101.56x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.511s (-8.1% 🟢)2.661s (+12.4% 🔺)2.151s101.00x
▲ VercelNext.js (Turbopack)0.539s (-19.9% 🟢)2.277s (-15.0% 🟢)1.738s101.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.127s (-0.5%)2.006s (~)0.879s101.00x
🐘 PostgresExpress1.142s (~)2.014s (~)0.871s101.01x
🐘 PostgresNitro1.151s (+0.8%)2.012s (~)0.861s101.02x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.053s (-10.5% 🟢)3.848s (-2.3%)1.795s101.00x
▲ VercelNitro2.106s (+2.0%)3.910s (+5.3% 🔺)1.804s101.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro10.848s (~)11.021s (~)0.173s31.00x
🐘 PostgresExpress10.879s (~)11.020s (~)0.141s31.00x
💻 LocalExpress10.920s (~)11.023s (~)0.103s31.01x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.163s (-3.9%)22.341s (+16.9% 🔺)5.178s21.00x
▲ VercelNext.js (Turbopack)18.070s (+4.5%)19.086s (+2.2%)1.016s21.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro14.470s (~)15.020s (~)0.550s41.00x
🐘 PostgresExpress14.536s (~)15.027s (~)0.491s41.00x
💻 LocalExpress14.940s (~)15.028s (~)0.088s41.03x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro33.849s (+6.7% 🔺)35.772s (+8.6% 🔺)1.922s21.00x
▲ VercelNext.js (Turbopack)33.946s (+1.0%)35.584s (+0.5%)1.638s21.00x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express13.879s (~)14.166s (~)0.287s71.00x
🐘 PostgresNitro13.937s (+1.0%)14.166s (+1.0%)0.230s71.00x
💻 LocalExpress16.569s (~)17.030s (~)0.461s61.19x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro58.115s (-5.6% 🟢)60.163s (-5.2% 🟢)2.047s21.00x
▲ VercelNext.js (Turbopack)59.047s (+5.4% 🔺)60.159s (+5.0% 🔺)1.111s21.02x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.260s (~)2.011s (~)0.751s151.00x
🐘 PostgresNitro1.264s (~)2.011s (~)0.746s151.00x
💻 LocalExpress1.505s (+2.0%)2.005s (~)0.500s151.19x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.522s (+6.5% 🔺)4.127s (+6.2% 🔺)1.605s81.00x
▲ VercelNext.js (Turbopack)2.731s (+18.6% 🔺)3.869s (+4.8%)1.138s81.08x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.322s (-0.8%)3.011s (~)0.689s101.00x
🐘 PostgresExpress2.327s (~)3.010s (~)0.683s101.00x
💻 LocalExpress2.954s (-1.4%)3.452s (+3.3%)0.498s91.27x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.612s (+0.6%)4.180s (+8.8% 🔺)1.568s81.00x
▲ VercelNext.js (Turbopack)2.785s (+3.5%)3.832s (~)1.046s81.07x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.452s (-0.5%)4.011s (~)0.559s81.00x
🐘 PostgresNitro3.466s (~)4.013s (~)0.547s81.00x
💻 LocalExpress9.137s (+13.3% 🔺)9.521s (+8.6% 🔺)0.385s42.65x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.333s (+18.3% 🔺)4.743s (+16.9% 🔺)1.410s71.00x
▲ VercelNext.js (Turbopack)4.034s (+18.0% 🔺)5.330s (+5.1% 🔺)1.296s61.21x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.258s (~)2.010s (~)0.752s151.00x
🐘 PostgresNitro1.260s (~)2.010s (~)0.750s151.00x
💻 LocalExpress1.558s (+1.3%)2.006s (~)0.448s151.24x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.311s (+13.2% 🔺)3.862s (+6.2% 🔺)1.551s81.00x
▲ VercelNext.js (Turbopack)2.564s (+9.9% 🔺)3.886s (+8.0% 🔺)1.322s81.11x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.321s (~)3.011s (~)0.690s101.00x
🐘 PostgresNitro2.325s (-0.5%)3.012s (~)0.687s101.00x
💻 LocalExpress3.022s (+0.6%)3.885s (+12.5% 🔺)0.862s81.30x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.405s (+5.1% 🔺)3.890s (+13.1% 🔺)1.485s81.00x
▲ VercelNext.js (Turbopack)2.675s (-7.0% 🟢)4.224s (-1.6%)1.548s81.11x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.448s (~)4.010s (~)0.563s81.00x
🐘 PostgresNitro3.458s (~)4.013s (~)0.555s81.00x
💻 LocalExpress9.102s (+4.1%)9.773s (+8.3% 🔺)0.671s42.64x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.185s (+12.2% 🔺)4.845s (+15.7% 🔺)1.660s71.00x
▲ VercelNext.js (Turbopack)3.332s (-5.1% 🟢)4.572s (-9.6% 🟢)1.239s71.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.789s (-2.4%)1.007s (~)0.217s601.00x
🐘 PostgresNitro0.800s (-2.7%)1.007s (-1.7%)0.207s601.01x
💻 LocalExpress0.996s (+0.6%)1.281s (+10.9% 🔺)0.285s471.26x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro9.752s (-0.6%)11.566s (-1.5%)1.814s61.00x
▲ VercelNext.js (Turbopack)9.815s (-10.1% 🟢)11.637s (-5.6% 🟢)1.822s61.01x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.853s (-1.6%)2.008s (-1.1%)0.155s451.00x
🐘 PostgresNitro1.884s (+0.6%)2.031s (-1.1%)0.147s451.02x
💻 LocalExpress2.996s (~)3.453s (+2.2%)0.456s271.62x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro30.623s (-6.1% 🟢)32.663s (-4.2%)2.040s31.00x
▲ VercelNext.js (Turbopack)32.159s (~)33.570s (~)1.411s31.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.848s (~)4.113s (+1.7%)0.265s301.00x
🐘 PostgresNitro3.896s (+1.5%)4.111s (+2.5%)0.215s301.01x
💻 LocalExpress9.131s (+0.5%)9.864s (+3.2%)0.732s132.37x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro91.712s (-85.6% 🟢)93.952s (-85.3% 🟢)2.241s21.00x
▲ VercelNext.js (Turbopack)99.318s (+16.3% 🔺)100.959s (+15.9% 🔺)1.641s21.08x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.272s (-2.2%)1.009s (~)0.736s601.00x
🐘 PostgresExpress0.276s (+1.4%)1.008s (~)0.731s601.01x
💻 LocalExpress0.613s (+2.1%)1.004s (~)0.392s602.25x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.713s (-4.3%)3.256s (-8.7% 🟢)1.543s191.00x
▲ VercelNext.js (Turbopack)1.841s (-9.2% 🟢)3.533s (-4.9%)1.692s171.07x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.495s (-0.6%)1.008s (~)0.513s901.00x
🐘 PostgresExpress0.531s (+8.0% 🔺)1.010s (~)0.480s901.07x
💻 LocalExpress2.602s (+4.2%)3.008s (~)0.406s305.26x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.933s (+2.8%)4.556s (+5.7% 🔺)1.623s201.00x
▲ VercelNext.js (Turbopack)3.540s (-90.6% 🟢)4.913s (-87.4% 🟢)1.374s191.21x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.765s (-0.9%)1.008s (~)0.243s1201.00x
🐘 PostgresExpress0.980s (+27.8% 🔺)1.488s (+47.6% 🔺)0.507s811.28x
💻 LocalExpress11.309s (+2.5%)11.936s (+2.3%)0.626s1114.79x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro6.151s (-24.5% 🟢)8.076s (-15.6% 🟢)1.925s151.00x
▲ VercelNext.js (Turbopack)6.986s (-10.7% 🟢)8.464s (-11.8% 🟢)1.478s151.14x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.197s (-0.9%)0.994s (~)0.001s (~)1.010s (~)0.813s101.00x
🐘 PostgresNitro0.204s (~)0.997s (~)0.002s (+15.4% 🔺)1.013s (~)0.809s101.04x
💻 LocalExpress0.206s (-1.1%)1.003s (~)0.011s (-2.6%)1.017s (~)0.811s101.05x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----
💻 LocalNitro⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.613s (~)2.974s (+16.9% 🔺)0.194s (-65.9% 🟢)3.715s (~)2.103s101.00x
▲ VercelNitro1.728s (+10.4% 🔺)2.793s (+7.8% 🔺)0.389s (-26.1% 🟢)3.897s (+7.1% 🔺)2.168s101.07x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.600s (+1.8%)1.002s (~)0.004s (-0.8%)1.024s (~)0.423s591.00x
🐘 PostgresExpress0.607s (+1.9%)1.002s (~)0.004s (~)1.024s (~)0.417s591.01x
💻 LocalExpress0.737s (+1.5%)1.009s (~)0.010s (+2.1%)1.024s (~)0.287s591.23x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----
💻 LocalNitro⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.382s (-1.6%)5.429s (-2.5%)0.207s (-20.5% 🟢)6.188s (-9.6% 🟢)1.806s101.00x
▲ VercelNitro4.477s (+4.5%)5.760s (+5.7% 🔺)0.233s (+4.2%)6.658s (+4.5%)2.181s101.02x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.941s (-2.4%)1.104s (-11.0% 🟢)0.000s (-41.8% 🟢)1.118s (-11.3% 🟢)0.177s551.00x
🐘 PostgresExpress0.998s (+6.4% 🔺)1.387s (+11.8% 🔺)0.000s (-44.2% 🟢)1.405s (+11.6% 🔺)0.407s431.06x
💻 LocalExpress1.254s (~)2.021s (~)0.000s (+9.1% 🔺)2.024s (~)0.770s301.33x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----
💻 LocalNitro⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.195s (+8.3% 🔺)4.109s (~)0.000s (NaN%)4.738s (+1.3%)1.543s131.00x
▲ VercelNitro3.488s (+19.1% 🔺)4.339s (+18.0% 🔺)0.000s (+16.7% 🔺)5.064s (+14.9% 🔺)1.576s121.09x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.758s (+2.7%)2.134s (+1.6%)0.000s (~)2.154s (+1.8%)0.396s291.00x
🐘 PostgresNitro1.809s (+4.3%)2.175s (~)0.000s (-65.5% 🟢)2.189s (~)0.379s281.03x
💻 LocalExpress3.508s (-2.5%)4.032s (-1.6%)0.001s (+25.0% 🔺)4.037s (-1.6%)0.529s152.00x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----
💻 LocalNitro⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.959s (+6.2% 🔺)5.146s (+4.9%)0.000s (+400.0% 🔺)5.855s (+6.4% 🔺)1.896s111.00x
▲ VercelNext.js (Turbopack)4.150s (-92.4% 🟢)5.240s (+6.1% 🔺)0.000s (+Infinity% 🔺)5.807s (-89.7% 🟢)1.657s111.05x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress21/21
🐘 PostgresExpress13/21
▲ VercelNitro17/21
Fastest World by Framework

Winner determined by most benchmark wins

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

Worlds:

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

📋 View full workflow run


Some benchmark jobs failed:

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

Check the workflow run for details.

@github-actions

github-actionsBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production844267913
✅ 💻 Local Development8180178996
✅ 📦 Local Production8180178996
✅ 🐘 Local Postgres8180178996
✅ 🪟 Windows750883
❌ 🌍 Community Worlds1305924213
✅ 📋 Other207042249
Total3710616754446

❌ Failed Tests

▲ Vercel Production (2 failed)

nextjs-turbopack (2 failed):

  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMP3ZN0JX4ZHGZDA2JKQX386 | 🔍 observability
🌍 Community Worlds (59 failed)

mongodb (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMP3N85D905YXMZ5EJ87SA0N
  • webhookWorkflow | wrun_01KMP3NH16VE34DN3VAKG8D5J9
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMP3XG613FV6M6SR0EY31X5G

redis (2 failed):

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

turso (54 failed):

  • addTenWorkflow | wrun_01KMP3M2PQWNFJSYZ8CZZD147D
  • addTenWorkflow | wrun_01KMP3M2PQWNFJSYZ8CZZD147D
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KMP3NQGY1V13G5FMKM76Z111
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KMP3M96QNS23ZMSBSZ19RX9D
  • promiseRaceWorkflow | wrun_01KMP3MCEVR5JYNKCDEP212SKW
  • promiseAnyWorkflow | wrun_01KMP3MER50ENQMK1DZC54B5J2
  • importedStepOnlyWorkflow | wrun_01KMP3P3E51J7221QT48Q8Y02H
  • hookWorkflow | wrun_01KMP3MXH1WCBBVA0QDQPWZYK3
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMP3N85D905YXMZ5EJ87SA0N
  • webhookWorkflow | wrun_01KMP3NH16VE34DN3VAKG8D5J9
  • sleepingWorkflow | wrun_01KMP3NQJBECVWABNGMAW4N069
  • parallelSleepWorkflow | wrun_01KMP3P3YCN5RD5NS1CNRS8A2C
  • nullByteWorkflow | wrun_01KMP3P88KHNPFQF09S5K88P7S
  • workflowAndStepMetadataWorkflow | wrun_01KMP3PAEYDSDGFAYRBHPV6FR0
  • fetchWorkflow | wrun_01KMP3SFQMB97MQVT17YZJ184S
  • promiseRaceStressTestWorkflow | wrun_01KMP3SJAT0A768PW6JP1Z5K4J
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KMP3WW5AY965ZVK70DRZC0N4
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMP3XG613FV6M6SR0EY31X5G
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMP3Y46NTSFRFQSFK8JEXCNM
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KMP3YQ2DF1PTS6B6MAAQ3Z4E
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KMP3YZ6QQTF6EKNTB8J42DF6
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KMP3Z4F0BHCBF9AJZAA2KVJA
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KMP3Z6WCJ8EDGDQZ2DS43YSK
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMP3ZN0JX4ZHGZDA2JKQX386
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KMP3ZT85HPBSRP420Y2DAR80
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KMP400X8DMN36VKN2N97A15Y
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KMP4078PZYYGXMA0184A4WNE
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KMP40DGYFBY797DC2JMJ5Q0Z
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KMP40KP7Y7NWPPGKC5JZCFQK
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KMP40T385HCAN8SXA3S2YJ03
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KMP414CQMBZBT6C2R4R0K6ZS
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KMP41BRX5XVN3BKN6QD922FG
  • cancelRun - cancelling a running workflow | wrun_01KMP41HZNYWKH1TTHGMPRWGGS
  • cancelRun via CLI - cancelling a running workflow | wrun_01KMP41TTC5FPX9214EGHNV94S
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KMP4267XGTF4PE1Z7TWH7F9R
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KMP42SMX58BBB9GK092DZYFZ
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KMP4352MY53SSYAH4YFSZD87

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro7607
✅ example7607
✅ express7607
✅ fastify7607
✅ hono7607
❌ nextjs-turbopack7922
✅ nextjs-webpack8102
✅ nitro7607
✅ nuxt7607
✅ sveltekit7607
✅ vite7607
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable69014
✅ express-stable69014
✅ fastify-stable69014
✅ hono-stable69014
✅ nextjs-turbopack-canary58025
✅ nextjs-turbopack-stable7508
✅ nextjs-webpack-canary58025
✅ nextjs-webpack-stable7508
✅ nitro-stable69014
✅ nuxt-stable69014
✅ sveltekit-stable69014
✅ vite-stable69014
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable69014
✅ express-stable69014
✅ fastify-stable69014
✅ hono-stable69014
✅ nextjs-turbopack-canary58025
✅ nextjs-turbopack-stable7508
✅ nextjs-webpack-canary58025
✅ nextjs-webpack-stable7508
✅ nitro-stable69014
✅ nuxt-stable69014
✅ sveltekit-stable69014
✅ vite-stable69014
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable69014
✅ express-stable69014
✅ fastify-stable69014
✅ hono-stable69014
✅ nextjs-turbopack-canary58025
✅ nextjs-turbopack-stable7508
✅ nextjs-webpack-canary58025
✅ nextjs-webpack-stable7508
✅ nitro-stable69014
✅ nuxt-stable69014
✅ sveltekit-stable69014
✅ vite-stable69014
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack7508
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev500
❌ mongodb5538
✅ redis-dev500
❌ redis5628
✅ turso-dev500
❌ turso4548
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable69014
✅ e2e-local-postgres-nest-stable69014
✅ e2e-local-prod-nest-stable69014

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: success
  • Windows: success

Check the workflow run for details.

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

Fixes a race where concurrent workflow invocations could both emit hook_disposed for the same hook, leading to duplicate events and replay corruption. The changes make hook disposal atomic in each World implementation and refine runtime logging for the expected “already disposed” case.

Changes:

  • world-postgres: make hook disposal atomic via DELETE ... RETURNING, throwing EntityConflictError on concurrent duplicate disposal.
  • world-local: add a writeExclusive lock file guard to prevent concurrent duplicate hook_disposed.
  • core: split logging paths for EntityConflictError vs RunExpiredError during hook disposal; add changeset.

Reviewed changes

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

Show a summary per file
FileDescription
packages/world-postgres/src/storage.tsAtomically deletes hooks on hook_disposed and detects concurrent duplicates.
packages/world-local/src/storage/events-storage.tsAdds exclusive lock file for hook disposal to prevent TOCTOU duplicates.
packages/world-local/src/storage.test.tsAdds a concurrency regression test for duplicate hook_disposed.
packages/core/src/runtime/suspension-handler.tsImproves logging differentiation for duplicate disposal vs expired runs.
.changeset/fix-duplicate-hook-disposed-race.mdDeclares patch releases for affected packages.

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

Comment on lines +1972 to +1974
expect((rejected[0] as PromiseRejectedResult).reason).toMatchObject({
name: 'EntityConflictError',
});

CopilotAIMar 25, 2026

Copy link

Choose a reason for hiding this comment

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

This concurrency test can be flaky: disposeHook() may reject with HookNotFoundError (not EntityConflictError) if one disposal deletes the hook file before the other call reaches the hook existence validation in events-storage. Consider broadening the assertion to accept either error, or introduce a barrier so both calls reach the disposal section before one completes.

Suggested change
expect((rejected[0]asPromiseRejectedResult).reason).toMatchObject({
name: 'EntityConflictError',
});
constreason=(rejected[0]asPromiseRejectedResult).reasonas{
name?: string;
};
expect(['EntityConflictError','HookNotFoundError']).toContain(reason.name);

Copilot uses AI. Check for mistakes.

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.

Already addressed in e604643 — the test now accepts both EntityConflictError and HookNotFoundError.

The concurrent hook_disposed race has two possible orderings: the loser
may hit the lock file (EntityConflictError) or find the hook entity
already deleted by the winner (HookNotFoundError). Both are correct.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pranaygp

Copy link
Copy Markdown
ContributorAuthor

failings tests are confirmed flaky from unrelated race conditions and queue timeout issues. merging this and investigating those

@pranaygp
pranaygp merged commit d1391e1 into mainMar 26, 2026
160 of 166 checks passed
@pranaygp
pranaygp deleted the fix/duplicate-hook-disposed-race branch March 26, 2026 22:51
@ghostghost mentioned this pull request Mar 26, 2026
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.

sleep() causes 'Unconsumed event in event log' when called concurrently via Promise.all

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('^' + ".*" + '
Skip to content

Fix race condition allowing duplicate hook_disposed events - #1523

Merged
pranaygp merged 4 commits into
mainfrom
fix/duplicate-hook-disposed-race
Mar 26, 2026
Merged

Fix race condition allowing duplicate hook_disposed events#1523
pranaygp merged 4 commits into
mainfrom
fix/duplicate-hook-disposed-race

Conversation

@pranaygp

Copy link
Copy Markdown
Contributor

Summary

  • Fixes a race condition where concurrent workflow invocations could both post hook_disposed for the same hook, corrupting the event log with duplicate events and causing Unconsumed event in event log: eventType=hook_disposed errors on replay
  • world-local: Adds writeExclusive lock file guard before hook deletion (same pattern as wait_completed from [world-postgres, world-local] Fix TOCTOU races in entity state transitions #1434)
  • world-postgres: Uses DELETE ... RETURNING so only one concurrent caller succeeds — second gets EntityConflictError
  • world-vercel: No client changes needed — server-side fix in vercel/workflow-server#356 returns 409, which is already translated to EntityConflictError by makeRequest
  • suspension-handler: Separates EntityConflictError (hook already disposed) from RunExpiredError (run completed) log messages

Fixes#1266

Test plan

  • Added should reject concurrent hook_disposed for the same hook test (mirrors existing wait_completed race test)
  • Verify all existing tests pass
  • E2E test with parallel tool calls triggering concurrent hook disposal

🤖 Generated with Claude Code

Concurrent workflow invocations could both post hook_disposed for the
same hook, corrupting the event log with duplicate events. This mirrors
the wait_completed race condition fixed in #1057/#1434.
- world-local: Add writeExclusive lock file for hook_disposed (same
pattern as wait_completed and step terminal states)
- world-postgres: Use DELETE ... RETURNING to atomically detect if
another caller already deleted the hook entity
- suspension-handler: Improve log messages to distinguish hook-already-
disposed (EntityConflictError) from run-already-completed (RunExpiredError)
Fixes#1266
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pranaygp
pranaygp requested a review from a team as a code ownerMarch 25, 2026 23:00
CopilotAI review requested due to automatic review settings March 25, 2026 23:00
@vercel

vercelBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
example-nextjs-workflow-turbopackReadyReadyPreview, CommentMar 26, 2026 10:18pm
example-nextjs-workflow-webpackReadyReadyPreview, CommentMar 26, 2026 10:18pm
example-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-astro-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-express-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-fastify-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-hono-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-nitro-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-nuxt-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-sveltekit-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-vite-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workflow-docsReadyReadyPreview, Comment, Open in v0Mar 26, 2026 10:18pm
workflow-swc-playgroundReadyReadyPreview, CommentMar 26, 2026 10:18pm

@changeset-bot

changeset-botBot commented Mar 25, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 960f3b3

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

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

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

@github-actions

github-actionsBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.045s (-4.5%)1.006s (~)0.961s101.00x
🐘 PostgresExpress0.061s (+1.2%)1.011s (~)0.950s101.36x
🐘 PostgresNitro0.070s (-3.2%)1.016s (~)0.946s101.56x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.511s (-8.1% 🟢)2.661s (+12.4% 🔺)2.151s101.00x
▲ VercelNext.js (Turbopack)0.539s (-19.9% 🟢)2.277s (-15.0% 🟢)1.738s101.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.127s (-0.5%)2.006s (~)0.879s101.00x
🐘 PostgresExpress1.142s (~)2.014s (~)0.871s101.01x
🐘 PostgresNitro1.151s (+0.8%)2.012s (~)0.861s101.02x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.053s (-10.5% 🟢)3.848s (-2.3%)1.795s101.00x
▲ VercelNitro2.106s (+2.0%)3.910s (+5.3% 🔺)1.804s101.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro10.848s (~)11.021s (~)0.173s31.00x
🐘 PostgresExpress10.879s (~)11.020s (~)0.141s31.00x
💻 LocalExpress10.920s (~)11.023s (~)0.103s31.01x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.163s (-3.9%)22.341s (+16.9% 🔺)5.178s21.00x
▲ VercelNext.js (Turbopack)18.070s (+4.5%)19.086s (+2.2%)1.016s21.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro14.470s (~)15.020s (~)0.550s41.00x
🐘 PostgresExpress14.536s (~)15.027s (~)0.491s41.00x
💻 LocalExpress14.940s (~)15.028s (~)0.088s41.03x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro33.849s (+6.7% 🔺)35.772s (+8.6% 🔺)1.922s21.00x
▲ VercelNext.js (Turbopack)33.946s (+1.0%)35.584s (+0.5%)1.638s21.00x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express13.879s (~)14.166s (~)0.287s71.00x
🐘 PostgresNitro13.937s (+1.0%)14.166s (+1.0%)0.230s71.00x
💻 LocalExpress16.569s (~)17.030s (~)0.461s61.19x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro58.115s (-5.6% 🟢)60.163s (-5.2% 🟢)2.047s21.00x
▲ VercelNext.js (Turbopack)59.047s (+5.4% 🔺)60.159s (+5.0% 🔺)1.111s21.02x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.260s (~)2.011s (~)0.751s151.00x
🐘 PostgresNitro1.264s (~)2.011s (~)0.746s151.00x
💻 LocalExpress1.505s (+2.0%)2.005s (~)0.500s151.19x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.522s (+6.5% 🔺)4.127s (+6.2% 🔺)1.605s81.00x
▲ VercelNext.js (Turbopack)2.731s (+18.6% 🔺)3.869s (+4.8%)1.138s81.08x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.322s (-0.8%)3.011s (~)0.689s101.00x
🐘 PostgresExpress2.327s (~)3.010s (~)0.683s101.00x
💻 LocalExpress2.954s (-1.4%)3.452s (+3.3%)0.498s91.27x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.612s (+0.6%)4.180s (+8.8% 🔺)1.568s81.00x
▲ VercelNext.js (Turbopack)2.785s (+3.5%)3.832s (~)1.046s81.07x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.452s (-0.5%)4.011s (~)0.559s81.00x
🐘 PostgresNitro3.466s (~)4.013s (~)0.547s81.00x
💻 LocalExpress9.137s (+13.3% 🔺)9.521s (+8.6% 🔺)0.385s42.65x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.333s (+18.3% 🔺)4.743s (+16.9% 🔺)1.410s71.00x
▲ VercelNext.js (Turbopack)4.034s (+18.0% 🔺)5.330s (+5.1% 🔺)1.296s61.21x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.258s (~)2.010s (~)0.752s151.00x
🐘 PostgresNitro1.260s (~)2.010s (~)0.750s151.00x
💻 LocalExpress1.558s (+1.3%)2.006s (~)0.448s151.24x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.311s (+13.2% 🔺)3.862s (+6.2% 🔺)1.551s81.00x
▲ VercelNext.js (Turbopack)2.564s (+9.9% 🔺)3.886s (+8.0% 🔺)1.322s81.11x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.321s (~)3.011s (~)0.690s101.00x
🐘 PostgresNitro2.325s (-0.5%)3.012s (~)0.687s101.00x
💻 LocalExpress3.022s (+0.6%)3.885s (+12.5% 🔺)0.862s81.30x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.405s (+5.1% 🔺)3.890s (+13.1% 🔺)1.485s81.00x
▲ VercelNext.js (Turbopack)2.675s (-7.0% 🟢)4.224s (-1.6%)1.548s81.11x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.448s (~)4.010s (~)0.563s81.00x
🐘 PostgresNitro3.458s (~)4.013s (~)0.555s81.00x
💻 LocalExpress9.102s (+4.1%)9.773s (+8.3% 🔺)0.671s42.64x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.185s (+12.2% 🔺)4.845s (+15.7% 🔺)1.660s71.00x
▲ VercelNext.js (Turbopack)3.332s (-5.1% 🟢)4.572s (-9.6% 🟢)1.239s71.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.789s (-2.4%)1.007s (~)0.217s601.00x
🐘 PostgresNitro0.800s (-2.7%)1.007s (-1.7%)0.207s601.01x
💻 LocalExpress0.996s (+0.6%)1.281s (+10.9% 🔺)0.285s471.26x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro9.752s (-0.6%)11.566s (-1.5%)1.814s61.00x
▲ VercelNext.js (Turbopack)9.815s (-10.1% 🟢)11.637s (-5.6% 🟢)1.822s61.01x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.853s (-1.6%)2.008s (-1.1%)0.155s451.00x
🐘 PostgresNitro1.884s (+0.6%)2.031s (-1.1%)0.147s451.02x
💻 LocalExpress2.996s (~)3.453s (+2.2%)0.456s271.62x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro30.623s (-6.1% 🟢)32.663s (-4.2%)2.040s31.00x
▲ VercelNext.js (Turbopack)32.159s (~)33.570s (~)1.411s31.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.848s (~)4.113s (+1.7%)0.265s301.00x
🐘 PostgresNitro3.896s (+1.5%)4.111s (+2.5%)0.215s301.01x
💻 LocalExpress9.131s (+0.5%)9.864s (+3.2%)0.732s132.37x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro91.712s (-85.6% 🟢)93.952s (-85.3% 🟢)2.241s21.00x
▲ VercelNext.js (Turbopack)99.318s (+16.3% 🔺)100.959s (+15.9% 🔺)1.641s21.08x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.272s (-2.2%)1.009s (~)0.736s601.00x
🐘 PostgresExpress0.276s (+1.4%)1.008s (~)0.731s601.01x
💻 LocalExpress0.613s (+2.1%)1.004s (~)0.392s602.25x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.713s (-4.3%)3.256s (-8.7% 🟢)1.543s191.00x
▲ VercelNext.js (Turbopack)1.841s (-9.2% 🟢)3.533s (-4.9%)1.692s171.07x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.495s (-0.6%)1.008s (~)0.513s901.00x
🐘 PostgresExpress0.531s (+8.0% 🔺)1.010s (~)0.480s901.07x
💻 LocalExpress2.602s (+4.2%)3.008s (~)0.406s305.26x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.933s (+2.8%)4.556s (+5.7% 🔺)1.623s201.00x
▲ VercelNext.js (Turbopack)3.540s (-90.6% 🟢)4.913s (-87.4% 🟢)1.374s191.21x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.765s (-0.9%)1.008s (~)0.243s1201.00x
🐘 PostgresExpress0.980s (+27.8% 🔺)1.488s (+47.6% 🔺)0.507s811.28x
💻 LocalExpress11.309s (+2.5%)11.936s (+2.3%)0.626s1114.79x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro6.151s (-24.5% 🟢)8.076s (-15.6% 🟢)1.925s151.00x
▲ VercelNext.js (Turbopack)6.986s (-10.7% 🟢)8.464s (-11.8% 🟢)1.478s151.14x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.197s (-0.9%)0.994s (~)0.001s (~)1.010s (~)0.813s101.00x
🐘 PostgresNitro0.204s (~)0.997s (~)0.002s (+15.4% 🔺)1.013s (~)0.809s101.04x
💻 LocalExpress0.206s (-1.1%)1.003s (~)0.011s (-2.6%)1.017s (~)0.811s101.05x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----
💻 LocalNitro⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.613s (~)2.974s (+16.9% 🔺)0.194s (-65.9% 🟢)3.715s (~)2.103s101.00x
▲ VercelNitro1.728s (+10.4% 🔺)2.793s (+7.8% 🔺)0.389s (-26.1% 🟢)3.897s (+7.1% 🔺)2.168s101.07x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.600s (+1.8%)1.002s (~)0.004s (-0.8%)1.024s (~)0.423s591.00x
🐘 PostgresExpress0.607s (+1.9%)1.002s (~)0.004s (~)1.024s (~)0.417s591.01x
💻 LocalExpress0.737s (+1.5%)1.009s (~)0.010s (+2.1%)1.024s (~)0.287s591.23x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----
💻 LocalNitro⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.382s (-1.6%)5.429s (-2.5%)0.207s (-20.5% 🟢)6.188s (-9.6% 🟢)1.806s101.00x
▲ VercelNitro4.477s (+4.5%)5.760s (+5.7% 🔺)0.233s (+4.2%)6.658s (+4.5%)2.181s101.02x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.941s (-2.4%)1.104s (-11.0% 🟢)0.000s (-41.8% 🟢)1.118s (-11.3% 🟢)0.177s551.00x
🐘 PostgresExpress0.998s (+6.4% 🔺)1.387s (+11.8% 🔺)0.000s (-44.2% 🟢)1.405s (+11.6% 🔺)0.407s431.06x
💻 LocalExpress1.254s (~)2.021s (~)0.000s (+9.1% 🔺)2.024s (~)0.770s301.33x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----
💻 LocalNitro⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.195s (+8.3% 🔺)4.109s (~)0.000s (NaN%)4.738s (+1.3%)1.543s131.00x
▲ VercelNitro3.488s (+19.1% 🔺)4.339s (+18.0% 🔺)0.000s (+16.7% 🔺)5.064s (+14.9% 🔺)1.576s121.09x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.758s (+2.7%)2.134s (+1.6%)0.000s (~)2.154s (+1.8%)0.396s291.00x
🐘 PostgresNitro1.809s (+4.3%)2.175s (~)0.000s (-65.5% 🟢)2.189s (~)0.379s281.03x
💻 LocalExpress3.508s (-2.5%)4.032s (-1.6%)0.001s (+25.0% 🔺)4.037s (-1.6%)0.529s152.00x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----
💻 LocalNitro⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.959s (+6.2% 🔺)5.146s (+4.9%)0.000s (+400.0% 🔺)5.855s (+6.4% 🔺)1.896s111.00x
▲ VercelNext.js (Turbopack)4.150s (-92.4% 🟢)5.240s (+6.1% 🔺)0.000s (+Infinity% 🔺)5.807s (-89.7% 🟢)1.657s111.05x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress21/21
🐘 PostgresExpress13/21
▲ VercelNitro17/21
Fastest World by Framework

Winner determined by most benchmark wins

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

Worlds:

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

📋 View full workflow run


Some benchmark jobs failed:

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

Check the workflow run for details.

@github-actions

github-actionsBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production844267913
✅ 💻 Local Development8180178996
✅ 📦 Local Production8180178996
✅ 🐘 Local Postgres8180178996
✅ 🪟 Windows750883
❌ 🌍 Community Worlds1305924213
✅ 📋 Other207042249
Total3710616754446

❌ Failed Tests

▲ Vercel Production (2 failed)

nextjs-turbopack (2 failed):

  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMP3ZN0JX4ZHGZDA2JKQX386 | 🔍 observability
🌍 Community Worlds (59 failed)

mongodb (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMP3N85D905YXMZ5EJ87SA0N
  • webhookWorkflow | wrun_01KMP3NH16VE34DN3VAKG8D5J9
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMP3XG613FV6M6SR0EY31X5G

redis (2 failed):

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

turso (54 failed):

  • addTenWorkflow | wrun_01KMP3M2PQWNFJSYZ8CZZD147D
  • addTenWorkflow | wrun_01KMP3M2PQWNFJSYZ8CZZD147D
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KMP3NQGY1V13G5FMKM76Z111
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KMP3M96QNS23ZMSBSZ19RX9D
  • promiseRaceWorkflow | wrun_01KMP3MCEVR5JYNKCDEP212SKW
  • promiseAnyWorkflow | wrun_01KMP3MER50ENQMK1DZC54B5J2
  • importedStepOnlyWorkflow | wrun_01KMP3P3E51J7221QT48Q8Y02H
  • hookWorkflow | wrun_01KMP3MXH1WCBBVA0QDQPWZYK3
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMP3N85D905YXMZ5EJ87SA0N
  • webhookWorkflow | wrun_01KMP3NH16VE34DN3VAKG8D5J9
  • sleepingWorkflow | wrun_01KMP3NQJBECVWABNGMAW4N069
  • parallelSleepWorkflow | wrun_01KMP3P3YCN5RD5NS1CNRS8A2C
  • nullByteWorkflow | wrun_01KMP3P88KHNPFQF09S5K88P7S
  • workflowAndStepMetadataWorkflow | wrun_01KMP3PAEYDSDGFAYRBHPV6FR0
  • fetchWorkflow | wrun_01KMP3SFQMB97MQVT17YZJ184S
  • promiseRaceStressTestWorkflow | wrun_01KMP3SJAT0A768PW6JP1Z5K4J
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KMP3WW5AY965ZVK70DRZC0N4
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMP3XG613FV6M6SR0EY31X5G
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMP3Y46NTSFRFQSFK8JEXCNM
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KMP3YQ2DF1PTS6B6MAAQ3Z4E
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KMP3YZ6QQTF6EKNTB8J42DF6
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KMP3Z4F0BHCBF9AJZAA2KVJA
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KMP3Z6WCJ8EDGDQZ2DS43YSK
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMP3ZN0JX4ZHGZDA2JKQX386
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KMP3ZT85HPBSRP420Y2DAR80
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KMP400X8DMN36VKN2N97A15Y
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KMP4078PZYYGXMA0184A4WNE
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KMP40DGYFBY797DC2JMJ5Q0Z
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KMP40KP7Y7NWPPGKC5JZCFQK
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KMP40T385HCAN8SXA3S2YJ03
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KMP414CQMBZBT6C2R4R0K6ZS
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KMP41BRX5XVN3BKN6QD922FG
  • cancelRun - cancelling a running workflow | wrun_01KMP41HZNYWKH1TTHGMPRWGGS
  • cancelRun via CLI - cancelling a running workflow | wrun_01KMP41TTC5FPX9214EGHNV94S
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KMP4267XGTF4PE1Z7TWH7F9R
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KMP42SMX58BBB9GK092DZYFZ
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KMP4352MY53SSYAH4YFSZD87

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro7607
✅ example7607
✅ express7607
✅ fastify7607
✅ hono7607
❌ nextjs-turbopack7922
✅ nextjs-webpack8102
✅ nitro7607
✅ nuxt7607
✅ sveltekit7607
✅ vite7607
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable69014
✅ express-stable69014
✅ fastify-stable69014
✅ hono-stable69014
✅ nextjs-turbopack-canary58025
✅ nextjs-turbopack-stable7508
✅ nextjs-webpack-canary58025
✅ nextjs-webpack-stable7508
✅ nitro-stable69014
✅ nuxt-stable69014
✅ sveltekit-stable69014
✅ vite-stable69014
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable69014
✅ express-stable69014
✅ fastify-stable69014
✅ hono-stable69014
✅ nextjs-turbopack-canary58025
✅ nextjs-turbopack-stable7508
✅ nextjs-webpack-canary58025
✅ nextjs-webpack-stable7508
✅ nitro-stable69014
✅ nuxt-stable69014
✅ sveltekit-stable69014
✅ vite-stable69014
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable69014
✅ express-stable69014
✅ fastify-stable69014
✅ hono-stable69014
✅ nextjs-turbopack-canary58025
✅ nextjs-turbopack-stable7508
✅ nextjs-webpack-canary58025
✅ nextjs-webpack-stable7508
✅ nitro-stable69014
✅ nuxt-stable69014
✅ sveltekit-stable69014
✅ vite-stable69014
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack7508
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev500
❌ mongodb5538
✅ redis-dev500
❌ redis5628
✅ turso-dev500
❌ turso4548
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable69014
✅ e2e-local-postgres-nest-stable69014
✅ e2e-local-prod-nest-stable69014

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: success
  • Windows: success

Check the workflow run for details.

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

Fixes a race where concurrent workflow invocations could both emit hook_disposed for the same hook, leading to duplicate events and replay corruption. The changes make hook disposal atomic in each World implementation and refine runtime logging for the expected “already disposed” case.

Changes:

  • world-postgres: make hook disposal atomic via DELETE ... RETURNING, throwing EntityConflictError on concurrent duplicate disposal.
  • world-local: add a writeExclusive lock file guard to prevent concurrent duplicate hook_disposed.
  • core: split logging paths for EntityConflictError vs RunExpiredError during hook disposal; add changeset.

Reviewed changes

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

Show a summary per file
FileDescription
packages/world-postgres/src/storage.tsAtomically deletes hooks on hook_disposed and detects concurrent duplicates.
packages/world-local/src/storage/events-storage.tsAdds exclusive lock file for hook disposal to prevent TOCTOU duplicates.
packages/world-local/src/storage.test.tsAdds a concurrency regression test for duplicate hook_disposed.
packages/core/src/runtime/suspension-handler.tsImproves logging differentiation for duplicate disposal vs expired runs.
.changeset/fix-duplicate-hook-disposed-race.mdDeclares patch releases for affected packages.

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

Comment on lines +1972 to +1974
expect((rejected[0] as PromiseRejectedResult).reason).toMatchObject({
name: 'EntityConflictError',
});

CopilotAIMar 25, 2026

Copy link

Choose a reason for hiding this comment

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

This concurrency test can be flaky: disposeHook() may reject with HookNotFoundError (not EntityConflictError) if one disposal deletes the hook file before the other call reaches the hook existence validation in events-storage. Consider broadening the assertion to accept either error, or introduce a barrier so both calls reach the disposal section before one completes.

Suggested change
expect((rejected[0]asPromiseRejectedResult).reason).toMatchObject({
name: 'EntityConflictError',
});
constreason=(rejected[0]asPromiseRejectedResult).reasonas{
name?: string;
};
expect(['EntityConflictError','HookNotFoundError']).toContain(reason.name);

Copilot uses AI. Check for mistakes.

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.

Already addressed in e604643 — the test now accepts both EntityConflictError and HookNotFoundError.

The concurrent hook_disposed race has two possible orderings: the loser
may hit the lock file (EntityConflictError) or find the hook entity
already deleted by the winner (HookNotFoundError). Both are correct.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pranaygp

Copy link
Copy Markdown
ContributorAuthor

failings tests are confirmed flaky from unrelated race conditions and queue timeout issues. merging this and investigating those

@pranaygp
pranaygp merged commit d1391e1 into mainMar 26, 2026
160 of 166 checks passed
@pranaygp
pranaygp deleted the fix/duplicate-hook-disposed-race branch March 26, 2026 22:51
@ghostghost mentioned this pull request Mar 26, 2026
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.

sleep() causes 'Unconsumed event in event log' when called concurrently via Promise.all

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('^' + ".*" + '
Skip to content

Fix race condition allowing duplicate hook_disposed events - #1523

Merged
pranaygp merged 4 commits into
mainfrom
fix/duplicate-hook-disposed-race
Mar 26, 2026
Merged

Fix race condition allowing duplicate hook_disposed events#1523
pranaygp merged 4 commits into
mainfrom
fix/duplicate-hook-disposed-race

Conversation

@pranaygp

Copy link
Copy Markdown
Contributor

Summary

  • Fixes a race condition where concurrent workflow invocations could both post hook_disposed for the same hook, corrupting the event log with duplicate events and causing Unconsumed event in event log: eventType=hook_disposed errors on replay
  • world-local: Adds writeExclusive lock file guard before hook deletion (same pattern as wait_completed from [world-postgres, world-local] Fix TOCTOU races in entity state transitions #1434)
  • world-postgres: Uses DELETE ... RETURNING so only one concurrent caller succeeds — second gets EntityConflictError
  • world-vercel: No client changes needed — server-side fix in vercel/workflow-server#356 returns 409, which is already translated to EntityConflictError by makeRequest
  • suspension-handler: Separates EntityConflictError (hook already disposed) from RunExpiredError (run completed) log messages

Fixes#1266

Test plan

  • Added should reject concurrent hook_disposed for the same hook test (mirrors existing wait_completed race test)
  • Verify all existing tests pass
  • E2E test with parallel tool calls triggering concurrent hook disposal

🤖 Generated with Claude Code

Concurrent workflow invocations could both post hook_disposed for the
same hook, corrupting the event log with duplicate events. This mirrors
the wait_completed race condition fixed in #1057/#1434.
- world-local: Add writeExclusive lock file for hook_disposed (same
pattern as wait_completed and step terminal states)
- world-postgres: Use DELETE ... RETURNING to atomically detect if
another caller already deleted the hook entity
- suspension-handler: Improve log messages to distinguish hook-already-
disposed (EntityConflictError) from run-already-completed (RunExpiredError)
Fixes#1266
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pranaygp
pranaygp requested a review from a team as a code ownerMarch 25, 2026 23:00
CopilotAI review requested due to automatic review settings March 25, 2026 23:00
@vercel

vercelBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
example-nextjs-workflow-turbopackReadyReadyPreview, CommentMar 26, 2026 10:18pm
example-nextjs-workflow-webpackReadyReadyPreview, CommentMar 26, 2026 10:18pm
example-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-astro-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-express-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-fastify-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-hono-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-nitro-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-nuxt-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-sveltekit-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-vite-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workflow-docsReadyReadyPreview, Comment, Open in v0Mar 26, 2026 10:18pm
workflow-swc-playgroundReadyReadyPreview, CommentMar 26, 2026 10:18pm

@changeset-bot

changeset-botBot commented Mar 25, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 960f3b3

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

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

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

@github-actions

github-actionsBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.045s (-4.5%)1.006s (~)0.961s101.00x
🐘 PostgresExpress0.061s (+1.2%)1.011s (~)0.950s101.36x
🐘 PostgresNitro0.070s (-3.2%)1.016s (~)0.946s101.56x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.511s (-8.1% 🟢)2.661s (+12.4% 🔺)2.151s101.00x
▲ VercelNext.js (Turbopack)0.539s (-19.9% 🟢)2.277s (-15.0% 🟢)1.738s101.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.127s (-0.5%)2.006s (~)0.879s101.00x
🐘 PostgresExpress1.142s (~)2.014s (~)0.871s101.01x
🐘 PostgresNitro1.151s (+0.8%)2.012s (~)0.861s101.02x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.053s (-10.5% 🟢)3.848s (-2.3%)1.795s101.00x
▲ VercelNitro2.106s (+2.0%)3.910s (+5.3% 🔺)1.804s101.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro10.848s (~)11.021s (~)0.173s31.00x
🐘 PostgresExpress10.879s (~)11.020s (~)0.141s31.00x
💻 LocalExpress10.920s (~)11.023s (~)0.103s31.01x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.163s (-3.9%)22.341s (+16.9% 🔺)5.178s21.00x
▲ VercelNext.js (Turbopack)18.070s (+4.5%)19.086s (+2.2%)1.016s21.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro14.470s (~)15.020s (~)0.550s41.00x
🐘 PostgresExpress14.536s (~)15.027s (~)0.491s41.00x
💻 LocalExpress14.940s (~)15.028s (~)0.088s41.03x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro33.849s (+6.7% 🔺)35.772s (+8.6% 🔺)1.922s21.00x
▲ VercelNext.js (Turbopack)33.946s (+1.0%)35.584s (+0.5%)1.638s21.00x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express13.879s (~)14.166s (~)0.287s71.00x
🐘 PostgresNitro13.937s (+1.0%)14.166s (+1.0%)0.230s71.00x
💻 LocalExpress16.569s (~)17.030s (~)0.461s61.19x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro58.115s (-5.6% 🟢)60.163s (-5.2% 🟢)2.047s21.00x
▲ VercelNext.js (Turbopack)59.047s (+5.4% 🔺)60.159s (+5.0% 🔺)1.111s21.02x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.260s (~)2.011s (~)0.751s151.00x
🐘 PostgresNitro1.264s (~)2.011s (~)0.746s151.00x
💻 LocalExpress1.505s (+2.0%)2.005s (~)0.500s151.19x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.522s (+6.5% 🔺)4.127s (+6.2% 🔺)1.605s81.00x
▲ VercelNext.js (Turbopack)2.731s (+18.6% 🔺)3.869s (+4.8%)1.138s81.08x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.322s (-0.8%)3.011s (~)0.689s101.00x
🐘 PostgresExpress2.327s (~)3.010s (~)0.683s101.00x
💻 LocalExpress2.954s (-1.4%)3.452s (+3.3%)0.498s91.27x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.612s (+0.6%)4.180s (+8.8% 🔺)1.568s81.00x
▲ VercelNext.js (Turbopack)2.785s (+3.5%)3.832s (~)1.046s81.07x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.452s (-0.5%)4.011s (~)0.559s81.00x
🐘 PostgresNitro3.466s (~)4.013s (~)0.547s81.00x
💻 LocalExpress9.137s (+13.3% 🔺)9.521s (+8.6% 🔺)0.385s42.65x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.333s (+18.3% 🔺)4.743s (+16.9% 🔺)1.410s71.00x
▲ VercelNext.js (Turbopack)4.034s (+18.0% 🔺)5.330s (+5.1% 🔺)1.296s61.21x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.258s (~)2.010s (~)0.752s151.00x
🐘 PostgresNitro1.260s (~)2.010s (~)0.750s151.00x
💻 LocalExpress1.558s (+1.3%)2.006s (~)0.448s151.24x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.311s (+13.2% 🔺)3.862s (+6.2% 🔺)1.551s81.00x
▲ VercelNext.js (Turbopack)2.564s (+9.9% 🔺)3.886s (+8.0% 🔺)1.322s81.11x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.321s (~)3.011s (~)0.690s101.00x
🐘 PostgresNitro2.325s (-0.5%)3.012s (~)0.687s101.00x
💻 LocalExpress3.022s (+0.6%)3.885s (+12.5% 🔺)0.862s81.30x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.405s (+5.1% 🔺)3.890s (+13.1% 🔺)1.485s81.00x
▲ VercelNext.js (Turbopack)2.675s (-7.0% 🟢)4.224s (-1.6%)1.548s81.11x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.448s (~)4.010s (~)0.563s81.00x
🐘 PostgresNitro3.458s (~)4.013s (~)0.555s81.00x
💻 LocalExpress9.102s (+4.1%)9.773s (+8.3% 🔺)0.671s42.64x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.185s (+12.2% 🔺)4.845s (+15.7% 🔺)1.660s71.00x
▲ VercelNext.js (Turbopack)3.332s (-5.1% 🟢)4.572s (-9.6% 🟢)1.239s71.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.789s (-2.4%)1.007s (~)0.217s601.00x
🐘 PostgresNitro0.800s (-2.7%)1.007s (-1.7%)0.207s601.01x
💻 LocalExpress0.996s (+0.6%)1.281s (+10.9% 🔺)0.285s471.26x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro9.752s (-0.6%)11.566s (-1.5%)1.814s61.00x
▲ VercelNext.js (Turbopack)9.815s (-10.1% 🟢)11.637s (-5.6% 🟢)1.822s61.01x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.853s (-1.6%)2.008s (-1.1%)0.155s451.00x
🐘 PostgresNitro1.884s (+0.6%)2.031s (-1.1%)0.147s451.02x
💻 LocalExpress2.996s (~)3.453s (+2.2%)0.456s271.62x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro30.623s (-6.1% 🟢)32.663s (-4.2%)2.040s31.00x
▲ VercelNext.js (Turbopack)32.159s (~)33.570s (~)1.411s31.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.848s (~)4.113s (+1.7%)0.265s301.00x
🐘 PostgresNitro3.896s (+1.5%)4.111s (+2.5%)0.215s301.01x
💻 LocalExpress9.131s (+0.5%)9.864s (+3.2%)0.732s132.37x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro91.712s (-85.6% 🟢)93.952s (-85.3% 🟢)2.241s21.00x
▲ VercelNext.js (Turbopack)99.318s (+16.3% 🔺)100.959s (+15.9% 🔺)1.641s21.08x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.272s (-2.2%)1.009s (~)0.736s601.00x
🐘 PostgresExpress0.276s (+1.4%)1.008s (~)0.731s601.01x
💻 LocalExpress0.613s (+2.1%)1.004s (~)0.392s602.25x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.713s (-4.3%)3.256s (-8.7% 🟢)1.543s191.00x
▲ VercelNext.js (Turbopack)1.841s (-9.2% 🟢)3.533s (-4.9%)1.692s171.07x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.495s (-0.6%)1.008s (~)0.513s901.00x
🐘 PostgresExpress0.531s (+8.0% 🔺)1.010s (~)0.480s901.07x
💻 LocalExpress2.602s (+4.2%)3.008s (~)0.406s305.26x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.933s (+2.8%)4.556s (+5.7% 🔺)1.623s201.00x
▲ VercelNext.js (Turbopack)3.540s (-90.6% 🟢)4.913s (-87.4% 🟢)1.374s191.21x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.765s (-0.9%)1.008s (~)0.243s1201.00x
🐘 PostgresExpress0.980s (+27.8% 🔺)1.488s (+47.6% 🔺)0.507s811.28x
💻 LocalExpress11.309s (+2.5%)11.936s (+2.3%)0.626s1114.79x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro6.151s (-24.5% 🟢)8.076s (-15.6% 🟢)1.925s151.00x
▲ VercelNext.js (Turbopack)6.986s (-10.7% 🟢)8.464s (-11.8% 🟢)1.478s151.14x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.197s (-0.9%)0.994s (~)0.001s (~)1.010s (~)0.813s101.00x
🐘 PostgresNitro0.204s (~)0.997s (~)0.002s (+15.4% 🔺)1.013s (~)0.809s101.04x
💻 LocalExpress0.206s (-1.1%)1.003s (~)0.011s (-2.6%)1.017s (~)0.811s101.05x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----
💻 LocalNitro⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.613s (~)2.974s (+16.9% 🔺)0.194s (-65.9% 🟢)3.715s (~)2.103s101.00x
▲ VercelNitro1.728s (+10.4% 🔺)2.793s (+7.8% 🔺)0.389s (-26.1% 🟢)3.897s (+7.1% 🔺)2.168s101.07x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.600s (+1.8%)1.002s (~)0.004s (-0.8%)1.024s (~)0.423s591.00x
🐘 PostgresExpress0.607s (+1.9%)1.002s (~)0.004s (~)1.024s (~)0.417s591.01x
💻 LocalExpress0.737s (+1.5%)1.009s (~)0.010s (+2.1%)1.024s (~)0.287s591.23x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----
💻 LocalNitro⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.382s (-1.6%)5.429s (-2.5%)0.207s (-20.5% 🟢)6.188s (-9.6% 🟢)1.806s101.00x
▲ VercelNitro4.477s (+4.5%)5.760s (+5.7% 🔺)0.233s (+4.2%)6.658s (+4.5%)2.181s101.02x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.941s (-2.4%)1.104s (-11.0% 🟢)0.000s (-41.8% 🟢)1.118s (-11.3% 🟢)0.177s551.00x
🐘 PostgresExpress0.998s (+6.4% 🔺)1.387s (+11.8% 🔺)0.000s (-44.2% 🟢)1.405s (+11.6% 🔺)0.407s431.06x
💻 LocalExpress1.254s (~)2.021s (~)0.000s (+9.1% 🔺)2.024s (~)0.770s301.33x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----
💻 LocalNitro⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.195s (+8.3% 🔺)4.109s (~)0.000s (NaN%)4.738s (+1.3%)1.543s131.00x
▲ VercelNitro3.488s (+19.1% 🔺)4.339s (+18.0% 🔺)0.000s (+16.7% 🔺)5.064s (+14.9% 🔺)1.576s121.09x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.758s (+2.7%)2.134s (+1.6%)0.000s (~)2.154s (+1.8%)0.396s291.00x
🐘 PostgresNitro1.809s (+4.3%)2.175s (~)0.000s (-65.5% 🟢)2.189s (~)0.379s281.03x
💻 LocalExpress3.508s (-2.5%)4.032s (-1.6%)0.001s (+25.0% 🔺)4.037s (-1.6%)0.529s152.00x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----
💻 LocalNitro⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.959s (+6.2% 🔺)5.146s (+4.9%)0.000s (+400.0% 🔺)5.855s (+6.4% 🔺)1.896s111.00x
▲ VercelNext.js (Turbopack)4.150s (-92.4% 🟢)5.240s (+6.1% 🔺)0.000s (+Infinity% 🔺)5.807s (-89.7% 🟢)1.657s111.05x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress21/21
🐘 PostgresExpress13/21
▲ VercelNitro17/21
Fastest World by Framework

Winner determined by most benchmark wins

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

Worlds:

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

📋 View full workflow run


Some benchmark jobs failed:

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

Check the workflow run for details.

@github-actions

github-actionsBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production844267913
✅ 💻 Local Development8180178996
✅ 📦 Local Production8180178996
✅ 🐘 Local Postgres8180178996
✅ 🪟 Windows750883
❌ 🌍 Community Worlds1305924213
✅ 📋 Other207042249
Total3710616754446

❌ Failed Tests

▲ Vercel Production (2 failed)

nextjs-turbopack (2 failed):

  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMP3ZN0JX4ZHGZDA2JKQX386 | 🔍 observability
🌍 Community Worlds (59 failed)

mongodb (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMP3N85D905YXMZ5EJ87SA0N
  • webhookWorkflow | wrun_01KMP3NH16VE34DN3VAKG8D5J9
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMP3XG613FV6M6SR0EY31X5G

redis (2 failed):

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

turso (54 failed):

  • addTenWorkflow | wrun_01KMP3M2PQWNFJSYZ8CZZD147D
  • addTenWorkflow | wrun_01KMP3M2PQWNFJSYZ8CZZD147D
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KMP3NQGY1V13G5FMKM76Z111
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KMP3M96QNS23ZMSBSZ19RX9D
  • promiseRaceWorkflow | wrun_01KMP3MCEVR5JYNKCDEP212SKW
  • promiseAnyWorkflow | wrun_01KMP3MER50ENQMK1DZC54B5J2
  • importedStepOnlyWorkflow | wrun_01KMP3P3E51J7221QT48Q8Y02H
  • hookWorkflow | wrun_01KMP3MXH1WCBBVA0QDQPWZYK3
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMP3N85D905YXMZ5EJ87SA0N
  • webhookWorkflow | wrun_01KMP3NH16VE34DN3VAKG8D5J9
  • sleepingWorkflow | wrun_01KMP3NQJBECVWABNGMAW4N069
  • parallelSleepWorkflow | wrun_01KMP3P3YCN5RD5NS1CNRS8A2C
  • nullByteWorkflow | wrun_01KMP3P88KHNPFQF09S5K88P7S
  • workflowAndStepMetadataWorkflow | wrun_01KMP3PAEYDSDGFAYRBHPV6FR0
  • fetchWorkflow | wrun_01KMP3SFQMB97MQVT17YZJ184S
  • promiseRaceStressTestWorkflow | wrun_01KMP3SJAT0A768PW6JP1Z5K4J
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KMP3WW5AY965ZVK70DRZC0N4
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMP3XG613FV6M6SR0EY31X5G
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMP3Y46NTSFRFQSFK8JEXCNM
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KMP3YQ2DF1PTS6B6MAAQ3Z4E
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KMP3YZ6QQTF6EKNTB8J42DF6
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KMP3Z4F0BHCBF9AJZAA2KVJA
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KMP3Z6WCJ8EDGDQZ2DS43YSK
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMP3ZN0JX4ZHGZDA2JKQX386
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KMP3ZT85HPBSRP420Y2DAR80
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KMP400X8DMN36VKN2N97A15Y
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KMP4078PZYYGXMA0184A4WNE
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KMP40DGYFBY797DC2JMJ5Q0Z
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KMP40KP7Y7NWPPGKC5JZCFQK
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KMP40T385HCAN8SXA3S2YJ03
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KMP414CQMBZBT6C2R4R0K6ZS
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KMP41BRX5XVN3BKN6QD922FG
  • cancelRun - cancelling a running workflow | wrun_01KMP41HZNYWKH1TTHGMPRWGGS
  • cancelRun via CLI - cancelling a running workflow | wrun_01KMP41TTC5FPX9214EGHNV94S
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KMP4267XGTF4PE1Z7TWH7F9R
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KMP42SMX58BBB9GK092DZYFZ
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KMP4352MY53SSYAH4YFSZD87

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro7607
✅ example7607
✅ express7607
✅ fastify7607
✅ hono7607
❌ nextjs-turbopack7922
✅ nextjs-webpack8102
✅ nitro7607
✅ nuxt7607
✅ sveltekit7607
✅ vite7607
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable69014
✅ express-stable69014
✅ fastify-stable69014
✅ hono-stable69014
✅ nextjs-turbopack-canary58025
✅ nextjs-turbopack-stable7508
✅ nextjs-webpack-canary58025
✅ nextjs-webpack-stable7508
✅ nitro-stable69014
✅ nuxt-stable69014
✅ sveltekit-stable69014
✅ vite-stable69014
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable69014
✅ express-stable69014
✅ fastify-stable69014
✅ hono-stable69014
✅ nextjs-turbopack-canary58025
✅ nextjs-turbopack-stable7508
✅ nextjs-webpack-canary58025
✅ nextjs-webpack-stable7508
✅ nitro-stable69014
✅ nuxt-stable69014
✅ sveltekit-stable69014
✅ vite-stable69014
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable69014
✅ express-stable69014
✅ fastify-stable69014
✅ hono-stable69014
✅ nextjs-turbopack-canary58025
✅ nextjs-turbopack-stable7508
✅ nextjs-webpack-canary58025
✅ nextjs-webpack-stable7508
✅ nitro-stable69014
✅ nuxt-stable69014
✅ sveltekit-stable69014
✅ vite-stable69014
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack7508
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev500
❌ mongodb5538
✅ redis-dev500
❌ redis5628
✅ turso-dev500
❌ turso4548
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable69014
✅ e2e-local-postgres-nest-stable69014
✅ e2e-local-prod-nest-stable69014

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: success
  • Windows: success

Check the workflow run for details.

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

Fixes a race where concurrent workflow invocations could both emit hook_disposed for the same hook, leading to duplicate events and replay corruption. The changes make hook disposal atomic in each World implementation and refine runtime logging for the expected “already disposed” case.

Changes:

  • world-postgres: make hook disposal atomic via DELETE ... RETURNING, throwing EntityConflictError on concurrent duplicate disposal.
  • world-local: add a writeExclusive lock file guard to prevent concurrent duplicate hook_disposed.
  • core: split logging paths for EntityConflictError vs RunExpiredError during hook disposal; add changeset.

Reviewed changes

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

Show a summary per file
FileDescription
packages/world-postgres/src/storage.tsAtomically deletes hooks on hook_disposed and detects concurrent duplicates.
packages/world-local/src/storage/events-storage.tsAdds exclusive lock file for hook disposal to prevent TOCTOU duplicates.
packages/world-local/src/storage.test.tsAdds a concurrency regression test for duplicate hook_disposed.
packages/core/src/runtime/suspension-handler.tsImproves logging differentiation for duplicate disposal vs expired runs.
.changeset/fix-duplicate-hook-disposed-race.mdDeclares patch releases for affected packages.

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

Comment on lines +1972 to +1974
expect((rejected[0] as PromiseRejectedResult).reason).toMatchObject({
name: 'EntityConflictError',
});

CopilotAIMar 25, 2026

Copy link

Choose a reason for hiding this comment

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

This concurrency test can be flaky: disposeHook() may reject with HookNotFoundError (not EntityConflictError) if one disposal deletes the hook file before the other call reaches the hook existence validation in events-storage. Consider broadening the assertion to accept either error, or introduce a barrier so both calls reach the disposal section before one completes.

Suggested change
expect((rejected[0]asPromiseRejectedResult).reason).toMatchObject({
name: 'EntityConflictError',
});
constreason=(rejected[0]asPromiseRejectedResult).reasonas{
name?: string;
};
expect(['EntityConflictError','HookNotFoundError']).toContain(reason.name);

Copilot uses AI. Check for mistakes.

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.

Already addressed in e604643 — the test now accepts both EntityConflictError and HookNotFoundError.

The concurrent hook_disposed race has two possible orderings: the loser
may hit the lock file (EntityConflictError) or find the hook entity
already deleted by the winner (HookNotFoundError). Both are correct.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pranaygp

Copy link
Copy Markdown
ContributorAuthor

failings tests are confirmed flaky from unrelated race conditions and queue timeout issues. merging this and investigating those

@pranaygp
pranaygp merged commit d1391e1 into mainMar 26, 2026
160 of 166 checks passed
@pranaygp
pranaygp deleted the fix/duplicate-hook-disposed-race branch March 26, 2026 22:51
@ghostghost mentioned this pull request Mar 26, 2026
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.

sleep() causes 'Unconsumed event in event log' when called concurrently via Promise.all

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" + '
Skip to content

Fix race condition allowing duplicate hook_disposed events - #1523

Merged
pranaygp merged 4 commits into
mainfrom
fix/duplicate-hook-disposed-race
Mar 26, 2026
Merged

Fix race condition allowing duplicate hook_disposed events#1523
pranaygp merged 4 commits into
mainfrom
fix/duplicate-hook-disposed-race

Conversation

@pranaygp

Copy link
Copy Markdown
Contributor

Summary

  • Fixes a race condition where concurrent workflow invocations could both post hook_disposed for the same hook, corrupting the event log with duplicate events and causing Unconsumed event in event log: eventType=hook_disposed errors on replay
  • world-local: Adds writeExclusive lock file guard before hook deletion (same pattern as wait_completed from [world-postgres, world-local] Fix TOCTOU races in entity state transitions #1434)
  • world-postgres: Uses DELETE ... RETURNING so only one concurrent caller succeeds — second gets EntityConflictError
  • world-vercel: No client changes needed — server-side fix in vercel/workflow-server#356 returns 409, which is already translated to EntityConflictError by makeRequest
  • suspension-handler: Separates EntityConflictError (hook already disposed) from RunExpiredError (run completed) log messages

Fixes#1266

Test plan

  • Added should reject concurrent hook_disposed for the same hook test (mirrors existing wait_completed race test)
  • Verify all existing tests pass
  • E2E test with parallel tool calls triggering concurrent hook disposal

🤖 Generated with Claude Code

Concurrent workflow invocations could both post hook_disposed for the
same hook, corrupting the event log with duplicate events. This mirrors
the wait_completed race condition fixed in #1057/#1434.
- world-local: Add writeExclusive lock file for hook_disposed (same
pattern as wait_completed and step terminal states)
- world-postgres: Use DELETE ... RETURNING to atomically detect if
another caller already deleted the hook entity
- suspension-handler: Improve log messages to distinguish hook-already-
disposed (EntityConflictError) from run-already-completed (RunExpiredError)
Fixes#1266
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pranaygp
pranaygp requested a review from a team as a code ownerMarch 25, 2026 23:00
CopilotAI review requested due to automatic review settings March 25, 2026 23:00
@vercel

vercelBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
example-nextjs-workflow-turbopackReadyReadyPreview, CommentMar 26, 2026 10:18pm
example-nextjs-workflow-webpackReadyReadyPreview, CommentMar 26, 2026 10:18pm
example-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-astro-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-express-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-fastify-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-hono-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-nitro-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-nuxt-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-sveltekit-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-vite-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workflow-docsReadyReadyPreview, Comment, Open in v0Mar 26, 2026 10:18pm
workflow-swc-playgroundReadyReadyPreview, CommentMar 26, 2026 10:18pm

@changeset-bot

changeset-botBot commented Mar 25, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 960f3b3

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

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

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

@github-actions

github-actionsBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.045s (-4.5%)1.006s (~)0.961s101.00x
🐘 PostgresExpress0.061s (+1.2%)1.011s (~)0.950s101.36x
🐘 PostgresNitro0.070s (-3.2%)1.016s (~)0.946s101.56x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.511s (-8.1% 🟢)2.661s (+12.4% 🔺)2.151s101.00x
▲ VercelNext.js (Turbopack)0.539s (-19.9% 🟢)2.277s (-15.0% 🟢)1.738s101.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.127s (-0.5%)2.006s (~)0.879s101.00x
🐘 PostgresExpress1.142s (~)2.014s (~)0.871s101.01x
🐘 PostgresNitro1.151s (+0.8%)2.012s (~)0.861s101.02x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.053s (-10.5% 🟢)3.848s (-2.3%)1.795s101.00x
▲ VercelNitro2.106s (+2.0%)3.910s (+5.3% 🔺)1.804s101.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro10.848s (~)11.021s (~)0.173s31.00x
🐘 PostgresExpress10.879s (~)11.020s (~)0.141s31.00x
💻 LocalExpress10.920s (~)11.023s (~)0.103s31.01x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.163s (-3.9%)22.341s (+16.9% 🔺)5.178s21.00x
▲ VercelNext.js (Turbopack)18.070s (+4.5%)19.086s (+2.2%)1.016s21.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro14.470s (~)15.020s (~)0.550s41.00x
🐘 PostgresExpress14.536s (~)15.027s (~)0.491s41.00x
💻 LocalExpress14.940s (~)15.028s (~)0.088s41.03x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro33.849s (+6.7% 🔺)35.772s (+8.6% 🔺)1.922s21.00x
▲ VercelNext.js (Turbopack)33.946s (+1.0%)35.584s (+0.5%)1.638s21.00x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express13.879s (~)14.166s (~)0.287s71.00x
🐘 PostgresNitro13.937s (+1.0%)14.166s (+1.0%)0.230s71.00x
💻 LocalExpress16.569s (~)17.030s (~)0.461s61.19x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro58.115s (-5.6% 🟢)60.163s (-5.2% 🟢)2.047s21.00x
▲ VercelNext.js (Turbopack)59.047s (+5.4% 🔺)60.159s (+5.0% 🔺)1.111s21.02x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.260s (~)2.011s (~)0.751s151.00x
🐘 PostgresNitro1.264s (~)2.011s (~)0.746s151.00x
💻 LocalExpress1.505s (+2.0%)2.005s (~)0.500s151.19x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.522s (+6.5% 🔺)4.127s (+6.2% 🔺)1.605s81.00x
▲ VercelNext.js (Turbopack)2.731s (+18.6% 🔺)3.869s (+4.8%)1.138s81.08x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.322s (-0.8%)3.011s (~)0.689s101.00x
🐘 PostgresExpress2.327s (~)3.010s (~)0.683s101.00x
💻 LocalExpress2.954s (-1.4%)3.452s (+3.3%)0.498s91.27x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.612s (+0.6%)4.180s (+8.8% 🔺)1.568s81.00x
▲ VercelNext.js (Turbopack)2.785s (+3.5%)3.832s (~)1.046s81.07x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.452s (-0.5%)4.011s (~)0.559s81.00x
🐘 PostgresNitro3.466s (~)4.013s (~)0.547s81.00x
💻 LocalExpress9.137s (+13.3% 🔺)9.521s (+8.6% 🔺)0.385s42.65x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.333s (+18.3% 🔺)4.743s (+16.9% 🔺)1.410s71.00x
▲ VercelNext.js (Turbopack)4.034s (+18.0% 🔺)5.330s (+5.1% 🔺)1.296s61.21x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.258s (~)2.010s (~)0.752s151.00x
🐘 PostgresNitro1.260s (~)2.010s (~)0.750s151.00x
💻 LocalExpress1.558s (+1.3%)2.006s (~)0.448s151.24x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.311s (+13.2% 🔺)3.862s (+6.2% 🔺)1.551s81.00x
▲ VercelNext.js (Turbopack)2.564s (+9.9% 🔺)3.886s (+8.0% 🔺)1.322s81.11x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.321s (~)3.011s (~)0.690s101.00x
🐘 PostgresNitro2.325s (-0.5%)3.012s (~)0.687s101.00x
💻 LocalExpress3.022s (+0.6%)3.885s (+12.5% 🔺)0.862s81.30x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.405s (+5.1% 🔺)3.890s (+13.1% 🔺)1.485s81.00x
▲ VercelNext.js (Turbopack)2.675s (-7.0% 🟢)4.224s (-1.6%)1.548s81.11x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.448s (~)4.010s (~)0.563s81.00x
🐘 PostgresNitro3.458s (~)4.013s (~)0.555s81.00x
💻 LocalExpress9.102s (+4.1%)9.773s (+8.3% 🔺)0.671s42.64x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.185s (+12.2% 🔺)4.845s (+15.7% 🔺)1.660s71.00x
▲ VercelNext.js (Turbopack)3.332s (-5.1% 🟢)4.572s (-9.6% 🟢)1.239s71.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.789s (-2.4%)1.007s (~)0.217s601.00x
🐘 PostgresNitro0.800s (-2.7%)1.007s (-1.7%)0.207s601.01x
💻 LocalExpress0.996s (+0.6%)1.281s (+10.9% 🔺)0.285s471.26x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro9.752s (-0.6%)11.566s (-1.5%)1.814s61.00x
▲ VercelNext.js (Turbopack)9.815s (-10.1% 🟢)11.637s (-5.6% 🟢)1.822s61.01x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.853s (-1.6%)2.008s (-1.1%)0.155s451.00x
🐘 PostgresNitro1.884s (+0.6%)2.031s (-1.1%)0.147s451.02x
💻 LocalExpress2.996s (~)3.453s (+2.2%)0.456s271.62x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro30.623s (-6.1% 🟢)32.663s (-4.2%)2.040s31.00x
▲ VercelNext.js (Turbopack)32.159s (~)33.570s (~)1.411s31.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.848s (~)4.113s (+1.7%)0.265s301.00x
🐘 PostgresNitro3.896s (+1.5%)4.111s (+2.5%)0.215s301.01x
💻 LocalExpress9.131s (+0.5%)9.864s (+3.2%)0.732s132.37x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro91.712s (-85.6% 🟢)93.952s (-85.3% 🟢)2.241s21.00x
▲ VercelNext.js (Turbopack)99.318s (+16.3% 🔺)100.959s (+15.9% 🔺)1.641s21.08x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.272s (-2.2%)1.009s (~)0.736s601.00x
🐘 PostgresExpress0.276s (+1.4%)1.008s (~)0.731s601.01x
💻 LocalExpress0.613s (+2.1%)1.004s (~)0.392s602.25x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.713s (-4.3%)3.256s (-8.7% 🟢)1.543s191.00x
▲ VercelNext.js (Turbopack)1.841s (-9.2% 🟢)3.533s (-4.9%)1.692s171.07x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.495s (-0.6%)1.008s (~)0.513s901.00x
🐘 PostgresExpress0.531s (+8.0% 🔺)1.010s (~)0.480s901.07x
💻 LocalExpress2.602s (+4.2%)3.008s (~)0.406s305.26x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.933s (+2.8%)4.556s (+5.7% 🔺)1.623s201.00x
▲ VercelNext.js (Turbopack)3.540s (-90.6% 🟢)4.913s (-87.4% 🟢)1.374s191.21x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.765s (-0.9%)1.008s (~)0.243s1201.00x
🐘 PostgresExpress0.980s (+27.8% 🔺)1.488s (+47.6% 🔺)0.507s811.28x
💻 LocalExpress11.309s (+2.5%)11.936s (+2.3%)0.626s1114.79x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro6.151s (-24.5% 🟢)8.076s (-15.6% 🟢)1.925s151.00x
▲ VercelNext.js (Turbopack)6.986s (-10.7% 🟢)8.464s (-11.8% 🟢)1.478s151.14x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.197s (-0.9%)0.994s (~)0.001s (~)1.010s (~)0.813s101.00x
🐘 PostgresNitro0.204s (~)0.997s (~)0.002s (+15.4% 🔺)1.013s (~)0.809s101.04x
💻 LocalExpress0.206s (-1.1%)1.003s (~)0.011s (-2.6%)1.017s (~)0.811s101.05x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----
💻 LocalNitro⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.613s (~)2.974s (+16.9% 🔺)0.194s (-65.9% 🟢)3.715s (~)2.103s101.00x
▲ VercelNitro1.728s (+10.4% 🔺)2.793s (+7.8% 🔺)0.389s (-26.1% 🟢)3.897s (+7.1% 🔺)2.168s101.07x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.600s (+1.8%)1.002s (~)0.004s (-0.8%)1.024s (~)0.423s591.00x
🐘 PostgresExpress0.607s (+1.9%)1.002s (~)0.004s (~)1.024s (~)0.417s591.01x
💻 LocalExpress0.737s (+1.5%)1.009s (~)0.010s (+2.1%)1.024s (~)0.287s591.23x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----
💻 LocalNitro⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.382s (-1.6%)5.429s (-2.5%)0.207s (-20.5% 🟢)6.188s (-9.6% 🟢)1.806s101.00x
▲ VercelNitro4.477s (+4.5%)5.760s (+5.7% 🔺)0.233s (+4.2%)6.658s (+4.5%)2.181s101.02x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.941s (-2.4%)1.104s (-11.0% 🟢)0.000s (-41.8% 🟢)1.118s (-11.3% 🟢)0.177s551.00x
🐘 PostgresExpress0.998s (+6.4% 🔺)1.387s (+11.8% 🔺)0.000s (-44.2% 🟢)1.405s (+11.6% 🔺)0.407s431.06x
💻 LocalExpress1.254s (~)2.021s (~)0.000s (+9.1% 🔺)2.024s (~)0.770s301.33x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----
💻 LocalNitro⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.195s (+8.3% 🔺)4.109s (~)0.000s (NaN%)4.738s (+1.3%)1.543s131.00x
▲ VercelNitro3.488s (+19.1% 🔺)4.339s (+18.0% 🔺)0.000s (+16.7% 🔺)5.064s (+14.9% 🔺)1.576s121.09x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.758s (+2.7%)2.134s (+1.6%)0.000s (~)2.154s (+1.8%)0.396s291.00x
🐘 PostgresNitro1.809s (+4.3%)2.175s (~)0.000s (-65.5% 🟢)2.189s (~)0.379s281.03x
💻 LocalExpress3.508s (-2.5%)4.032s (-1.6%)0.001s (+25.0% 🔺)4.037s (-1.6%)0.529s152.00x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----
💻 LocalNitro⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.959s (+6.2% 🔺)5.146s (+4.9%)0.000s (+400.0% 🔺)5.855s (+6.4% 🔺)1.896s111.00x
▲ VercelNext.js (Turbopack)4.150s (-92.4% 🟢)5.240s (+6.1% 🔺)0.000s (+Infinity% 🔺)5.807s (-89.7% 🟢)1.657s111.05x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress21/21
🐘 PostgresExpress13/21
▲ VercelNitro17/21
Fastest World by Framework

Winner determined by most benchmark wins

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

Worlds:

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

📋 View full workflow run


Some benchmark jobs failed:

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

Check the workflow run for details.

@github-actions

github-actionsBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production844267913
✅ 💻 Local Development8180178996
✅ 📦 Local Production8180178996
✅ 🐘 Local Postgres8180178996
✅ 🪟 Windows750883
❌ 🌍 Community Worlds1305924213
✅ 📋 Other207042249
Total3710616754446

❌ Failed Tests

▲ Vercel Production (2 failed)

nextjs-turbopack (2 failed):

  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMP3ZN0JX4ZHGZDA2JKQX386 | 🔍 observability
🌍 Community Worlds (59 failed)

mongodb (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMP3N85D905YXMZ5EJ87SA0N
  • webhookWorkflow | wrun_01KMP3NH16VE34DN3VAKG8D5J9
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMP3XG613FV6M6SR0EY31X5G

redis (2 failed):

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

turso (54 failed):

  • addTenWorkflow | wrun_01KMP3M2PQWNFJSYZ8CZZD147D
  • addTenWorkflow | wrun_01KMP3M2PQWNFJSYZ8CZZD147D
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KMP3NQGY1V13G5FMKM76Z111
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KMP3M96QNS23ZMSBSZ19RX9D
  • promiseRaceWorkflow | wrun_01KMP3MCEVR5JYNKCDEP212SKW
  • promiseAnyWorkflow | wrun_01KMP3MER50ENQMK1DZC54B5J2
  • importedStepOnlyWorkflow | wrun_01KMP3P3E51J7221QT48Q8Y02H
  • hookWorkflow | wrun_01KMP3MXH1WCBBVA0QDQPWZYK3
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMP3N85D905YXMZ5EJ87SA0N
  • webhookWorkflow | wrun_01KMP3NH16VE34DN3VAKG8D5J9
  • sleepingWorkflow | wrun_01KMP3NQJBECVWABNGMAW4N069
  • parallelSleepWorkflow | wrun_01KMP3P3YCN5RD5NS1CNRS8A2C
  • nullByteWorkflow | wrun_01KMP3P88KHNPFQF09S5K88P7S
  • workflowAndStepMetadataWorkflow | wrun_01KMP3PAEYDSDGFAYRBHPV6FR0
  • fetchWorkflow | wrun_01KMP3SFQMB97MQVT17YZJ184S
  • promiseRaceStressTestWorkflow | wrun_01KMP3SJAT0A768PW6JP1Z5K4J
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KMP3WW5AY965ZVK70DRZC0N4
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMP3XG613FV6M6SR0EY31X5G
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMP3Y46NTSFRFQSFK8JEXCNM
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KMP3YQ2DF1PTS6B6MAAQ3Z4E
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KMP3YZ6QQTF6EKNTB8J42DF6
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KMP3Z4F0BHCBF9AJZAA2KVJA
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KMP3Z6WCJ8EDGDQZ2DS43YSK
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMP3ZN0JX4ZHGZDA2JKQX386
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KMP3ZT85HPBSRP420Y2DAR80
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KMP400X8DMN36VKN2N97A15Y
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KMP4078PZYYGXMA0184A4WNE
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KMP40DGYFBY797DC2JMJ5Q0Z
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KMP40KP7Y7NWPPGKC5JZCFQK
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KMP40T385HCAN8SXA3S2YJ03
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KMP414CQMBZBT6C2R4R0K6ZS
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KMP41BRX5XVN3BKN6QD922FG
  • cancelRun - cancelling a running workflow | wrun_01KMP41HZNYWKH1TTHGMPRWGGS
  • cancelRun via CLI - cancelling a running workflow | wrun_01KMP41TTC5FPX9214EGHNV94S
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KMP4267XGTF4PE1Z7TWH7F9R
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KMP42SMX58BBB9GK092DZYFZ
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KMP4352MY53SSYAH4YFSZD87

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro7607
✅ example7607
✅ express7607
✅ fastify7607
✅ hono7607
❌ nextjs-turbopack7922
✅ nextjs-webpack8102
✅ nitro7607
✅ nuxt7607
✅ sveltekit7607
✅ vite7607
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable69014
✅ express-stable69014
✅ fastify-stable69014
✅ hono-stable69014
✅ nextjs-turbopack-canary58025
✅ nextjs-turbopack-stable7508
✅ nextjs-webpack-canary58025
✅ nextjs-webpack-stable7508
✅ nitro-stable69014
✅ nuxt-stable69014
✅ sveltekit-stable69014
✅ vite-stable69014
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable69014
✅ express-stable69014
✅ fastify-stable69014
✅ hono-stable69014
✅ nextjs-turbopack-canary58025
✅ nextjs-turbopack-stable7508
✅ nextjs-webpack-canary58025
✅ nextjs-webpack-stable7508
✅ nitro-stable69014
✅ nuxt-stable69014
✅ sveltekit-stable69014
✅ vite-stable69014
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable69014
✅ express-stable69014
✅ fastify-stable69014
✅ hono-stable69014
✅ nextjs-turbopack-canary58025
✅ nextjs-turbopack-stable7508
✅ nextjs-webpack-canary58025
✅ nextjs-webpack-stable7508
✅ nitro-stable69014
✅ nuxt-stable69014
✅ sveltekit-stable69014
✅ vite-stable69014
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack7508
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev500
❌ mongodb5538
✅ redis-dev500
❌ redis5628
✅ turso-dev500
❌ turso4548
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable69014
✅ e2e-local-postgres-nest-stable69014
✅ e2e-local-prod-nest-stable69014

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: success
  • Windows: success

Check the workflow run for details.

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

Fixes a race where concurrent workflow invocations could both emit hook_disposed for the same hook, leading to duplicate events and replay corruption. The changes make hook disposal atomic in each World implementation and refine runtime logging for the expected “already disposed” case.

Changes:

  • world-postgres: make hook disposal atomic via DELETE ... RETURNING, throwing EntityConflictError on concurrent duplicate disposal.
  • world-local: add a writeExclusive lock file guard to prevent concurrent duplicate hook_disposed.
  • core: split logging paths for EntityConflictError vs RunExpiredError during hook disposal; add changeset.

Reviewed changes

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

Show a summary per file
FileDescription
packages/world-postgres/src/storage.tsAtomically deletes hooks on hook_disposed and detects concurrent duplicates.
packages/world-local/src/storage/events-storage.tsAdds exclusive lock file for hook disposal to prevent TOCTOU duplicates.
packages/world-local/src/storage.test.tsAdds a concurrency regression test for duplicate hook_disposed.
packages/core/src/runtime/suspension-handler.tsImproves logging differentiation for duplicate disposal vs expired runs.
.changeset/fix-duplicate-hook-disposed-race.mdDeclares patch releases for affected packages.

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

Comment on lines +1972 to +1974
expect((rejected[0] as PromiseRejectedResult).reason).toMatchObject({
name: 'EntityConflictError',
});

CopilotAIMar 25, 2026

Copy link

Choose a reason for hiding this comment

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

This concurrency test can be flaky: disposeHook() may reject with HookNotFoundError (not EntityConflictError) if one disposal deletes the hook file before the other call reaches the hook existence validation in events-storage. Consider broadening the assertion to accept either error, or introduce a barrier so both calls reach the disposal section before one completes.

Suggested change
expect((rejected[0]asPromiseRejectedResult).reason).toMatchObject({
name: 'EntityConflictError',
});
constreason=(rejected[0]asPromiseRejectedResult).reasonas{
name?: string;
};
expect(['EntityConflictError','HookNotFoundError']).toContain(reason.name);

Copilot uses AI. Check for mistakes.

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.

Already addressed in e604643 — the test now accepts both EntityConflictError and HookNotFoundError.

The concurrent hook_disposed race has two possible orderings: the loser
may hit the lock file (EntityConflictError) or find the hook entity
already deleted by the winner (HookNotFoundError). Both are correct.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pranaygp

Copy link
Copy Markdown
ContributorAuthor

failings tests are confirmed flaky from unrelated race conditions and queue timeout issues. merging this and investigating those

@pranaygp
pranaygp merged commit d1391e1 into mainMar 26, 2026
160 of 166 checks passed
@pranaygp
pranaygp deleted the fix/duplicate-hook-disposed-race branch March 26, 2026 22:51
@ghostghost mentioned this pull request Mar 26, 2026
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.

sleep() causes 'Unconsumed event in event log' when called concurrently via Promise.all

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('^' + ".*" + '
Skip to content

Fix race condition allowing duplicate hook_disposed events - #1523

Merged
pranaygp merged 4 commits into
mainfrom
fix/duplicate-hook-disposed-race
Mar 26, 2026
Merged

Fix race condition allowing duplicate hook_disposed events#1523
pranaygp merged 4 commits into
mainfrom
fix/duplicate-hook-disposed-race

Conversation

@pranaygp

Copy link
Copy Markdown
Contributor

Summary

  • Fixes a race condition where concurrent workflow invocations could both post hook_disposed for the same hook, corrupting the event log with duplicate events and causing Unconsumed event in event log: eventType=hook_disposed errors on replay
  • world-local: Adds writeExclusive lock file guard before hook deletion (same pattern as wait_completed from [world-postgres, world-local] Fix TOCTOU races in entity state transitions #1434)
  • world-postgres: Uses DELETE ... RETURNING so only one concurrent caller succeeds — second gets EntityConflictError
  • world-vercel: No client changes needed — server-side fix in vercel/workflow-server#356 returns 409, which is already translated to EntityConflictError by makeRequest
  • suspension-handler: Separates EntityConflictError (hook already disposed) from RunExpiredError (run completed) log messages

Fixes#1266

Test plan

  • Added should reject concurrent hook_disposed for the same hook test (mirrors existing wait_completed race test)
  • Verify all existing tests pass
  • E2E test with parallel tool calls triggering concurrent hook disposal

🤖 Generated with Claude Code

Concurrent workflow invocations could both post hook_disposed for the
same hook, corrupting the event log with duplicate events. This mirrors
the wait_completed race condition fixed in #1057/#1434.
- world-local: Add writeExclusive lock file for hook_disposed (same
pattern as wait_completed and step terminal states)
- world-postgres: Use DELETE ... RETURNING to atomically detect if
another caller already deleted the hook entity
- suspension-handler: Improve log messages to distinguish hook-already-
disposed (EntityConflictError) from run-already-completed (RunExpiredError)
Fixes#1266
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pranaygp
pranaygp requested a review from a team as a code ownerMarch 25, 2026 23:00
CopilotAI review requested due to automatic review settings March 25, 2026 23:00
@vercel

vercelBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
example-nextjs-workflow-turbopackReadyReadyPreview, CommentMar 26, 2026 10:18pm
example-nextjs-workflow-webpackReadyReadyPreview, CommentMar 26, 2026 10:18pm
example-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-astro-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-express-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-fastify-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-hono-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-nitro-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-nuxt-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-sveltekit-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-vite-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workflow-docsReadyReadyPreview, Comment, Open in v0Mar 26, 2026 10:18pm
workflow-swc-playgroundReadyReadyPreview, CommentMar 26, 2026 10:18pm

@changeset-bot

changeset-botBot commented Mar 25, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 960f3b3

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

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

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

@github-actions

github-actionsBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.045s (-4.5%)1.006s (~)0.961s101.00x
🐘 PostgresExpress0.061s (+1.2%)1.011s (~)0.950s101.36x
🐘 PostgresNitro0.070s (-3.2%)1.016s (~)0.946s101.56x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.511s (-8.1% 🟢)2.661s (+12.4% 🔺)2.151s101.00x
▲ VercelNext.js (Turbopack)0.539s (-19.9% 🟢)2.277s (-15.0% 🟢)1.738s101.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.127s (-0.5%)2.006s (~)0.879s101.00x
🐘 PostgresExpress1.142s (~)2.014s (~)0.871s101.01x
🐘 PostgresNitro1.151s (+0.8%)2.012s (~)0.861s101.02x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.053s (-10.5% 🟢)3.848s (-2.3%)1.795s101.00x
▲ VercelNitro2.106s (+2.0%)3.910s (+5.3% 🔺)1.804s101.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro10.848s (~)11.021s (~)0.173s31.00x
🐘 PostgresExpress10.879s (~)11.020s (~)0.141s31.00x
💻 LocalExpress10.920s (~)11.023s (~)0.103s31.01x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.163s (-3.9%)22.341s (+16.9% 🔺)5.178s21.00x
▲ VercelNext.js (Turbopack)18.070s (+4.5%)19.086s (+2.2%)1.016s21.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro14.470s (~)15.020s (~)0.550s41.00x
🐘 PostgresExpress14.536s (~)15.027s (~)0.491s41.00x
💻 LocalExpress14.940s (~)15.028s (~)0.088s41.03x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro33.849s (+6.7% 🔺)35.772s (+8.6% 🔺)1.922s21.00x
▲ VercelNext.js (Turbopack)33.946s (+1.0%)35.584s (+0.5%)1.638s21.00x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express13.879s (~)14.166s (~)0.287s71.00x
🐘 PostgresNitro13.937s (+1.0%)14.166s (+1.0%)0.230s71.00x
💻 LocalExpress16.569s (~)17.030s (~)0.461s61.19x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro58.115s (-5.6% 🟢)60.163s (-5.2% 🟢)2.047s21.00x
▲ VercelNext.js (Turbopack)59.047s (+5.4% 🔺)60.159s (+5.0% 🔺)1.111s21.02x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.260s (~)2.011s (~)0.751s151.00x
🐘 PostgresNitro1.264s (~)2.011s (~)0.746s151.00x
💻 LocalExpress1.505s (+2.0%)2.005s (~)0.500s151.19x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.522s (+6.5% 🔺)4.127s (+6.2% 🔺)1.605s81.00x
▲ VercelNext.js (Turbopack)2.731s (+18.6% 🔺)3.869s (+4.8%)1.138s81.08x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.322s (-0.8%)3.011s (~)0.689s101.00x
🐘 PostgresExpress2.327s (~)3.010s (~)0.683s101.00x
💻 LocalExpress2.954s (-1.4%)3.452s (+3.3%)0.498s91.27x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.612s (+0.6%)4.180s (+8.8% 🔺)1.568s81.00x
▲ VercelNext.js (Turbopack)2.785s (+3.5%)3.832s (~)1.046s81.07x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.452s (-0.5%)4.011s (~)0.559s81.00x
🐘 PostgresNitro3.466s (~)4.013s (~)0.547s81.00x
💻 LocalExpress9.137s (+13.3% 🔺)9.521s (+8.6% 🔺)0.385s42.65x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.333s (+18.3% 🔺)4.743s (+16.9% 🔺)1.410s71.00x
▲ VercelNext.js (Turbopack)4.034s (+18.0% 🔺)5.330s (+5.1% 🔺)1.296s61.21x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.258s (~)2.010s (~)0.752s151.00x
🐘 PostgresNitro1.260s (~)2.010s (~)0.750s151.00x
💻 LocalExpress1.558s (+1.3%)2.006s (~)0.448s151.24x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.311s (+13.2% 🔺)3.862s (+6.2% 🔺)1.551s81.00x
▲ VercelNext.js (Turbopack)2.564s (+9.9% 🔺)3.886s (+8.0% 🔺)1.322s81.11x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.321s (~)3.011s (~)0.690s101.00x
🐘 PostgresNitro2.325s (-0.5%)3.012s (~)0.687s101.00x
💻 LocalExpress3.022s (+0.6%)3.885s (+12.5% 🔺)0.862s81.30x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.405s (+5.1% 🔺)3.890s (+13.1% 🔺)1.485s81.00x
▲ VercelNext.js (Turbopack)2.675s (-7.0% 🟢)4.224s (-1.6%)1.548s81.11x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.448s (~)4.010s (~)0.563s81.00x
🐘 PostgresNitro3.458s (~)4.013s (~)0.555s81.00x
💻 LocalExpress9.102s (+4.1%)9.773s (+8.3% 🔺)0.671s42.64x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.185s (+12.2% 🔺)4.845s (+15.7% 🔺)1.660s71.00x
▲ VercelNext.js (Turbopack)3.332s (-5.1% 🟢)4.572s (-9.6% 🟢)1.239s71.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.789s (-2.4%)1.007s (~)0.217s601.00x
🐘 PostgresNitro0.800s (-2.7%)1.007s (-1.7%)0.207s601.01x
💻 LocalExpress0.996s (+0.6%)1.281s (+10.9% 🔺)0.285s471.26x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro9.752s (-0.6%)11.566s (-1.5%)1.814s61.00x
▲ VercelNext.js (Turbopack)9.815s (-10.1% 🟢)11.637s (-5.6% 🟢)1.822s61.01x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.853s (-1.6%)2.008s (-1.1%)0.155s451.00x
🐘 PostgresNitro1.884s (+0.6%)2.031s (-1.1%)0.147s451.02x
💻 LocalExpress2.996s (~)3.453s (+2.2%)0.456s271.62x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro30.623s (-6.1% 🟢)32.663s (-4.2%)2.040s31.00x
▲ VercelNext.js (Turbopack)32.159s (~)33.570s (~)1.411s31.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.848s (~)4.113s (+1.7%)0.265s301.00x
🐘 PostgresNitro3.896s (+1.5%)4.111s (+2.5%)0.215s301.01x
💻 LocalExpress9.131s (+0.5%)9.864s (+3.2%)0.732s132.37x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro91.712s (-85.6% 🟢)93.952s (-85.3% 🟢)2.241s21.00x
▲ VercelNext.js (Turbopack)99.318s (+16.3% 🔺)100.959s (+15.9% 🔺)1.641s21.08x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.272s (-2.2%)1.009s (~)0.736s601.00x
🐘 PostgresExpress0.276s (+1.4%)1.008s (~)0.731s601.01x
💻 LocalExpress0.613s (+2.1%)1.004s (~)0.392s602.25x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.713s (-4.3%)3.256s (-8.7% 🟢)1.543s191.00x
▲ VercelNext.js (Turbopack)1.841s (-9.2% 🟢)3.533s (-4.9%)1.692s171.07x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.495s (-0.6%)1.008s (~)0.513s901.00x
🐘 PostgresExpress0.531s (+8.0% 🔺)1.010s (~)0.480s901.07x
💻 LocalExpress2.602s (+4.2%)3.008s (~)0.406s305.26x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.933s (+2.8%)4.556s (+5.7% 🔺)1.623s201.00x
▲ VercelNext.js (Turbopack)3.540s (-90.6% 🟢)4.913s (-87.4% 🟢)1.374s191.21x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.765s (-0.9%)1.008s (~)0.243s1201.00x
🐘 PostgresExpress0.980s (+27.8% 🔺)1.488s (+47.6% 🔺)0.507s811.28x
💻 LocalExpress11.309s (+2.5%)11.936s (+2.3%)0.626s1114.79x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro6.151s (-24.5% 🟢)8.076s (-15.6% 🟢)1.925s151.00x
▲ VercelNext.js (Turbopack)6.986s (-10.7% 🟢)8.464s (-11.8% 🟢)1.478s151.14x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.197s (-0.9%)0.994s (~)0.001s (~)1.010s (~)0.813s101.00x
🐘 PostgresNitro0.204s (~)0.997s (~)0.002s (+15.4% 🔺)1.013s (~)0.809s101.04x
💻 LocalExpress0.206s (-1.1%)1.003s (~)0.011s (-2.6%)1.017s (~)0.811s101.05x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----
💻 LocalNitro⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.613s (~)2.974s (+16.9% 🔺)0.194s (-65.9% 🟢)3.715s (~)2.103s101.00x
▲ VercelNitro1.728s (+10.4% 🔺)2.793s (+7.8% 🔺)0.389s (-26.1% 🟢)3.897s (+7.1% 🔺)2.168s101.07x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.600s (+1.8%)1.002s (~)0.004s (-0.8%)1.024s (~)0.423s591.00x
🐘 PostgresExpress0.607s (+1.9%)1.002s (~)0.004s (~)1.024s (~)0.417s591.01x
💻 LocalExpress0.737s (+1.5%)1.009s (~)0.010s (+2.1%)1.024s (~)0.287s591.23x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----
💻 LocalNitro⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.382s (-1.6%)5.429s (-2.5%)0.207s (-20.5% 🟢)6.188s (-9.6% 🟢)1.806s101.00x
▲ VercelNitro4.477s (+4.5%)5.760s (+5.7% 🔺)0.233s (+4.2%)6.658s (+4.5%)2.181s101.02x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.941s (-2.4%)1.104s (-11.0% 🟢)0.000s (-41.8% 🟢)1.118s (-11.3% 🟢)0.177s551.00x
🐘 PostgresExpress0.998s (+6.4% 🔺)1.387s (+11.8% 🔺)0.000s (-44.2% 🟢)1.405s (+11.6% 🔺)0.407s431.06x
💻 LocalExpress1.254s (~)2.021s (~)0.000s (+9.1% 🔺)2.024s (~)0.770s301.33x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----
💻 LocalNitro⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.195s (+8.3% 🔺)4.109s (~)0.000s (NaN%)4.738s (+1.3%)1.543s131.00x
▲ VercelNitro3.488s (+19.1% 🔺)4.339s (+18.0% 🔺)0.000s (+16.7% 🔺)5.064s (+14.9% 🔺)1.576s121.09x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.758s (+2.7%)2.134s (+1.6%)0.000s (~)2.154s (+1.8%)0.396s291.00x
🐘 PostgresNitro1.809s (+4.3%)2.175s (~)0.000s (-65.5% 🟢)2.189s (~)0.379s281.03x
💻 LocalExpress3.508s (-2.5%)4.032s (-1.6%)0.001s (+25.0% 🔺)4.037s (-1.6%)0.529s152.00x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----
💻 LocalNitro⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.959s (+6.2% 🔺)5.146s (+4.9%)0.000s (+400.0% 🔺)5.855s (+6.4% 🔺)1.896s111.00x
▲ VercelNext.js (Turbopack)4.150s (-92.4% 🟢)5.240s (+6.1% 🔺)0.000s (+Infinity% 🔺)5.807s (-89.7% 🟢)1.657s111.05x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress21/21
🐘 PostgresExpress13/21
▲ VercelNitro17/21
Fastest World by Framework

Winner determined by most benchmark wins

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

Worlds:

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

📋 View full workflow run


Some benchmark jobs failed:

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

Check the workflow run for details.

@github-actions

github-actionsBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production844267913
✅ 💻 Local Development8180178996
✅ 📦 Local Production8180178996
✅ 🐘 Local Postgres8180178996
✅ 🪟 Windows750883
❌ 🌍 Community Worlds1305924213
✅ 📋 Other207042249
Total3710616754446

❌ Failed Tests

▲ Vercel Production (2 failed)

nextjs-turbopack (2 failed):

  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMP3ZN0JX4ZHGZDA2JKQX386 | 🔍 observability
🌍 Community Worlds (59 failed)

mongodb (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMP3N85D905YXMZ5EJ87SA0N
  • webhookWorkflow | wrun_01KMP3NH16VE34DN3VAKG8D5J9
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMP3XG613FV6M6SR0EY31X5G

redis (2 failed):

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

turso (54 failed):

  • addTenWorkflow | wrun_01KMP3M2PQWNFJSYZ8CZZD147D
  • addTenWorkflow | wrun_01KMP3M2PQWNFJSYZ8CZZD147D
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KMP3NQGY1V13G5FMKM76Z111
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KMP3M96QNS23ZMSBSZ19RX9D
  • promiseRaceWorkflow | wrun_01KMP3MCEVR5JYNKCDEP212SKW
  • promiseAnyWorkflow | wrun_01KMP3MER50ENQMK1DZC54B5J2
  • importedStepOnlyWorkflow | wrun_01KMP3P3E51J7221QT48Q8Y02H
  • hookWorkflow | wrun_01KMP3MXH1WCBBVA0QDQPWZYK3
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMP3N85D905YXMZ5EJ87SA0N
  • webhookWorkflow | wrun_01KMP3NH16VE34DN3VAKG8D5J9
  • sleepingWorkflow | wrun_01KMP3NQJBECVWABNGMAW4N069
  • parallelSleepWorkflow | wrun_01KMP3P3YCN5RD5NS1CNRS8A2C
  • nullByteWorkflow | wrun_01KMP3P88KHNPFQF09S5K88P7S
  • workflowAndStepMetadataWorkflow | wrun_01KMP3PAEYDSDGFAYRBHPV6FR0
  • fetchWorkflow | wrun_01KMP3SFQMB97MQVT17YZJ184S
  • promiseRaceStressTestWorkflow | wrun_01KMP3SJAT0A768PW6JP1Z5K4J
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KMP3WW5AY965ZVK70DRZC0N4
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMP3XG613FV6M6SR0EY31X5G
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMP3Y46NTSFRFQSFK8JEXCNM
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KMP3YQ2DF1PTS6B6MAAQ3Z4E
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KMP3YZ6QQTF6EKNTB8J42DF6
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KMP3Z4F0BHCBF9AJZAA2KVJA
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KMP3Z6WCJ8EDGDQZ2DS43YSK
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMP3ZN0JX4ZHGZDA2JKQX386
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KMP3ZT85HPBSRP420Y2DAR80
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KMP400X8DMN36VKN2N97A15Y
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KMP4078PZYYGXMA0184A4WNE
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KMP40DGYFBY797DC2JMJ5Q0Z
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KMP40KP7Y7NWPPGKC5JZCFQK
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KMP40T385HCAN8SXA3S2YJ03
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KMP414CQMBZBT6C2R4R0K6ZS
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KMP41BRX5XVN3BKN6QD922FG
  • cancelRun - cancelling a running workflow | wrun_01KMP41HZNYWKH1TTHGMPRWGGS
  • cancelRun via CLI - cancelling a running workflow | wrun_01KMP41TTC5FPX9214EGHNV94S
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KMP4267XGTF4PE1Z7TWH7F9R
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KMP42SMX58BBB9GK092DZYFZ
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KMP4352MY53SSYAH4YFSZD87

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro7607
✅ example7607
✅ express7607
✅ fastify7607
✅ hono7607
❌ nextjs-turbopack7922
✅ nextjs-webpack8102
✅ nitro7607
✅ nuxt7607
✅ sveltekit7607
✅ vite7607
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable69014
✅ express-stable69014
✅ fastify-stable69014
✅ hono-stable69014
✅ nextjs-turbopack-canary58025
✅ nextjs-turbopack-stable7508
✅ nextjs-webpack-canary58025
✅ nextjs-webpack-stable7508
✅ nitro-stable69014
✅ nuxt-stable69014
✅ sveltekit-stable69014
✅ vite-stable69014
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable69014
✅ express-stable69014
✅ fastify-stable69014
✅ hono-stable69014
✅ nextjs-turbopack-canary58025
✅ nextjs-turbopack-stable7508
✅ nextjs-webpack-canary58025
✅ nextjs-webpack-stable7508
✅ nitro-stable69014
✅ nuxt-stable69014
✅ sveltekit-stable69014
✅ vite-stable69014
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable69014
✅ express-stable69014
✅ fastify-stable69014
✅ hono-stable69014
✅ nextjs-turbopack-canary58025
✅ nextjs-turbopack-stable7508
✅ nextjs-webpack-canary58025
✅ nextjs-webpack-stable7508
✅ nitro-stable69014
✅ nuxt-stable69014
✅ sveltekit-stable69014
✅ vite-stable69014
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack7508
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev500
❌ mongodb5538
✅ redis-dev500
❌ redis5628
✅ turso-dev500
❌ turso4548
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable69014
✅ e2e-local-postgres-nest-stable69014
✅ e2e-local-prod-nest-stable69014

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: success
  • Windows: success

Check the workflow run for details.

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

Fixes a race where concurrent workflow invocations could both emit hook_disposed for the same hook, leading to duplicate events and replay corruption. The changes make hook disposal atomic in each World implementation and refine runtime logging for the expected “already disposed” case.

Changes:

  • world-postgres: make hook disposal atomic via DELETE ... RETURNING, throwing EntityConflictError on concurrent duplicate disposal.
  • world-local: add a writeExclusive lock file guard to prevent concurrent duplicate hook_disposed.
  • core: split logging paths for EntityConflictError vs RunExpiredError during hook disposal; add changeset.

Reviewed changes

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

Show a summary per file
FileDescription
packages/world-postgres/src/storage.tsAtomically deletes hooks on hook_disposed and detects concurrent duplicates.
packages/world-local/src/storage/events-storage.tsAdds exclusive lock file for hook disposal to prevent TOCTOU duplicates.
packages/world-local/src/storage.test.tsAdds a concurrency regression test for duplicate hook_disposed.
packages/core/src/runtime/suspension-handler.tsImproves logging differentiation for duplicate disposal vs expired runs.
.changeset/fix-duplicate-hook-disposed-race.mdDeclares patch releases for affected packages.

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

Comment on lines +1972 to +1974
expect((rejected[0] as PromiseRejectedResult).reason).toMatchObject({
name: 'EntityConflictError',
});

CopilotAIMar 25, 2026

Copy link

Choose a reason for hiding this comment

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

This concurrency test can be flaky: disposeHook() may reject with HookNotFoundError (not EntityConflictError) if one disposal deletes the hook file before the other call reaches the hook existence validation in events-storage. Consider broadening the assertion to accept either error, or introduce a barrier so both calls reach the disposal section before one completes.

Suggested change
expect((rejected[0]asPromiseRejectedResult).reason).toMatchObject({
name: 'EntityConflictError',
});
constreason=(rejected[0]asPromiseRejectedResult).reasonas{
name?: string;
};
expect(['EntityConflictError','HookNotFoundError']).toContain(reason.name);

Copilot uses AI. Check for mistakes.

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.

Already addressed in e604643 — the test now accepts both EntityConflictError and HookNotFoundError.

The concurrent hook_disposed race has two possible orderings: the loser
may hit the lock file (EntityConflictError) or find the hook entity
already deleted by the winner (HookNotFoundError). Both are correct.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pranaygp

Copy link
Copy Markdown
ContributorAuthor

failings tests are confirmed flaky from unrelated race conditions and queue timeout issues. merging this and investigating those

@pranaygp
pranaygp merged commit d1391e1 into mainMar 26, 2026
160 of 166 checks passed
@pranaygp
pranaygp deleted the fix/duplicate-hook-disposed-race branch March 26, 2026 22:51
@ghostghost mentioned this pull request Mar 26, 2026
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.

sleep() causes 'Unconsumed event in event log' when called concurrently via Promise.all

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('^' + ".*" + '
Skip to content

Fix race condition allowing duplicate hook_disposed events - #1523

Merged
pranaygp merged 4 commits into
mainfrom
fix/duplicate-hook-disposed-race
Mar 26, 2026
Merged

Fix race condition allowing duplicate hook_disposed events#1523
pranaygp merged 4 commits into
mainfrom
fix/duplicate-hook-disposed-race

Conversation

@pranaygp

Copy link
Copy Markdown
Contributor

Summary

  • Fixes a race condition where concurrent workflow invocations could both post hook_disposed for the same hook, corrupting the event log with duplicate events and causing Unconsumed event in event log: eventType=hook_disposed errors on replay
  • world-local: Adds writeExclusive lock file guard before hook deletion (same pattern as wait_completed from [world-postgres, world-local] Fix TOCTOU races in entity state transitions #1434)
  • world-postgres: Uses DELETE ... RETURNING so only one concurrent caller succeeds — second gets EntityConflictError
  • world-vercel: No client changes needed — server-side fix in vercel/workflow-server#356 returns 409, which is already translated to EntityConflictError by makeRequest
  • suspension-handler: Separates EntityConflictError (hook already disposed) from RunExpiredError (run completed) log messages

Fixes#1266

Test plan

  • Added should reject concurrent hook_disposed for the same hook test (mirrors existing wait_completed race test)
  • Verify all existing tests pass
  • E2E test with parallel tool calls triggering concurrent hook disposal

🤖 Generated with Claude Code

Concurrent workflow invocations could both post hook_disposed for the
same hook, corrupting the event log with duplicate events. This mirrors
the wait_completed race condition fixed in #1057/#1434.
- world-local: Add writeExclusive lock file for hook_disposed (same
pattern as wait_completed and step terminal states)
- world-postgres: Use DELETE ... RETURNING to atomically detect if
another caller already deleted the hook entity
- suspension-handler: Improve log messages to distinguish hook-already-
disposed (EntityConflictError) from run-already-completed (RunExpiredError)
Fixes#1266
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pranaygp
pranaygp requested a review from a team as a code ownerMarch 25, 2026 23:00
CopilotAI review requested due to automatic review settings March 25, 2026 23:00
@vercel

vercelBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
example-nextjs-workflow-turbopackReadyReadyPreview, CommentMar 26, 2026 10:18pm
example-nextjs-workflow-webpackReadyReadyPreview, CommentMar 26, 2026 10:18pm
example-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-astro-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-express-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-fastify-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-hono-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-nitro-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-nuxt-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-sveltekit-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-vite-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workflow-docsReadyReadyPreview, Comment, Open in v0Mar 26, 2026 10:18pm
workflow-swc-playgroundReadyReadyPreview, CommentMar 26, 2026 10:18pm

@changeset-bot

changeset-botBot commented Mar 25, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 960f3b3

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

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

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

@github-actions

github-actionsBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.045s (-4.5%)1.006s (~)0.961s101.00x
🐘 PostgresExpress0.061s (+1.2%)1.011s (~)0.950s101.36x
🐘 PostgresNitro0.070s (-3.2%)1.016s (~)0.946s101.56x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.511s (-8.1% 🟢)2.661s (+12.4% 🔺)2.151s101.00x
▲ VercelNext.js (Turbopack)0.539s (-19.9% 🟢)2.277s (-15.0% 🟢)1.738s101.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.127s (-0.5%)2.006s (~)0.879s101.00x
🐘 PostgresExpress1.142s (~)2.014s (~)0.871s101.01x
🐘 PostgresNitro1.151s (+0.8%)2.012s (~)0.861s101.02x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.053s (-10.5% 🟢)3.848s (-2.3%)1.795s101.00x
▲ VercelNitro2.106s (+2.0%)3.910s (+5.3% 🔺)1.804s101.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro10.848s (~)11.021s (~)0.173s31.00x
🐘 PostgresExpress10.879s (~)11.020s (~)0.141s31.00x
💻 LocalExpress10.920s (~)11.023s (~)0.103s31.01x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.163s (-3.9%)22.341s (+16.9% 🔺)5.178s21.00x
▲ VercelNext.js (Turbopack)18.070s (+4.5%)19.086s (+2.2%)1.016s21.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro14.470s (~)15.020s (~)0.550s41.00x
🐘 PostgresExpress14.536s (~)15.027s (~)0.491s41.00x
💻 LocalExpress14.940s (~)15.028s (~)0.088s41.03x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro33.849s (+6.7% 🔺)35.772s (+8.6% 🔺)1.922s21.00x
▲ VercelNext.js (Turbopack)33.946s (+1.0%)35.584s (+0.5%)1.638s21.00x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express13.879s (~)14.166s (~)0.287s71.00x
🐘 PostgresNitro13.937s (+1.0%)14.166s (+1.0%)0.230s71.00x
💻 LocalExpress16.569s (~)17.030s (~)0.461s61.19x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro58.115s (-5.6% 🟢)60.163s (-5.2% 🟢)2.047s21.00x
▲ VercelNext.js (Turbopack)59.047s (+5.4% 🔺)60.159s (+5.0% 🔺)1.111s21.02x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.260s (~)2.011s (~)0.751s151.00x
🐘 PostgresNitro1.264s (~)2.011s (~)0.746s151.00x
💻 LocalExpress1.505s (+2.0%)2.005s (~)0.500s151.19x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.522s (+6.5% 🔺)4.127s (+6.2% 🔺)1.605s81.00x
▲ VercelNext.js (Turbopack)2.731s (+18.6% 🔺)3.869s (+4.8%)1.138s81.08x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.322s (-0.8%)3.011s (~)0.689s101.00x
🐘 PostgresExpress2.327s (~)3.010s (~)0.683s101.00x
💻 LocalExpress2.954s (-1.4%)3.452s (+3.3%)0.498s91.27x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.612s (+0.6%)4.180s (+8.8% 🔺)1.568s81.00x
▲ VercelNext.js (Turbopack)2.785s (+3.5%)3.832s (~)1.046s81.07x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.452s (-0.5%)4.011s (~)0.559s81.00x
🐘 PostgresNitro3.466s (~)4.013s (~)0.547s81.00x
💻 LocalExpress9.137s (+13.3% 🔺)9.521s (+8.6% 🔺)0.385s42.65x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.333s (+18.3% 🔺)4.743s (+16.9% 🔺)1.410s71.00x
▲ VercelNext.js (Turbopack)4.034s (+18.0% 🔺)5.330s (+5.1% 🔺)1.296s61.21x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.258s (~)2.010s (~)0.752s151.00x
🐘 PostgresNitro1.260s (~)2.010s (~)0.750s151.00x
💻 LocalExpress1.558s (+1.3%)2.006s (~)0.448s151.24x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.311s (+13.2% 🔺)3.862s (+6.2% 🔺)1.551s81.00x
▲ VercelNext.js (Turbopack)2.564s (+9.9% 🔺)3.886s (+8.0% 🔺)1.322s81.11x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.321s (~)3.011s (~)0.690s101.00x
🐘 PostgresNitro2.325s (-0.5%)3.012s (~)0.687s101.00x
💻 LocalExpress3.022s (+0.6%)3.885s (+12.5% 🔺)0.862s81.30x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.405s (+5.1% 🔺)3.890s (+13.1% 🔺)1.485s81.00x
▲ VercelNext.js (Turbopack)2.675s (-7.0% 🟢)4.224s (-1.6%)1.548s81.11x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.448s (~)4.010s (~)0.563s81.00x
🐘 PostgresNitro3.458s (~)4.013s (~)0.555s81.00x
💻 LocalExpress9.102s (+4.1%)9.773s (+8.3% 🔺)0.671s42.64x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.185s (+12.2% 🔺)4.845s (+15.7% 🔺)1.660s71.00x
▲ VercelNext.js (Turbopack)3.332s (-5.1% 🟢)4.572s (-9.6% 🟢)1.239s71.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.789s (-2.4%)1.007s (~)0.217s601.00x
🐘 PostgresNitro0.800s (-2.7%)1.007s (-1.7%)0.207s601.01x
💻 LocalExpress0.996s (+0.6%)1.281s (+10.9% 🔺)0.285s471.26x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro9.752s (-0.6%)11.566s (-1.5%)1.814s61.00x
▲ VercelNext.js (Turbopack)9.815s (-10.1% 🟢)11.637s (-5.6% 🟢)1.822s61.01x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.853s (-1.6%)2.008s (-1.1%)0.155s451.00x
🐘 PostgresNitro1.884s (+0.6%)2.031s (-1.1%)0.147s451.02x
💻 LocalExpress2.996s (~)3.453s (+2.2%)0.456s271.62x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro30.623s (-6.1% 🟢)32.663s (-4.2%)2.040s31.00x
▲ VercelNext.js (Turbopack)32.159s (~)33.570s (~)1.411s31.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.848s (~)4.113s (+1.7%)0.265s301.00x
🐘 PostgresNitro3.896s (+1.5%)4.111s (+2.5%)0.215s301.01x
💻 LocalExpress9.131s (+0.5%)9.864s (+3.2%)0.732s132.37x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro91.712s (-85.6% 🟢)93.952s (-85.3% 🟢)2.241s21.00x
▲ VercelNext.js (Turbopack)99.318s (+16.3% 🔺)100.959s (+15.9% 🔺)1.641s21.08x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.272s (-2.2%)1.009s (~)0.736s601.00x
🐘 PostgresExpress0.276s (+1.4%)1.008s (~)0.731s601.01x
💻 LocalExpress0.613s (+2.1%)1.004s (~)0.392s602.25x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.713s (-4.3%)3.256s (-8.7% 🟢)1.543s191.00x
▲ VercelNext.js (Turbopack)1.841s (-9.2% 🟢)3.533s (-4.9%)1.692s171.07x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.495s (-0.6%)1.008s (~)0.513s901.00x
🐘 PostgresExpress0.531s (+8.0% 🔺)1.010s (~)0.480s901.07x
💻 LocalExpress2.602s (+4.2%)3.008s (~)0.406s305.26x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.933s (+2.8%)4.556s (+5.7% 🔺)1.623s201.00x
▲ VercelNext.js (Turbopack)3.540s (-90.6% 🟢)4.913s (-87.4% 🟢)1.374s191.21x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.765s (-0.9%)1.008s (~)0.243s1201.00x
🐘 PostgresExpress0.980s (+27.8% 🔺)1.488s (+47.6% 🔺)0.507s811.28x
💻 LocalExpress11.309s (+2.5%)11.936s (+2.3%)0.626s1114.79x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro6.151s (-24.5% 🟢)8.076s (-15.6% 🟢)1.925s151.00x
▲ VercelNext.js (Turbopack)6.986s (-10.7% 🟢)8.464s (-11.8% 🟢)1.478s151.14x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.197s (-0.9%)0.994s (~)0.001s (~)1.010s (~)0.813s101.00x
🐘 PostgresNitro0.204s (~)0.997s (~)0.002s (+15.4% 🔺)1.013s (~)0.809s101.04x
💻 LocalExpress0.206s (-1.1%)1.003s (~)0.011s (-2.6%)1.017s (~)0.811s101.05x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----
💻 LocalNitro⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.613s (~)2.974s (+16.9% 🔺)0.194s (-65.9% 🟢)3.715s (~)2.103s101.00x
▲ VercelNitro1.728s (+10.4% 🔺)2.793s (+7.8% 🔺)0.389s (-26.1% 🟢)3.897s (+7.1% 🔺)2.168s101.07x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.600s (+1.8%)1.002s (~)0.004s (-0.8%)1.024s (~)0.423s591.00x
🐘 PostgresExpress0.607s (+1.9%)1.002s (~)0.004s (~)1.024s (~)0.417s591.01x
💻 LocalExpress0.737s (+1.5%)1.009s (~)0.010s (+2.1%)1.024s (~)0.287s591.23x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----
💻 LocalNitro⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.382s (-1.6%)5.429s (-2.5%)0.207s (-20.5% 🟢)6.188s (-9.6% 🟢)1.806s101.00x
▲ VercelNitro4.477s (+4.5%)5.760s (+5.7% 🔺)0.233s (+4.2%)6.658s (+4.5%)2.181s101.02x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.941s (-2.4%)1.104s (-11.0% 🟢)0.000s (-41.8% 🟢)1.118s (-11.3% 🟢)0.177s551.00x
🐘 PostgresExpress0.998s (+6.4% 🔺)1.387s (+11.8% 🔺)0.000s (-44.2% 🟢)1.405s (+11.6% 🔺)0.407s431.06x
💻 LocalExpress1.254s (~)2.021s (~)0.000s (+9.1% 🔺)2.024s (~)0.770s301.33x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----
💻 LocalNitro⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.195s (+8.3% 🔺)4.109s (~)0.000s (NaN%)4.738s (+1.3%)1.543s131.00x
▲ VercelNitro3.488s (+19.1% 🔺)4.339s (+18.0% 🔺)0.000s (+16.7% 🔺)5.064s (+14.9% 🔺)1.576s121.09x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.758s (+2.7%)2.134s (+1.6%)0.000s (~)2.154s (+1.8%)0.396s291.00x
🐘 PostgresNitro1.809s (+4.3%)2.175s (~)0.000s (-65.5% 🟢)2.189s (~)0.379s281.03x
💻 LocalExpress3.508s (-2.5%)4.032s (-1.6%)0.001s (+25.0% 🔺)4.037s (-1.6%)0.529s152.00x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----
💻 LocalNitro⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.959s (+6.2% 🔺)5.146s (+4.9%)0.000s (+400.0% 🔺)5.855s (+6.4% 🔺)1.896s111.00x
▲ VercelNext.js (Turbopack)4.150s (-92.4% 🟢)5.240s (+6.1% 🔺)0.000s (+Infinity% 🔺)5.807s (-89.7% 🟢)1.657s111.05x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress21/21
🐘 PostgresExpress13/21
▲ VercelNitro17/21
Fastest World by Framework

Winner determined by most benchmark wins

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

Worlds:

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

📋 View full workflow run


Some benchmark jobs failed:

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

Check the workflow run for details.

@github-actions

github-actionsBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production844267913
✅ 💻 Local Development8180178996
✅ 📦 Local Production8180178996
✅ 🐘 Local Postgres8180178996
✅ 🪟 Windows750883
❌ 🌍 Community Worlds1305924213
✅ 📋 Other207042249
Total3710616754446

❌ Failed Tests

▲ Vercel Production (2 failed)

nextjs-turbopack (2 failed):

  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMP3ZN0JX4ZHGZDA2JKQX386 | 🔍 observability
🌍 Community Worlds (59 failed)

mongodb (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMP3N85D905YXMZ5EJ87SA0N
  • webhookWorkflow | wrun_01KMP3NH16VE34DN3VAKG8D5J9
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMP3XG613FV6M6SR0EY31X5G

redis (2 failed):

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

turso (54 failed):

  • addTenWorkflow | wrun_01KMP3M2PQWNFJSYZ8CZZD147D
  • addTenWorkflow | wrun_01KMP3M2PQWNFJSYZ8CZZD147D
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KMP3NQGY1V13G5FMKM76Z111
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KMP3M96QNS23ZMSBSZ19RX9D
  • promiseRaceWorkflow | wrun_01KMP3MCEVR5JYNKCDEP212SKW
  • promiseAnyWorkflow | wrun_01KMP3MER50ENQMK1DZC54B5J2
  • importedStepOnlyWorkflow | wrun_01KMP3P3E51J7221QT48Q8Y02H
  • hookWorkflow | wrun_01KMP3MXH1WCBBVA0QDQPWZYK3
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMP3N85D905YXMZ5EJ87SA0N
  • webhookWorkflow | wrun_01KMP3NH16VE34DN3VAKG8D5J9
  • sleepingWorkflow | wrun_01KMP3NQJBECVWABNGMAW4N069
  • parallelSleepWorkflow | wrun_01KMP3P3YCN5RD5NS1CNRS8A2C
  • nullByteWorkflow | wrun_01KMP3P88KHNPFQF09S5K88P7S
  • workflowAndStepMetadataWorkflow | wrun_01KMP3PAEYDSDGFAYRBHPV6FR0
  • fetchWorkflow | wrun_01KMP3SFQMB97MQVT17YZJ184S
  • promiseRaceStressTestWorkflow | wrun_01KMP3SJAT0A768PW6JP1Z5K4J
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KMP3WW5AY965ZVK70DRZC0N4
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMP3XG613FV6M6SR0EY31X5G
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMP3Y46NTSFRFQSFK8JEXCNM
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KMP3YQ2DF1PTS6B6MAAQ3Z4E
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KMP3YZ6QQTF6EKNTB8J42DF6
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KMP3Z4F0BHCBF9AJZAA2KVJA
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KMP3Z6WCJ8EDGDQZ2DS43YSK
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMP3ZN0JX4ZHGZDA2JKQX386
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KMP3ZT85HPBSRP420Y2DAR80
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KMP400X8DMN36VKN2N97A15Y
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KMP4078PZYYGXMA0184A4WNE
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KMP40DGYFBY797DC2JMJ5Q0Z
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KMP40KP7Y7NWPPGKC5JZCFQK
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KMP40T385HCAN8SXA3S2YJ03
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KMP414CQMBZBT6C2R4R0K6ZS
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KMP41BRX5XVN3BKN6QD922FG
  • cancelRun - cancelling a running workflow | wrun_01KMP41HZNYWKH1TTHGMPRWGGS
  • cancelRun via CLI - cancelling a running workflow | wrun_01KMP41TTC5FPX9214EGHNV94S
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KMP4267XGTF4PE1Z7TWH7F9R
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KMP42SMX58BBB9GK092DZYFZ
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KMP4352MY53SSYAH4YFSZD87

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro7607
✅ example7607
✅ express7607
✅ fastify7607
✅ hono7607
❌ nextjs-turbopack7922
✅ nextjs-webpack8102
✅ nitro7607
✅ nuxt7607
✅ sveltekit7607
✅ vite7607
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable69014
✅ express-stable69014
✅ fastify-stable69014
✅ hono-stable69014
✅ nextjs-turbopack-canary58025
✅ nextjs-turbopack-stable7508
✅ nextjs-webpack-canary58025
✅ nextjs-webpack-stable7508
✅ nitro-stable69014
✅ nuxt-stable69014
✅ sveltekit-stable69014
✅ vite-stable69014
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable69014
✅ express-stable69014
✅ fastify-stable69014
✅ hono-stable69014
✅ nextjs-turbopack-canary58025
✅ nextjs-turbopack-stable7508
✅ nextjs-webpack-canary58025
✅ nextjs-webpack-stable7508
✅ nitro-stable69014
✅ nuxt-stable69014
✅ sveltekit-stable69014
✅ vite-stable69014
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable69014
✅ express-stable69014
✅ fastify-stable69014
✅ hono-stable69014
✅ nextjs-turbopack-canary58025
✅ nextjs-turbopack-stable7508
✅ nextjs-webpack-canary58025
✅ nextjs-webpack-stable7508
✅ nitro-stable69014
✅ nuxt-stable69014
✅ sveltekit-stable69014
✅ vite-stable69014
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack7508
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev500
❌ mongodb5538
✅ redis-dev500
❌ redis5628
✅ turso-dev500
❌ turso4548
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable69014
✅ e2e-local-postgres-nest-stable69014
✅ e2e-local-prod-nest-stable69014

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: success
  • Windows: success

Check the workflow run for details.

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

Fixes a race where concurrent workflow invocations could both emit hook_disposed for the same hook, leading to duplicate events and replay corruption. The changes make hook disposal atomic in each World implementation and refine runtime logging for the expected “already disposed” case.

Changes:

  • world-postgres: make hook disposal atomic via DELETE ... RETURNING, throwing EntityConflictError on concurrent duplicate disposal.
  • world-local: add a writeExclusive lock file guard to prevent concurrent duplicate hook_disposed.
  • core: split logging paths for EntityConflictError vs RunExpiredError during hook disposal; add changeset.

Reviewed changes

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

Show a summary per file
FileDescription
packages/world-postgres/src/storage.tsAtomically deletes hooks on hook_disposed and detects concurrent duplicates.
packages/world-local/src/storage/events-storage.tsAdds exclusive lock file for hook disposal to prevent TOCTOU duplicates.
packages/world-local/src/storage.test.tsAdds a concurrency regression test for duplicate hook_disposed.
packages/core/src/runtime/suspension-handler.tsImproves logging differentiation for duplicate disposal vs expired runs.
.changeset/fix-duplicate-hook-disposed-race.mdDeclares patch releases for affected packages.

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

Comment on lines +1972 to +1974
expect((rejected[0] as PromiseRejectedResult).reason).toMatchObject({
name: 'EntityConflictError',
});

CopilotAIMar 25, 2026

Copy link

Choose a reason for hiding this comment

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

This concurrency test can be flaky: disposeHook() may reject with HookNotFoundError (not EntityConflictError) if one disposal deletes the hook file before the other call reaches the hook existence validation in events-storage. Consider broadening the assertion to accept either error, or introduce a barrier so both calls reach the disposal section before one completes.

Suggested change
expect((rejected[0]asPromiseRejectedResult).reason).toMatchObject({
name: 'EntityConflictError',
});
constreason=(rejected[0]asPromiseRejectedResult).reasonas{
name?: string;
};
expect(['EntityConflictError','HookNotFoundError']).toContain(reason.name);

Copilot uses AI. Check for mistakes.

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.

Already addressed in e604643 — the test now accepts both EntityConflictError and HookNotFoundError.

The concurrent hook_disposed race has two possible orderings: the loser
may hit the lock file (EntityConflictError) or find the hook entity
already deleted by the winner (HookNotFoundError). Both are correct.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pranaygp

Copy link
Copy Markdown
ContributorAuthor

failings tests are confirmed flaky from unrelated race conditions and queue timeout issues. merging this and investigating those

@pranaygp
pranaygp merged commit d1391e1 into mainMar 26, 2026
160 of 166 checks passed
@pranaygp
pranaygp deleted the fix/duplicate-hook-disposed-race branch March 26, 2026 22:51
@ghostghost mentioned this pull request Mar 26, 2026
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.

sleep() causes 'Unconsumed event in event log' when called concurrently via Promise.all

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); } })(); })();
Skip to content

Fix race condition allowing duplicate hook_disposed events - #1523

Merged
pranaygp merged 4 commits into
mainfrom
fix/duplicate-hook-disposed-race
Mar 26, 2026
Merged

Fix race condition allowing duplicate hook_disposed events#1523
pranaygp merged 4 commits into
mainfrom
fix/duplicate-hook-disposed-race

Conversation

@pranaygp

Copy link
Copy Markdown
Contributor

Summary

  • Fixes a race condition where concurrent workflow invocations could both post hook_disposed for the same hook, corrupting the event log with duplicate events and causing Unconsumed event in event log: eventType=hook_disposed errors on replay
  • world-local: Adds writeExclusive lock file guard before hook deletion (same pattern as wait_completed from [world-postgres, world-local] Fix TOCTOU races in entity state transitions #1434)
  • world-postgres: Uses DELETE ... RETURNING so only one concurrent caller succeeds — second gets EntityConflictError
  • world-vercel: No client changes needed — server-side fix in vercel/workflow-server#356 returns 409, which is already translated to EntityConflictError by makeRequest
  • suspension-handler: Separates EntityConflictError (hook already disposed) from RunExpiredError (run completed) log messages

Fixes#1266

Test plan

  • Added should reject concurrent hook_disposed for the same hook test (mirrors existing wait_completed race test)
  • Verify all existing tests pass
  • E2E test with parallel tool calls triggering concurrent hook disposal

🤖 Generated with Claude Code

Concurrent workflow invocations could both post hook_disposed for the
same hook, corrupting the event log with duplicate events. This mirrors
the wait_completed race condition fixed in #1057/#1434.
- world-local: Add writeExclusive lock file for hook_disposed (same
pattern as wait_completed and step terminal states)
- world-postgres: Use DELETE ... RETURNING to atomically detect if
another caller already deleted the hook entity
- suspension-handler: Improve log messages to distinguish hook-already-
disposed (EntityConflictError) from run-already-completed (RunExpiredError)
Fixes#1266
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pranaygp
pranaygp requested a review from a team as a code ownerMarch 25, 2026 23:00
CopilotAI review requested due to automatic review settings March 25, 2026 23:00
@vercel

vercelBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
example-nextjs-workflow-turbopackReadyReadyPreview, CommentMar 26, 2026 10:18pm
example-nextjs-workflow-webpackReadyReadyPreview, CommentMar 26, 2026 10:18pm
example-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-astro-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-express-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-fastify-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-hono-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-nitro-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-nuxt-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-sveltekit-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workbench-vite-workflowReadyReadyPreview, CommentMar 26, 2026 10:18pm
workflow-docsReadyReadyPreview, Comment, Open in v0Mar 26, 2026 10:18pm
workflow-swc-playgroundReadyReadyPreview, CommentMar 26, 2026 10:18pm

@changeset-bot

changeset-botBot commented Mar 25, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 960f3b3

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

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

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

@github-actions

github-actionsBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.045s (-4.5%)1.006s (~)0.961s101.00x
🐘 PostgresExpress0.061s (+1.2%)1.011s (~)0.950s101.36x
🐘 PostgresNitro0.070s (-3.2%)1.016s (~)0.946s101.56x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.511s (-8.1% 🟢)2.661s (+12.4% 🔺)2.151s101.00x
▲ VercelNext.js (Turbopack)0.539s (-19.9% 🟢)2.277s (-15.0% 🟢)1.738s101.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.127s (-0.5%)2.006s (~)0.879s101.00x
🐘 PostgresExpress1.142s (~)2.014s (~)0.871s101.01x
🐘 PostgresNitro1.151s (+0.8%)2.012s (~)0.861s101.02x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.053s (-10.5% 🟢)3.848s (-2.3%)1.795s101.00x
▲ VercelNitro2.106s (+2.0%)3.910s (+5.3% 🔺)1.804s101.03x
▲ VercelExpress⚠️missing----

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro10.848s (~)11.021s (~)0.173s31.00x
🐘 PostgresExpress10.879s (~)11.020s (~)0.141s31.00x
💻 LocalExpress10.920s (~)11.023s (~)0.103s31.01x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.163s (-3.9%)22.341s (+16.9% 🔺)5.178s21.00x
▲ VercelNext.js (Turbopack)18.070s (+4.5%)19.086s (+2.2%)1.016s21.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro14.470s (~)15.020s (~)0.550s41.00x
🐘 PostgresExpress14.536s (~)15.027s (~)0.491s41.00x
💻 LocalExpress14.940s (~)15.028s (~)0.088s41.03x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro33.849s (+6.7% 🔺)35.772s (+8.6% 🔺)1.922s21.00x
▲ VercelNext.js (Turbopack)33.946s (+1.0%)35.584s (+0.5%)1.638s21.00x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express13.879s (~)14.166s (~)0.287s71.00x
🐘 PostgresNitro13.937s (+1.0%)14.166s (+1.0%)0.230s71.00x
💻 LocalExpress16.569s (~)17.030s (~)0.461s61.19x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro58.115s (-5.6% 🟢)60.163s (-5.2% 🟢)2.047s21.00x
▲ VercelNext.js (Turbopack)59.047s (+5.4% 🔺)60.159s (+5.0% 🔺)1.111s21.02x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.260s (~)2.011s (~)0.751s151.00x
🐘 PostgresNitro1.264s (~)2.011s (~)0.746s151.00x
💻 LocalExpress1.505s (+2.0%)2.005s (~)0.500s151.19x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.522s (+6.5% 🔺)4.127s (+6.2% 🔺)1.605s81.00x
▲ VercelNext.js (Turbopack)2.731s (+18.6% 🔺)3.869s (+4.8%)1.138s81.08x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.322s (-0.8%)3.011s (~)0.689s101.00x
🐘 PostgresExpress2.327s (~)3.010s (~)0.683s101.00x
💻 LocalExpress2.954s (-1.4%)3.452s (+3.3%)0.498s91.27x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.612s (+0.6%)4.180s (+8.8% 🔺)1.568s81.00x
▲ VercelNext.js (Turbopack)2.785s (+3.5%)3.832s (~)1.046s81.07x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.452s (-0.5%)4.011s (~)0.559s81.00x
🐘 PostgresNitro3.466s (~)4.013s (~)0.547s81.00x
💻 LocalExpress9.137s (+13.3% 🔺)9.521s (+8.6% 🔺)0.385s42.65x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.333s (+18.3% 🔺)4.743s (+16.9% 🔺)1.410s71.00x
▲ VercelNext.js (Turbopack)4.034s (+18.0% 🔺)5.330s (+5.1% 🔺)1.296s61.21x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.258s (~)2.010s (~)0.752s151.00x
🐘 PostgresNitro1.260s (~)2.010s (~)0.750s151.00x
💻 LocalExpress1.558s (+1.3%)2.006s (~)0.448s151.24x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.311s (+13.2% 🔺)3.862s (+6.2% 🔺)1.551s81.00x
▲ VercelNext.js (Turbopack)2.564s (+9.9% 🔺)3.886s (+8.0% 🔺)1.322s81.11x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.321s (~)3.011s (~)0.690s101.00x
🐘 PostgresNitro2.325s (-0.5%)3.012s (~)0.687s101.00x
💻 LocalExpress3.022s (+0.6%)3.885s (+12.5% 🔺)0.862s81.30x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.405s (+5.1% 🔺)3.890s (+13.1% 🔺)1.485s81.00x
▲ VercelNext.js (Turbopack)2.675s (-7.0% 🟢)4.224s (-1.6%)1.548s81.11x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.448s (~)4.010s (~)0.563s81.00x
🐘 PostgresNitro3.458s (~)4.013s (~)0.555s81.00x
💻 LocalExpress9.102s (+4.1%)9.773s (+8.3% 🔺)0.671s42.64x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.185s (+12.2% 🔺)4.845s (+15.7% 🔺)1.660s71.00x
▲ VercelNext.js (Turbopack)3.332s (-5.1% 🟢)4.572s (-9.6% 🟢)1.239s71.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.789s (-2.4%)1.007s (~)0.217s601.00x
🐘 PostgresNitro0.800s (-2.7%)1.007s (-1.7%)0.207s601.01x
💻 LocalExpress0.996s (+0.6%)1.281s (+10.9% 🔺)0.285s471.26x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro9.752s (-0.6%)11.566s (-1.5%)1.814s61.00x
▲ VercelNext.js (Turbopack)9.815s (-10.1% 🟢)11.637s (-5.6% 🟢)1.822s61.01x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.853s (-1.6%)2.008s (-1.1%)0.155s451.00x
🐘 PostgresNitro1.884s (+0.6%)2.031s (-1.1%)0.147s451.02x
💻 LocalExpress2.996s (~)3.453s (+2.2%)0.456s271.62x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro30.623s (-6.1% 🟢)32.663s (-4.2%)2.040s31.00x
▲ VercelNext.js (Turbopack)32.159s (~)33.570s (~)1.411s31.05x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.848s (~)4.113s (+1.7%)0.265s301.00x
🐘 PostgresNitro3.896s (+1.5%)4.111s (+2.5%)0.215s301.01x
💻 LocalExpress9.131s (+0.5%)9.864s (+3.2%)0.732s132.37x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro91.712s (-85.6% 🟢)93.952s (-85.3% 🟢)2.241s21.00x
▲ VercelNext.js (Turbopack)99.318s (+16.3% 🔺)100.959s (+15.9% 🔺)1.641s21.08x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.272s (-2.2%)1.009s (~)0.736s601.00x
🐘 PostgresExpress0.276s (+1.4%)1.008s (~)0.731s601.01x
💻 LocalExpress0.613s (+2.1%)1.004s (~)0.392s602.25x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.713s (-4.3%)3.256s (-8.7% 🟢)1.543s191.00x
▲ VercelNext.js (Turbopack)1.841s (-9.2% 🟢)3.533s (-4.9%)1.692s171.07x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.495s (-0.6%)1.008s (~)0.513s901.00x
🐘 PostgresExpress0.531s (+8.0% 🔺)1.010s (~)0.480s901.07x
💻 LocalExpress2.602s (+4.2%)3.008s (~)0.406s305.26x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.933s (+2.8%)4.556s (+5.7% 🔺)1.623s201.00x
▲ VercelNext.js (Turbopack)3.540s (-90.6% 🟢)4.913s (-87.4% 🟢)1.374s191.21x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.765s (-0.9%)1.008s (~)0.243s1201.00x
🐘 PostgresExpress0.980s (+27.8% 🔺)1.488s (+47.6% 🔺)0.507s811.28x
💻 LocalExpress11.309s (+2.5%)11.936s (+2.3%)0.626s1114.79x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----
💻 LocalNitro⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro6.151s (-24.5% 🟢)8.076s (-15.6% 🟢)1.925s151.00x
▲ VercelNext.js (Turbopack)6.986s (-10.7% 🟢)8.464s (-11.8% 🟢)1.478s151.14x
▲ VercelExpress⚠️missing----

🔍 Observability: Nitro | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.197s (-0.9%)0.994s (~)0.001s (~)1.010s (~)0.813s101.00x
🐘 PostgresNitro0.204s (~)0.997s (~)0.002s (+15.4% 🔺)1.013s (~)0.809s101.04x
💻 LocalExpress0.206s (-1.1%)1.003s (~)0.011s (-2.6%)1.017s (~)0.811s101.05x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----
💻 LocalNitro⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.613s (~)2.974s (+16.9% 🔺)0.194s (-65.9% 🟢)3.715s (~)2.103s101.00x
▲ VercelNitro1.728s (+10.4% 🔺)2.793s (+7.8% 🔺)0.389s (-26.1% 🟢)3.897s (+7.1% 🔺)2.168s101.07x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.600s (+1.8%)1.002s (~)0.004s (-0.8%)1.024s (~)0.423s591.00x
🐘 PostgresExpress0.607s (+1.9%)1.002s (~)0.004s (~)1.024s (~)0.417s591.01x
💻 LocalExpress0.737s (+1.5%)1.009s (~)0.010s (+2.1%)1.024s (~)0.287s591.23x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----
💻 LocalNitro⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.382s (-1.6%)5.429s (-2.5%)0.207s (-20.5% 🟢)6.188s (-9.6% 🟢)1.806s101.00x
▲ VercelNitro4.477s (+4.5%)5.760s (+5.7% 🔺)0.233s (+4.2%)6.658s (+4.5%)2.181s101.02x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.941s (-2.4%)1.104s (-11.0% 🟢)0.000s (-41.8% 🟢)1.118s (-11.3% 🟢)0.177s551.00x
🐘 PostgresExpress0.998s (+6.4% 🔺)1.387s (+11.8% 🔺)0.000s (-44.2% 🟢)1.405s (+11.6% 🔺)0.407s431.06x
💻 LocalExpress1.254s (~)2.021s (~)0.000s (+9.1% 🔺)2.024s (~)0.770s301.33x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----
💻 LocalNitro⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.195s (+8.3% 🔺)4.109s (~)0.000s (NaN%)4.738s (+1.3%)1.543s131.00x
▲ VercelNitro3.488s (+19.1% 🔺)4.339s (+18.0% 🔺)0.000s (+16.7% 🔺)5.064s (+14.9% 🔺)1.576s121.09x
▲ VercelExpress⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Nitro

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.758s (+2.7%)2.134s (+1.6%)0.000s (~)2.154s (+1.8%)0.396s291.00x
🐘 PostgresNitro1.809s (+4.3%)2.175s (~)0.000s (-65.5% 🟢)2.189s (~)0.379s281.03x
💻 LocalExpress3.508s (-2.5%)4.032s (-1.6%)0.001s (+25.0% 🔺)4.037s (-1.6%)0.529s152.00x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----
💻 LocalNitro⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.959s (+6.2% 🔺)5.146s (+4.9%)0.000s (+400.0% 🔺)5.855s (+6.4% 🔺)1.896s111.00x
▲ VercelNext.js (Turbopack)4.150s (-92.4% 🟢)5.240s (+6.1% 🔺)0.000s (+Infinity% 🔺)5.807s (-89.7% 🟢)1.657s111.05x
▲ VercelExpress⚠️missing-----

🔍 Observability: Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress21/21
🐘 PostgresExpress13/21
▲ VercelNitro17/21
Fastest World by Framework

Winner determined by most benchmark wins

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

Worlds:

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

📋 View full workflow run


Some benchmark jobs failed:

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

Check the workflow run for details.

@github-actions

github-actionsBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production844267913
✅ 💻 Local Development8180178996
✅ 📦 Local Production8180178996
✅ 🐘 Local Postgres8180178996
✅ 🪟 Windows750883
❌ 🌍 Community Worlds1305924213
✅ 📋 Other207042249
Total3710616754446

❌ Failed Tests

▲ Vercel Production (2 failed)

nextjs-turbopack (2 failed):

  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMP3ZN0JX4ZHGZDA2JKQX386 | 🔍 observability
🌍 Community Worlds (59 failed)

mongodb (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMP3N85D905YXMZ5EJ87SA0N
  • webhookWorkflow | wrun_01KMP3NH16VE34DN3VAKG8D5J9
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMP3XG613FV6M6SR0EY31X5G

redis (2 failed):

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

turso (54 failed):

  • addTenWorkflow | wrun_01KMP3M2PQWNFJSYZ8CZZD147D
  • addTenWorkflow | wrun_01KMP3M2PQWNFJSYZ8CZZD147D
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KMP3NQGY1V13G5FMKM76Z111
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KMP3M96QNS23ZMSBSZ19RX9D
  • promiseRaceWorkflow | wrun_01KMP3MCEVR5JYNKCDEP212SKW
  • promiseAnyWorkflow | wrun_01KMP3MER50ENQMK1DZC54B5J2
  • importedStepOnlyWorkflow | wrun_01KMP3P3E51J7221QT48Q8Y02H
  • hookWorkflow | wrun_01KMP3MXH1WCBBVA0QDQPWZYK3
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KMP3N85D905YXMZ5EJ87SA0N
  • webhookWorkflow | wrun_01KMP3NH16VE34DN3VAKG8D5J9
  • sleepingWorkflow | wrun_01KMP3NQJBECVWABNGMAW4N069
  • parallelSleepWorkflow | wrun_01KMP3P3YCN5RD5NS1CNRS8A2C
  • nullByteWorkflow | wrun_01KMP3P88KHNPFQF09S5K88P7S
  • workflowAndStepMetadataWorkflow | wrun_01KMP3PAEYDSDGFAYRBHPV6FR0
  • fetchWorkflow | wrun_01KMP3SFQMB97MQVT17YZJ184S
  • promiseRaceStressTestWorkflow | wrun_01KMP3SJAT0A768PW6JP1Z5K4J
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KMP3WW5AY965ZVK70DRZC0N4
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KMP3XG613FV6M6SR0EY31X5G
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KMP3Y46NTSFRFQSFK8JEXCNM
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KMP3YQ2DF1PTS6B6MAAQ3Z4E
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KMP3YZ6QQTF6EKNTB8J42DF6
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KMP3Z4F0BHCBF9AJZAA2KVJA
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KMP3Z6WCJ8EDGDQZ2DS43YSK
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KMP3ZN0JX4ZHGZDA2JKQX386
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KMP3ZT85HPBSRP420Y2DAR80
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KMP400X8DMN36VKN2N97A15Y
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KMP4078PZYYGXMA0184A4WNE
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KMP40DGYFBY797DC2JMJ5Q0Z
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KMP40KP7Y7NWPPGKC5JZCFQK
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KMP40T385HCAN8SXA3S2YJ03
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KMP414CQMBZBT6C2R4R0K6ZS
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KMP41BRX5XVN3BKN6QD922FG
  • cancelRun - cancelling a running workflow | wrun_01KMP41HZNYWKH1TTHGMPRWGGS
  • cancelRun via CLI - cancelling a running workflow | wrun_01KMP41TTC5FPX9214EGHNV94S
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KMP4267XGTF4PE1Z7TWH7F9R
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KMP42SMX58BBB9GK092DZYFZ
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KMP4352MY53SSYAH4YFSZD87

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro7607
✅ example7607
✅ express7607
✅ fastify7607
✅ hono7607
❌ nextjs-turbopack7922
✅ nextjs-webpack8102
✅ nitro7607
✅ nuxt7607
✅ sveltekit7607
✅ vite7607
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable69014
✅ express-stable69014
✅ fastify-stable69014
✅ hono-stable69014
✅ nextjs-turbopack-canary58025
✅ nextjs-turbopack-stable7508
✅ nextjs-webpack-canary58025
✅ nextjs-webpack-stable7508
✅ nitro-stable69014
✅ nuxt-stable69014
✅ sveltekit-stable69014
✅ vite-stable69014
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable69014
✅ express-stable69014
✅ fastify-stable69014
✅ hono-stable69014
✅ nextjs-turbopack-canary58025
✅ nextjs-turbopack-stable7508
✅ nextjs-webpack-canary58025
✅ nextjs-webpack-stable7508
✅ nitro-stable69014
✅ nuxt-stable69014
✅ sveltekit-stable69014
✅ vite-stable69014
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable69014
✅ express-stable69014
✅ fastify-stable69014
✅ hono-stable69014
✅ nextjs-turbopack-canary58025
✅ nextjs-turbopack-stable7508
✅ nextjs-webpack-canary58025
✅ nextjs-webpack-stable7508
✅ nitro-stable69014
✅ nuxt-stable69014
✅ sveltekit-stable69014
✅ vite-stable69014
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack7508
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev500
❌ mongodb5538
✅ redis-dev500
❌ redis5628
✅ turso-dev500
❌ turso4548
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable69014
✅ e2e-local-postgres-nest-stable69014
✅ e2e-local-prod-nest-stable69014

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: success
  • Windows: success

Check the workflow run for details.

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

Fixes a race where concurrent workflow invocations could both emit hook_disposed for the same hook, leading to duplicate events and replay corruption. The changes make hook disposal atomic in each World implementation and refine runtime logging for the expected “already disposed” case.

Changes:

  • world-postgres: make hook disposal atomic via DELETE ... RETURNING, throwing EntityConflictError on concurrent duplicate disposal.
  • world-local: add a writeExclusive lock file guard to prevent concurrent duplicate hook_disposed.
  • core: split logging paths for EntityConflictError vs RunExpiredError during hook disposal; add changeset.

Reviewed changes

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

Show a summary per file
FileDescription
packages/world-postgres/src/storage.tsAtomically deletes hooks on hook_disposed and detects concurrent duplicates.
packages/world-local/src/storage/events-storage.tsAdds exclusive lock file for hook disposal to prevent TOCTOU duplicates.
packages/world-local/src/storage.test.tsAdds a concurrency regression test for duplicate hook_disposed.
packages/core/src/runtime/suspension-handler.tsImproves logging differentiation for duplicate disposal vs expired runs.
.changeset/fix-duplicate-hook-disposed-race.mdDeclares patch releases for affected packages.

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

Comment on lines +1972 to +1974
expect((rejected[0] as PromiseRejectedResult).reason).toMatchObject({
name: 'EntityConflictError',
});

CopilotAIMar 25, 2026

Copy link

Choose a reason for hiding this comment

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

This concurrency test can be flaky: disposeHook() may reject with HookNotFoundError (not EntityConflictError) if one disposal deletes the hook file before the other call reaches the hook existence validation in events-storage. Consider broadening the assertion to accept either error, or introduce a barrier so both calls reach the disposal section before one completes.

Suggested change
expect((rejected[0]asPromiseRejectedResult).reason).toMatchObject({
name: 'EntityConflictError',
});
constreason=(rejected[0]asPromiseRejectedResult).reasonas{
name?: string;
};
expect(['EntityConflictError','HookNotFoundError']).toContain(reason.name);

Copilot uses AI. Check for mistakes.

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.

Already addressed in e604643 — the test now accepts both EntityConflictError and HookNotFoundError.

The concurrent hook_disposed race has two possible orderings: the loser
may hit the lock file (EntityConflictError) or find the hook entity
already deleted by the winner (HookNotFoundError). Both are correct.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pranaygp

Copy link
Copy Markdown
ContributorAuthor

failings tests are confirmed flaky from unrelated race conditions and queue timeout issues. merging this and investigating those

@pranaygp
pranaygp merged commit d1391e1 into mainMar 26, 2026
160 of 166 checks passed
@pranaygp
pranaygp deleted the fix/duplicate-hook-disposed-race branch March 26, 2026 22:51
@ghostghost mentioned this pull request Mar 26, 2026
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.

sleep() causes 'Unconsumed event in event log' when called concurrently via Promise.all

3 participants

@pranaygp@VaguelySerious