Handle 409 errors gracefully for step_completed/failed/retrying - #1120

Merged
VaguelySerious merged 3 commits into
mainfrom
pnoll/handle-step-409-gracefully
Feb 20, 2026
Merged

Handle 409 errors gracefully for step_completed/failed/retrying#1120
VaguelySerious merged 3 commits into
mainfrom
pnoll/handle-step-409-gracefully

Conversation

@VaguelySerious

Copy link
Copy Markdown
Member

When multiple step invocations race to complete/fail/retry a step, the server returns a 409 Conflict. Previously this would bubble up as an unhandled error. Now these are caught and logged as warnings, matching the pattern established for run_completed/run_failed in #1118.

…p_retrying events
When multiple step invocations race to complete/fail/retry a step, the
server returns a 409 Conflict. Previously this would bubble up as an
unhandled error. Now these are caught and logged as warnings, matching
the pattern established for run_completed/run_failed in #1118.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@changeset-bot

changeset-botBot commented Feb 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c59a690

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

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

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

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

@vercel

vercelBot commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Feb 19, 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.029s (-14.6% 🟢)1.004s (~)0.976s101.00x
💻 LocalNitro0.032s (-4.5%)1.004s (~)0.972s101.12x
💻 LocalNext.js (Turbopack)0.048s1.005s0.957s101.66x
🌐 RedisNext.js (Turbopack)0.049s1.005s0.956s101.70x
🌐 MongoDBNext.js (Turbopack)0.092s1.007s0.915s103.20x
🐘 PostgresNitro0.126s (-70.4% 🟢)1.009s (~)0.883s104.39x
🐘 PostgresExpress0.213s (+116.0% 🔺)1.010s (~)0.797s107.42x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.476s (-16.9% 🟢)2.049s (+20.8% 🔺)1.573s101.00x
▲ VercelNext.js (Turbopack)0.502s (-26.5% 🟢)1.969s (-9.1% 🟢)1.467s101.05x
▲ VercelExpress0.543s (+4.5%)1.939s (-2.3%)1.396s101.14x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.099s (-0.8%)2.005s (~)0.907s101.00x
🌐 RedisNext.js (Turbopack)1.104s2.006s0.902s101.01x
💻 LocalNitro1.107s (~)2.005s (~)0.898s101.01x
💻 LocalNext.js (Turbopack)1.107s2.005s0.898s101.01x
🌐 MongoDBNext.js (Turbopack)1.299s2.008s0.709s101.18x
🐘 PostgresExpress2.437s (-1.5%)3.014s (~)0.577s102.22x
🐘 PostgresNitro2.465s (+20.8% 🔺)3.013s (+19.9% 🔺)0.548s102.24x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.994s (-3.5%)3.274s (-4.3%)1.280s101.00x
▲ VercelExpress2.038s (-1.3%)3.486s (+1.3%)1.448s101.02x
▲ VercelNext.js (Turbopack)2.145s (+4.4%)3.314s (~)1.169s101.08x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)10.705s11.022s0.317s31.00x
💻 LocalExpress10.779s (-0.6%)11.022s (~)0.243s31.01x
💻 LocalNext.js (Turbopack)10.799s11.023s0.224s31.01x
💻 LocalNitro10.846s (~)11.022s (~)0.176s31.01x
🌐 MongoDBNext.js (Turbopack)12.183s13.024s0.841s31.14x
🐘 PostgresExpress20.312s (~)21.057s (~)0.745s21.90x
🐘 PostgresNitro20.339s (+34.1% 🔺)21.054s (+31.2% 🔺)0.715s21.90x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express15.349s (-0.5%)16.576s (-3.6%)1.227s21.00x
▲ VercelNitro15.845s (+1.3%)16.953s (-1.0%)1.108s21.03x
▲ VercelNext.js (Turbopack)16.241s (+1.3%)17.819s (+1.3%)1.578s21.06x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.885s27.050s0.165s31.00x
💻 LocalExpress27.299s (-0.7%)28.050s (~)0.751s31.02x
💻 LocalNext.js (Turbopack)27.322s28.054s0.733s31.02x
💻 LocalNitro27.507s (~)28.052s (~)0.545s31.02x
🌐 MongoDBNext.js (Turbopack)29.817s30.045s0.228s21.11x
🐘 PostgresExpress50.346s (~)51.131s (~)0.785s21.87x
🐘 PostgresNitro50.358s (+24.3% 🔺)51.125s (+25.9% 🔺)0.766s21.87x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express38.971s (-0.7%)40.623s (+0.6%)1.652s21.00x
▲ VercelNext.js (Turbopack)41.327s (+2.2%)42.956s (+2.9%)1.630s21.06x
▲ VercelNitro44.955s (+15.8% 🔺)46.160s (+15.0% 🔺)1.205s21.15x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.449s55.103s0.655s21.00x
💻 LocalExpress56.746s (-0.8%)57.102s (-1.7%)0.356s21.04x
💻 LocalNext.js (Turbopack)56.807s57.112s0.304s21.04x
💻 LocalNitro57.055s (~)57.102s (-1.7%)0.047s21.05x
🌐 MongoDBNext.js (Turbopack)60.849s61.077s0.228s21.12x
🐘 PostgresNitro100.245s (+22.8% 🔺)101.242s (+23.2% 🔺)0.997s11.84x
🐘 PostgresExpress100.282s (~)101.243s (~)0.961s11.84x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express84.271s (+1.0%)86.342s (+2.0%)2.071s21.00x
▲ VercelNitro84.672s (-10.9% 🟢)85.916s (-11.1% 🟢)1.244s21.00x
▲ VercelNext.js (Turbopack)87.110s (-7.4% 🟢)88.516s (-7.3% 🟢)1.406s21.03x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.258s2.006s0.748s151.00x
💻 LocalExpress1.380s (-1.4%)2.006s (~)0.626s151.10x
💻 LocalNext.js (Turbopack)1.395s2.005s0.609s151.11x
💻 LocalNitro1.412s (+2.0%)2.005s (~)0.593s151.12x
🌐 MongoDBNext.js (Turbopack)2.153s3.008s0.855s101.71x
🐘 PostgresNitro2.272s (+6.0% 🔺)3.013s (+2.9%)0.741s101.81x
🐘 PostgresExpress2.293s (+0.7%)3.013s (~)0.721s101.82x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.202s (~)3.503s (-4.5%)1.301s91.00x
▲ VercelNext.js (Turbopack)2.732s (-6.3% 🟢)3.969s (-11.0% 🟢)1.237s91.24x
▲ VercelExpress3.581s (+51.1% 🔺)5.072s (+40.7% 🔺)1.491s61.63x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express2.421s (-4.6%)3.008s (~)0.587s101.00x
💻 LocalNitro2.481s (+1.7%)3.008s (~)0.527s101.02x
💻 LocalNext.js (Turbopack)2.482s3.007s0.525s101.03x
🌐 RedisNext.js (Turbopack)2.487s3.008s0.520s101.03x
🌐 MongoDBNext.js (Turbopack)4.694s5.178s0.484s61.94x
🐘 PostgresNitro7.940s (-29.8% 🟢)8.531s (-27.1% 🟢)0.591s43.28x
🐘 PostgresExpress8.460s (-1.3%)9.033s (-2.8%)0.573s43.49x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.602s (+3.0%)3.778s (-0.9%)1.176s81.00x
▲ VercelNext.js (Turbopack)2.868s (+9.8% 🔺)3.810s (-0.5%)0.943s81.10x
▲ VercelExpress3.979s (+64.3% 🔺)5.202s (+37.4% 🔺)1.223s61.53x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.037s4.438s0.401s71.00x
💻 LocalNext.js (Turbopack)6.760s7.214s0.454s51.67x
💻 LocalExpress6.827s (-7.3% 🟢)7.218s (-10.0% 🟢)0.391s51.69x
💻 LocalNitro6.853s (+2.1%)7.021s (~)0.168s51.70x
🌐 MongoDBNext.js (Turbopack)9.896s10.350s0.454s32.45x
🐘 PostgresNitro48.813s (+2.2%)49.157s (+2.1%)0.344s112.09x
🐘 PostgresExpress50.880s (+2.0%)51.183s (+2.1%)0.303s112.60x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.995s (-15.8% 🟢)4.028s (-14.8% 🟢)1.032s81.00x
▲ VercelExpress3.408s (+8.6% 🔺)4.629s (+12.4% 🔺)1.221s71.14x
▲ VercelNext.js (Turbopack)3.614s (+4.3%)4.598s (+1.7%)0.984s71.21x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.267s2.006s0.739s151.00x
💻 LocalExpress1.412s (-1.1%)2.006s (~)0.594s151.11x
💻 LocalNitro1.427s (+1.2%)2.006s (~)0.579s151.13x
💻 LocalNext.js (Turbopack)1.458s2.006s0.547s151.15x
🌐 MongoDBNext.js (Turbopack)2.128s3.008s0.880s101.68x
🐘 PostgresNitro2.186s (+2.8%)2.679s (~)0.493s121.73x
🐘 PostgresExpress2.218s (~)2.740s (+5.6% 🔺)0.523s111.75x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.060s (-20.6% 🟢)3.356s (-13.1% 🟢)1.296s91.00x
▲ VercelExpress2.147s (~)3.433s (~)1.286s91.04x
▲ VercelNext.js (Turbopack)2.351s (+2.9%)3.625s (~)1.274s91.14x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.479s3.007s0.528s101.00x
💻 LocalNitro2.588s (-1.1%)3.009s (~)0.421s101.04x
💻 LocalExpress2.646s (-1.7%)3.007s (~)0.362s101.07x
💻 LocalNext.js (Turbopack)2.693s3.010s0.316s101.09x
🌐 MongoDBNext.js (Turbopack)4.679s5.177s0.499s61.89x
🐘 PostgresNitro10.280s (-2.8%)10.695s (-5.9% 🟢)0.415s34.15x
🐘 PostgresExpress11.117s (-8.6% 🟢)11.365s (-8.2% 🟢)0.248s34.48x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.246s (-2.0%)3.485s (+2.0%)1.238s91.00x
▲ VercelNext.js (Turbopack)2.619s (+2.5%)3.696s (-1.1%)1.078s91.17x
▲ VercelNitro2.928s (+28.4% 🔺)4.577s (+28.8% 🔺)1.649s81.30x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.010s4.724s0.714s71.00x
💻 LocalNext.js (Turbopack)7.063s7.769s0.706s41.76x
💻 LocalExpress7.215s (-6.7% 🟢)8.019s (~)0.804s41.80x
💻 LocalNitro7.655s (+3.2%)8.024s (~)0.369s41.91x
🌐 MongoDBNext.js (Turbopack)9.977s10.350s0.373s32.49x
🐘 PostgresExpress48.605s (-3.1%)49.119s (-3.9%)0.514s112.12x
🐘 PostgresNitro51.945s (+8.1% 🔺)52.110s (+8.2% 🔺)0.165s112.95x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.917s (-17.2% 🟢)3.920s (-13.6% 🟢)1.004s81.00x
▲ VercelExpress3.620s (+5.5% 🔺)4.579s (+3.2%)0.959s71.24x
▲ VercelNitro3.647s (+28.8% 🔺)4.650s (+15.1% 🔺)1.004s71.25x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.147s1.001s0.010s1.016s0.869s101.00x
🌐 RedisNext.js (Turbopack)0.153s1.000s0.001s1.007s0.854s101.04x
💻 LocalExpress0.161s (-8.3% 🟢)1.003s (~)0.010s (-7.6% 🟢)1.015s (~)0.854s101.09x
💻 LocalNitro0.179s (~)1.002s (~)0.010s (-5.9% 🟢)1.015s (~)0.836s101.21x
🌐 MongoDBNext.js (Turbopack)0.494s0.945s0.001s1.009s0.514s103.35x
🐘 PostgresNitro2.344s (+103.8% 🔺)2.696s (+42.1% 🔺)0.002s (+7.1% 🔺)3.014s (+49.6% 🔺)0.669s1015.90x
🐘 PostgresExpress2.382s (+1.2%)2.659s (-1.1%)0.001s (-7.1% 🟢)3.015s (~)0.633s1016.16x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.610s (+1.4%)2.168s (+3.0%)0.095s (-41.3% 🟢)2.836s (+2.5%)1.226s101.00x
▲ VercelNitro1.652s (-21.5% 🟢)1.921s (-30.1% 🟢)0.222s (+25.1% 🔺)2.629s (-24.6% 🟢)0.977s101.03x
▲ VercelNext.js (Turbopack)1.740s (+1.0%)2.565s (+7.6% 🔺)0.182s (+30.9% 🔺)3.241s (+5.1% 🔺)1.502s101.08x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress8/12
🐘 PostgresNitro8/12
▲ VercelNitro6/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local9/12
Next.js (Turbopack)🌐 Redis7/12
Nitro💻 Local10/12
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

@github-actions

github-actionsBot commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production522149572
✅ 💻 Local Development556068624
✅ 📦 Local Production556068624
✅ 🐘 Local Postgres556068624
✅ 🪟 Windows490352
❌ 🌍 Community Worlds111459165
✅ 📋 Other135021156
Total2485462862817

❌ Failed Tests

▲ Vercel Production (1 failed)

nextjs-turbopack (1 failed):

  • error handling retry behavior workflow completes despite transient 5xx on step_completed
🌍 Community Worlds (45 failed)

turso (45 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • parallelSleepWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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 retry behavior workflow completes despite transient 5xx on step_completed
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • cancelRun - cancelling a running workflow
  • cancelRun via CLI - cancelling a running workflow
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4705
✅ example4705
✅ express4705
✅ fastify4705
✅ hono4705
❌ nextjs-turbopack4912
✅ nextjs-webpack5002
✅ nitro4705
✅ nuxt4705
✅ sveltekit4705
✅ vite4705
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4903
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4903
✅ redis-dev300
✅ redis4903
✅ turso-dev300
❌ turso4453
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4507
✅ e2e-local-postgres-nest-stable4507
✅ e2e-local-prod-nest-stable4507

📋 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.

@VaguelySerious
VaguelySerious marked this pull request as ready for review February 19, 2026 01:52

@pranaygppranaygp 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.

Solid PR — the 409 handling pattern is consistent and correct, and the tests cover the key paths well. Left a few minor comments.

},
});
try {
await world.events.create(workflowRunId, {

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.

Nit: This is the only step_failed event creation that does not use withServerErrorRetry. The other three sites (fatal error path, max retries exhausted path, and step_retrying) all wrap the call with it. Was this intentional? If not, might be worth wrapping for consistency:

try{awaitwithServerErrorRetry(()=>world.events.create(workflowRunId,{
...
}));}catch(err){

(Pre-existing, but since you're already touching this block it'd be a clean fix.)

},
event: {},
});
mockStepFn.mockResolvedValue('step-result');

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.

Unused variable — callCount is incremented but never asserted on. Either assert it (e.g. expect(callCount).toBe(1) to verify step_completed was actually attempted) or remove it.

).rejects.toThrow('Internal Server Error');
});
});
});

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.

Nice that you have a should re-throw non-409 errors from step_retrying test. Consider adding analogous re-throw tests for step_completed and step_failed (e.g. a 500 from step_completed should propagate, a 500 from step_failed in the max-retries path should propagate). This would fully cover all the throw err / throw stepFailErr branches.

@pranaygppranaygp 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.

Did an audit of 409/410 handling across all world.events.create() call sites in the SDK (cross-referenced against the server's event validation logic and the event sourcing docs). The changes in this PR are correct — here are the pre-existing gaps worth addressing:


Should fix in this PR

packages/core/src/runtime/step-handler.ts:150-153 — uses console.warn() instead of runtimeLogger.info() for the step_started 410 (workflow already completed) case. Every other 410/409 handler in the file uses the structured logger. This should be:

runtimeLogger.info('Workflow run already completed, skipping step',{ workflowRunId, stepId,message: err.message});

info is the right level here — this is an expected, non-actionable condition (same as the 410 handler in the catch block at line 476-486).


Follow-up PR candidates

These are all pre-existing and fine to address separately:

1. packages/core/src/runtime/resume-hook.ts:128hook_received has no error handling at all. Server can return 409 (hook disposed) or 410 (run done) — both benign races that should be caught and logged as info. A 404 here would be a real bug and should throw.

2. packages/core/src/runtime/run.ts:69run_cancelled (the Run.cancel() method) has no error handling. Server returns 409 if run already terminal — should catch and log as warn.

3. packages/core/src/runtime/runs.ts:95run_cancelled (the cancelRun() function) — same issue, different call site. Errors get wrapped in a generic Failed to cancel run message, losing the 409 signal.

4. packages/core/src/runtime.ts:145run_started has no error handling. Server returns 410 if run is already terminal. Should catch 410 and log as info ("run already completed, skipping").

5. packages/core/src/runtime/suspension-handler.ts:116hook_created catches 410 but not 409. Server returns 409 if the hookId already exists (duplicate creation, same as step_created/wait_created). Should catch 409 and log as info, matching the pattern at lines 183 and 238.

6. packages/core/src/runtime/runs.ts:190wait_completed in wakeUpRun() catches 409 silently (increments stoppedCount with no log). A debug log would help observability without noise.

7. packages/core/src/runtime/step-handler.ts:253 — (already commented on this) the pre-execution guard step_failed is the only one not wrapped in withServerErrorRetry.

@VaguelySerious
VaguelySerious merged commit c75de97 into mainFeb 20, 2026
158 of 164 checks passed
@VaguelySerious
VaguelySerious deleted the pnoll/handle-step-409-gracefully branch February 20, 2026 22:43
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@VaguelySerious@pranaygp
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n 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;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} 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

