Skip to content

Do not re-throw error when multiple workflow invocations race to complete the workflow#1118

Merged
VaguelySerious merged 3 commits intomainfrom
peter/warn-for-409-only
Feb 18, 2026
Merged

Do not re-throw error when multiple workflow invocations race to complete the workflow#1118
VaguelySerious merged 3 commits intomainfrom
peter/warn-for-409-only

Conversation

@VaguelySerious
Copy link
Member

No description provided.

…lete the workflow

Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@vercel
Copy link
Contributor

vercel bot commented Feb 18, 2026

@changeset-bot
Copy link

changeset-bot bot commented Feb 18, 2026

🦋 Changeset detected

Latest commit: 5effb22

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

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

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

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

@github-actions
Copy link
Contributor

github-actions bot commented Feb 18, 2026

🧪 E2E Test Results

Some tests failed

Summary

Passed Failed Skipped Total
✅ ▲ Vercel Production 534 0 38 572
✅ 💻 Local Development 556 0 68 624
✅ 📦 Local Production 556 0 68 624
✅ 🐘 Local Postgres 556 0 68 624
✅ 🪟 Windows 49 0 3 52
❌ 🌍 Community Worlds 111 45 9 165
✅ 📋 Other 135 0 21 156
Total 2497 45 275 2817

❌ Failed Tests

🌍 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
App Passed Failed Skipped
✅ astro 48 0 4
✅ example 48 0 4
✅ express 48 0 4
✅ fastify 48 0 4
✅ hono 48 0 4
✅ nextjs-turbopack 51 0 1
✅ nextjs-webpack 51 0 1
✅ nitro 48 0 4
✅ nuxt 48 0 4
✅ sveltekit 48 0 4
✅ vite 48 0 4
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 45 0 7
✅ express-stable 45 0 7
✅ fastify-stable 45 0 7
✅ hono-stable 45 0 7
✅ nextjs-turbopack-canary 49 0 3
✅ nextjs-turbopack-stable 49 0 3
✅ nextjs-webpack-canary 49 0 3
✅ nextjs-webpack-stable 49 0 3
✅ nitro-stable 45 0 7
✅ nuxt-stable 45 0 7
✅ sveltekit-stable 45 0 7
✅ vite-stable 45 0 7
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 45 0 7
✅ express-stable 45 0 7
✅ fastify-stable 45 0 7
✅ hono-stable 45 0 7
✅ nextjs-turbopack-canary 49 0 3
✅ nextjs-turbopack-stable 49 0 3
✅ nextjs-webpack-canary 49 0 3
✅ nextjs-webpack-stable 49 0 3
✅ nitro-stable 45 0 7
✅ nuxt-stable 45 0 7
✅ sveltekit-stable 45 0 7
✅ vite-stable 45 0 7
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 45 0 7
✅ express-stable 45 0 7
✅ fastify-stable 45 0 7
✅ hono-stable 45 0 7
✅ nextjs-turbopack-canary 49 0 3
✅ nextjs-turbopack-stable 49 0 3
✅ nextjs-webpack-canary 49 0 3
✅ nextjs-webpack-stable 49 0 3
✅ nitro-stable 45 0 7
✅ nuxt-stable 45 0 7
✅ sveltekit-stable 45 0 7
✅ vite-stable 45 0 7
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 49 0 3
❌ 🌍 Community Worlds
App Passed Failed Skipped
✅ mongodb-dev 3 0 0
✅ mongodb 49 0 3
✅ redis-dev 3 0 0
✅ redis 49 0 3
✅ turso-dev 3 0 0
❌ turso 4 45 3
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 45 0 7
✅ e2e-local-postgres-nest-stable 45 0 7
✅ e2e-local-prod-nest-stable 45 0 7

📋 View full workflow run

@github-actions
Copy link
Contributor

github-actions bot commented Feb 18, 2026

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 0.032s (-1.9%) 1.005s (~) 0.973s 10 1.00x
💻 Local Nitro 0.033s (-3.3%) 1.006s (~) 0.973s 10 1.03x
💻 Local Next.js (Turbopack) 0.040s 1.005s 0.965s 10 1.25x
🌐 Redis Next.js (Turbopack) 0.049s 1.005s 0.956s 10 1.54x
🌐 MongoDB Next.js (Turbopack) 0.101s 1.006s 0.905s 10 3.19x
🐘 Postgres Express 0.109s (+5.4% 🔺) 1.010s (~) 0.901s 10 3.43x
🐘 Postgres Nitro 0.387s (-18.8% 🟢) 1.010s (~) 0.623s 10 12.16x
🐘 Postgres Next.js (Turbopack) 0.391s 1.010s 0.619s 10 12.29x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 0.524s (-50.8% 🟢) 1.850s (-25.5% 🟢) 1.326s 10 1.00x
▲ Vercel Express 0.562s (-18.5% 🟢) 1.810s (-12.8% 🟢) 1.248s 10 1.07x
▲ Vercel Next.js (Turbopack) 0.578s (-28.9% 🟢) 1.814s (-12.3% 🟢) 1.236s 10 1.10x

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