Handle 409 errors gracefully for step_completed/failed/retrying - #1120

Merged
VaguelySerious merged 3 commits into
mainfrom
pnoll/handle-step-409-gracefully
Feb 20, 2026
Merged

Handle 409 errors gracefully for step_completed/failed/retrying#1120
VaguelySerious merged 3 commits into
mainfrom
pnoll/handle-step-409-gracefully

Conversation

@VaguelySerious

Copy link
Copy Markdown
Member

When multiple step invocations race to complete/fail/retry a step, the server returns a 409 Conflict. Previously this would bubble up as an unhandled error. Now these are caught and logged as warnings, matching the pattern established for run_completed/run_failed in #1118.

…p_retrying events
When multiple step invocations race to complete/fail/retry a step, the
server returns a 409 Conflict. Previously this would bubble up as an
unhandled error. Now these are caught and logged as warnings, matching
the pattern established for run_completed/run_failed in #1118.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@changeset-bot

changeset-botBot commented Feb 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c59a690

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

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

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

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

@vercel

vercelBot commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Feb 19, 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.029s (-14.6% 🟢)1.004s (~)0.976s101.00x
💻 LocalNitro0.032s (-4.5%)1.004s (~)0.972s101.12x
💻 LocalNext.js (Turbopack)0.048s1.005s0.957s101.66x
🌐 RedisNext.js (Turbopack)0.049s1.005s0.956s101.70x
🌐 MongoDBNext.js (Turbopack)0.092s1.007s0.915s103.20x
🐘 PostgresNitro0.126s (-70.4% 🟢)1.009s (~)0.883s104.39x
🐘 PostgresExpress0.213s (+116.0% 🔺)1.010s (~)0.797s107.42x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.476s (-16.9% 🟢)2.049s (+20.8% 🔺)1.573s101.00x
▲ VercelNext.js (Turbopack)0.502s (-26.5% 🟢)1.969s (-9.1% 🟢)1.467s101.05x
▲ VercelExpress0.543s (+4.5%)1.939s (-2.3%)1.396s101.14x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.099s (-0.8%)2.005s (~)0.907s101.00x
🌐 RedisNext.js (Turbopack)1.104s2.006s0.902s101.01x
💻 LocalNitro1.107s (~)2.005s (~)0.898s101.01x
💻 LocalNext.js (Turbopack)1.107s2.005s0.898s101.01x
🌐 MongoDBNext.js (Turbopack)1.299s2.008s0.709s101.18x
🐘 PostgresExpress2.437s (-1.5%)3.014s (~)0.577s102.22x
🐘 PostgresNitro2.465s (+20.8% 🔺)3.013s (+19.9% 🔺)0.548s102.24x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.994s (-3.5%)3.274s (-4.3%)1.280s101.00x
▲ VercelExpress2.038s (-1.3%)3.486s (+1.3%)1.448s101.02x
▲ VercelNext.js (Turbopack)2.145s (+4.4%)3.314s (~)1.169s101.08x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)10.705s11.022s0.317s31.00x
💻 LocalExpress10.779s (-0.6%)11.022s (~)0.243s31.01x
💻 LocalNext.js (Turbopack)10.799s11.023s0.224s31.01x
💻 LocalNitro10.846s (~)11.022s (~)0.176s31.01x
🌐 MongoDBNext.js (Turbopack)12.183s13.024s0.841s31.14x
🐘 PostgresExpress20.312s (~)21.057s (~)0.745s21.90x
🐘 PostgresNitro20.339s (+34.1% 🔺)21.054s (+31.2% 🔺)0.715s21.90x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express15.349s (-0.5%)16.576s (-3.6%)1.227s21.00x
▲ VercelNitro15.845s (+1.3%)16.953s (-1.0%)1.108s21.03x
▲ VercelNext.js (Turbopack)16.241s (+1.3%)17.819s (+1.3%)1.578s21.06x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.885s27.050s0.165s31.00x
💻 LocalExpress27.299s (-0.7%)28.050s (~)0.751s31.02x
💻 LocalNext.js (Turbopack)27.322s28.054s0.733s31.02x
💻 LocalNitro27.507s (~)28.052s (~)0.545s31.02x
🌐 MongoDBNext.js (Turbopack)29.817s30.045s0.228s21.11x
🐘 PostgresExpress50.346s (~)51.131s (~)0.785s21.87x
🐘 PostgresNitro50.358s (+24.3% 🔺)51.125s (+25.9% 🔺)0.766s21.87x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express38.971s (-0.7%)40.623s (+0.6%)1.652s21.00x
▲ VercelNext.js (Turbopack)41.327s (+2.2%)42.956s (+2.9%)1.630s21.06x
▲ VercelNitro44.955s (+15.8% 🔺)46.160s (+15.0% 🔺)1.205s21.15x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.449s55.103s0.655s21.00x
💻 LocalExpress56.746s (-0.8%)57.102s (-1.7%)0.356s21.04x
💻 LocalNext.js (Turbopack)56.807s57.112s0.304s21.04x
💻 LocalNitro57.055s (~)57.102s (-1.7%)0.047s21.05x
🌐 MongoDBNext.js (Turbopack)60.849s61.077s0.228s21.12x
🐘 PostgresNitro100.245s (+22.8% 🔺)101.242s (+23.2% 🔺)0.997s11.84x
🐘 PostgresExpress100.282s (~)101.243s (~)0.961s11.84x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express84.271s (+1.0%)86.342s (+2.0%)2.071s21.00x
▲ VercelNitro84.672s (-10.9% 🟢)85.916s (-11.1% 🟢)1.244s21.00x
▲ VercelNext.js (Turbopack)87.110s (-7.4% 🟢)88.516s (-7.3% 🟢)1.406s21.03x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.258s2.006s0.748s151.00x
💻 LocalExpress1.380s (-1.4%)2.006s (~)0.626s151.10x
💻 LocalNext.js (Turbopack)1.395s2.005s0.609s151.11x
💻 LocalNitro1.412s (+2.0%)2.005s (~)0.593s151.12x
🌐 MongoDBNext.js (Turbopack)2.153s3.008s0.855s101.71x
🐘 PostgresNitro2.272s (+6.0% 🔺)3.013s (+2.9%)0.741s101.81x
🐘 PostgresExpress2.293s (+0.7%)3.013s (~)0.721s101.82x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.202s (~)3.503s (-4.5%)1.301s91.00x
▲ VercelNext.js (Turbopack)2.732s (-6.3% 🟢)3.969s (-11.0% 🟢)1.237s91.24x
▲ VercelExpress3.581s (+51.1% 🔺)5.072s (+40.7% 🔺)1.491s61.63x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express2.421s (-4.6%)3.008s (~)0.587s101.00x
💻 LocalNitro2.481s (+1.7%)3.008s (~)0.527s101.02x
💻 LocalNext.js (Turbopack)2.482s3.007s0.525s101.03x
🌐 RedisNext.js (Turbopack)2.487s3.008s0.520s101.03x
🌐 MongoDBNext.js (Turbopack)4.694s5.178s0.484s61.94x
🐘 PostgresNitro7.940s (-29.8% 🟢)8.531s (-27.1% 🟢)0.591s43.28x
🐘 PostgresExpress8.460s (-1.3%)9.033s (-2.8%)0.573s43.49x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.602s (+3.0%)3.778s (-0.9%)1.176s81.00x
▲ VercelNext.js (Turbopack)2.868s (+9.8% 🔺)3.810s (-0.5%)0.943s81.10x
▲ VercelExpress3.979s (+64.3% 🔺)5.202s (+37.4% 🔺)1.223s61.53x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.037s4.438s0.401s71.00x
💻 LocalNext.js (Turbopack)6.760s7.214s0.454s51.67x
💻 LocalExpress6.827s (-7.3% 🟢)7.218s (-10.0% 🟢)0.391s51.69x
💻 LocalNitro6.853s (+2.1%)7.021s (~)0.168s51.70x
🌐 MongoDBNext.js (Turbopack)9.896s10.350s0.454s32.45x
🐘 PostgresNitro48.813s (+2.2%)49.157s (+2.1%)0.344s112.09x
🐘 PostgresExpress50.880s (+2.0%)51.183s (+2.1%)0.303s112.60x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.995s (-15.8% 🟢)4.028s (-14.8% 🟢)1.032s81.00x
▲ VercelExpress3.408s (+8.6% 🔺)4.629s (+12.4% 🔺)1.221s71.14x
▲ VercelNext.js (Turbopack)3.614s (+4.3%)4.598s (+1.7%)0.984s71.21x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.267s2.006s0.739s151.00x
💻 LocalExpress1.412s (-1.1%)2.006s (~)0.594s151.11x
💻 LocalNitro1.427s (+1.2%)2.006s (~)0.579s151.13x
💻 LocalNext.js (Turbopack)1.458s2.006s0.547s151.15x
🌐 MongoDBNext.js (Turbopack)2.128s3.008s0.880s101.68x
🐘 PostgresNitro2.186s (+2.8%)2.679s (~)0.493s121.73x
🐘 PostgresExpress2.218s (~)2.740s (+5.6% 🔺)0.523s111.75x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.060s (-20.6% 🟢)3.356s (-13.1% 🟢)1.296s91.00x
▲ VercelExpress2.147s (~)3.433s (~)1.286s91.04x
▲ VercelNext.js (Turbopack)2.351s (+2.9%)3.625s (~)1.274s91.14x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.479s3.007s0.528s101.00x
💻 LocalNitro2.588s (-1.1%)3.009s (~)0.421s101.04x
💻 LocalExpress2.646s (-1.7%)3.007s (~)0.362s101.07x
💻 LocalNext.js (Turbopack)2.693s3.010s0.316s101.09x
🌐 MongoDBNext.js (Turbopack)4.679s5.177s0.499s61.89x
🐘 PostgresNitro10.280s (-2.8%)10.695s (-5.9% 🟢)0.415s34.15x
🐘 PostgresExpress11.117s (-8.6% 🟢)11.365s (-8.2% 🟢)0.248s34.48x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.246s (-2.0%)3.485s (+2.0%)1.238s91.00x
▲ VercelNext.js (Turbopack)2.619s (+2.5%)3.696s (-1.1%)1.078s91.17x
▲ VercelNitro2.928s (+28.4% 🔺)4.577s (+28.8% 🔺)1.649s81.30x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.010s4.724s0.714s71.00x
💻 LocalNext.js (Turbopack)7.063s7.769s0.706s41.76x
💻 LocalExpress7.215s (-6.7% 🟢)8.019s (~)0.804s41.80x
💻 LocalNitro7.655s (+3.2%)8.024s (~)0.369s41.91x
🌐 MongoDBNext.js (Turbopack)9.977s10.350s0.373s32.49x
🐘 PostgresExpress48.605s (-3.1%)49.119s (-3.9%)0.514s112.12x
🐘 PostgresNitro51.945s (+8.1% 🔺)52.110s (+8.2% 🔺)0.165s112.95x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.917s (-17.2% 🟢)3.920s (-13.6% 🟢)1.004s81.00x
▲ VercelExpress3.620s (+5.5% 🔺)4.579s (+3.2%)0.959s71.24x
▲ VercelNitro3.647s (+28.8% 🔺)4.650s (+15.1% 🔺)1.004s71.25x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.147s1.001s0.010s1.016s0.869s101.00x
🌐 RedisNext.js (Turbopack)0.153s1.000s0.001s1.007s0.854s101.04x
💻 LocalExpress0.161s (-8.3% 🟢)1.003s (~)0.010s (-7.6% 🟢)1.015s (~)0.854s101.09x
💻 LocalNitro0.179s (~)1.002s (~)0.010s (-5.9% 🟢)1.015s (~)0.836s101.21x
🌐 MongoDBNext.js (Turbopack)0.494s0.945s0.001s1.009s0.514s103.35x
🐘 PostgresNitro2.344s (+103.8% 🔺)2.696s (+42.1% 🔺)0.002s (+7.1% 🔺)3.014s (+49.6% 🔺)0.669s1015.90x
🐘 PostgresExpress2.382s (+1.2%)2.659s (-1.1%)0.001s (-7.1% 🟢)3.015s (~)0.633s1016.16x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.610s (+1.4%)2.168s (+3.0%)0.095s (-41.3% 🟢)2.836s (+2.5%)1.226s101.00x
▲ VercelNitro1.652s (-21.5% 🟢)1.921s (-30.1% 🟢)0.222s (+25.1% 🔺)2.629s (-24.6% 🟢)0.977s101.03x
▲ VercelNext.js (Turbopack)1.740s (+1.0%)2.565s (+7.6% 🔺)0.182s (+30.9% 🔺)3.241s (+5.1% 🔺)1.502s101.08x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress8/12
🐘 PostgresNitro8/12
▲ VercelNitro6/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local9/12
Next.js (Turbopack)🌐 Redis7/12
Nitro💻 Local10/12
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

@github-actions

github-actionsBot commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production522149572
✅ 💻 Local Development556068624
✅ 📦 Local Production556068624
✅ 🐘 Local Postgres556068624
✅ 🪟 Windows490352
❌ 🌍 Community Worlds111459165
✅ 📋 Other135021156
Total2485462862817

❌ Failed Tests

▲ Vercel Production (1 failed)

nextjs-turbopack (1 failed):

  • error handling retry behavior workflow completes despite transient 5xx on step_completed
🌍 Community Worlds (45 failed)

turso (45 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • parallelSleepWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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 retry behavior workflow completes despite transient 5xx on step_completed
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • cancelRun - cancelling a running workflow
  • cancelRun via CLI - cancelling a running workflow
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4705
✅ example4705
✅ express4705
✅ fastify4705
✅ hono4705
❌ nextjs-turbopack4912
✅ nextjs-webpack5002
✅ nitro4705
✅ nuxt4705
✅ sveltekit4705
✅ vite4705
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4903
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4903
✅ redis-dev300
✅ redis4903
✅ turso-dev300
❌ turso4453
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4507
✅ e2e-local-postgres-nest-stable4507
✅ e2e-local-prod-nest-stable4507

📋 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.

@VaguelySerious
VaguelySerious marked this pull request as ready for review February 19, 2026 01:52

@pranaygppranaygp 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.

Solid PR — the 409 handling pattern is consistent and correct, and the tests cover the key paths well. Left a few minor comments.

},
});
try {
await world.events.create(workflowRunId, {

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.

Nit: This is the only step_failed event creation that does not use withServerErrorRetry. The other three sites (fatal error path, max retries exhausted path, and step_retrying) all wrap the call with it. Was this intentional? If not, might be worth wrapping for consistency:

try{awaitwithServerErrorRetry(()=>world.events.create(workflowRunId,{
...
}));}catch(err){

(Pre-existing, but since you're already touching this block it'd be a clean fix.)

},
event: {},
});
mockStepFn.mockResolvedValue('step-result');

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.

Unused variable — callCount is incremented but never asserted on. Either assert it (e.g. expect(callCount).toBe(1) to verify step_completed was actually attempted) or remove it.

).rejects.toThrow('Internal Server Error');
});
});
});

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.

Nice that you have a should re-throw non-409 errors from step_retrying test. Consider adding analogous re-throw tests for step_completed and step_failed (e.g. a 500 from step_completed should propagate, a 500 from step_failed in the max-retries path should propagate). This would fully cover all the throw err / throw stepFailErr branches.

@pranaygppranaygp 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.

Did an audit of 409/410 handling across all world.events.create() call sites in the SDK (cross-referenced against the server's event validation logic and the event sourcing docs). The changes in this PR are correct — here are the pre-existing gaps worth addressing:


Should fix in this PR

packages/core/src/runtime/step-handler.ts:150-153 — uses console.warn() instead of runtimeLogger.info() for the step_started 410 (workflow already completed) case. Every other 410/409 handler in the file uses the structured logger. This should be:

runtimeLogger.info('Workflow run already completed, skipping step',{ workflowRunId, stepId,message: err.message});

info is the right level here — this is an expected, non-actionable condition (same as the 410 handler in the catch block at line 476-486).


Follow-up PR candidates

These are all pre-existing and fine to address separately:

1. packages/core/src/runtime/resume-hook.ts:128hook_received has no error handling at all. Server can return 409 (hook disposed) or 410 (run done) — both benign races that should be caught and logged as info. A 404 here would be a real bug and should throw.

2. packages/core/src/runtime/run.ts:69run_cancelled (the Run.cancel() method) has no error handling. Server returns 409 if run already terminal — should catch and log as warn.

3. packages/core/src/runtime/runs.ts:95run_cancelled (the cancelRun() function) — same issue, different call site. Errors get wrapped in a generic Failed to cancel run message, losing the 409 signal.

4. packages/core/src/runtime.ts:145run_started has no error handling. Server returns 410 if run is already terminal. Should catch 410 and log as info ("run already completed, skipping").

5. packages/core/src/runtime/suspension-handler.ts:116hook_created catches 410 but not 409. Server returns 409 if the hookId already exists (duplicate creation, same as step_created/wait_created). Should catch 409 and log as info, matching the pattern at lines 183 and 238.

6. packages/core/src/runtime/runs.ts:190wait_completed in wakeUpRun() catches 409 silently (increments stoppedCount with no log). A debug log would help observability without noise.

7. packages/core/src/runtime/step-handler.ts:253 — (already commented on this) the pre-execution guard step_failed is the only one not wrapped in withServerErrorRetry.

@VaguelySerious
VaguelySerious merged commit c75de97 into mainFeb 20, 2026
158 of 164 checks passed
@VaguelySerious
VaguelySerious deleted the pnoll/handle-step-409-gracefully branch February 20, 2026 22:43
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

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

Handle 409 errors gracefully for step_completed/failed/retrying - #1120

Merged
VaguelySerious merged 3 commits into
mainfrom
pnoll/handle-step-409-gracefully
Feb 20, 2026
Merged

Handle 409 errors gracefully for step_completed/failed/retrying#1120
VaguelySerious merged 3 commits into
mainfrom
pnoll/handle-step-409-gracefully

Conversation

@VaguelySerious

Copy link
Copy Markdown
Member

When multiple step invocations race to complete/fail/retry a step, the server returns a 409 Conflict. Previously this would bubble up as an unhandled error. Now these are caught and logged as warnings, matching the pattern established for run_completed/run_failed in #1118.

…p_retrying events
When multiple step invocations race to complete/fail/retry a step, the
server returns a 409 Conflict. Previously this would bubble up as an
unhandled error. Now these are caught and logged as warnings, matching
the pattern established for run_completed/run_failed in #1118.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@changeset-bot

changeset-botBot commented Feb 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c59a690

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

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

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

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

@vercel

vercelBot commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Feb 19, 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.029s (-14.6% 🟢)1.004s (~)0.976s101.00x
💻 LocalNitro0.032s (-4.5%)1.004s (~)0.972s101.12x
💻 LocalNext.js (Turbopack)0.048s1.005s0.957s101.66x
🌐 RedisNext.js (Turbopack)0.049s1.005s0.956s101.70x
🌐 MongoDBNext.js (Turbopack)0.092s1.007s0.915s103.20x
🐘 PostgresNitro0.126s (-70.4% 🟢)1.009s (~)0.883s104.39x
🐘 PostgresExpress0.213s (+116.0% 🔺)1.010s (~)0.797s107.42x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.476s (-16.9% 🟢)2.049s (+20.8% 🔺)1.573s101.00x
▲ VercelNext.js (Turbopack)0.502s (-26.5% 🟢)1.969s (-9.1% 🟢)1.467s101.05x
▲ VercelExpress0.543s (+4.5%)1.939s (-2.3%)1.396s101.14x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.099s (-0.8%)2.005s (~)0.907s101.00x
🌐 RedisNext.js (Turbopack)1.104s2.006s0.902s101.01x
💻 LocalNitro1.107s (~)2.005s (~)0.898s101.01x
💻 LocalNext.js (Turbopack)1.107s2.005s0.898s101.01x
🌐 MongoDBNext.js (Turbopack)1.299s2.008s0.709s101.18x
🐘 PostgresExpress2.437s (-1.5%)3.014s (~)0.577s102.22x
🐘 PostgresNitro2.465s (+20.8% 🔺)3.013s (+19.9% 🔺)0.548s102.24x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.994s (-3.5%)3.274s (-4.3%)1.280s101.00x
▲ VercelExpress2.038s (-1.3%)3.486s (+1.3%)1.448s101.02x
▲ VercelNext.js (Turbopack)2.145s (+4.4%)3.314s (~)1.169s101.08x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)10.705s11.022s0.317s31.00x
💻 LocalExpress10.779s (-0.6%)11.022s (~)0.243s31.01x
💻 LocalNext.js (Turbopack)10.799s11.023s0.224s31.01x
💻 LocalNitro10.846s (~)11.022s (~)0.176s31.01x
🌐 MongoDBNext.js (Turbopack)12.183s13.024s0.841s31.14x
🐘 PostgresExpress20.312s (~)21.057s (~)0.745s21.90x
🐘 PostgresNitro20.339s (+34.1% 🔺)21.054s (+31.2% 🔺)0.715s21.90x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express15.349s (-0.5%)16.576s (-3.6%)1.227s21.00x
▲ VercelNitro15.845s (+1.3%)16.953s (-1.0%)1.108s21.03x
▲ VercelNext.js (Turbopack)16.241s (+1.3%)17.819s (+1.3%)1.578s21.06x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.885s27.050s0.165s31.00x
💻 LocalExpress27.299s (-0.7%)28.050s (~)0.751s31.02x
💻 LocalNext.js (Turbopack)27.322s28.054s0.733s31.02x
💻 LocalNitro27.507s (~)28.052s (~)0.545s31.02x
🌐 MongoDBNext.js (Turbopack)29.817s30.045s0.228s21.11x
🐘 PostgresExpress50.346s (~)51.131s (~)0.785s21.87x
🐘 PostgresNitro50.358s (+24.3% 🔺)51.125s (+25.9% 🔺)0.766s21.87x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express38.971s (-0.7%)40.623s (+0.6%)1.652s21.00x
▲ VercelNext.js (Turbopack)41.327s (+2.2%)42.956s (+2.9%)1.630s21.06x
▲ VercelNitro44.955s (+15.8% 🔺)46.160s (+15.0% 🔺)1.205s21.15x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.449s55.103s0.655s21.00x
💻 LocalExpress56.746s (-0.8%)57.102s (-1.7%)0.356s21.04x
💻 LocalNext.js (Turbopack)56.807s57.112s0.304s21.04x
💻 LocalNitro57.055s (~)57.102s (-1.7%)0.047s21.05x
🌐 MongoDBNext.js (Turbopack)60.849s61.077s0.228s21.12x
🐘 PostgresNitro100.245s (+22.8% 🔺)101.242s (+23.2% 🔺)0.997s11.84x
🐘 PostgresExpress100.282s (~)101.243s (~)0.961s11.84x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express84.271s (+1.0%)86.342s (+2.0%)2.071s21.00x
▲ VercelNitro84.672s (-10.9% 🟢)85.916s (-11.1% 🟢)1.244s21.00x
▲ VercelNext.js (Turbopack)87.110s (-7.4% 🟢)88.516s (-7.3% 🟢)1.406s21.03x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.258s2.006s0.748s151.00x
💻 LocalExpress1.380s (-1.4%)2.006s (~)0.626s151.10x
💻 LocalNext.js (Turbopack)1.395s2.005s0.609s151.11x
💻 LocalNitro1.412s (+2.0%)2.005s (~)0.593s151.12x
🌐 MongoDBNext.js (Turbopack)2.153s3.008s0.855s101.71x
🐘 PostgresNitro2.272s (+6.0% 🔺)3.013s (+2.9%)0.741s101.81x
🐘 PostgresExpress2.293s (+0.7%)3.013s (~)0.721s101.82x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.202s (~)3.503s (-4.5%)1.301s91.00x
▲ VercelNext.js (Turbopack)2.732s (-6.3% 🟢)3.969s (-11.0% 🟢)1.237s91.24x
▲ VercelExpress3.581s (+51.1% 🔺)5.072s (+40.7% 🔺)1.491s61.63x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express2.421s (-4.6%)3.008s (~)0.587s101.00x
💻 LocalNitro2.481s (+1.7%)3.008s (~)0.527s101.02x
💻 LocalNext.js (Turbopack)2.482s3.007s0.525s101.03x
🌐 RedisNext.js (Turbopack)2.487s3.008s0.520s101.03x
🌐 MongoDBNext.js (Turbopack)4.694s5.178s0.484s61.94x
🐘 PostgresNitro7.940s (-29.8% 🟢)8.531s (-27.1% 🟢)0.591s43.28x
🐘 PostgresExpress8.460s (-1.3%)9.033s (-2.8%)0.573s43.49x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.602s (+3.0%)3.778s (-0.9%)1.176s81.00x
▲ VercelNext.js (Turbopack)2.868s (+9.8% 🔺)3.810s (-0.5%)0.943s81.10x
▲ VercelExpress3.979s (+64.3% 🔺)5.202s (+37.4% 🔺)1.223s61.53x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.037s4.438s0.401s71.00x
💻 LocalNext.js (Turbopack)6.760s7.214s0.454s51.67x
💻 LocalExpress6.827s (-7.3% 🟢)7.218s (-10.0% 🟢)0.391s51.69x
💻 LocalNitro6.853s (+2.1%)7.021s (~)0.168s51.70x
🌐 MongoDBNext.js (Turbopack)9.896s10.350s0.454s32.45x
🐘 PostgresNitro48.813s (+2.2%)49.157s (+2.1%)0.344s112.09x
🐘 PostgresExpress50.880s (+2.0%)51.183s (+2.1%)0.303s112.60x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.995s (-15.8% 🟢)4.028s (-14.8% 🟢)1.032s81.00x
▲ VercelExpress3.408s (+8.6% 🔺)4.629s (+12.4% 🔺)1.221s71.14x
▲ VercelNext.js (Turbopack)3.614s (+4.3%)4.598s (+1.7%)0.984s71.21x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.267s2.006s0.739s151.00x
💻 LocalExpress1.412s (-1.1%)2.006s (~)0.594s151.11x
💻 LocalNitro1.427s (+1.2%)2.006s (~)0.579s151.13x
💻 LocalNext.js (Turbopack)1.458s2.006s0.547s151.15x
🌐 MongoDBNext.js (Turbopack)2.128s3.008s0.880s101.68x
🐘 PostgresNitro2.186s (+2.8%)2.679s (~)0.493s121.73x
🐘 PostgresExpress2.218s (~)2.740s (+5.6% 🔺)0.523s111.75x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.060s (-20.6% 🟢)3.356s (-13.1% 🟢)1.296s91.00x
▲ VercelExpress2.147s (~)3.433s (~)1.286s91.04x
▲ VercelNext.js (Turbopack)2.351s (+2.9%)3.625s (~)1.274s91.14x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.479s3.007s0.528s101.00x
💻 LocalNitro2.588s (-1.1%)3.009s (~)0.421s101.04x
💻 LocalExpress2.646s (-1.7%)3.007s (~)0.362s101.07x
💻 LocalNext.js (Turbopack)2.693s3.010s0.316s101.09x
🌐 MongoDBNext.js (Turbopack)4.679s5.177s0.499s61.89x
🐘 PostgresNitro10.280s (-2.8%)10.695s (-5.9% 🟢)0.415s34.15x
🐘 PostgresExpress11.117s (-8.6% 🟢)11.365s (-8.2% 🟢)0.248s34.48x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.246s (-2.0%)3.485s (+2.0%)1.238s91.00x
▲ VercelNext.js (Turbopack)2.619s (+2.5%)3.696s (-1.1%)1.078s91.17x
▲ VercelNitro2.928s (+28.4% 🔺)4.577s (+28.8% 🔺)1.649s81.30x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.010s4.724s0.714s71.00x
💻 LocalNext.js (Turbopack)7.063s7.769s0.706s41.76x
💻 LocalExpress7.215s (-6.7% 🟢)8.019s (~)0.804s41.80x
💻 LocalNitro7.655s (+3.2%)8.024s (~)0.369s41.91x
🌐 MongoDBNext.js (Turbopack)9.977s10.350s0.373s32.49x
🐘 PostgresExpress48.605s (-3.1%)49.119s (-3.9%)0.514s112.12x
🐘 PostgresNitro51.945s (+8.1% 🔺)52.110s (+8.2% 🔺)0.165s112.95x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.917s (-17.2% 🟢)3.920s (-13.6% 🟢)1.004s81.00x
▲ VercelExpress3.620s (+5.5% 🔺)4.579s (+3.2%)0.959s71.24x
▲ VercelNitro3.647s (+28.8% 🔺)4.650s (+15.1% 🔺)1.004s71.25x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.147s1.001s0.010s1.016s0.869s101.00x
🌐 RedisNext.js (Turbopack)0.153s1.000s0.001s1.007s0.854s101.04x
💻 LocalExpress0.161s (-8.3% 🟢)1.003s (~)0.010s (-7.6% 🟢)1.015s (~)0.854s101.09x
💻 LocalNitro0.179s (~)1.002s (~)0.010s (-5.9% 🟢)1.015s (~)0.836s101.21x
🌐 MongoDBNext.js (Turbopack)0.494s0.945s0.001s1.009s0.514s103.35x
🐘 PostgresNitro2.344s (+103.8% 🔺)2.696s (+42.1% 🔺)0.002s (+7.1% 🔺)3.014s (+49.6% 🔺)0.669s1015.90x
🐘 PostgresExpress2.382s (+1.2%)2.659s (-1.1%)0.001s (-7.1% 🟢)3.015s (~)0.633s1016.16x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.610s (+1.4%)2.168s (+3.0%)0.095s (-41.3% 🟢)2.836s (+2.5%)1.226s101.00x
▲ VercelNitro1.652s (-21.5% 🟢)1.921s (-30.1% 🟢)0.222s (+25.1% 🔺)2.629s (-24.6% 🟢)0.977s101.03x
▲ VercelNext.js (Turbopack)1.740s (+1.0%)2.565s (+7.6% 🔺)0.182s (+30.9% 🔺)3.241s (+5.1% 🔺)1.502s101.08x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress8/12
🐘 PostgresNitro8/12
▲ VercelNitro6/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local9/12
Next.js (Turbopack)🌐 Redis7/12
Nitro💻 Local10/12
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

@github-actions

github-actionsBot commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production522149572
✅ 💻 Local Development556068624
✅ 📦 Local Production556068624
✅ 🐘 Local Postgres556068624
✅ 🪟 Windows490352
❌ 🌍 Community Worlds111459165
✅ 📋 Other135021156
Total2485462862817

❌ Failed Tests

▲ Vercel Production (1 failed)

nextjs-turbopack (1 failed):

  • error handling retry behavior workflow completes despite transient 5xx on step_completed
🌍 Community Worlds (45 failed)

turso (45 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • parallelSleepWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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 retry behavior workflow completes despite transient 5xx on step_completed
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • cancelRun - cancelling a running workflow
  • cancelRun via CLI - cancelling a running workflow
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4705
✅ example4705
✅ express4705
✅ fastify4705
✅ hono4705
❌ nextjs-turbopack4912
✅ nextjs-webpack5002
✅ nitro4705
✅ nuxt4705
✅ sveltekit4705
✅ vite4705
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4903
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4903
✅ redis-dev300
✅ redis4903
✅ turso-dev300
❌ turso4453
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4507
✅ e2e-local-postgres-nest-stable4507
✅ e2e-local-prod-nest-stable4507

📋 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.

@VaguelySerious
VaguelySerious marked this pull request as ready for review February 19, 2026 01:52

@pranaygppranaygp 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.

Solid PR — the 409 handling pattern is consistent and correct, and the tests cover the key paths well. Left a few minor comments.

},
});
try {
await world.events.create(workflowRunId, {

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.

Nit: This is the only step_failed event creation that does not use withServerErrorRetry. The other three sites (fatal error path, max retries exhausted path, and step_retrying) all wrap the call with it. Was this intentional? If not, might be worth wrapping for consistency:

try{awaitwithServerErrorRetry(()=>world.events.create(workflowRunId,{
...
}));}catch(err){

(Pre-existing, but since you're already touching this block it'd be a clean fix.)

},
event: {},
});
mockStepFn.mockResolvedValue('step-result');

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.

Unused variable — callCount is incremented but never asserted on. Either assert it (e.g. expect(callCount).toBe(1) to verify step_completed was actually attempted) or remove it.

).rejects.toThrow('Internal Server Error');
});
});
});

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.

Nice that you have a should re-throw non-409 errors from step_retrying test. Consider adding analogous re-throw tests for step_completed and step_failed (e.g. a 500 from step_completed should propagate, a 500 from step_failed in the max-retries path should propagate). This would fully cover all the throw err / throw stepFailErr branches.

@pranaygppranaygp 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.