workflow with 1 step

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 1.099s 2.005s 0.906s 10 1.00x
💻 Local Express 1.102s (~) 2.006s (~) 0.904s 10 1.00x
💻 Local Nitro 1.107s (~) 2.005s (~) 0.898s 10 1.01x
🌐 Redis Next.js (Turbopack) 1.111s 2.006s 0.896s 10 1.01x
🌐 MongoDB Next.js (Turbopack) 1.284s 2.007s 0.723s 10 1.17x
🐘 Postgres Next.js (Turbopack) 2.267s 3.015s 0.748s 10 2.06x
🐘 Postgres Nitro 2.297s (-2.2%) 2.814s (-6.7% 🟢) 0.518s 10 2.09x
🐘 Postgres Express 2.444s (-1.4%) 3.014s (~) 0.570s 10 2.22x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.269s (-1.0%) 2.999s (-4.5%) 0.729s 10 1.00x
▲ Vercel Express 2.301s (+5.4% 🔺) 2.985s (-5.3% 🟢) 0.684s 10 1.01x
▲ Vercel Next.js (Turbopack) 2.776s (+23.5% 🔺) 3.612s (+16.3% 🔺) 0.836s 10 1.22x

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

workflow with 10 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 10.710s 11.023s 0.313s 3 1.00x
💻 Local Next.js (Turbopack) 10.714s 11.021s 0.308s 3 1.00x
💻 Local Express 10.816s (~) 11.022s (~) 0.206s 3 1.01x
💻 Local Nitro 10.847s (~) 11.023s (~) 0.176s 3 1.01x
🌐 MongoDB Next.js (Turbopack) 12.200s 13.015s 0.814s 3 1.14x
🐘 Postgres Nitro 15.268s (-24.4% 🟢) 16.047s (-23.8% 🟢) 0.780s 2 1.43x
🐘 Postgres Next.js (Turbopack) 20.148s 21.059s 0.910s 2 1.88x
🐘 Postgres Express 20.349s (~) 21.060s (~) 0.711s 2 1.90x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 29.669s (+68.5% 🔺) 30.380s (+57.8% 🔺) 0.711s 1 1.00x
▲ Vercel Express 31.865s (+80.3% 🔺) 32.482s (+72.9% 🔺) 0.617s 1 1.07x
▲ Vercel Next.js (Turbopack) 34.677s (+74.1% 🔺) 35.814s (+71.6% 🔺) 1.137s 1 1.17x

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

workflow with 25 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 26.944s 27.053s 0.109s 3 1.00x
💻 Local Next.js (Turbopack) 27.243s 28.052s 0.808s 3 1.01x
💻 Local Express 27.471s (~) 28.049s (~) 0.578s 3 1.02x
💻 Local Nitro 27.526s (~) 28.053s (~) 0.527s 3 1.02x
🌐 MongoDB Next.js (Turbopack) 30.294s 31.028s 0.734s 2 1.12x
🐘 Postgres Nitro 37.829s (-25.1% 🟢) 38.099s (-25.5% 🟢) 0.270s 2 1.40x
🐘 Postgres Express 50.361s (~) 51.130s (+1.0%) 0.769s 2 1.87x
🐘 Postgres Next.js (Turbopack) 50.501s 51.133s 0.632s 2 1.87x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 42.987s (~) 44.151s (~) 1.164s 2 1.00x
▲ Vercel Nitro 43.650s (+0.9%) 45.001s (+1.6%) 1.352s 2 1.02x
▲ Vercel Next.js (Turbopack) 44.943s (+4.0%) 45.839s (+2.3%) 0.896s 2 1.05x

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