Did an audit of 409/410 handling across all world.events.create() call sites in the SDK (cross-referenced against the server's event validation logic and the event sourcing docs). The changes in this PR are correct — here are the pre-existing gaps worth addressing:


Should fix in this PR

packages/core/src/runtime/step-handler.ts:150-153 — uses console.warn() instead of runtimeLogger.info() for the step_started 410 (workflow already completed) case. Every other 410/409 handler in the file uses the structured logger. This should be:

runtimeLogger.info('Workflow run already completed, skipping step',{ workflowRunId, stepId,message: err.message});

info is the right level here — this is an expected, non-actionable condition (same as the 410 handler in the catch block at line 476-486).


Follow-up PR candidates

These are all pre-existing and fine to address separately:

1. packages/core/src/runtime/resume-hook.ts:128hook_received has no error handling at all. Server can return 409 (hook disposed) or 410 (run done) — both benign races that should be caught and logged as info. A 404 here would be a real bug and should throw.

2. packages/core/src/runtime/run.ts:69run_cancelled (the Run.cancel() method) has no error handling. Server returns 409 if run already terminal — should catch and log as warn.

3. packages/core/src/runtime/runs.ts:95run_cancelled (the cancelRun() function) — same issue, different call site. Errors get wrapped in a generic Failed to cancel run message, losing the 409 signal.

4. packages/core/src/runtime.ts:145run_started has no error handling. Server returns 410 if run is already terminal. Should catch 410 and log as info ("run already completed, skipping").

5. packages/core/src/runtime/suspension-handler.ts:116hook_created catches 410 but not 409. Server returns 409 if the hookId already exists (duplicate creation, same as step_created/wait_created). Should catch 409 and log as info, matching the pattern at lines 183 and 238.

6. packages/core/src/runtime/runs.ts:190wait_completed in wakeUpRun() catches 409 silently (increments stoppedCount with no log). A debug log would help observability without noise.

7. packages/core/src/runtime/step-handler.ts:253 — (already commented on this) the pre-execution guard step_failed is the only one not wrapped in withServerErrorRetry.

@VaguelySerious
VaguelySerious merged commit c75de97 into mainFeb 20, 2026
158 of 164 checks passed
@VaguelySerious
VaguelySerious deleted the pnoll/handle-step-409-gracefully branch February 20, 2026 22:43
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

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

Handle 409 errors gracefully for step_completed/failed/retrying - #1120

Merged
VaguelySerious merged 3 commits into
mainfrom
pnoll/handle-step-409-gracefully
Feb 20, 2026
Merged

Handle 409 errors gracefully for step_completed/failed/retrying#1120
VaguelySerious merged 3 commits into
mainfrom
pnoll/handle-step-409-gracefully

Conversation

@VaguelySerious

Copy link
Copy Markdown
Member

When multiple step invocations race to complete/fail/retry a step, the server returns a 409 Conflict. Previously this would bubble up as an unhandled error. Now these are caught and logged as warnings, matching the pattern established for run_completed/run_failed in #1118.

…p_retrying events
When multiple step invocations race to complete/fail/retry a step, the
server returns a 409 Conflict. Previously this would bubble up as an
unhandled error. Now these are caught and logged as warnings, matching
the pattern established for run_completed/run_failed in #1118.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@changeset-bot

changeset-botBot commented Feb 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c59a690

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

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

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

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

@vercel

vercelBot commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Feb 19, 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.029s (-14.6% 🟢)1.004s (~)0.976s101.00x
💻 LocalNitro0.032s (-4.5%)1.004s (~)0.972s101.12x
💻 LocalNext.js (Turbopack)0.048s1.005s0.957s101.66x
🌐 RedisNext.js (Turbopack)0.049s1.005s0.956s101.70x
🌐 MongoDBNext.js (Turbopack)0.092s1.007s0.915s103.20x
🐘 PostgresNitro0.126s (-70.4% 🟢)1.009s (~)0.883s104.39x
🐘 PostgresExpress0.213s (+116.0% 🔺)1.010s (~)0.797s107.42x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.476s (-16.9% 🟢)2.049s (+20.8% 🔺)1.573s101.00x
▲ VercelNext.js (Turbopack)0.502s (-26.5% 🟢)1.969s (-9.1% 🟢)1.467s101.05x
▲ VercelExpress0.543s (+4.5%)1.939s (-2.3%)1.396s101.14x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.099s (-0.8%)2.005s (~)0.907s101.00x
🌐 RedisNext.js (Turbopack)1.104s2.006s0.902s101.01x
💻 LocalNitro1.107s (~)2.005s (~)0.898s101.01x
💻 LocalNext.js (Turbopack)1.107s2.005s0.898s101.01x
🌐 MongoDBNext.js (Turbopack)1.299s2.008s0.709s101.18x
🐘 PostgresExpress2.437s (-1.5%)3.014s (~)0.577s102.22x
🐘 PostgresNitro2.465s (+20.8% 🔺)3.013s (+19.9% 🔺)0.548s102.24x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.994s (-3.5%)3.274s (-4.3%)1.280s101.00x
▲ VercelExpress2.038s (-1.3%)3.486s (+1.3%)1.448s101.02x
▲ VercelNext.js (Turbopack)2.145s (+4.4%)3.314s (~)1.169s101.08x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)10.705s11.022s0.317s31.00x
💻 LocalExpress10.779s (-0.6%)11.022s (~)0.243s31.01x
💻 LocalNext.js (Turbopack)10.799s11.023s0.224s31.01x
💻 LocalNitro10.846s (~)11.022s (~)0.176s31.01x
🌐 MongoDBNext.js (Turbopack)12.183s13.024s0.841s31.14x
🐘 PostgresExpress20.312s (~)21.057s (~)0.745s21.90x
🐘 PostgresNitro20.339s (+34.1% 🔺)21.054s (+31.2% 🔺)0.715s21.90x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express15.349s (-0.5%)16.576s (-3.6%)1.227s21.00x
▲ VercelNitro15.845s (+1.3%)16.953s (-1.0%)1.108s21.03x
▲ VercelNext.js (Turbopack)16.241s (+1.3%)17.819s (+1.3%)1.578s21.06x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.885s27.050s0.165s31.00x
💻 LocalExpress27.299s (-0.7%)28.050s (~)0.751s31.02x
💻 LocalNext.js (Turbopack)27.322s28.054s0.733s31.02x
💻 LocalNitro27.507s (~)28.052s (~)0.545s31.02x
🌐 MongoDBNext.js (Turbopack)29.817s30.045s0.228s21.11x
🐘 PostgresExpress50.346s (~)51.131s (~)0.785s21.87x
🐘 PostgresNitro50.358s (+24.3% 🔺)51.125s (+25.9% 🔺)0.766s21.87x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express38.971s (-0.7%)40.623s (+0.6%)1.652s21.00x
▲ VercelNext.js (Turbopack)41.327s (+2.2%)42.956s (+2.9%)1.630s21.06x
▲ VercelNitro44.955s (+15.8% 🔺)46.160s (+15.0% 🔺)1.205s21.15x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.449s55.103s0.655s21.00x
💻 LocalExpress56.746s (-0.8%)57.102s (-1.7%)0.356s21.04x
💻 LocalNext.js (Turbopack)56.807s57.112s0.304s21.04x
💻 LocalNitro57.055s (~)57.102s (-1.7%)0.047s21.05x
🌐 MongoDBNext.js (Turbopack)60.849s61.077s0.228s21.12x
🐘 PostgresNitro100.245s (+22.8% 🔺)101.242s (+23.2% 🔺)0.997s11.84x
🐘 PostgresExpress100.282s (~)101.243s (~)0.961s11.84x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express84.271s (+1.0%)86.342s (+2.0%)2.071s21.00x
▲ VercelNitro84.672s (-10.9% 🟢)85.916s (-11.1% 🟢)1.244s21.00x
▲ VercelNext.js (Turbopack)87.110s (-7.4% 🟢)88.516s (-7.3% 🟢)1.406s21.03x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.258s2.006s0.748s151.00x
💻 LocalExpress1.380s (-1.4%)2.006s (~)0.626s151.10x
💻 LocalNext.js (Turbopack)1.395s2.005s0.609s151.11x
💻 LocalNitro1.412s (+2.0%)2.005s (~)0.593s151.12x
🌐 MongoDBNext.js (Turbopack)2.153s3.008s0.855s101.71x
🐘 PostgresNitro2.272s (+6.0% 🔺)3.013s (+2.9%)0.741s101.81x
🐘 PostgresExpress2.293s (+0.7%)3.013s (~)0.721s101.82x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.202s (~)3.503s (-4.5%)1.301s91.00x
▲ VercelNext.js (Turbopack)2.732s (-6.3% 🟢)3.969s (-11.0% 🟢)1.237s91.24x
▲ VercelExpress3.581s (+51.1% 🔺)5.072s (+40.7% 🔺)1.491s61.63x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express2.421s (-4.6%)3.008s (~)0.587s101.00x
💻 LocalNitro2.481s (+1.7%)3.008s (~)0.527s101.02x
💻 LocalNext.js (Turbopack)2.482s3.007s0.525s101.03x
🌐 RedisNext.js (Turbopack)2.487s3.008s0.520s101.03x
🌐 MongoDBNext.js (Turbopack)4.694s5.178s0.484s61.94x
🐘 PostgresNitro7.940s (-29.8% 🟢)8.531s (-27.1% 🟢)0.591s43.28x
🐘 PostgresExpress8.460s (-1.3%)9.033s (-2.8%)0.573s43.49x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.602s (+3.0%)3.778s (-0.9%)1.176s81.00x
▲ VercelNext.js (Turbopack)2.868s (+9.8% 🔺)3.810s (-0.5%)0.943s81.10x
▲ VercelExpress3.979s (+64.3% 🔺)5.202s (+37.4% 🔺)1.223s61.53x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.037s4.438s0.401s71.00x
💻 LocalNext.js (Turbopack)6.760s7.214s0.454s51.67x
💻 LocalExpress6.827s (-7.3% 🟢)7.218s (-10.0% 🟢)0.391s51.69x
💻 LocalNitro6.853s (+2.1%)7.021s (~)0.168s51.70x
🌐 MongoDBNext.js (Turbopack)9.896s10.350s0.454s32.45x
🐘 PostgresNitro48.813s (+2.2%)49.157s (+2.1%)0.344s112.09x
🐘 PostgresExpress50.880s (+2.0%)51.183s (+2.1%)0.303s112.60x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.995s (-15.8% 🟢)4.028s (-14.8% 🟢)1.032s81.00x
▲ VercelExpress3.408s (+8.6% 🔺)4.629s (+12.4% 🔺)1.221s71.14x
▲ VercelNext.js (Turbopack)3.614s (+4.3%)4.598s (+1.7%)0.984s71.21x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.267s2.006s0.739s151.00x
💻 LocalExpress1.412s (-1.1%)2.006s (~)0.594s151.11x
💻 LocalNitro1.427s (+1.2%)2.006s (~)0.579s151.13x
💻 LocalNext.js (Turbopack)1.458s2.006s0.547s151.15x
🌐 MongoDBNext.js (Turbopack)2.128s3.008s0.880s101.68x
🐘 PostgresNitro2.186s (+2.8%)2.679s (~)0.493s121.73x
🐘 PostgresExpress2.218s (~)2.740s (+5.6% 🔺)0.523s111.75x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.060s (-20.6% 🟢)3.356s (-13.1% 🟢)1.296s91.00x
▲ VercelExpress2.147s (~)3.433s (~)1.286s91.04x
▲ VercelNext.js (Turbopack)2.351s (+2.9%)3.625s (~)1.274s91.14x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.479s3.007s0.528s101.00x
💻 LocalNitro2.588s (-1.1%)3.009s (~)0.421s101.04x
💻 LocalExpress2.646s (-1.7%)3.007s (~)0.362s101.07x
💻 LocalNext.js (Turbopack)2.693s3.010s0.316s101.09x
🌐 MongoDBNext.js (Turbopack)4.679s5.177s0.499s61.89x
🐘 PostgresNitro10.280s (-2.8%)10.695s (-5.9% 🟢)0.415s34.15x
🐘 PostgresExpress11.117s (-8.6% 🟢)11.365s (-8.2% 🟢)0.248s34.48x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.246s (-2.0%)3.485s (+2.0%)1.238s91.00x
▲ VercelNext.js (Turbopack)2.619s (+2.5%)3.696s (-1.1%)1.078s91.17x
▲ VercelNitro2.928s (+28.4% 🔺)4.577s (+28.8% 🔺)1.649s81.30x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.010s4.724s0.714s71.00x
💻 LocalNext.js (Turbopack)7.063s7.769s0.706s41.76x
💻 LocalExpress7.215s (-6.7% 🟢)8.019s (~)0.804s41.80x
💻 LocalNitro7.655s (+3.2%)8.024s (~)0.369s41.91x
🌐 MongoDBNext.js (Turbopack)9.977s10.350s0.373s32.49x
🐘 PostgresExpress48.605s (-3.1%)49.119s (-3.9%)0.514s112.12x
🐘 PostgresNitro51.945s (+8.1% 🔺)52.110s (+8.2% 🔺)0.165s112.95x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.917s (-17.2% 🟢)3.920s (-13.6% 🟢)1.004s81.00x
▲ VercelExpress3.620s (+5.5% 🔺)4.579s (+3.2%)0.959s71.24x
▲ VercelNitro3.647s (+28.8% 🔺)4.650s (+15.1% 🔺)1.004s71.25x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.147s1.001s0.010s1.016s0.869s101.00x
🌐 RedisNext.js (Turbopack)0.153s1.000s0.001s1.007s0.854s101.04x
💻 LocalExpress0.161s (-8.3% 🟢)1.003s (~)0.010s (-7.6% 🟢)1.015s (~)0.854s101.09x
💻 LocalNitro0.179s (~)1.002s (~)0.010s (-5.9% 🟢)1.015s (~)0.836s101.21x
🌐 MongoDBNext.js (Turbopack)0.494s0.945s0.001s1.009s0.514s103.35x
🐘 PostgresNitro2.344s (+103.8% 🔺)2.696s (+42.1% 🔺)0.002s (+7.1% 🔺)3.014s (+49.6% 🔺)0.669s1015.90x
🐘 PostgresExpress2.382s (+1.2%)2.659s (-1.1%)0.001s (-7.1% 🟢)3.015s (~)0.633s1016.16x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.610s (+1.4%)2.168s (+3.0%)0.095s (-41.3% 🟢)2.836s (+2.5%)1.226s101.00x
▲ VercelNitro1.652s (-21.5% 🟢)1.921s (-30.1% 🟢)0.222s (+25.1% 🔺)2.629s (-24.6% 🟢)0.977s101.03x
▲ VercelNext.js (Turbopack)1.740s (+1.0%)2.565s (+7.6% 🔺)0.182s (+30.9% 🔺)3.241s (+5.1% 🔺)1.502s101.08x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress8/12
🐘 PostgresNitro8/12
▲ VercelNitro6/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local9/12
Next.js (Turbopack)🌐 Redis7/12
Nitro💻 Local10/12
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

@github-actions

github-actionsBot commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production522149572
✅ 💻 Local Development556068624
✅ 📦 Local Production556068624
✅ 🐘 Local Postgres556068624
✅ 🪟 Windows490352
❌ 🌍 Community Worlds111459165
✅ 📋 Other135021156
Total2485462862817

❌ Failed Tests

▲ Vercel Production (1 failed)

nextjs-turbopack (1 failed):

  • error handling retry behavior workflow completes despite transient 5xx on step_completed
🌍 Community Worlds (45 failed)

turso (45 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • parallelSleepWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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 retry behavior workflow completes despite transient 5xx on step_completed
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • cancelRun - cancelling a running workflow
  • cancelRun via CLI - cancelling a running workflow
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4705
✅ example4705
✅ express4705
✅ fastify4705
✅ hono4705
❌ nextjs-turbopack4912
✅ nextjs-webpack5002
✅ nitro4705
✅ nuxt4705
✅ sveltekit4705
✅ vite4705
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4903
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4903
✅ redis-dev300
✅ redis4903
✅ turso-dev300
❌ turso4453
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4507
✅ e2e-local-postgres-nest-stable4507
✅ e2e-local-prod-nest-stable4507

📋 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.

@VaguelySerious
VaguelySerious marked this pull request as ready for review February 19, 2026 01:52

@pranaygppranaygp 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.

Solid PR — the 409 handling pattern is consistent and correct, and the tests cover the key paths well. Left a few minor comments.

},
});
try {
await world.events.create(workflowRunId, {

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.

Nit: This is the only step_failed event creation that does not use withServerErrorRetry. The other three sites (fatal error path, max retries exhausted path, and step_retrying) all wrap the call with it. Was this intentional? If not, might be worth wrapping for consistency:

try{awaitwithServerErrorRetry(()=>world.events.create(workflowRunId,{
...
}));}catch(err){

(Pre-existing, but since you're already touching this block it'd be a clean fix.)

},
event: {},
});
mockStepFn.mockResolvedValue('step-result');

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.

Unused variable — callCount is incremented but never asserted on. Either assert it (e.g. expect(callCount).toBe(1) to verify step_completed was actually attempted) or remove it.

).rejects.toThrow('Internal Server Error');
});
});
});

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.

Nice that you have a should re-throw non-409 errors from step_retrying test. Consider adding analogous re-throw tests for step_completed and step_failed (e.g. a 500 from step_completed should propagate, a 500 from step_failed in the max-retries path should propagate). This would fully cover all the throw err / throw stepFailErr branches.

@pranaygppranaygp 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.

Did an audit of 409/410 handling across all world.events.create() call sites in the SDK (cross-referenced against the server's event validation logic and the event sourcing docs). The changes in this PR are correct — here are the pre-existing gaps worth addressing:


Should fix in this PR

packages/core/src/runtime/step-handler.ts:150-153 — uses console.warn() instead of runtimeLogger.info() for the step_started 410 (workflow already completed) case. Every other 410/409 handler in the file uses the structured logger. This should be:

runtimeLogger.info('Workflow run already completed, skipping step',{ workflowRunId, stepId,message: err.message});

info is the right level here — this is an expected, non-actionable condition (same as the 410 handler in the catch block at line 476-486).


Follow-up PR candidates

These are all pre-existing and fine to address separately:

1. packages/core/src/runtime/resume-hook.ts:128hook_received has no error handling at all. Server can return 409 (hook disposed) or 410 (run done) — both benign races that should be caught and logged as info. A 404 here would be a real bug and should throw.

2. packages/core/src/runtime/run.ts:69run_cancelled (the Run.cancel() method) has no error handling. Server returns 409 if run already terminal — should catch and log as warn.

3. packages/core/src/runtime/runs.ts:95run_cancelled (the cancelRun() function) — same issue, different call site. Errors get wrapped in a generic Failed to cancel run message, losing the 409 signal.

4. packages/core/src/runtime.ts:145run_started has no error handling. Server returns 410 if run is already terminal. Should catch 410 and log as info ("run already completed, skipping").

5. packages/core/src/runtime/suspension-handler.ts:116hook_created catches 410 but not 409. Server returns 409 if the hookId already exists (duplicate creation, same as step_created/wait_created). Should catch 409 and log as info, matching the pattern at lines 183 and 238.

6. packages/core/src/runtime/runs.ts:190wait_completed in wakeUpRun() catches 409 silently (increments stoppedCount with no log). A debug log would help observability without noise.

7. packages/core/src/runtime/step-handler.ts:253 — (already commented on this) the pre-execution guard step_failed is the only one not wrapped in withServerErrorRetry.

@VaguelySerious
VaguelySerious merged commit c75de97 into mainFeb 20, 2026
158 of 164 checks passed
@VaguelySerious
VaguelySerious deleted the pnoll/handle-step-409-gracefully branch February 20, 2026 22:43
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@VaguelySerious@pranaygp
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } 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

Handle 409 errors gracefully for step_completed/failed/retrying - #1120

Merged
VaguelySerious merged 3 commits into
mainfrom
pnoll/handle-step-409-gracefully
Feb 20, 2026
Merged

Handle 409 errors gracefully for step_completed/failed/retrying#1120
VaguelySerious merged 3 commits into
mainfrom
pnoll/handle-step-409-gracefully

Conversation

@VaguelySerious

Copy link
Copy Markdown
Member

When multiple step invocations race to complete/fail/retry a step, the server returns a 409 Conflict. Previously this would bubble up as an unhandled error. Now these are caught and logged as warnings, matching the pattern established for run_completed/run_failed in #1118.

…p_retrying events
When multiple step invocations race to complete/fail/retry a step, the
server returns a 409 Conflict. Previously this would bubble up as an
unhandled error. Now these are caught and logged as warnings, matching
the pattern established for run_completed/run_failed in #1118.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@changeset-bot

changeset-botBot commented Feb 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c59a690

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

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

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

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

@vercel

vercelBot commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Feb 19, 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.029s (-14.6% 🟢)1.004s (~)0.976s101.00x
💻 LocalNitro0.032s (-4.5%)1.004s (~)0.972s101.12x
💻 LocalNext.js (Turbopack)0.048s1.005s0.957s101.66x
🌐 RedisNext.js (Turbopack)0.049s1.005s0.956s101.70x
🌐 MongoDBNext.js (Turbopack)0.092s1.007s0.915s103.20x
🐘 PostgresNitro0.126s (-70.4% 🟢)1.009s (~)0.883s104.39x
🐘 PostgresExpress0.213s (+116.0% 🔺)1.010s (~)0.797s107.42x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.476s (-16.9% 🟢)2.049s (+20.8% 🔺)1.573s101.00x
▲ VercelNext.js (Turbopack)0.502s (-26.5% 🟢)1.969s (-9.1% 🟢)1.467s101.05x
▲ VercelExpress0.543s (+4.5%)1.939s (-2.3%)1.396s101.14x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.099s (-0.8%)2.005s (~)0.907s101.00x
🌐 RedisNext.js (Turbopack)1.104s2.006s0.902s101.01x
💻 LocalNitro1.107s (~)2.005s (~)0.898s101.01x
💻 LocalNext.js (Turbopack)1.107s2.005s0.898s101.01x
🌐 MongoDBNext.js (Turbopack)1.299s2.008s0.709s101.18x
🐘 PostgresExpress2.437s (-1.5%)3.014s (~)0.577s102.22x
🐘 PostgresNitro2.465s (+20.8% 🔺)3.013s (+19.9% 🔺)0.548s102.24x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.994s (-3.5%)3.274s (-4.3%)1.280s101.00x
▲ VercelExpress2.038s (-1.3%)3.486s (+1.3%)1.448s101.02x
▲ VercelNext.js (Turbopack)2.145s (+4.4%)3.314s (~)1.169s101.08x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)10.705s11.022s0.317s31.00x
💻 LocalExpress10.779s (-0.6%)11.022s (~)0.243s31.01x
💻 LocalNext.js (Turbopack)10.799s11.023s0.224s31.01x
💻 LocalNitro10.846s (~)11.022s (~)0.176s31.01x
🌐 MongoDBNext.js (Turbopack)12.183s13.024s0.841s31.14x
🐘 PostgresExpress20.312s (~)21.057s (~)0.745s21.90x
🐘 PostgresNitro20.339s (+34.1% 🔺)21.054s (+31.2% 🔺)0.715s21.90x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express15.349s (-0.5%)16.576s (-3.6%)1.227s21.00x
▲ VercelNitro15.845s (+1.3%)16.953s (-1.0%)1.108s21.03x
▲ VercelNext.js (Turbopack)16.241s (+1.3%)17.819s (+1.3%)1.578s21.06x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.885s27.050s0.165s31.00x
💻 LocalExpress27.299s (-0.7%)28.050s (~)0.751s31.02x
💻 LocalNext.js (Turbopack)27.322s28.054s0.733s31.02x
💻 LocalNitro27.507s (~)28.052s (~)0.545s31.02x
🌐 MongoDBNext.js (Turbopack)29.817s30.045s0.228s21.11x
🐘 PostgresExpress50.346s (~)51.131s (~)0.785s21.87x
🐘 PostgresNitro50.358s (+24.3% 🔺)51.125s (+25.9% 🔺)0.766s21.87x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express38.971s (-0.7%)40.623s (+0.6%)1.652s21.00x
▲ VercelNext.js (Turbopack)41.327s (+2.2%)42.956s (+2.9%)1.630s21.06x
▲ VercelNitro44.955s (+15.8% 🔺)46.160s (+15.0% 🔺)1.205s21.15x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.449s55.103s0.655s21.00x
💻 LocalExpress56.746s (-0.8%)57.102s (-1.7%)0.356s21.04x
💻 LocalNext.js (Turbopack)56.807s57.112s0.304s21.04x
💻 LocalNitro57.055s (~)57.102s (-1.7%)0.047s21.05x
🌐 MongoDBNext.js (Turbopack)60.849s61.077s0.228s21.12x
🐘 PostgresNitro100.245s (+22.8% 🔺)101.242s (+23.2% 🔺)0.997s11.84x
🐘 PostgresExpress100.282s (~)101.243s (~)0.961s11.84x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express84.271s (+1.0%)86.342s (+2.0%)2.071s21.00x
▲ VercelNitro84.672s (-10.9% 🟢)85.916s (-11.1% 🟢)1.244s21.00x
▲ VercelNext.js (Turbopack)87.110s (-7.4% 🟢)88.516s (-7.3% 🟢)1.406s21.03x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.258s2.006s0.748s151.00x
💻 LocalExpress1.380s (-1.4%)2.006s (~)0.626s151.10x
💻 LocalNext.js (Turbopack)1.395s2.005s0.609s151.11x
💻 LocalNitro1.412s (+2.0%)2.005s (~)0.593s151.12x
🌐 MongoDBNext.js (Turbopack)2.153s3.008s0.855s101.71x
🐘 PostgresNitro2.272s (+6.0% 🔺)3.013s (+2.9%)0.741s101.81x
🐘 PostgresExpress2.293s (+0.7%)3.013s (~)0.721s101.82x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.202s (~)3.503s (-4.5%)1.301s91.00x
▲ VercelNext.js (Turbopack)2.732s (-6.3% 🟢)3.969s (-11.0% 🟢)1.237s91.24x
▲ VercelExpress3.581s (+51.1% 🔺)5.072s (+40.7% 🔺)1.491s61.63x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express2.421s (-4.6%)3.008s (~)0.587s101.00x
💻 LocalNitro2.481s (+1.7%)3.008s (~)0.527s101.02x
💻 LocalNext.js (Turbopack)2.482s3.007s0.525s101.03x
🌐 RedisNext.js (Turbopack)2.487s3.008s0.520s101.03x
🌐 MongoDBNext.js (Turbopack)4.694s5.178s0.484s61.94x
🐘 PostgresNitro7.940s (-29.8% 🟢)8.531s (-27.1% 🟢)0.591s43.28x
🐘 PostgresExpress8.460s (-1.3%)9.033s (-2.8%)0.573s43.49x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.602s (+3.0%)3.778s (-0.9%)1.176s81.00x
▲ VercelNext.js (Turbopack)2.868s (+9.8% 🔺)3.810s (-0.5%)0.943s81.10x
▲ VercelExpress3.979s (+64.3% 🔺)5.202s (+37.4% 🔺)1.223s61.53x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.037s4.438s0.401s71.00x
💻 LocalNext.js (Turbopack)6.760s7.214s0.454s51.67x
💻 LocalExpress6.827s (-7.3% 🟢)7.218s (-10.0% 🟢)0.391s51.69x
💻 LocalNitro6.853s (+2.1%)7.021s (~)0.168s51.70x
🌐 MongoDBNext.js (Turbopack)9.896s10.350s0.454s32.45x
🐘 PostgresNitro48.813s (+2.2%)49.157s (+2.1%)0.344s112.09x
🐘 PostgresExpress50.880s (+2.0%)51.183s (+2.1%)0.303s112.60x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.995s (-15.8% 🟢)4.028s (-14.8% 🟢)1.032s81.00x
▲ VercelExpress3.408s (+8.6% 🔺)4.629s (+12.4% 🔺)1.221s71.14x
▲ VercelNext.js (Turbopack)3.614s (+4.3%)4.598s (+1.7%)0.984s71.21x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.267s2.006s0.739s151.00x
💻 LocalExpress1.412s (-1.1%)2.006s (~)0.594s151.11x
💻 LocalNitro1.427s (+1.2%)2.006s (~)0.579s151.13x
💻 LocalNext.js (Turbopack)1.458s2.006s0.547s151.15x
🌐 MongoDBNext.js (Turbopack)2.128s3.008s0.880s101.68x
🐘 PostgresNitro2.186s (+2.8%)2.679s (~)0.493s121.73x
🐘 PostgresExpress2.218s (~)2.740s (+5.6% 🔺)0.523s111.75x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.060s (-20.6% 🟢)3.356s (-13.1% 🟢)1.296s91.00x
▲ VercelExpress2.147s (~)3.433s (~)1.286s91.04x
▲ VercelNext.js (Turbopack)2.351s (+2.9%)3.625s (~)1.274s91.14x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.479s3.007s0.528s101.00x
💻 LocalNitro2.588s (-1.1%)3.009s (~)0.421s101.04x
💻 LocalExpress2.646s (-1.7%)3.007s (~)0.362s101.07x
💻 LocalNext.js (Turbopack)2.693s3.010s0.316s101.09x
🌐 MongoDBNext.js (Turbopack)4.679s5.177s0.499s61.89x
🐘 PostgresNitro10.280s (-2.8%)10.695s (-5.9% 🟢)0.415s34.15x
🐘 PostgresExpress11.117s (-8.6% 🟢)11.365s (-8.2% 🟢)0.248s34.48x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.246s (-2.0%)3.485s (+2.0%)1.238s91.00x
▲ VercelNext.js (Turbopack)2.619s (+2.5%)3.696s (-1.1%)1.078s91.17x
▲ VercelNitro2.928s (+28.4% 🔺)4.577s (+28.8% 🔺)1.649s81.30x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.010s4.724s0.714s71.00x
💻 LocalNext.js (Turbopack)7.063s7.769s0.706s41.76x
💻 LocalExpress7.215s (-6.7% 🟢)8.019s (~)0.804s41.80x
💻 LocalNitro7.655s (+3.2%)8.024s (~)0.369s41.91x
🌐 MongoDBNext.js (Turbopack)9.977s10.350s0.373s32.49x
🐘 PostgresExpress48.605s (-3.1%)49.119s (-3.9%)0.514s112.12x
🐘 PostgresNitro51.945s (+8.1% 🔺)52.110s (+8.2% 🔺)0.165s112.95x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.917s (-17.2% 🟢)3.920s (-13.6% 🟢)1.004s81.00x
▲ VercelExpress3.620s (+5.5% 🔺)4.579s (+3.2%)0.959s71.24x
▲ VercelNitro3.647s (+28.8% 🔺)4.650s (+15.1% 🔺)1.004s71.25x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.147s1.001s0.010s1.016s0.869s101.00x
🌐 RedisNext.js (Turbopack)0.153s1.000s0.001s1.007s0.854s101.04x
💻 LocalExpress0.161s (-8.3% 🟢)1.003s (~)0.010s (-7.6% 🟢)1.015s (~)0.854s101.09x
💻 LocalNitro0.179s (~)1.002s (~)0.010s (-5.9% 🟢)1.015s (~)0.836s101.21x
🌐 MongoDBNext.js (Turbopack)0.494s0.945s0.001s1.009s0.514s103.35x
🐘 PostgresNitro2.344s (+103.8% 🔺)2.696s (+42.1% 🔺)0.002s (+7.1% 🔺)3.014s (+49.6% 🔺)0.669s1015.90x
🐘 PostgresExpress2.382s (+1.2%)2.659s (-1.1%)0.001s (-7.1% 🟢)3.015s (~)0.633s1016.16x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.610s (+1.4%)2.168s (+3.0%)0.095s (-41.3% 🟢)2.836s (+2.5%)1.226s101.00x
▲ VercelNitro1.652s (-21.5% 🟢)1.921s (-30.1% 🟢)0.222s (+25.1% 🔺)2.629s (-24.6% 🟢)0.977s101.03x
▲ VercelNext.js (Turbopack)1.740s (+1.0%)2.565s (+7.6% 🔺)0.182s (+30.9% 🔺)3.241s (+5.1% 🔺)1.502s101.08x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress8/12
🐘 PostgresNitro8/12
▲ VercelNitro6/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local9/12
Next.js (Turbopack)🌐 Redis7/12
Nitro💻 Local10/12
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

@github-actions

github-actionsBot commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production522149572
✅ 💻 Local Development556068624
✅ 📦 Local Production556068624
✅ 🐘 Local Postgres556068624
✅ 🪟 Windows490352
❌ 🌍 Community Worlds111459165
✅ 📋 Other135021156
Total2485462862817

❌ Failed Tests

▲ Vercel Production (1 failed)

nextjs-turbopack (1 failed):

  • error handling retry behavior workflow completes despite transient 5xx on step_completed
🌍 Community Worlds (45 failed)

turso (45 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • parallelSleepWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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 retry behavior workflow completes despite transient 5xx on step_completed
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • cancelRun - cancelling a running workflow
  • cancelRun via CLI - cancelling a running workflow
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4705
✅ example4705
✅ express4705
✅ fastify4705
✅ hono4705
❌ nextjs-turbopack4912
✅ nextjs-webpack5002
✅ nitro4705
✅ nuxt4705
✅ sveltekit4705
✅ vite4705
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4903
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4903
✅ redis-dev300
✅ redis4903
✅ turso-dev300
❌ turso4453
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4507
✅ e2e-local-postgres-nest-stable4507
✅ e2e-local-prod-nest-stable4507

📋 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.

@VaguelySerious
VaguelySerious marked this pull request as ready for review February 19, 2026 01:52

@pranaygppranaygp 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.

Solid PR — the 409 handling pattern is consistent and correct, and the tests cover the key paths well. Left a few minor comments.

},
});
try {
await world.events.create(workflowRunId, {

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.

Nit: This is the only step_failed event creation that does not use withServerErrorRetry. The other three sites (fatal error path, max retries exhausted path, and step_retrying) all wrap the call with it. Was this intentional? If not, might be worth wrapping for consistency:

try{awaitwithServerErrorRetry(()=>world.events.create(workflowRunId,{
...
}));}catch(err){

(Pre-existing, but since you're already touching this block it'd be a clean fix.)

},
event: {},
});
mockStepFn.mockResolvedValue('step-result');

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.

Unused variable — callCount is incremented but never asserted on. Either assert it (e.g. expect(callCount).toBe(1) to verify step_completed was actually attempted) or remove it.

).rejects.toThrow('Internal Server Error');
});
});
});

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.

Nice that you have a should re-throw non-409 errors from step_retrying test. Consider adding analogous re-throw tests for step_completed and step_failed (e.g. a 500 from step_completed should propagate, a 500 from step_failed in the max-retries path should propagate). This would fully cover all the throw err / throw stepFailErr branches.

@pranaygppranaygp 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.