workflow with 50 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 54.365s 55.101s 0.736s 2 1.00x
💻 Local Next.js (Turbopack) 57.093s 57.601s 0.509s 2 1.05x
💻 Local Express 57.230s (~) 58.100s (~) 0.870s 2 1.05x
💻 Local Nitro 57.408s (~) 58.108s (~) 0.699s 2 1.06x
🌐 MongoDB Next.js (Turbopack) 60.709s 61.059s 0.351s 2 1.12x
🐘 Postgres Nitro 75.441s (-24.7% 🟢) 76.192s (-24.0% 🟢) 0.751s 2 1.39x
🐘 Postgres Next.js (Turbopack) 75.672s 76.171s 0.499s 2 1.39x
🐘 Postgres Express 100.270s (~) 101.236s (~) 0.966s 1 1.84x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 88.971s (+0.7%) 90.097s (+1.1%) 1.126s 1 1.00x
▲ Vercel Nitro 89.537s (+3.4%) 90.446s (+2.9%) 0.909s 2 1.01x
▲ Vercel Next.js (Turbopack) 90.770s (+3.0%) 92.149s (+3.1%) 1.379s 1 1.02x

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

Promise.all with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 1.264s 2.006s 0.742s 15 1.00x
💻 Local Express 1.408s (~) 2.005s (~) 0.597s 15 1.11x
💻 Local Nitro 1.414s (-1.5%) 2.005s (~) 0.591s 15 1.12x
💻 Local Next.js (Turbopack) 1.420s 2.006s 0.586s 15 1.12x
🌐 MongoDB Next.js (Turbopack) 2.180s 3.007s 0.827s 10 1.72x
🐘 Postgres Nitro 2.265s (+6.1% 🔺) 2.923s (-3.0%) 0.658s 11 1.79x
🐘 Postgres Next.js (Turbopack) 2.289s 2.741s 0.452s 11 1.81x
🐘 Postgres Express 2.354s (-2.2%) 3.014s (~) 0.660s 10 1.86x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.392s (+3.6%) 3.206s (-2.7%) 0.814s 10 1.00x
▲ Vercel Express 2.651s (+9.2% 🔺) 3.378s (~) 0.728s 10 1.11x
▲ Vercel Next.js (Turbopack) 2.783s (-18.5% 🟢) 3.561s (-17.4% 🟢) 0.777s 9 1.16x

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

Promise.all with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 2.495s 3.008s 0.513s 10 1.00x
💻 Local Express 2.547s (~) 3.007s (~) 0.460s 10 1.02x
💻 Local Nitro 2.627s (+0.9%) 3.008s (~) 0.381s 10 1.05x
💻 Local Next.js (Turbopack) 2.680s 3.007s 0.326s 10 1.07x
🌐 MongoDB Next.js (Turbopack) 4.785s 5.176s 0.391s 6 1.92x
🐘 Postgres Nitro 9.238s (+8.9% 🔺) 9.787s (+8.3% 🔺) 0.549s 4 3.70x
🐘 Postgres Express 9.591s (+18.8% 🔺) 10.033s (+21.2% 🔺) 0.442s 3 3.84x
🐘 Postgres Next.js (Turbopack) 12.251s 13.032s 0.781s 3 4.91x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.594s (-2.4%) 3.324s (-3.9%) 0.730s 10 1.00x
▲ Vercel Express 2.829s (-9.0% 🟢) 3.454s (-18.3% 🟢) 0.625s 9 1.09x
▲ Vercel Next.js (Turbopack) 3.431s (+7.6% 🔺) 4.381s (+11.9% 🔺) 0.950s 7 1.32x

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

Promise.all with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 4.076s 4.582s 0.506s 7 1.00x
💻 Local Next.js (Turbopack) 7.327s 7.766s 0.439s 4 1.80x
💻 Local Express 7.544s (+3.6%) 8.018s (~) 0.473s 4 1.85x
💻 Local Nitro 7.686s (+4.6%) 8.018s (~) 0.332s 4 1.89x
🌐 MongoDB Next.js (Turbopack) 9.829s 10.346s 0.517s 3 2.41x
🐘 Postgres Express 45.131s (+8.4% 🔺) 46.123s (+9.5% 🔺) 0.992s 1 11.07x
🐘 Postgres Nitro 47.817s (-1.0%) 48.128s (-2.1%) 0.311s 1 11.73x
🐘 Postgres Next.js (Turbopack) 55.264s 56.133s 0.869s 1 13.56x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 3.085s (-33.5% 🟢) 3.663s (-34.8% 🟢) 0.577s 9 1.00x
▲ Vercel Nitro 3.111s (-6.9% 🟢) 4.294s (~) 1.184s 7 1.01x
▲ Vercel Next.js (Turbopack) 3.618s (-28.8% 🟢) 4.684s (-23.2% 🟢) 1.067s 7 1.17x

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