Did an audit of 409/410 handling across all world.events.create() call sites in the SDK (cross-referenced against the server's event validation logic and the event sourcing docs). The changes in this PR are correct — here are the pre-existing gaps worth addressing:


Should fix in this PR

packages/core/src/runtime/step-handler.ts:150-153 — uses console.warn() instead of runtimeLogger.info() for the step_started 410 (workflow already completed) case. Every other 410/409 handler in the file uses the structured logger. This should be:

runtimeLogger.info('Workflow run already completed, skipping step',{ workflowRunId, stepId,message: err.message});

info is the right level here — this is an expected, non-actionable condition (same as the 410 handler in the catch block at line 476-486).


Follow-up PR candidates

These are all pre-existing and fine to address separately:

1. packages/core/src/runtime/resume-hook.ts:128hook_received has no error handling at all. Server can return 409 (hook disposed) or 410 (run done) — both benign races that should be caught and logged as info. A 404 here would be a real bug and should throw.

2. packages/core/src/runtime/run.ts:69run_cancelled (the Run.cancel() method) has no error handling. Server returns 409 if run already terminal — should catch and log as warn.

3. packages/core/src/runtime/runs.ts:95run_cancelled (the cancelRun() function) — same issue, different call site. Errors get wrapped in a generic Failed to cancel run message, losing the 409 signal.

4. packages/core/src/runtime.ts:145run_started has no error handling. Server returns 410 if run is already terminal. Should catch 410 and log as info ("run already completed, skipping").

5. packages/core/src/runtime/suspension-handler.ts:116hook_created catches 410 but not 409. Server returns 409 if the hookId already exists (duplicate creation, same as step_created/wait_created). Should catch 409 and log as info, matching the pattern at lines 183 and 238.

6. packages/core/src/runtime/runs.ts:190wait_completed in wakeUpRun() catches 409 silently (increments stoppedCount with no log). A debug log would help observability without noise.

7. packages/core/src/runtime/step-handler.ts:253 — (already commented on this) the pre-execution guard step_failed is the only one not wrapped in withServerErrorRetry.

@VaguelySerious
VaguelySerious merged commit c75de97 into mainFeb 20, 2026
158 of 164 checks passed
@VaguelySerious
VaguelySerious deleted the pnoll/handle-step-409-gracefully branch February 20, 2026 22:43
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

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

Handle 409 errors gracefully for step_completed/failed/retrying - #1120

Merged
VaguelySerious merged 3 commits into
mainfrom
pnoll/handle-step-409-gracefully
Feb 20, 2026
Merged

Handle 409 errors gracefully for step_completed/failed/retrying#1120
VaguelySerious merged 3 commits into
mainfrom
pnoll/handle-step-409-gracefully

Conversation

@VaguelySerious

Copy link
Copy Markdown
Member

When multiple step invocations race to complete/fail/retry a step, the server returns a 409 Conflict. Previously this would bubble up as an unhandled error. Now these are caught and logged as warnings, matching the pattern established for run_completed/run_failed in #1118.

…p_retrying events
When multiple step invocations race to complete/fail/retry a step, the
server returns a 409 Conflict. Previously this would bubble up as an
unhandled error. Now these are caught and logged as warnings, matching
the pattern established for run_completed/run_failed in #1118.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@changeset-bot

changeset-botBot commented Feb 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c59a690

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

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

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

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

@vercel

vercelBot commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Feb 19, 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.029s (-14.6% 🟢)1.004s (~)0.976s101.00x
💻 LocalNitro0.032s (-4.5%)1.004s (~)0.972s101.12x
💻 LocalNext.js (Turbopack)0.048s1.005s0.957s101.66x
🌐 RedisNext.js (Turbopack)0.049s1.005s0.956s101.70x
🌐 MongoDBNext.js (Turbopack)0.092s1.007s0.915s103.20x
🐘 PostgresNitro0.126s (-70.4% 🟢)1.009s (~)0.883s104.39x
🐘 PostgresExpress0.213s (+116.0% 🔺)1.010s (~)0.797s107.42x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.476s (-16.9% 🟢)2.049s (+20.8% 🔺)1.573s101.00x
▲ VercelNext.js (Turbopack)0.502s (-26.5% 🟢)1.969s (-9.1% 🟢)1.467s101.05x
▲ VercelExpress0.543s (+4.5%)1.939s (-2.3%)1.396s101.14x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.099s (-0.8%)2.005s (~)0.907s101.00x
🌐 RedisNext.js (Turbopack)1.104s2.006s0.902s101.01x
💻 LocalNitro1.107s (~)2.005s (~)0.898s101.01x
💻 LocalNext.js (Turbopack)1.107s2.005s0.898s101.01x
🌐 MongoDBNext.js (Turbopack)1.299s2.008s0.709s101.18x
🐘 PostgresExpress2.437s (-1.5%)3.014s (~)0.577s102.22x
🐘 PostgresNitro2.465s (+20.8% 🔺)3.013s (+19.9% 🔺)0.548s102.24x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.994s (-3.5%)3.274s (-4.3%)1.280s101.00x
▲ VercelExpress2.038s (-1.3%)3.486s (+1.3%)1.448s101.02x
▲ VercelNext.js (Turbopack)2.145s (+4.4%)3.314s (~)1.169s101.08x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)10.705s11.022s0.317s31.00x
💻 LocalExpress10.779s (-0.6%)11.022s (~)0.243s31.01x
💻 LocalNext.js (Turbopack)10.799s11.023s0.224s31.01x
💻 LocalNitro10.846s (~)11.022s (~)0.176s31.01x
🌐 MongoDBNext.js (Turbopack)12.183s13.024s0.841s31.14x
🐘 PostgresExpress20.312s (~)21.057s (~)0.745s21.90x
🐘 PostgresNitro20.339s (+34.1% 🔺)21.054s (+31.2% 🔺)0.715s21.90x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express15.349s (-0.5%)16.576s (-3.6%)1.227s21.00x
▲ VercelNitro15.845s (+1.3%)16.953s (-1.0%)1.108s21.03x
▲ VercelNext.js (Turbopack)16.241s (+1.3%)17.819s (+1.3%)1.578s21.06x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.885s27.050s0.165s31.00x
💻 LocalExpress27.299s (-0.7%)28.050s (~)0.751s31.02x
💻 LocalNext.js (Turbopack)27.322s28.054s0.733s31.02x
💻 LocalNitro27.507s (~)28.052s (~)0.545s31.02x
🌐 MongoDBNext.js (Turbopack)29.817s30.045s0.228s21.11x
🐘 PostgresExpress50.346s (~)51.131s (~)0.785s21.87x
🐘 PostgresNitro50.358s (+24.3% 🔺)51.125s (+25.9% 🔺)0.766s21.87x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express38.971s (-0.7%)40.623s (+0.6%)1.652s21.00x
▲ VercelNext.js (Turbopack)41.327s (+2.2%)42.956s (+2.9%)1.630s21.06x
▲ VercelNitro44.955s (+15.8% 🔺)46.160s (+15.0% 🔺)1.205s21.15x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.449s55.103s0.655s21.00x
💻 LocalExpress56.746s (-0.8%)57.102s (-1.7%)0.356s21.04x
💻 LocalNext.js (Turbopack)56.807s57.112s0.304s21.04x
💻 LocalNitro57.055s (~)57.102s (-1.7%)0.047s21.05x
🌐 MongoDBNext.js (Turbopack)60.849s61.077s0.228s21.12x
🐘 PostgresNitro100.245s (+22.8% 🔺)101.242s (+23.2% 🔺)0.997s11.84x
🐘 PostgresExpress100.282s (~)101.243s (~)0.961s11.84x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express84.271s (+1.0%)86.342s (+2.0%)2.071s21.00x
▲ VercelNitro84.672s (-10.9% 🟢)85.916s (-11.1% 🟢)1.244s21.00x
▲ VercelNext.js (Turbopack)87.110s (-7.4% 🟢)88.516s (-7.3% 🟢)1.406s21.03x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.258s2.006s0.748s151.00x
💻 LocalExpress1.380s (-1.4%)2.006s (~)0.626s151.10x
💻 LocalNext.js (Turbopack)1.395s2.005s0.609s151.11x
💻 LocalNitro1.412s (+2.0%)2.005s (~)0.593s151.12x
🌐 MongoDBNext.js (Turbopack)2.153s3.008s0.855s101.71x
🐘 PostgresNitro2.272s (+6.0% 🔺)3.013s (+2.9%)0.741s101.81x
🐘 PostgresExpress2.293s (+0.7%)3.013s (~)0.721s101.82x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.202s (~)3.503s (-4.5%)1.301s91.00x
▲ VercelNext.js (Turbopack)2.732s (-6.3% 🟢)3.969s (-11.0% 🟢)1.237s91.24x
▲ VercelExpress3.581s (+51.1% 🔺)5.072s (+40.7% 🔺)1.491s61.63x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express2.421s (-4.6%)3.008s (~)0.587s101.00x
💻 LocalNitro2.481s (+1.7%)3.008s (~)0.527s101.02x
💻 LocalNext.js (Turbopack)2.482s3.007s0.525s101.03x
🌐 RedisNext.js (Turbopack)2.487s3.008s0.520s101.03x
🌐 MongoDBNext.js (Turbopack)4.694s5.178s0.484s61.94x
🐘 PostgresNitro7.940s (-29.8% 🟢)8.531s (-27.1% 🟢)0.591s43.28x
🐘 PostgresExpress8.460s (-1.3%)9.033s (-2.8%)0.573s43.49x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.602s (+3.0%)3.778s (-0.9%)1.176s81.00x
▲ VercelNext.js (Turbopack)2.868s (+9.8% 🔺)3.810s (-0.5%)0.943s81.10x
▲ VercelExpress3.979s (+64.3% 🔺)5.202s (+37.4% 🔺)1.223s61.53x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.037s4.438s0.401s71.00x
💻 LocalNext.js (Turbopack)6.760s7.214s0.454s51.67x
💻 LocalExpress6.827s (-7.3% 🟢)7.218s (-10.0% 🟢)0.391s51.69x
💻 LocalNitro6.853s (+2.1%)7.021s (~)0.168s51.70x
🌐 MongoDBNext.js (Turbopack)9.896s10.350s0.454s32.45x
🐘 PostgresNitro48.813s (+2.2%)49.157s (+2.1%)0.344s112.09x
🐘 PostgresExpress50.880s (+2.0%)51.183s (+2.1%)0.303s112.60x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.995s (-15.8% 🟢)4.028s (-14.8% 🟢)1.032s81.00x
▲ VercelExpress3.408s (+8.6% 🔺)4.629s (+12.4% 🔺)1.221s71.14x
▲ VercelNext.js (Turbopack)3.614s (+4.3%)4.598s (+1.7%)0.984s71.21x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.267s2.006s0.739s151.00x
💻 LocalExpress1.412s (-1.1%)2.006s (~)0.594s151.11x
💻 LocalNitro1.427s (+1.2%)2.006s (~)0.579s151.13x
💻 LocalNext.js (Turbopack)1.458s2.006s0.547s151.15x
🌐 MongoDBNext.js (Turbopack)2.128s3.008s0.880s101.68x
🐘 PostgresNitro2.186s (+2.8%)2.679s (~)0.493s121.73x
🐘 PostgresExpress2.218s (~)2.740s (+5.6% 🔺)0.523s111.75x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.060s (-20.6% 🟢)3.356s (-13.1% 🟢)1.296s91.00x
▲ VercelExpress2.147s (~)3.433s (~)1.286s91.04x
▲ VercelNext.js (Turbopack)2.351s (+2.9%)3.625s (~)1.274s91.14x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.479s3.007s0.528s101.00x
💻 LocalNitro2.588s (-1.1%)3.009s (~)0.421s101.04x
💻 LocalExpress2.646s (-1.7%)3.007s (~)0.362s101.07x
💻 LocalNext.js (Turbopack)2.693s3.010s0.316s101.09x
🌐 MongoDBNext.js (Turbopack)4.679s5.177s0.499s61.89x
🐘 PostgresNitro10.280s (-2.8%)10.695s (-5.9% 🟢)0.415s34.15x
🐘 PostgresExpress11.117s (-8.6% 🟢)11.365s (-8.2% 🟢)0.248s34.48x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.246s (-2.0%)3.485s (+2.0%)1.238s91.00x
▲ VercelNext.js (Turbopack)2.619s (+2.5%)3.696s (-1.1%)1.078s91.17x
▲ VercelNitro2.928s (+28.4% 🔺)4.577s (+28.8% 🔺)1.649s81.30x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.010s4.724s0.714s71.00x
💻 LocalNext.js (Turbopack)7.063s7.769s0.706s41.76x
💻 LocalExpress7.215s (-6.7% 🟢)8.019s (~)0.804s41.80x
💻 LocalNitro7.655s (+3.2%)8.024s (~)0.369s41.91x
🌐 MongoDBNext.js (Turbopack)9.977s10.350s0.373s32.49x
🐘 PostgresExpress48.605s (-3.1%)49.119s (-3.9%)0.514s112.12x
🐘 PostgresNitro51.945s (+8.1% 🔺)52.110s (+8.2% 🔺)0.165s112.95x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.917s (-17.2% 🟢)3.920s (-13.6% 🟢)1.004s81.00x
▲ VercelExpress3.620s (+5.5% 🔺)4.579s (+3.2%)0.959s71.24x
▲ VercelNitro3.647s (+28.8% 🔺)4.650s (+15.1% 🔺)1.004s71.25x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.147s1.001s0.010s1.016s0.869s101.00x
🌐 RedisNext.js (Turbopack)0.153s1.000s0.001s1.007s0.854s101.04x
💻 LocalExpress0.161s (-8.3% 🟢)1.003s (~)0.010s (-7.6% 🟢)1.015s (~)0.854s101.09x
💻 LocalNitro0.179s (~)1.002s (~)0.010s (-5.9% 🟢)1.015s (~)0.836s101.21x
🌐 MongoDBNext.js (Turbopack)0.494s0.945s0.001s1.009s0.514s103.35x
🐘 PostgresNitro2.344s (+103.8% 🔺)2.696s (+42.1% 🔺)0.002s (+7.1% 🔺)3.014s (+49.6% 🔺)0.669s1015.90x
🐘 PostgresExpress2.382s (+1.2%)2.659s (-1.1%)0.001s (-7.1% 🟢)3.015s (~)0.633s1016.16x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.610s (+1.4%)2.168s (+3.0%)0.095s (-41.3% 🟢)2.836s (+2.5%)1.226s101.00x
▲ VercelNitro1.652s (-21.5% 🟢)1.921s (-30.1% 🟢)0.222s (+25.1% 🔺)2.629s (-24.6% 🟢)0.977s101.03x
▲ VercelNext.js (Turbopack)1.740s (+1.0%)2.565s (+7.6% 🔺)0.182s (+30.9% 🔺)3.241s (+5.1% 🔺)1.502s101.08x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress8/12
🐘 PostgresNitro8/12
▲ VercelNitro6/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local9/12
Next.js (Turbopack)🌐 Redis7/12
Nitro💻 Local10/12
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

@github-actions

github-actionsBot commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production522149572
✅ 💻 Local Development556068624
✅ 📦 Local Production556068624
✅ 🐘 Local Postgres556068624
✅ 🪟 Windows490352
❌ 🌍 Community Worlds111459165
✅ 📋 Other135021156
Total2485462862817

❌ Failed Tests

▲ Vercel Production (1 failed)

nextjs-turbopack (1 failed):

  • error handling retry behavior workflow completes despite transient 5xx on step_completed
🌍 Community Worlds (45 failed)

turso (45 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • parallelSleepWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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 retry behavior workflow completes despite transient 5xx on step_completed
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • cancelRun - cancelling a running workflow
  • cancelRun via CLI - cancelling a running workflow
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4705
✅ example4705
✅ express4705
✅ fastify4705
✅ hono4705
❌ nextjs-turbopack4912
✅ nextjs-webpack5002
✅ nitro4705
✅ nuxt4705
✅ sveltekit4705
✅ vite4705
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4903
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4903
✅ redis-dev300
✅ redis4903
✅ turso-dev300
❌ turso4453
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4507
✅ e2e-local-postgres-nest-stable4507
✅ e2e-local-prod-nest-stable4507

📋 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.

@VaguelySerious
VaguelySerious marked this pull request as ready for review February 19, 2026 01:52

@pranaygppranaygp 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.

Solid PR — the 409 handling pattern is consistent and correct, and the tests cover the key paths well. Left a few minor comments.

},
});
try {
await world.events.create(workflowRunId, {

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.

Nit: This is the only step_failed event creation that does not use withServerErrorRetry. The other three sites (fatal error path, max retries exhausted path, and step_retrying) all wrap the call with it. Was this intentional? If not, might be worth wrapping for consistency:

try{awaitwithServerErrorRetry(()=>world.events.create(workflowRunId,{
...
}));}catch(err){

(Pre-existing, but since you're already touching this block it'd be a clean fix.)

},
event: {},
});
mockStepFn.mockResolvedValue('step-result');

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.

Unused variable — callCount is incremented but never asserted on. Either assert it (e.g. expect(callCount).toBe(1) to verify step_completed was actually attempted) or remove it.

).rejects.toThrow('Internal Server Error');
});
});
});

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.

Nice that you have a should re-throw non-409 errors from step_retrying test. Consider adding analogous re-throw tests for step_completed and step_failed (e.g. a 500 from step_completed should propagate, a 500 from step_failed in the max-retries path should propagate). This would fully cover all the throw err / throw stepFailErr branches.

@pranaygppranaygp 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.

Did an audit of 409/410 handling across all world.events.create() call sites in the SDK (cross-referenced against the server's event validation logic and the event sourcing docs). The changes in this PR are correct — here are the pre-existing gaps worth addressing:


Should fix in this PR

packages/core/src/runtime/step-handler.ts:150-153 — uses console.warn() instead of runtimeLogger.info() for the step_started 410 (workflow already completed) case. Every other 410/409 handler in the file uses the structured logger. This should be:

runtimeLogger.info('Workflow run already completed, skipping step',{ workflowRunId, stepId,message: err.message});

info is the right level here — this is an expected, non-actionable condition (same as the 410 handler in the catch block at line 476-486).


Follow-up PR candidates

These are all pre-existing and fine to address separately:

1. packages/core/src/runtime/resume-hook.ts:128hook_received has no error handling at all. Server can return 409 (hook disposed) or 410 (run done) — both benign races that should be caught and logged as info. A 404 here would be a real bug and should throw.

2. packages/core/src/runtime/run.ts:69run_cancelled (the Run.cancel() method) has no error handling. Server returns 409 if run already terminal — should catch and log as warn.

3. packages/core/src/runtime/runs.ts:95run_cancelled (the cancelRun() function) — same issue, different call site. Errors get wrapped in a generic Failed to cancel run message, losing the 409 signal.

4. packages/core/src/runtime.ts:145run_started has no error handling. Server returns 410 if run is already terminal. Should catch 410 and log as info ("run already completed, skipping").

5. packages/core/src/runtime/suspension-handler.ts:116hook_created catches 410 but not 409. Server returns 409 if the hookId already exists (duplicate creation, same as step_created/wait_created). Should catch 409 and log as info, matching the pattern at lines 183 and 238.

6. packages/core/src/runtime/runs.ts:190wait_completed in wakeUpRun() catches 409 silently (increments stoppedCount with no log). A debug log would help observability without noise.

7. packages/core/src/runtime/step-handler.ts:253 — (already commented on this) the pre-execution guard step_failed is the only one not wrapped in withServerErrorRetry.

@VaguelySerious
VaguelySerious merged commit c75de97 into mainFeb 20, 2026
158 of 164 checks passed
@VaguelySerious
VaguelySerious deleted the pnoll/handle-step-409-gracefully branch February 20, 2026 22:43
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@VaguelySerious@pranaygp
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Handle 409 errors gracefully for step_completed/failed/retrying - #1120

Merged
VaguelySerious merged 3 commits into
mainfrom
pnoll/handle-step-409-gracefully
Feb 20, 2026
Merged

Handle 409 errors gracefully for step_completed/failed/retrying#1120
VaguelySerious merged 3 commits into
mainfrom
pnoll/handle-step-409-gracefully

Conversation

@VaguelySerious

Copy link
Copy Markdown
Member

When multiple step invocations race to complete/fail/retry a step, the server returns a 409 Conflict. Previously this would bubble up as an unhandled error. Now these are caught and logged as warnings, matching the pattern established for run_completed/run_failed in #1118.

…p_retrying events
When multiple step invocations race to complete/fail/retry a step, the
server returns a 409 Conflict. Previously this would bubble up as an
unhandled error. Now these are caught and logged as warnings, matching
the pattern established for run_completed/run_failed in #1118.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@changeset-bot

changeset-botBot commented Feb 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c59a690

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

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

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

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

@vercel

vercelBot commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Feb 19, 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.029s (-14.6% 🟢)1.004s (~)0.976s101.00x
💻 LocalNitro0.032s (-4.5%)1.004s (~)0.972s101.12x
💻 LocalNext.js (Turbopack)0.048s1.005s0.957s101.66x
🌐 RedisNext.js (Turbopack)0.049s1.005s0.956s101.70x
🌐 MongoDBNext.js (Turbopack)0.092s1.007s0.915s103.20x
🐘 PostgresNitro0.126s (-70.4% 🟢)1.009s (~)0.883s104.39x
🐘 PostgresExpress0.213s (+116.0% 🔺)1.010s (~)0.797s107.42x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.476s (-16.9% 🟢)2.049s (+20.8% 🔺)1.573s101.00x
▲ VercelNext.js (Turbopack)0.502s (-26.5% 🟢)1.969s (-9.1% 🟢)1.467s101.05x
▲ VercelExpress0.543s (+4.5%)1.939s (-2.3%)1.396s101.14x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.099s (-0.8%)2.005s (~)0.907s101.00x
🌐 RedisNext.js (Turbopack)1.104s2.006s0.902s101.01x
💻 LocalNitro1.107s (~)2.005s (~)0.898s101.01x
💻 LocalNext.js (Turbopack)1.107s2.005s0.898s101.01x
🌐 MongoDBNext.js (Turbopack)1.299s2.008s0.709s101.18x
🐘 PostgresExpress2.437s (-1.5%)3.014s (~)0.577s102.22x
🐘 PostgresNitro2.465s (+20.8% 🔺)3.013s (+19.9% 🔺)0.548s102.24x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.994s (-3.5%)3.274s (-4.3%)1.280s101.00x
▲ VercelExpress2.038s (-1.3%)3.486s (+1.3%)1.448s101.02x
▲ VercelNext.js (Turbopack)2.145s (+4.4%)3.314s (~)1.169s101.08x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)10.705s11.022s0.317s31.00x
💻 LocalExpress10.779s (-0.6%)11.022s (~)0.243s31.01x
💻 LocalNext.js (Turbopack)10.799s11.023s0.224s31.01x
💻 LocalNitro10.846s (~)11.022s (~)0.176s31.01x
🌐 MongoDBNext.js (Turbopack)12.183s13.024s0.841s31.14x
🐘 PostgresExpress20.312s (~)21.057s (~)0.745s21.90x
🐘 PostgresNitro20.339s (+34.1% 🔺)21.054s (+31.2% 🔺)0.715s21.90x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express15.349s (-0.5%)16.576s (-3.6%)1.227s21.00x
▲ VercelNitro15.845s (+1.3%)16.953s (-1.0%)1.108s21.03x
▲ VercelNext.js (Turbopack)16.241s (+1.3%)17.819s (+1.3%)1.578s21.06x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.885s27.050s0.165s31.00x
💻 LocalExpress27.299s (-0.7%)28.050s (~)0.751s31.02x
💻 LocalNext.js (Turbopack)27.322s28.054s0.733s31.02x
💻 LocalNitro27.507s (~)28.052s (~)0.545s31.02x
🌐 MongoDBNext.js (Turbopack)29.817s30.045s0.228s21.11x
🐘 PostgresExpress50.346s (~)51.131s (~)0.785s21.87x
🐘 PostgresNitro50.358s (+24.3% 🔺)51.125s (+25.9% 🔺)0.766s21.87x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express38.971s (-0.7%)40.623s (+0.6%)1.652s21.00x
▲ VercelNext.js (Turbopack)41.327s (+2.2%)42.956s (+2.9%)1.630s21.06x
▲ VercelNitro44.955s (+15.8% 🔺)46.160s (+15.0% 🔺)1.205s21.15x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.449s55.103s0.655s21.00x
💻 LocalExpress56.746s (-0.8%)57.102s (-1.7%)0.356s21.04x
💻 LocalNext.js (Turbopack)56.807s57.112s0.304s21.04x
💻 LocalNitro57.055s (~)57.102s (-1.7%)0.047s21.05x
🌐 MongoDBNext.js (Turbopack)60.849s61.077s0.228s21.12x
🐘 PostgresNitro100.245s (+22.8% 🔺)101.242s (+23.2% 🔺)0.997s11.84x
🐘 PostgresExpress100.282s (~)101.243s (~)0.961s11.84x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express84.271s (+1.0%)86.342s (+2.0%)2.071s21.00x
▲ VercelNitro84.672s (-10.9% 🟢)85.916s (-11.1% 🟢)1.244s21.00x
▲ VercelNext.js (Turbopack)87.110s (-7.4% 🟢)88.516s (-7.3% 🟢)1.406s21.03x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.258s2.006s0.748s151.00x
💻 LocalExpress1.380s (-1.4%)2.006s (~)0.626s151.10x
💻 LocalNext.js (Turbopack)1.395s2.005s0.609s151.11x
💻 LocalNitro1.412s (+2.0%)2.005s (~)0.593s151.12x
🌐 MongoDBNext.js (Turbopack)2.153s3.008s0.855s101.71x
🐘 PostgresNitro2.272s (+6.0% 🔺)3.013s (+2.9%)0.741s101.81x
🐘 PostgresExpress2.293s (+0.7%)3.013s (~)0.721s101.82x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.202s (~)3.503s (-4.5%)1.301s91.00x
▲ VercelNext.js (Turbopack)2.732s (-6.3% 🟢)3.969s (-11.0% 🟢)1.237s91.24x
▲ VercelExpress3.581s (+51.1% 🔺)5.072s (+40.7% 🔺)1.491s61.63x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express2.421s (-4.6%)3.008s (~)0.587s101.00x
💻 LocalNitro2.481s (+1.7%)3.008s (~)0.527s101.02x
💻 LocalNext.js (Turbopack)2.482s3.007s0.525s101.03x
🌐 RedisNext.js (Turbopack)2.487s3.008s0.520s101.03x
🌐 MongoDBNext.js (Turbopack)4.694s5.178s0.484s61.94x
🐘 PostgresNitro7.940s (-29.8% 🟢)8.531s (-27.1% 🟢)0.591s43.28x
🐘 PostgresExpress8.460s (-1.3%)9.033s (-2.8%)0.573s43.49x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.602s (+3.0%)3.778s (-0.9%)1.176s81.00x
▲ VercelNext.js (Turbopack)2.868s (+9.8% 🔺)3.810s (-0.5%)0.943s81.10x
▲ VercelExpress3.979s (+64.3% 🔺)5.202s (+37.4% 🔺)1.223s61.53x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.037s4.438s0.401s71.00x
💻 LocalNext.js (Turbopack)6.760s7.214s0.454s51.67x
💻 LocalExpress6.827s (-7.3% 🟢)7.218s (-10.0% 🟢)0.391s51.69x
💻 LocalNitro6.853s (+2.1%)7.021s (~)0.168s51.70x
🌐 MongoDBNext.js (Turbopack)9.896s10.350s0.454s32.45x
🐘 PostgresNitro48.813s (+2.2%)49.157s (+2.1%)0.344s112.09x
🐘 PostgresExpress50.880s (+2.0%)51.183s (+2.1%)0.303s112.60x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.995s (-15.8% 🟢)4.028s (-14.8% 🟢)1.032s81.00x
▲ VercelExpress3.408s (+8.6% 🔺)4.629s (+12.4% 🔺)1.221s71.14x
▲ VercelNext.js (Turbopack)3.614s (+4.3%)4.598s (+1.7%)0.984s71.21x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.267s2.006s0.739s151.00x
💻 LocalExpress1.412s (-1.1%)2.006s (~)0.594s151.11x
💻 LocalNitro1.427s (+1.2%)2.006s (~)0.579s151.13x
💻 LocalNext.js (Turbopack)1.458s2.006s0.547s151.15x
🌐 MongoDBNext.js (Turbopack)2.128s3.008s0.880s101.68x
🐘 PostgresNitro2.186s (+2.8%)2.679s (~)0.493s121.73x
🐘 PostgresExpress2.218s (~)2.740s (+5.6% 🔺)0.523s111.75x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.060s (-20.6% 🟢)3.356s (-13.1% 🟢)1.296s91.00x
▲ VercelExpress2.147s (~)3.433s (~)1.286s91.04x
▲ VercelNext.js (Turbopack)2.351s (+2.9%)3.625s (~)1.274s91.14x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.479s3.007s0.528s101.00x
💻 LocalNitro2.588s (-1.1%)3.009s (~)0.421s101.04x
💻 LocalExpress2.646s (-1.7%)3.007s (~)0.362s101.07x
💻 LocalNext.js (Turbopack)2.693s3.010s0.316s101.09x
🌐 MongoDBNext.js (Turbopack)4.679s5.177s0.499s61.89x
🐘 PostgresNitro10.280s (-2.8%)10.695s (-5.9% 🟢)0.415s34.15x
🐘 PostgresExpress11.117s (-8.6% 🟢)11.365s (-8.2% 🟢)0.248s34.48x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.246s (-2.0%)3.485s (+2.0%)1.238s91.00x
▲ VercelNext.js (Turbopack)2.619s (+2.5%)3.696s (-1.1%)1.078s91.17x
▲ VercelNitro2.928s (+28.4% 🔺)4.577s (+28.8% 🔺)1.649s81.30x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.010s4.724s0.714s71.00x
💻 LocalNext.js (Turbopack)7.063s7.769s0.706s41.76x
💻 LocalExpress7.215s (-6.7% 🟢)8.019s (~)0.804s41.80x
💻 LocalNitro7.655s (+3.2%)8.024s (~)0.369s41.91x
🌐 MongoDBNext.js (Turbopack)9.977s10.350s0.373s32.49x
🐘 PostgresExpress48.605s (-3.1%)49.119s (-3.9%)0.514s112.12x
🐘 PostgresNitro51.945s (+8.1% 🔺)52.110s (+8.2% 🔺)0.165s112.95x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.917s (-17.2% 🟢)3.920s (-13.6% 🟢)1.004s81.00x
▲ VercelExpress3.620s (+5.5% 🔺)4.579s (+3.2%)0.959s71.24x
▲ VercelNitro3.647s (+28.8% 🔺)4.650s (+15.1% 🔺)1.004s71.25x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.147s1.001s0.010s1.016s0.869s101.00x
🌐 RedisNext.js (Turbopack)0.153s1.000s0.001s1.007s0.854s101.04x
💻 LocalExpress0.161s (-8.3% 🟢)1.003s (~)0.010s (-7.6% 🟢)1.015s (~)0.854s101.09x
💻 LocalNitro0.179s (~)1.002s (~)0.010s (-5.9% 🟢)1.015s (~)0.836s101.21x
🌐 MongoDBNext.js (Turbopack)0.494s0.945s0.001s1.009s0.514s103.35x
🐘 PostgresNitro2.344s (+103.8% 🔺)2.696s (+42.1% 🔺)0.002s (+7.1% 🔺)3.014s (+49.6% 🔺)0.669s1015.90x
🐘 PostgresExpress2.382s (+1.2%)2.659s (-1.1%)0.001s (-7.1% 🟢)3.015s (~)0.633s1016.16x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.610s (+1.4%)2.168s (+3.0%)0.095s (-41.3% 🟢)2.836s (+2.5%)1.226s101.00x
▲ VercelNitro1.652s (-21.5% 🟢)1.921s (-30.1% 🟢)0.222s (+25.1% 🔺)2.629s (-24.6% 🟢)0.977s101.03x
▲ VercelNext.js (Turbopack)1.740s (+1.0%)2.565s (+7.6% 🔺)0.182s (+30.9% 🔺)3.241s (+5.1% 🔺)1.502s101.08x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress8/12
🐘 PostgresNitro8/12
▲ VercelNitro6/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local9/12
Next.js (Turbopack)🌐 Redis7/12
Nitro💻 Local10/12
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

@github-actions

github-actionsBot commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production522149572
✅ 💻 Local Development556068624
✅ 📦 Local Production556068624
✅ 🐘 Local Postgres556068624
✅ 🪟 Windows490352
❌ 🌍 Community Worlds111459165
✅ 📋 Other135021156
Total2485462862817

❌ Failed Tests

▲ Vercel Production (1 failed)

nextjs-turbopack (1 failed):

  • error handling retry behavior workflow completes despite transient 5xx on step_completed
🌍 Community Worlds (45 failed)

turso (45 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • parallelSleepWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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 retry behavior workflow completes despite transient 5xx on step_completed
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • cancelRun - cancelling a running workflow
  • cancelRun via CLI - cancelling a running workflow
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4705
✅ example4705
✅ express4705
✅ fastify4705
✅ hono4705
❌ nextjs-turbopack4912
✅ nextjs-webpack5002
✅ nitro4705
✅ nuxt4705
✅ sveltekit4705
✅ vite4705
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4903
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4903
✅ redis-dev300
✅ redis4903
✅ turso-dev300
❌ turso4453
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4507
✅ e2e-local-postgres-nest-stable4507
✅ e2e-local-prod-nest-stable4507

📋 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.

@VaguelySerious
VaguelySerious marked this pull request as ready for review February 19, 2026 01:52

@pranaygppranaygp 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.

Solid PR — the 409 handling pattern is consistent and correct, and the tests cover the key paths well. Left a few minor comments.

},
});
try {
await world.events.create(workflowRunId, {

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.

Nit: This is the only step_failed event creation that does not use withServerErrorRetry. The other three sites (fatal error path, max retries exhausted path, and step_retrying) all wrap the call with it. Was this intentional? If not, might be worth wrapping for consistency:

try{awaitwithServerErrorRetry(()=>world.events.create(workflowRunId,{
...
}));}catch(err){

(Pre-existing, but since you're already touching this block it'd be a clean fix.)

},
event: {},
});
mockStepFn.mockResolvedValue('step-result');

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.

Unused variable — callCount is incremented but never asserted on. Either assert it (e.g. expect(callCount).toBe(1) to verify step_completed was actually attempted) or remove it.

).rejects.toThrow('Internal Server Error');
});
});
});

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.

Nice that you have a should re-throw non-409 errors from step_retrying test. Consider adding analogous re-throw tests for step_completed and step_failed (e.g. a 500 from step_completed should propagate, a 500 from step_failed in the max-retries path should propagate). This would fully cover all the throw err / throw stepFailErr branches.

@pranaygppranaygp 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.