Promise.race with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 1.273s 2.006s 0.733s 15 1.00x
💻 Local Next.js (Turbopack) 1.432s 2.005s 0.573s 15 1.12x
💻 Local Express 1.437s (+1.2%) 2.005s (~) 0.568s 15 1.13x
💻 Local Nitro 1.440s (+0.7%) 2.006s (~) 0.566s 15 1.13x
🐘 Postgres Express 2.017s (+2.7%) 2.833s (+12.7% 🔺) 0.816s 11 1.58x
🌐 MongoDB Next.js (Turbopack) 2.156s 3.007s 0.851s 10 1.69x
🐘 Postgres Nitro 2.230s (-1.9%) 2.596s (-3.3%) 0.366s 12 1.75x
🐘 Postgres Next.js (Turbopack) 2.592s 2.923s 0.331s 11 2.04x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.179s (-1.5%) 2.919s (-10.8% 🟢) 0.740s 11 1.00x
▲ Vercel Nitro 2.344s (-11.9% 🟢) 3.075s (-15.5% 🟢) 0.731s 10 1.08x
▲ Vercel Next.js (Turbopack) 2.473s (+10.0% 🔺) 3.112s (-3.2%) 0.639s 10 1.13x

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

Promise.race with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 2.501s 3.008s 0.507s 10 1.00x
💻 Local Express 2.672s (~) 3.007s (~) 0.336s 10 1.07x
💻 Local Nitro 2.672s (~) 3.007s (~) 0.335s 10 1.07x
💻 Local Next.js (Turbopack) 2.783s 3.009s 0.225s 10 1.11x
🌐 MongoDB Next.js (Turbopack) 4.703s 5.176s 0.474s 6 1.88x
🐘 Postgres Express 10.846s (-5.3% 🟢) 11.368s (-5.6% 🟢) 0.522s 3 4.34x
🐘 Postgres Nitro 12.576s (-5.6% 🟢) 13.375s (-2.4%) 0.799s 3 5.03x
🐘 Postgres Next.js (Turbopack) 14.028s 14.702s 0.674s 3 5.61x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 2.424s (-3.4%) 3.097s (-10.0% 🟢) 0.673s 10 1.00x
▲ Vercel Express 2.797s (+5.7% 🔺) 3.593s (+1.0%) 0.796s 10 1.15x
▲ Vercel Nitro 3.744s (+62.4% 🔺) 4.579s (+43.9% 🔺) 0.835s 7 1.54x

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

Promise.race with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 4.075s 4.582s 0.506s 7 1.00x
💻 Local Next.js (Turbopack) 7.323s 8.020s 0.696s 4 1.80x
💻 Local Express 7.791s (-3.5%) 8.270s (~) 0.479s 4 1.91x
💻 Local Nitro 7.974s (+1.3%) 8.271s (~) 0.297s 4 1.96x
🌐 MongoDB Next.js (Turbopack) 9.932s 10.348s 0.416s 3 2.44x
🐘 Postgres Express 49.790s (-3.4%) 50.121s (-3.9%) 0.331s 1 12.22x
🐘 Postgres Nitro 52.341s (+0.7%) 53.142s (+1.9%) 0.801s 1 12.84x
🐘 Postgres Next.js (Turbopack) 58.156s 59.133s 0.977s 1 14.27x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.769s (-28.2% 🟢) 3.550s (-23.7% 🟢) 0.781s 9 1.00x
▲ Vercel Nitro 2.800s (-9.6% 🟢) 3.704s (-7.1% 🟢) 0.903s 9 1.01x
▲ Vercel Next.js (Turbopack) 3.443s (-10.7% 🟢) 4.504s (-10.5% 🟢) 1.061s 7 1.24x

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

Stream Benchmarks (includes TTFB metrics)
workflow with stream

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 0.152s 1.001s 0.012s 1.018s 0.866s 10 1.00x
🌐 Redis Next.js (Turbopack) 0.156s 1.000s 0.001s 1.007s 0.851s 10 1.03x
💻 Local Nitro 0.173s (-1.1%) 1.003s (~) 0.011s (+1.8%) 1.017s (~) 0.844s 10 1.14x
💻 Local Express 0.174s (+3.3%) 1.003s (~) 0.011s (-1.7%) 1.017s (~) 0.842s 10 1.14x
🌐 MongoDB Next.js (Turbopack) 0.511s 0.932s 0.001s 1.008s 0.496s 10 3.36x
🐘 Postgres Next.js (Turbopack) 1.248s 1.797s 0.001s 2.014s 0.766s 10 8.19x
🐘 Postgres Nitro 1.256s (-43.6% 🟢) 1.786s (-36.6% 🟢) 0.001s (-17.6% 🟢) 2.013s (-33.2% 🟢) 0.758s 10 8.24x
🐘 Postgres Express 2.377s (-3.2%) 2.666s (+3.2%) 0.001s (+7.7% 🔺) 3.015s (~) 0.638s 10 15.61x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 1.881s (-24.4% 🟢) 2.435s (-20.6% 🟢) 0.183s (-21.3% 🟢) 3.105s (-19.5% 🟢) 1.224s 10 1.00x
▲ Vercel Express 1.942s (-1.3%) 2.511s (-4.7%) 0.148s (-75.5% 🟢) 3.219s (-15.2% 🟢) 1.278s 10 1.03x
▲ Vercel Nitro 2.073s (+7.0% 🔺) 2.512s (-6.6% 🟢) 0.560s (-4.7%) 3.636s (-4.8%) 1.563s 10 1.10x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

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

Winner determined by most benchmark wins

Framework 🥇 Fastest World Wins
Express 💻 Local 10/12
Next.js (Turbopack) 🌐 Redis 6/12
Nitro 💻 Local 9/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

return;
}
throw err;
}
Copy link
Member Author

@VaguelySerious VaguelySerious Feb 18, 2026

Choose a reason for hiding this comment

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

This solves an issue where completing the workflow fails with 409, followed by another workflow invocations that then tries to mark the workflow as "failed", which then also 409s, etc.

Copy link
Collaborator

Choose a reason for hiding this comment

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

are you sure this is the right approach? are there valid 409s? what about 410 response? are there valid cases where there IS actually indicative of an error?

worth investigating a bit

separately i also think the error codes are getting a bit out of hand to manage and correlate between server and runtime

either this pr future we might want to have well defined workflow error responses from the server (rather than overloading http codes) and have the world-vercel convert them into client errors from the errors package that all worlds can share

i think the runtime should then handle those errors instead of dealing with less-descript HTTP error codes

Copy link
Member Author

Choose a reason for hiding this comment

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

Since I'm specifically wrapping the run_completed event creation, we only care about 409s for that specifically, which currently only happens if the the run is already terminal (had claude confirm this + looked myself). This makes me think it's fine to ignore this specific invocation, since even if something did go wrong, it would have gone wrong in the original invocation, and now that the run is terminal, there are no remedial actions we can take.

This begs the question of what possible future 409s we could add to this specific invocation, which I can't come up with any good ones for run_completed that wouldn't want the same handling.

Copy link
Collaborator

@pranaygp pranaygp Feb 18, 2026

Choose a reason for hiding this comment

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

do we also need to do the same handling for run_failed and run_cancelled then?

we return 409 on any invalid state transition iirc

but for hooks i think we return 410 when the run is completed

but yeah that's also what i mean by its a little hard to track the server vs client error states based on http codes :P

claude's also more likely to miss http codes were used compared to more explicit error returns like "invalid_run_state_transition" or something

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe for run_failed too. It's much less likely to race, but can happen just the same. Updated the code.

I think run_cancelled should error visibly since it's a mostly user-UI or programmatic action and shouldn't race.

Copy link
Collaborator

Choose a reason for hiding this comment

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

awesome! makes sense. if otel is tidied up and correct - let's also maybe add a test for the changes to prevent regression in the errors
messages and ship :)

},
});
} catch (err) {
if (WorkflowAPIError.is(err) && err.status === 409) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

When we hit this path, are we potentially missing setting the span attributes (on line 287) cos we would never hit that path? It might end up not reporting in o11y for these traces.

Copy link
Member Author

Choose a reason for hiding this comment

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

We are, I think intentionally as we don't actually complete the run in this case (and don't know the run state, could be "failed") so we'd rather not add wrong information

Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Copy link
Collaborator

@pranaygp pranaygp left a comment

Choose a reason for hiding this comment

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

would love tests on this too :)

@VaguelySerious VaguelySerious merged commit 852e3f1 into main Feb 18, 2026
104 checks passed
@VaguelySerious VaguelySerious deleted the peter/warn-for-409-only branch February 18, 2026 22:00
VaguelySerious added a commit that referenced this pull request Feb 19, 2026
…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>
Sign up for free to 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.

3 participants

Comments