Did an audit of 409/410 handling across all world.events.create() call sites in the SDK (cross-referenced against the server's event validation logic and the event sourcing docs). The changes in this PR are correct — here are the pre-existing gaps worth addressing:


Should fix in this PR

packages/core/src/runtime/step-handler.ts:150-153 — uses console.warn() instead of runtimeLogger.info() for the step_started 410 (workflow already completed) case. Every other 410/409 handler in the file uses the structured logger. This should be:

runtimeLogger.info('Workflow run already completed, skipping step',{ workflowRunId, stepId,message: err.message});

info is the right level here — this is an expected, non-actionable condition (same as the 410 handler in the catch block at line 476-486).


Follow-up PR candidates

These are all pre-existing and fine to address separately:

1. packages/core/src/runtime/resume-hook.ts:128hook_received has no error handling at all. Server can return 409 (hook disposed) or 410 (run done) — both benign races that should be caught and logged as info. A 404 here would be a real bug and should throw.

2. packages/core/src/runtime/run.ts:69run_cancelled (the Run.cancel() method) has no error handling. Server returns 409 if run already terminal — should catch and log as warn.

3. packages/core/src/runtime/runs.ts:95run_cancelled (the cancelRun() function) — same issue, different call site. Errors get wrapped in a generic Failed to cancel run message, losing the 409 signal.

4. packages/core/src/runtime.ts:145run_started has no error handling. Server returns 410 if run is already terminal. Should catch 410 and log as info ("run already completed, skipping").

5. packages/core/src/runtime/suspension-handler.ts:116hook_created catches 410 but not 409. Server returns 409 if the hookId already exists (duplicate creation, same as step_created/wait_created). Should catch 409 and log as info, matching the pattern at lines 183 and 238.

6. packages/core/src/runtime/runs.ts:190wait_completed in wakeUpRun() catches 409 silently (increments stoppedCount with no log). A debug log would help observability without noise.

7. packages/core/src/runtime/step-handler.ts:253 — (already commented on this) the pre-execution guard step_failed is the only one not wrapped in withServerErrorRetry.

@VaguelySerious
VaguelySerious merged commit c75de97 into mainFeb 20, 2026
158 of 164 checks passed
@VaguelySerious
VaguelySerious deleted the pnoll/handle-step-409-gracefully branch February 20, 2026 22:43
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

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

Handle 409 errors gracefully for step_completed/failed/retrying - #1120

Merged
VaguelySerious merged 3 commits into
mainfrom
pnoll/handle-step-409-gracefully
Feb 20, 2026
Merged

Handle 409 errors gracefully for step_completed/failed/retrying#1120
VaguelySerious merged 3 commits into
mainfrom
pnoll/handle-step-409-gracefully

Conversation

@VaguelySerious

Copy link
Copy Markdown
Member

When multiple step invocations race to complete/fail/retry a step, the server returns a 409 Conflict. Previously this would bubble up as an unhandled error. Now these are caught and logged as warnings, matching the pattern established for run_completed/run_failed in #1118.

…p_retrying events
When multiple step invocations race to complete/fail/retry a step, the
server returns a 409 Conflict. Previously this would bubble up as an
unhandled error. Now these are caught and logged as warnings, matching
the pattern established for run_completed/run_failed in #1118.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@changeset-bot

changeset-botBot commented Feb 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c59a690

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

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

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

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

@vercel

vercelBot commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Feb 19, 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.029s (-14.6% 🟢)1.004s (~)0.976s101.00x
💻 LocalNitro0.032s (-4.5%)1.004s (~)0.972s101.12x
💻 LocalNext.js (Turbopack)0.048s1.005s0.957s101.66x
🌐 RedisNext.js (Turbopack)0.049s1.005s0.956s101.70x
🌐 MongoDBNext.js (Turbopack)0.092s1.007s0.915s103.20x
🐘 PostgresNitro0.126s (-70.4% 🟢)1.009s (~)0.883s104.39x
🐘 PostgresExpress0.213s (+116.0% 🔺)1.010s (~)0.797s107.42x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.476s (-16.9% 🟢)2.049s (+20.8% 🔺)1.573s101.00x
▲ VercelNext.js (Turbopack)0.502s (-26.5% 🟢)1.969s (-9.1% 🟢)1.467s101.05x
▲ VercelExpress0.543s (+4.5%)1.939s (-2.3%)1.396s101.14x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.099s (-0.8%)2.005s (~)0.907s101.00x
🌐 RedisNext.js (Turbopack)1.104s2.006s0.902s101.01x
💻 LocalNitro1.107s (~)2.005s (~)0.898s101.01x
💻 LocalNext.js (Turbopack)1.107s2.005s0.898s101.01x
🌐 MongoDBNext.js (Turbopack)1.299s2.008s0.709s101.18x
🐘 PostgresExpress2.437s (-1.5%)3.014s (~)0.577s102.22x
🐘 PostgresNitro2.465s (+20.8% 🔺)3.013s (+19.9% 🔺)0.548s102.24x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.994s (-3.5%)3.274s (-4.3%)1.280s101.00x
▲ VercelExpress2.038s (-1.3%)3.486s (+1.3%)1.448s101.02x
▲ VercelNext.js (Turbopack)2.145s (+4.4%)3.314s (~)1.169s101.08x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)10.705s11.022s0.317s31.00x
💻 LocalExpress10.779s (-0.6%)11.022s (~)0.243s31.01x
💻 LocalNext.js (Turbopack)10.799s11.023s0.224s31.01x
💻 LocalNitro10.846s (~)11.022s (~)0.176s31.01x
🌐 MongoDBNext.js (Turbopack)12.183s13.024s0.841s31.14x
🐘 PostgresExpress20.312s (~)21.057s (~)0.745s21.90x
🐘 PostgresNitro20.339s (+34.1% 🔺)21.054s (+31.2% 🔺)0.715s21.90x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express15.349s (-0.5%)16.576s (-3.6%)1.227s21.00x
▲ VercelNitro15.845s (+1.3%)16.953s (-1.0%)1.108s21.03x
▲ VercelNext.js (Turbopack)16.241s (+1.3%)17.819s (+1.3%)1.578s21.06x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.885s27.050s0.165s31.00x
💻 LocalExpress27.299s (-0.7%)28.050s (~)0.751s31.02x
💻 LocalNext.js (Turbopack)27.322s28.054s0.733s31.02x
💻 LocalNitro27.507s (~)28.052s (~)0.545s31.02x
🌐 MongoDBNext.js (Turbopack)29.817s30.045s0.228s21.11x
🐘 PostgresExpress50.346s (~)51.131s (~)0.785s21.87x
🐘 PostgresNitro50.358s (+24.3% 🔺)51.125s (+25.9% 🔺)0.766s21.87x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express38.971s (-0.7%)40.623s (+0.6%)1.652s21.00x
▲ VercelNext.js (Turbopack)41.327s (+2.2%)42.956s (+2.9%)1.630s21.06x
▲ VercelNitro44.955s (+15.8% 🔺)46.160s (+15.0% 🔺)1.205s21.15x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.449s55.103s0.655s21.00x
💻 LocalExpress56.746s (-0.8%)57.102s (-1.7%)0.356s21.04x
💻 LocalNext.js (Turbopack)56.807s57.112s0.304s21.04x
💻 LocalNitro57.055s (~)57.102s (-1.7%)0.047s21.05x
🌐 MongoDBNext.js (Turbopack)60.849s61.077s0.228s21.12x
🐘 PostgresNitro100.245s (+22.8% 🔺)101.242s (+23.2% 🔺)0.997s11.84x
🐘 PostgresExpress100.282s (~)101.243s (~)0.961s11.84x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express84.271s (+1.0%)86.342s (+2.0%)2.071s21.00x
▲ VercelNitro84.672s (-10.9% 🟢)85.916s (-11.1% 🟢)1.244s21.00x
▲ VercelNext.js (Turbopack)87.110s (-7.4% 🟢)88.516s (-7.3% 🟢)1.406s21.03x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.258s2.006s0.748s151.00x
💻 LocalExpress1.380s (-1.4%)2.006s (~)0.626s151.10x
💻 LocalNext.js (Turbopack)1.395s2.005s0.609s151.11x
💻 LocalNitro1.412s (+2.0%)2.005s (~)0.593s151.12x
🌐 MongoDBNext.js (Turbopack)2.153s3.008s0.855s101.71x
🐘 PostgresNitro2.272s (+6.0% 🔺)3.013s (+2.9%)0.741s101.81x
🐘 PostgresExpress2.293s (+0.7%)3.013s (~)0.721s101.82x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.202s (~)3.503s (-4.5%)1.301s91.00x
▲ VercelNext.js (Turbopack)2.732s (-6.3% 🟢)3.969s (-11.0% 🟢)1.237s91.24x
▲ VercelExpress3.581s (+51.1% 🔺)5.072s (+40.7% 🔺)1.491s61.63x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express2.421s (-4.6%)3.008s (~)0.587s101.00x
💻 LocalNitro2.481s (+1.7%)3.008s (~)0.527s101.02x
💻 LocalNext.js (Turbopack)2.482s3.007s0.525s101.03x
🌐 RedisNext.js (Turbopack)2.487s3.008s0.520s101.03x
🌐 MongoDBNext.js (Turbopack)4.694s5.178s0.484s61.94x
🐘 PostgresNitro7.940s (-29.8% 🟢)8.531s (-27.1% 🟢)0.591s43.28x
🐘 PostgresExpress8.460s (-1.3%)9.033s (-2.8%)0.573s43.49x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.602s (+3.0%)3.778s (-0.9%)1.176s81.00x
▲ VercelNext.js (Turbopack)2.868s (+9.8% 🔺)3.810s (-0.5%)0.943s81.10x
▲ VercelExpress3.979s (+64.3% 🔺)5.202s (+37.4% 🔺)1.223s61.53x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.037s4.438s0.401s71.00x
💻 LocalNext.js (Turbopack)6.760s7.214s0.454s51.67x
💻 LocalExpress6.827s (-7.3% 🟢)7.218s (-10.0% 🟢)0.391s51.69x
💻 LocalNitro6.853s (+2.1%)7.021s (~)0.168s51.70x
🌐 MongoDBNext.js (Turbopack)9.896s10.350s0.454s32.45x
🐘 PostgresNitro48.813s (+2.2%)49.157s (+2.1%)0.344s112.09x
🐘 PostgresExpress50.880s (+2.0%)51.183s (+2.1%)0.303s112.60x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.995s (-15.8% 🟢)4.028s (-14.8% 🟢)1.032s81.00x
▲ VercelExpress3.408s (+8.6% 🔺)4.629s (+12.4% 🔺)1.221s71.14x
▲ VercelNext.js (Turbopack)3.614s (+4.3%)4.598s (+1.7%)0.984s71.21x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.267s2.006s0.739s151.00x
💻 LocalExpress1.412s (-1.1%)2.006s (~)0.594s151.11x
💻 LocalNitro1.427s (+1.2%)2.006s (~)0.579s151.13x
💻 LocalNext.js (Turbopack)1.458s2.006s0.547s151.15x
🌐 MongoDBNext.js (Turbopack)2.128s3.008s0.880s101.68x
🐘 PostgresNitro2.186s (+2.8%)2.679s (~)0.493s121.73x
🐘 PostgresExpress2.218s (~)2.740s (+5.6% 🔺)0.523s111.75x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.060s (-20.6% 🟢)3.356s (-13.1% 🟢)1.296s91.00x
▲ VercelExpress2.147s (~)3.433s (~)1.286s91.04x
▲ VercelNext.js (Turbopack)2.351s (+2.9%)3.625s (~)1.274s91.14x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.479s3.007s0.528s101.00x
💻 LocalNitro2.588s (-1.1%)3.009s (~)0.421s101.04x
💻 LocalExpress2.646s (-1.7%)3.007s (~)0.362s101.07x
💻 LocalNext.js (Turbopack)2.693s3.010s0.316s101.09x
🌐 MongoDBNext.js (Turbopack)4.679s5.177s0.499s61.89x
🐘 PostgresNitro10.280s (-2.8%)10.695s (-5.9% 🟢)0.415s34.15x
🐘 PostgresExpress11.117s (-8.6% 🟢)11.365s (-8.2% 🟢)0.248s34.48x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.246s (-2.0%)3.485s (+2.0%)1.238s91.00x
▲ VercelNext.js (Turbopack)2.619s (+2.5%)3.696s (-1.1%)1.078s91.17x
▲ VercelNitro2.928s (+28.4% 🔺)4.577s (+28.8% 🔺)1.649s81.30x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.010s4.724s0.714s71.00x
💻 LocalNext.js (Turbopack)7.063s7.769s0.706s41.76x
💻 LocalExpress7.215s (-6.7% 🟢)8.019s (~)0.804s41.80x
💻 LocalNitro7.655s (+3.2%)8.024s (~)0.369s41.91x
🌐 MongoDBNext.js (Turbopack)9.977s10.350s0.373s32.49x
🐘 PostgresExpress48.605s (-3.1%)49.119s (-3.9%)0.514s112.12x
🐘 PostgresNitro51.945s (+8.1% 🔺)52.110s (+8.2% 🔺)0.165s112.95x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.917s (-17.2% 🟢)3.920s (-13.6% 🟢)1.004s81.00x
▲ VercelExpress3.620s (+5.5% 🔺)4.579s (+3.2%)0.959s71.24x
▲ VercelNitro3.647s (+28.8% 🔺)4.650s (+15.1% 🔺)1.004s71.25x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.147s1.001s0.010s1.016s0.869s101.00x
🌐 RedisNext.js (Turbopack)0.153s1.000s0.001s1.007s0.854s101.04x
💻 LocalExpress0.161s (-8.3% 🟢)1.003s (~)0.010s (-7.6% 🟢)1.015s (~)0.854s101.09x
💻 LocalNitro0.179s (~)1.002s (~)0.010s (-5.9% 🟢)1.015s (~)0.836s101.21x
🌐 MongoDBNext.js (Turbopack)0.494s0.945s0.001s1.009s0.514s103.35x
🐘 PostgresNitro2.344s (+103.8% 🔺)2.696s (+42.1% 🔺)0.002s (+7.1% 🔺)3.014s (+49.6% 🔺)0.669s1015.90x
🐘 PostgresExpress2.382s (+1.2%)2.659s (-1.1%)0.001s (-7.1% 🟢)3.015s (~)0.633s1016.16x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.610s (+1.4%)2.168s (+3.0%)0.095s (-41.3% 🟢)2.836s (+2.5%)1.226s101.00x
▲ VercelNitro1.652s (-21.5% 🟢)1.921s (-30.1% 🟢)0.222s (+25.1% 🔺)2.629s (-24.6% 🟢)0.977s101.03x
▲ VercelNext.js (Turbopack)1.740s (+1.0%)2.565s (+7.6% 🔺)0.182s (+30.9% 🔺)3.241s (+5.1% 🔺)1.502s101.08x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress8/12
🐘 PostgresNitro8/12
▲ VercelNitro6/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local9/12
Next.js (Turbopack)🌐 Redis7/12
Nitro💻 Local10/12
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

@github-actions

github-actionsBot commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production522149572
✅ 💻 Local Development556068624
✅ 📦 Local Production556068624
✅ 🐘 Local Postgres556068624
✅ 🪟 Windows490352
❌ 🌍 Community Worlds111459165
✅ 📋 Other135021156
Total2485462862817

❌ Failed Tests

▲ Vercel Production (1 failed)

nextjs-turbopack (1 failed):

  • error handling retry behavior workflow completes despite transient 5xx on step_completed
🌍 Community Worlds (45 failed)

turso (45 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • parallelSleepWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • 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 retry behavior workflow completes despite transient 5xx on step_completed
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • cancelRun - cancelling a running workflow
  • cancelRun via CLI - cancelling a running workflow
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4705
✅ example4705
✅ express4705
✅ fastify4705
✅ hono4705
❌ nextjs-turbopack4912
✅ nextjs-webpack5002
✅ nitro4705
✅ nuxt4705
✅ sveltekit4705
✅ vite4705
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4903
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4903
✅ redis-dev300
✅ redis4903
✅ turso-dev300
❌ turso4453
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4507
✅ e2e-local-postgres-nest-stable4507
✅ e2e-local-prod-nest-stable4507

📋 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.

@VaguelySerious
VaguelySerious marked this pull request as ready for review February 19, 2026 01:52

@pranaygppranaygp 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.

Solid PR — the 409 handling pattern is consistent and correct, and the tests cover the key paths well. Left a few minor comments.

},
});
try {
await world.events.create(workflowRunId, {

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.

Nit: This is the only step_failed event creation that does not use withServerErrorRetry. The other three sites (fatal error path, max retries exhausted path, and step_retrying) all wrap the call with it. Was this intentional? If not, might be worth wrapping for consistency:

try{awaitwithServerErrorRetry(()=>world.events.create(workflowRunId,{
...
}));}catch(err){

(Pre-existing, but since you're already touching this block it'd be a clean fix.)

},
event: {},
});
mockStepFn.mockResolvedValue('step-result');

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.

Unused variable — callCount is incremented but never asserted on. Either assert it (e.g. expect(callCount).toBe(1) to verify step_completed was actually attempted) or remove it.

).rejects.toThrow('Internal Server Error');
});
});
});

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.

Nice that you have a should re-throw non-409 errors from step_retrying test. Consider adding analogous re-throw tests for step_completed and step_failed (e.g. a 500 from step_completed should propagate, a 500 from step_failed in the max-retries path should propagate). This would fully cover all the throw err / throw stepFailErr branches.

@pranaygppranaygp 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.

Did an audit of 409/410 handling across all world.events.create() call sites in the SDK (cross-referenced against the server's event validation logic and the event sourcing docs). The changes in this PR are correct — here are the pre-existing gaps worth addressing:


Should fix in this PR

packages/core/src/runtime/step-handler.ts:150-153 — uses console.warn() instead of runtimeLogger.info() for the step_started 410 (workflow already completed) case. Every other 410/409 handler in the file uses the structured logger. This should be:

runtimeLogger.info('Workflow run already completed, skipping step',{ workflowRunId, stepId,message: err.message});

info is the right level here — this is an expected, non-actionable condition (same as the 410 handler in the catch block at line 476-486).


Follow-up PR candidates

These are all pre-existing and fine to address separately:

1. packages/core/src/runtime/resume-hook.ts:128hook_received has no error handling at all. Server can return 409 (hook disposed) or 410 (run done) — both benign races that should be caught and logged as info. A 404 here would be a real bug and should throw.

2. packages/core/src/runtime/run.ts:69run_cancelled (the Run.cancel() method) has no error handling. Server returns 409 if run already terminal — should catch and log as warn.

3. packages/core/src/runtime/runs.ts:95run_cancelled (the cancelRun() function) — same issue, different call site. Errors get wrapped in a generic Failed to cancel run message, losing the 409 signal.

4. packages/core/src/runtime.ts:145run_started has no error handling. Server returns 410 if run is already terminal. Should catch 410 and log as info ("run already completed, skipping").

5. packages/core/src/runtime/suspension-handler.ts:116hook_created catches 410 but not 409. Server returns 409 if the hookId already exists (duplicate creation, same as step_created/wait_created). Should catch 409 and log as info, matching the pattern at lines 183 and 238.

6. packages/core/src/runtime/runs.ts:190wait_completed in wakeUpRun() catches 409 silently (increments stoppedCount with no log). A debug log would help observability without noise.

7. packages/core/src/runtime/step-handler.ts:253 — (already commented on this) the pre-execution guard step_failed is the only one not wrapped in withServerErrorRetry.

@VaguelySerious
VaguelySerious merged commit c75de97 into mainFeb 20, 2026
158 of 164 checks passed
@VaguelySerious
VaguelySerious deleted the pnoll/handle-step-409-gracefully branch February 20, 2026 22:43
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@VaguelySerious@pranaygp