feat: add exists getter to Run class - #1336

Merged
pranaygp merged 2 commits into
mainfrom
feat/run-exists-getter
Mar 11, 2026
Merged

feat: add exists getter to Run class#1336
pranaygp merged 2 commits into
mainfrom
feat/run-exists-getter

Conversation

@pranaygp

Copy link
Copy Markdown
Contributor

Summary

  • Add an exists async getter to the Run class that returns true if the run is found, false for WorkflowRunNotFoundError, and re-throws other errors
  • Add tests for all three cases (exists, not found, other errors)
  • Add docs example showing the new getter in the getRun API reference

Test plan

  • Unit tests pass: pnpm vitest run packages/core/src/runtime/runs.test.ts (8 tests, 3 new)
  • CI passes

🤖 Generated with Claude Code

Allow checking if a workflow run exists without catching errors.
Returns `true` if the run is found, `false` for WorkflowRunNotFoundError,
and re-throws any other errors.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Mar 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0f9aff5

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

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

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

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

@github-actions

github-actionsBot commented Mar 11, 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.033s (-0.9%)1.005s (~)0.973s101.00x
💻 LocalNitro0.033s (~)1.006s (~)0.973s101.00x
💻 LocalNext.js (Turbopack)0.035s1.005s0.971s101.07x
🌐 RedisNext.js (Turbopack)0.048s (+12.1% 🔺)1.005s (~)0.957s101.48x
🐘 PostgresNext.js (Turbopack)0.051s1.011s0.960s101.57x
🐘 PostgresNitro0.053s (-4.2%)1.012s (~)0.959s101.63x
🐘 PostgresExpress0.053s (-0.9%)1.011s (~)0.958s101.63x
🌐 MongoDBNext.js (Turbopack)0.107s (+29.3% 🔺)1.008s (~)0.901s103.28x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.475s (-4.1%)2.293s (+7.3% 🔺)1.818s101.00x
▲ VercelExpress0.480s (+5.1% 🔺)2.335s (-2.2%)1.855s101.01x
▲ VercelNitro0.496s (-12.1% 🟢)2.338s (-2.0%)1.842s101.04x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.080s2.005s0.925s101.00x
💻 LocalNitro1.103s (~)2.007s (~)0.903s101.02x
💻 LocalExpress1.105s (~)2.005s (~)0.901s101.02x
🌐 RedisNext.js (Turbopack)1.114s (+1.6%)2.007s (~)0.893s101.03x
🐘 PostgresNext.js (Turbopack)1.125s2.012s0.886s101.04x
🐘 PostgresExpress1.127s (~)2.012s (~)0.885s101.04x
🐘 PostgresNitro1.138s (+0.5%)2.012s (~)0.874s101.05x
🌐 MongoDBNext.js (Turbopack)1.296s (-0.7%)2.008s (~)0.713s101.20x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.033s (-4.7%)3.688s (-2.0%)1.655s101.00x
▲ VercelNext.js (Turbopack)2.140s (+2.0%)3.845s (+7.8% 🔺)1.705s101.05x
▲ VercelNitro2.140s (+9.3% 🔺)3.646s (~)1.506s101.05x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.519s11.022s0.503s31.00x
🌐 RedisNext.js (Turbopack)10.727s (+0.6%)11.025s (~)0.298s31.02x
💻 LocalNitro10.780s (~)11.023s (~)0.243s31.02x
💻 LocalExpress10.786s (~)11.023s (~)0.237s31.03x
🐘 PostgresNext.js (Turbopack)10.797s11.040s0.243s31.03x
🐘 PostgresExpress10.831s (~)11.041s (~)0.209s31.03x
🐘 PostgresNitro10.877s (~)11.046s (~)0.169s31.03x
🌐 MongoDBNext.js (Turbopack)12.258s (+0.8%)13.022s (~)0.765s31.17x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.883s (-4.3%)18.520s (-4.1%)1.638s21.00x
▲ VercelNext.js (Turbopack)17.163s (+0.8%)18.531s (~)1.368s21.02x
▲ VercelNitro18.371s (+7.6% 🔺)20.803s (+10.8% 🔺)2.432s21.09x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)26.529s27.050s0.522s31.00x
🌐 RedisNext.js (Turbopack)26.675s (~)27.053s (~)0.379s31.01x
🐘 PostgresNext.js (Turbopack)26.865s27.062s0.197s31.01x
🐘 PostgresNitro26.918s (~)27.064s (-1.2%)0.147s31.01x
🐘 PostgresExpress26.994s (~)27.396s (+1.2%)0.402s31.02x
💻 LocalExpress27.245s (~)28.053s (~)0.808s31.03x
💻 LocalNitro27.302s (~)28.052s (~)0.750s31.03x
🌐 MongoDBNext.js (Turbopack)30.261s (~)31.031s (~)0.771s21.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)43.981s (-0.6%)45.621s (~)1.640s21.00x
▲ VercelExpress44.072s (+1.3%)45.644s (+1.1%)1.571s21.00x
▲ VercelNitro45.357s (-2.2%)46.825s (-3.2%)1.468s21.03x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)53.340s (~)54.101s (~)0.762s21.00x
🐘 PostgresNext.js (Turbopack)53.720s54.106s0.386s21.01x
🐘 PostgresNitro53.788s (~)54.100s (~)0.313s21.01x
🐘 PostgresExpress53.797s (~)54.107s (~)0.309s21.01x
💻 LocalNext.js (Turbopack)54.445s55.094s0.649s21.02x
💻 LocalNitro56.120s (~)57.102s (+1.8%)0.982s21.05x
💻 LocalExpress56.245s (~)57.098s (+1.8%)0.853s21.05x
🌐 MongoDBNext.js (Turbopack)60.477s (~)61.083s (~)0.606s21.13x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express91.067s (-8.6% 🟢)92.518s (-9.0% 🟢)1.451s11.00x
▲ VercelNext.js (Turbopack)93.443s (-9.0% 🟢)95.515s (-9.1% 🟢)2.072s11.03x
▲ VercelNitro93.610s (-1.3%)95.253s (-0.9%)1.643s11.03x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.249s (~)2.007s (~)0.758s151.00x
🐘 PostgresExpress1.361s (-1.6%)2.011s (~)0.650s151.09x
🐘 PostgresNext.js (Turbopack)1.365s2.011s0.645s151.09x
💻 LocalNext.js (Turbopack)1.381s2.006s0.625s151.11x
💻 LocalNitro1.396s (-1.1%)2.005s (~)0.609s151.12x
🐘 PostgresNitro1.400s (+1.5%)2.011s (~)0.611s151.12x
💻 LocalExpress1.422s (+1.0%)2.006s (~)0.584s151.14x
🌐 MongoDBNext.js (Turbopack)2.131s (+0.8%)3.008s (~)0.877s101.71x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.483s (-13.0% 🟢)4.615s (+4.4%)2.133s71.00x
▲ VercelNitro2.484s (-17.7% 🟢)4.322s (-5.5% 🟢)1.838s71.00x
▲ VercelExpress2.572s (-2.9%)4.032s (+1.6%)1.460s81.04x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.944s (-6.9% 🟢)2.478s (-1.5%)0.534s131.00x
🐘 PostgresExpress2.025s (+2.3%)2.598s (+3.3%)0.572s121.04x
🐘 PostgresNext.js (Turbopack)2.057s2.682s0.625s121.06x
💻 LocalNext.js (Turbopack)2.341s2.916s0.574s111.20x
🌐 RedisNext.js (Turbopack)2.578s (+3.4%)3.009s (~)0.431s101.33x
💻 LocalNitro2.609s (+1.0%)3.007s (~)0.398s101.34x
💻 LocalExpress2.621s (~)3.007s (~)0.387s101.35x
🌐 MongoDBNext.js (Turbopack)4.645s (-0.9%)5.177s (~)0.532s62.39x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.221s (+12.7% 🔺)4.628s (+7.4% 🔺)1.407s71.00x
▲ VercelNitro3.330s (+37.1% 🔺)4.522s (+18.7% 🔺)1.192s71.03x
▲ VercelExpress3.841s (+53.3% 🔺)5.132s (+39.2% 🔺)1.291s61.19x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.498s (-2.0%)4.306s (+0.8%)0.808s71.00x
🐘 PostgresNitro3.800s (-7.2% 🟢)4.451s (-6.2% 🟢)0.651s71.09x
🐘 PostgresNext.js (Turbopack)4.108s4.882s0.773s71.17x
🌐 RedisNext.js (Turbopack)4.140s (+2.5%)5.012s (+9.4% 🔺)0.872s61.18x
💻 LocalNext.js (Turbopack)6.420s6.815s0.395s51.84x
💻 LocalNitro7.418s (+1.9%)8.022s (~)0.604s42.12x
💻 LocalExpress7.627s (+2.0%)8.020s (~)0.393s42.18x
🌐 MongoDBNext.js (Turbopack)9.866s (-1.1%)10.349s (~)0.483s32.82x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.649s (-33.0% 🟢)3.791s (-38.9% 🟢)1.143s81.00x
▲ VercelExpress2.760s (-9.5% 🟢)7.697s (+70.1% 🔺)4.937s41.04x
▲ VercelNext.js (Turbopack)3.306s (-12.1% 🟢)5.045s (-21.5% 🟢)1.739s61.25x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.266s (+0.6%)2.007s (~)0.741s151.00x
🐘 PostgresNext.js (Turbopack)1.358s2.012s0.653s151.07x
💻 LocalNext.js (Turbopack)1.399s2.006s0.607s151.11x
🐘 PostgresExpress1.403s (+0.6%)2.011s (~)0.608s151.11x
🐘 PostgresNitro1.405s (+2.3%)2.011s (~)0.606s151.11x
💻 LocalNitro1.431s (~)2.005s (~)0.574s151.13x
💻 LocalExpress1.437s (+0.6%)2.006s (~)0.568s151.14x
🌐 MongoDBNext.js (Turbopack)2.123s (-3.5%)3.008s (~)0.885s101.68x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.122s (-12.7% 🟢)4.683s (+28.8% 🔺)2.562s71.00x
▲ VercelNitro2.177s (-28.1% 🟢)4.697s (-2.4%)2.520s71.03x
▲ VercelExpress2.328s (-7.4% 🟢)3.891s (-15.9% 🟢)1.562s81.10x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.960s (-6.3% 🟢)2.596s (+3.3%)0.636s121.00x
🐘 PostgresNitro1.985s (-4.5%)2.517s (~)0.532s121.01x
🐘 PostgresNext.js (Turbopack)2.095s2.680s0.585s121.07x
💻 LocalNext.js (Turbopack)2.441s2.917s0.476s111.25x
🌐 RedisNext.js (Turbopack)2.639s (+5.4% 🔺)3.109s (+3.3%)0.469s101.35x
💻 LocalExpress2.742s (+2.6%)3.009s (~)0.266s101.40x
💻 LocalNitro2.756s (+0.5%)3.008s (~)0.253s101.41x
🌐 MongoDBNext.js (Turbopack)4.797s (+2.7%)5.177s (~)0.380s62.45x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.452s (-12.4% 🟢)3.875s (-10.7% 🟢)1.423s81.00x
▲ VercelNext.js (Turbopack)2.552s (-3.5%)4.131s (+3.4%)1.579s81.04x
▲ VercelExpress2.699s (-13.4% 🟢)5.110s (+6.8% 🔺)2.411s61.10x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.003s (-8.2% 🟢)3.768s (-6.3% 🟢)0.765s81.00x
🐘 PostgresNext.js (Turbopack)3.625s4.593s0.967s71.21x
🐘 PostgresNitro3.799s (+10.4% 🔺)4.453s (+4.2%)0.655s71.26x
🌐 RedisNext.js (Turbopack)4.168s (+4.4%)5.013s (+6.1% 🔺)0.845s61.39x
💻 LocalNext.js (Turbopack)6.285s6.615s0.330s52.09x
💻 LocalNitro8.078s (~)8.771s (+2.9%)0.693s42.69x
💻 LocalExpress8.181s (+4.0%)9.022s (+12.5% 🔺)0.841s42.72x
🌐 MongoDBNext.js (Turbopack)9.926s (~)10.352s (~)0.426s33.30x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.881s (-7.9% 🟢)4.138s (-12.7% 🟢)1.257s81.00x
▲ VercelNitro3.032s (+6.5% 🔺)4.316s (+5.3% 🔺)1.284s71.05x
▲ VercelNext.js (Turbopack)3.609s (+26.3% 🔺)5.052s (+22.9% 🔺)1.443s71.25x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.111s1.001s0.009s1.015s0.904s101.00x
🌐 RedisNext.js (Turbopack)0.161s (+10.7% 🔺)1.000s (~)0.001s (-17.6% 🟢)1.008s (~)0.847s101.45x
💻 LocalNitro0.168s (-2.5%)1.003s (~)0.011s (-6.9% 🟢)1.016s (~)0.848s101.51x
💻 LocalExpress0.174s (~)1.003s (~)0.012s (+4.5%)1.018s (~)0.843s101.57x
🐘 PostgresNext.js (Turbopack)0.177s1.001s0.002s1.012s0.835s101.59x
🐘 PostgresExpress0.191s (-4.7%)0.995s (~)0.002s (+6.7% 🔺)1.012s (~)0.821s101.72x
🐘 PostgresNitro0.193s (-4.6%)0.991s (~)0.002s (+12.5% 🔺)1.012s (~)0.819s101.74x
🌐 MongoDBNext.js (Turbopack)0.512s (+12.5% 🔺)0.923s (-6.3% 🟢)0.002s (+7.1% 🔺)1.008s (~)0.496s104.61x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.484s (-15.0% 🟢)2.018s (-18.3% 🟢)0.013s (+123.3% 🔺)2.621s (-15.6% 🟢)1.138s101.00x
▲ VercelNitro1.501s (-7.8% 🟢)2.166s (-18.6% 🟢)0.005s (+1.9%)2.725s (-15.5% 🟢)1.224s101.01x
▲ VercelExpress1.659s (-3.8%)2.264s (-9.9% 🟢)0.005s (-2.0%)2.931s (-5.3% 🟢)1.271s101.12x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)11/12
🐘 PostgresNext.js (Turbopack)7/12
▲ VercelNext.js (Turbopack)6/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres6/12
Next.js (Turbopack)💻 Local5/12
Nitro💻 Local5/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 Mar 11, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production571067638
✅ 💻 Local Development612084696
✅ 📦 Local Production612084696
✅ 🐘 Local Postgres612084696
✅ 🪟 Windows550358
❌ 🌍 Community Worlds1185615189
✅ 📋 Other147027174
Total2727563643147

❌ Failed Tests

🌍 Community Worlds (56 failed)

mongodb (3 failed):

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

redis (2 failed):

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

turso (51 failed):

  • addTenWorkflow
  • addTenWorkflow
  • wellKnownAgentWorkflow (.well-known/agent)
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • importedStepOnlyWorkflow
  • hookWorkflow
  • hookWorkflow is not resumable via public webhook endpoint
  • 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
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running
  • 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
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control)

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro5107
✅ example5107
✅ express5107
✅ fastify5107
✅ hono5107
✅ nextjs-turbopack5602
✅ nextjs-webpack5602
✅ nitro5107
✅ nuxt5107
✅ sveltekit5107
✅ vite5107
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4909
✅ express-stable4909
✅ fastify-stable4909
✅ hono-stable4909
✅ nextjs-turbopack-canary5503
✅ nextjs-turbopack-stable5503
✅ nextjs-webpack-canary5503
✅ nextjs-webpack-stable5503
✅ nitro-stable4909
✅ nuxt-stable4909
✅ sveltekit-stable4909
✅ vite-stable4909
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4909
✅ express-stable4909
✅ fastify-stable4909
✅ hono-stable4909
✅ nextjs-turbopack-canary5503
✅ nextjs-turbopack-stable5503
✅ nextjs-webpack-canary5503
✅ nextjs-webpack-stable5503
✅ nitro-stable4909
✅ nuxt-stable4909
✅ sveltekit-stable4909
✅ vite-stable4909
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4909
✅ express-stable4909
✅ fastify-stable4909
✅ hono-stable4909
✅ nextjs-turbopack-canary5503
✅ nextjs-turbopack-stable5503
✅ nextjs-webpack-canary5503
✅ nextjs-webpack-stable5503
✅ nitro-stable4909
✅ nuxt-stable4909
✅ sveltekit-stable4909
✅ vite-stable4909
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack5503
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev302
❌ mongodb5233
✅ redis-dev302
❌ redis5323
✅ turso-dev302
❌ turso4513
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4909
✅ e2e-local-postgres-nest-stable4909
✅ e2e-local-prod-nest-stable4909

📋 View full workflow run

@pranaygp
pranaygp marked this pull request as ready for review March 11, 2026 22:09
@pranaygp
pranaygp requested a review from a team as a code ownerMarch 11, 2026 22:09
CopilotAI review requested due to automatic review settings March 11, 2026 22:09

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an exists async getter to the Run runtime API to allow checking whether a workflow run is present without treating “not found” as an exception, along with unit tests and documentation updates.

Changes:

  • Add Run.exists: Promise<boolean> that returns false for WorkflowRunNotFoundError and rethrows other errors.
  • Add unit tests covering: run exists, run not found, and unexpected error cases.
  • Document the new getter in the getRun API reference and add a changeset.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

FileDescription
packages/core/src/runtime/run.tsAdds the new exists getter on Run.
packages/core/src/runtime/runs.test.tsAdds unit tests for Run.exists.
docs/content/docs/api-reference/workflow-api/get-run.mdxAdds an example showing how to use run.exists.
.changeset/add-run-exists-getter.mdPublishes the API change as a patch changeset.

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

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +120 to +129
get exists(): Promise<boolean> {
return this.world.runs
.get(this.runId)
.then(() => true)
.catch((error) => {
if (WorkflowRunNotFoundError.is(error)) {
return false;
}
throw error;
});

CopilotAIMar 11, 2026

Copy link

Choose a reason for hiding this comment

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

Run.exists calls world.runs.get(this.runId) without resolveData: 'none'. In this codebase the default resolveData is 'all' (e.g., world-local/world-vercel), so this existence check can unnecessarily fetch potentially large input/output payloads just to determine presence. Consider calling this.world.runs.get(this.runId, { resolveData: 'none' }) here (and anywhere else where only metadata is needed).

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

^ this. Good bot.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Done — now passing { resolveData: 'none' } to skip fetching input/output payloads since we only need to check existence.


### Check if a Run Exists

Use the `exists` getter to check whether a workflow run exists without throwing an error:

CopilotAIMar 11, 2026

Copy link

Choose a reason for hiding this comment

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

The docs say the exists getter checks whether a run exists "without throwing an error", but Run.exists only suppresses WorkflowRunNotFoundError and will still throw for other failures (e.g., transport/500s). Please tweak the wording to clarify it's "without throwing when the run is not found" (or similar) so readers don't assume it never throws.

Suggested change
Use the `exists` getter to check whether a workflow run exists without throwing an error:
Use the `exists` getter to check whether a workflow run exists without throwing when the run is not found:

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Updated — now says "without throwing when the run is not found".

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM aside from the comment about data resolution

Comment on lines +120 to +129
get exists(): Promise<boolean> {
return this.world.runs
.get(this.runId)
.then(() => true)
.catch((error) => {
if (WorkflowRunNotFoundError.is(error)) {
return false;
}
throw error;
});

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

^ this. Good bot.

…cs wording
Pass { resolveData: 'none' } to world.runs.get() in the exists getter
to skip fetching input/output payloads. Update docs to say "without
throwing when the run is not found" instead of "without throwing an error".
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pranaygp
pranaygp merged commit fb5a500 into mainMar 11, 2026
166 of 169 checks passed
@pranaygp
pranaygp deleted the feat/run-exists-getter branch March 11, 2026 23:19
pranaygp added a commit that referenced this pull request Mar 12, 2026
…ignal
* origin/main: (26 commits)
Fix flaky streamer test ENOENT when chunks directory does not exist yet (#1330)
Version Packages (beta) (#1325)
[web-shared] Improve workflow observability event list UX (#1337)
feat: add `exists` getter to `Run` class (#1336)
Support client-side tools in DurableAgent (#1329)
[world-postgres] [world-local] Execute Graphile jobs directly instead of defering to world-local queue (#1334)
Merge CLAUDE.md into AGENTS.md and symlink CLAUDE.md (#1326)
[web] Polish loading indicators (#1327)
Fix flaky webhookWorkflow e2e test by polling instead of fixed sleep (#1328)
feat: support `deploymentId: 'latest'` in `start()` to resolve most recent deployment (#1317)
Fix bug where the SWC compiler bug prunes step-only imports in the client-mode transformation
[web] [world-vercel] Ensure user-passed run IDs are URL encoded and call out self-hosted security (#1322)
Version Packages (beta) (#1306)
Remove hard-coded VERCEL_DEPLOYMENT_KEY from nextjs-turbopack workbench (#1319)
fix(web): move react-router deps to devDependencies (#1265)
fix(ai): use workspace:* for workflow peer dependency (#1320)
fix(core): pass resolved deploymentId to getEncryptionKeyForRun in start() (#1318)
fix: surface 429 rate-limit errors in e2e tests and CLI (#1309)
fix(world-local): return HTTP 200 instead of 503 for queue timeout re-enqueue signals (#1307)
[web-shared] [cli] Refactor observability data fetching (#1261)
...
# Conflicts:
#	packages/core/e2e/e2e.test.ts
#	packages/web-shared/src/components/sidebar/attribute-panel.tsx
#	workbench/example/workflows/99_e2e.ts
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@pranaygp@TooTallNate@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

feat: add exists getter to Run class - #1336

Merged
pranaygp merged 2 commits into
mainfrom
feat/run-exists-getter
Mar 11, 2026
Merged

feat: add exists getter to Run class#1336
pranaygp merged 2 commits into
mainfrom
feat/run-exists-getter

Conversation

@pranaygp

Copy link
Copy Markdown
Contributor

Summary

  • Add an exists async getter to the Run class that returns true if the run is found, false for WorkflowRunNotFoundError, and re-throws other errors
  • Add tests for all three cases (exists, not found, other errors)
  • Add docs example showing the new getter in the getRun API reference

Test plan

  • Unit tests pass: pnpm vitest run packages/core/src/runtime/runs.test.ts (8 tests, 3 new)
  • CI passes

🤖 Generated with Claude Code

Allow checking if a workflow run exists without catching errors.
Returns `true` if the run is found, `false` for WorkflowRunNotFoundError,
and re-throws any other errors.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Mar 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0f9aff5

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

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

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

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

@github-actions

github-actionsBot commented Mar 11, 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.033s (-0.9%)1.005s (~)0.973s101.00x
💻 LocalNitro0.033s (~)1.006s (~)0.973s101.00x
💻 LocalNext.js (Turbopack)0.035s1.005s0.971s101.07x
🌐 RedisNext.js (Turbopack)0.048s (+12.1% 🔺)1.005s (~)0.957s101.48x
🐘 PostgresNext.js (Turbopack)0.051s1.011s0.960s101.57x
🐘 PostgresNitro0.053s (-4.2%)1.012s (~)0.959s101.63x
🐘 PostgresExpress0.053s (-0.9%)1.011s (~)0.958s101.63x
🌐 MongoDBNext.js (Turbopack)0.107s (+29.3% 🔺)1.008s (~)0.901s103.28x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.475s (-4.1%)2.293s (+7.3% 🔺)1.818s101.00x
▲ VercelExpress0.480s (+5.1% 🔺)2.335s (-2.2%)1.855s101.01x
▲ VercelNitro0.496s (-12.1% 🟢)2.338s (-2.0%)1.842s101.04x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.080s2.005s0.925s101.00x
💻 LocalNitro1.103s (~)2.007s (~)0.903s101.02x
💻 LocalExpress1.105s (~)2.005s (~)0.901s101.02x
🌐 RedisNext.js (Turbopack)1.114s (+1.6%)2.007s (~)0.893s101.03x
🐘 PostgresNext.js (Turbopack)1.125s2.012s0.886s101.04x
🐘 PostgresExpress1.127s (~)2.012s (~)0.885s101.04x
🐘 PostgresNitro1.138s (+0.5%)2.012s (~)0.874s101.05x
🌐 MongoDBNext.js (Turbopack)1.296s (-0.7%)2.008s (~)0.713s101.20x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.033s (-4.7%)3.688s (-2.0%)1.655s101.00x
▲ VercelNext.js (Turbopack)2.140s (+2.0%)3.845s (+7.8% 🔺)1.705s101.05x
▲ VercelNitro2.140s (+9.3% 🔺)3.646s (~)1.506s101.05x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.519s11.022s0.503s31.00x
🌐 RedisNext.js (Turbopack)10.727s (+0.6%)11.025s (~)0.298s31.02x
💻 LocalNitro10.780s (~)11.023s (~)0.243s31.02x
💻 LocalExpress10.786s (~)11.023s (~)0.237s31.03x
🐘 PostgresNext.js (Turbopack)10.797s11.040s0.243s31.03x
🐘 PostgresExpress10.831s (~)11.041s (~)0.209s31.03x
🐘 PostgresNitro10.877s (~)11.046s (~)0.169s31.03x
🌐 MongoDBNext.js (Turbopack)12.258s (+0.8%)13.022s (~)0.765s31.17x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.883s (-4.3%)18.520s (-4.1%)1.638s21.00x
▲ VercelNext.js (Turbopack)17.163s (+0.8%)18.531s (~)1.368s21.02x
▲ VercelNitro18.371s (+7.6% 🔺)20.803s (+10.8% 🔺)2.432s21.09x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)26.529s27.050s0.522s31.00x
🌐 RedisNext.js (Turbopack)26.675s (~)27.053s (~)0.379s31.01x
🐘 PostgresNext.js (Turbopack)26.865s27.062s0.197s31.01x
🐘 PostgresNitro26.918s (~)27.064s (-1.2%)0.147s31.01x
🐘 PostgresExpress26.994s (~)27.396s (+1.2%)0.402s31.02x
💻 LocalExpress27.245s (~)28.053s (~)0.808s31.03x
💻 LocalNitro27.302s (~)28.052s (~)0.750s31.03x
🌐 MongoDBNext.js (Turbopack)30.261s (~)31.031s (~)0.771s21.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)43.981s (-0.6%)45.621s (~)1.640s21.00x
▲ VercelExpress44.072s (+1.3%)45.644s (+1.1%)1.571s21.00x
▲ VercelNitro45.357s (-2.2%)46.825s (-3.2%)1.468s21.03x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)53.340s (~)54.101s (~)0.762s21.00x
🐘 PostgresNext.js (Turbopack)53.720s54.106s0.386s21.01x
🐘 PostgresNitro53.788s (~)54.100s (~)0.313s21.01x
🐘 PostgresExpress53.797s (~)54.107s (~)0.309s21.01x
💻 LocalNext.js (Turbopack)54.445s55.094s0.649s21.02x
💻 LocalNitro56.120s (~)57.102s (+1.8%)0.982s21.05x
💻 LocalExpress56.245s (~)57.098s (+1.8%)0.853s21.05x
🌐 MongoDBNext.js (Turbopack)60.477s (~)61.083s (~)0.606s21.13x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express91.067s (-8.6% 🟢)92.518s (-9.0% 🟢)1.451s11.00x
▲ VercelNext.js (Turbopack)93.443s (-9.0% 🟢)95.515s (-9.1% 🟢)2.072s11.03x
▲ VercelNitro93.610s (-1.3%)95.253s (-0.9%)1.643s11.03x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.249s (~)2.007s (~)0.758s151.00x
🐘 PostgresExpress1.361s (-1.6%)2.011s (~)0.650s151.09x
🐘 PostgresNext.js (Turbopack)1.365s2.011s0.645s151.09x
💻 LocalNext.js (Turbopack)1.381s2.006s0.625s151.11x
💻 LocalNitro1.396s (-1.1%)2.005s (~)0.609s151.12x
🐘 PostgresNitro1.400s (+1.5%)2.011s (~)0.611s151.12x
💻 LocalExpress1.422s (+1.0%)2.006s (~)0.584s151.14x
🌐 MongoDBNext.js (Turbopack)2.131s (+0.8%)3.008s (~)0.877s101.71x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.483s (-13.0% 🟢)4.615s (+4.4%)2.133s71.00x
▲ VercelNitro2.484s (-17.7% 🟢)4.322s (-5.5% 🟢)1.838s71.00x
▲ VercelExpress2.572s (-2.9%)4.032s (+1.6%)1.460s81.04x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.944s (-6.9% 🟢)2.478s (-1.5%)0.534s131.00x
🐘 PostgresExpress2.025s (+2.3%)2.598s (+3.3%)0.572s121.04x
🐘 PostgresNext.js (Turbopack)2.057s2.682s0.625s121.06x
💻 LocalNext.js (Turbopack)2.341s2.916s0.574s111.20x
🌐 RedisNext.js (Turbopack)2.578s (+3.4%)3.009s (~)0.431s101.33x
💻 LocalNitro2.609s (+1.0%)3.007s (~)0.398s101.34x
💻 LocalExpress2.621s (~)3.007s (~)0.387s101.35x
🌐 MongoDBNext.js (Turbopack)4.645s (-0.9%)5.177s (~)0.532s62.39x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.221s (+12.7% 🔺)4.628s (+7.4% 🔺)1.407s71.00x
▲ VercelNitro3.330s (+37.1% 🔺)4.522s (+18.7% 🔺)1.192s71.03x
▲ VercelExpress3.841s (+53.3% 🔺)5.132s (+39.2% 🔺)1.291s61.19x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.498s (-2.0%)4.306s (+0.8%)0.808s71.00x
🐘 PostgresNitro3.800s (-7.2% 🟢)4.451s (-6.2% 🟢)0.651s71.09x
🐘 PostgresNext.js (Turbopack)4.108s4.882s0.773s71.17x
🌐 RedisNext.js (Turbopack)4.140s (+2.5%)5.012s (+9.4% 🔺)0.872s61.18x
💻 LocalNext.js (Turbopack)6.420s6.815s0.395s51.84x
💻 LocalNitro7.418s (+1.9%)8.022s (~)0.604s42.12x
💻 LocalExpress7.627s (+2.0%)8.020s (~)0.393s42.18x
🌐 MongoDBNext.js (Turbopack)9.866s (-1.1%)10.349s (~)0.483s32.82x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.649s (-33.0% 🟢)3.791s (-38.9% 🟢)1.143s81.00x
▲ VercelExpress2.760s (-9.5% 🟢)7.697s (+70.1% 🔺)4.937s41.04x
▲ VercelNext.js (Turbopack)3.306s (-12.1% 🟢)5.045s (-21.5% 🟢)1.739s61.25x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.266s (+0.6%)2.007s (~)0.741s151.00x
🐘 PostgresNext.js (Turbopack)1.358s2.012s0.653s151.07x
💻 LocalNext.js (Turbopack)1.399s2.006s0.607s151.11x
🐘 PostgresExpress1.403s (+0.6%)2.011s (~)0.608s151.11x
🐘 PostgresNitro1.405s (+2.3%)2.011s (~)0.606s151.11x
💻 LocalNitro1.431s (~)2.005s (~)0.574s151.13x
💻 LocalExpress1.437s (+0.6%)2.006s (~)0.568s151.14x
🌐 MongoDBNext.js (Turbopack)2.123s (-3.5%)3.008s (~)0.885s101.68x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.122s (-12.7% 🟢)4.683s (+28.8% 🔺)2.562s71.00x
▲ VercelNitro2.177s (-28.1% 🟢)4.697s (-2.4%)2.520s71.03x
▲ VercelExpress2.328s (-7.4% 🟢)3.891s (-15.9% 🟢)1.562s81.10x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.960s (-6.3% 🟢)2.596s (+3.3%)0.636s121.00x
🐘 PostgresNitro1.985s (-4.5%)2.517s (~)0.532s121.01x
🐘 PostgresNext.js (Turbopack)2.095s2.680s0.585s121.07x
💻 LocalNext.js (Turbopack)2.441s2.917s0.476s111.25x
🌐 RedisNext.js (Turbopack)2.639s (+5.4% 🔺)3.109s (+3.3%)0.469s101.35x
💻 LocalExpress2.742s (+2.6%)3.009s (~)0.266s101.40x
💻 LocalNitro2.756s (+0.5%)3.008s (~)0.253s101.41x
🌐 MongoDBNext.js (Turbopack)4.797s (+2.7%)5.177s (~)0.380s62.45x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.452s (-12.4% 🟢)3.875s (-10.7% 🟢)1.423s81.00x
▲ VercelNext.js (Turbopack)2.552s (-3.5%)4.131s (+3.4%)1.579s81.04x
▲ VercelExpress2.699s (-13.4% 🟢)5.110s (+6.8% 🔺)2.411s61.10x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.003s (-8.2% 🟢)3.768s (-6.3% 🟢)0.765s81.00x
🐘 PostgresNext.js (Turbopack)3.625s4.593s0.967s71.21x
🐘 PostgresNitro3.799s (+10.4% 🔺)4.453s (+4.2%)0.655s71.26x
🌐 RedisNext.js (Turbopack)4.168s (+4.4%)5.013s (+6.1% 🔺)0.845s61.39x
💻 LocalNext.js (Turbopack)6.285s6.615s0.330s52.09x
💻 LocalNitro8.078s (~)8.771s (+2.9%)0.693s42.69x
💻 LocalExpress8.181s (+4.0%)9.022s (+12.5% 🔺)0.841s42.72x
🌐 MongoDBNext.js (Turbopack)9.926s (~)10.352s (~)0.426s33.30x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.881s (-7.9% 🟢)4.138s (-12.7% 🟢)1.257s81.00x
▲ VercelNitro3.032s (+6.5% 🔺)4.316s (+5.3% 🔺)1.284s71.05x
▲ VercelNext.js (Turbopack)3.609s (+26.3% 🔺)5.052s (+22.9% 🔺)1.443s71.25x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.111s1.001s0.009s1.015s0.904s101.00x
🌐 RedisNext.js (Turbopack)0.161s (+10.7% 🔺)1.000s (~)0.001s (-17.6% 🟢)1.008s (~)0.847s101.45x
💻 LocalNitro0.168s (-2.5%)1.003s (~)0.011s (-6.9% 🟢)1.016s (~)0.848s101.51x
💻 LocalExpress0.174s (~)1.003s (~)0.012s (+4.5%)1.018s (~)0.843s101.57x
🐘 PostgresNext.js (Turbopack)0.177s1.001s0.002s1.012s0.835s101.59x
🐘 PostgresExpress0.191s (-4.7%)0.995s (~)0.002s (+6.7% 🔺)1.012s (~)0.821s101.72x
🐘 PostgresNitro0.193s (-4.6%)0.991s (~)0.002s (+12.5% 🔺)1.012s (~)0.819s101.74x
🌐 MongoDBNext.js (Turbopack)0.512s (+12.5% 🔺)0.923s (-6.3% 🟢)0.002s (+7.1% 🔺)1.008s (~)0.496s104.61x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.484s (-15.0% 🟢)2.018s (-18.3% 🟢)0.013s (+123.3% 🔺)2.621s (-15.6% 🟢)1.138s101.00x
▲ VercelNitro1.501s (-7.8% 🟢)2.166s (-18.6% 🟢)0.005s (+1.9%)2.725s (-15.5% 🟢)1.224s101.01x
▲ VercelExpress1.659s (-3.8%)2.264s (-9.9% 🟢)0.005s (-2.0%)2.931s (-5.3% 🟢)1.271s101.12x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)11/12
🐘 PostgresNext.js (Turbopack)7/12
▲ VercelNext.js (Turbopack)6/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres6/12
Next.js (Turbopack)💻 Local5/12
Nitro💻 Local5/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 Mar 11, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production571067638
✅ 💻 Local Development612084696
✅ 📦 Local Production612084696
✅ 🐘 Local Postgres612084696
✅ 🪟 Windows550358
❌ 🌍 Community Worlds1185615189
✅ 📋 Other147027174
Total2727563643147

❌ Failed Tests

🌍 Community Worlds (56 failed)

mongodb (3 failed):

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

redis (2 failed):

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

turso (51 failed):

  • addTenWorkflow
  • addTenWorkflow
  • wellKnownAgentWorkflow (.well-known/agent)
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • importedStepOnlyWorkflow
  • hookWorkflow
  • hookWorkflow is not resumable via public webhook endpoint
  • 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
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running
  • 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
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control)

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro5107
✅ example5107
✅ express5107
✅ fastify5107
✅ hono5107
✅ nextjs-turbopack5602
✅ nextjs-webpack5602
✅ nitro5107
✅ nuxt5107
✅ sveltekit5107
✅ vite5107
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4909
✅ express-stable4909
✅ fastify-stable4909
✅ hono-stable4909
✅ nextjs-turbopack-canary5503
✅ nextjs-turbopack-stable5503
✅ nextjs-webpack-canary5503
✅ nextjs-webpack-stable5503
✅ nitro-stable4909
✅ nuxt-stable4909
✅ sveltekit-stable4909
✅ vite-stable4909
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4909
✅ express-stable4909
✅ fastify-stable4909
✅ hono-stable4909
✅ nextjs-turbopack-canary5503
✅ nextjs-turbopack-stable5503
✅ nextjs-webpack-canary5503
✅ nextjs-webpack-stable5503
✅ nitro-stable4909
✅ nuxt-stable4909
✅ sveltekit-stable4909
✅ vite-stable4909
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4909
✅ express-stable4909
✅ fastify-stable4909
✅ hono-stable4909
✅ nextjs-turbopack-canary5503
✅ nextjs-turbopack-stable5503
✅ nextjs-webpack-canary5503
✅ nextjs-webpack-stable5503
✅ nitro-stable4909
✅ nuxt-stable4909
✅ sveltekit-stable4909
✅ vite-stable4909
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack5503
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev302
❌ mongodb5233
✅ redis-dev302
❌ redis5323
✅ turso-dev302
❌ turso4513
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4909
✅ e2e-local-postgres-nest-stable4909
✅ e2e-local-prod-nest-stable4909

📋 View full workflow run

@pranaygp
pranaygp marked this pull request as ready for review March 11, 2026 22:09
@pranaygp
pranaygp requested a review from a team as a code ownerMarch 11, 2026 22:09
CopilotAI review requested due to automatic review settings March 11, 2026 22:09

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an exists async getter to the Run runtime API to allow checking whether a workflow run is present without treating “not found” as an exception, along with unit tests and documentation updates.

Changes:

  • Add Run.exists: Promise<boolean> that returns false for WorkflowRunNotFoundError and rethrows other errors.
  • Add unit tests covering: run exists, run not found, and unexpected error cases.
  • Document the new getter in the getRun API reference and add a changeset.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

FileDescription
packages/core/src/runtime/run.tsAdds the new exists getter on Run.
packages/core/src/runtime/runs.test.tsAdds unit tests for Run.exists.
docs/content/docs/api-reference/workflow-api/get-run.mdxAdds an example showing how to use run.exists.
.changeset/add-run-exists-getter.mdPublishes the API change as a patch changeset.

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

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +120 to +129
get exists(): Promise<boolean> {
return this.world.runs
.get(this.runId)
.then(() => true)
.catch((error) => {
if (WorkflowRunNotFoundError.is(error)) {
return false;
}
throw error;
});

CopilotAIMar 11, 2026

Copy link

Choose a reason for hiding this comment

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

Run.exists calls world.runs.get(this.runId) without resolveData: 'none'. In this codebase the default resolveData is 'all' (e.g., world-local/world-vercel), so this existence check can unnecessarily fetch potentially large input/output payloads just to determine presence. Consider calling this.world.runs.get(this.runId, { resolveData: 'none' }) here (and anywhere else where only metadata is needed).

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

^ this. Good bot.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Done — now passing { resolveData: 'none' } to skip fetching input/output payloads since we only need to check existence.


### Check if a Run Exists

Use the `exists` getter to check whether a workflow run exists without throwing an error:

CopilotAIMar 11, 2026

Copy link

Choose a reason for hiding this comment

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

The docs say the exists getter checks whether a run exists "without throwing an error", but Run.exists only suppresses WorkflowRunNotFoundError and will still throw for other failures (e.g., transport/500s). Please tweak the wording to clarify it's "without throwing when the run is not found" (or similar) so readers don't assume it never throws.

Suggested change
Use the `exists` getter to check whether a workflow run exists without throwing an error:
Use the `exists` getter to check whether a workflow run exists without throwing when the run is not found:

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Updated — now says "without throwing when the run is not found".

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM aside from the comment about data resolution

Comment on lines +120 to +129
get exists(): Promise<boolean> {
return this.world.runs
.get(this.runId)
.then(() => true)
.catch((error) => {
if (WorkflowRunNotFoundError.is(error)) {
return false;
}
throw error;
});

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

^ this. Good bot.

…cs wording
Pass { resolveData: 'none' } to world.runs.get() in the exists getter
to skip fetching input/output payloads. Update docs to say "without
throwing when the run is not found" instead of "without throwing an error".
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pranaygp
pranaygp merged commit fb5a500 into mainMar 11, 2026
166 of 169 checks passed
@pranaygp
pranaygp deleted the feat/run-exists-getter branch March 11, 2026 23:19
pranaygp added a commit that referenced this pull request Mar 12, 2026
…ignal
* origin/main: (26 commits)
Fix flaky streamer test ENOENT when chunks directory does not exist yet (#1330)
Version Packages (beta) (#1325)
[web-shared] Improve workflow observability event list UX (#1337)
feat: add `exists` getter to `Run` class (#1336)
Support client-side tools in DurableAgent (#1329)
[world-postgres] [world-local] Execute Graphile jobs directly instead of defering to world-local queue (#1334)
Merge CLAUDE.md into AGENTS.md and symlink CLAUDE.md (#1326)
[web] Polish loading indicators (#1327)
Fix flaky webhookWorkflow e2e test by polling instead of fixed sleep (#1328)
feat: support `deploymentId: 'latest'` in `start()` to resolve most recent deployment (#1317)
Fix bug where the SWC compiler bug prunes step-only imports in the client-mode transformation
[web] [world-vercel] Ensure user-passed run IDs are URL encoded and call out self-hosted security (#1322)
Version Packages (beta) (#1306)
Remove hard-coded VERCEL_DEPLOYMENT_KEY from nextjs-turbopack workbench (#1319)
fix(web): move react-router deps to devDependencies (#1265)
fix(ai): use workspace:* for workflow peer dependency (#1320)
fix(core): pass resolved deploymentId to getEncryptionKeyForRun in start() (#1318)
fix: surface 429 rate-limit errors in e2e tests and CLI (#1309)
fix(world-local): return HTTP 200 instead of 503 for queue timeout re-enqueue signals (#1307)
[web-shared] [cli] Refactor observability data fetching (#1261)
...
# Conflicts:
#	packages/core/e2e/e2e.test.ts
#	packages/web-shared/src/components/sidebar/attribute-panel.tsx
#	workbench/example/workflows/99_e2e.ts
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

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

feat: add exists getter to Run class - #1336

Merged
pranaygp merged 2 commits into
mainfrom
feat/run-exists-getter
Mar 11, 2026
Merged

feat: add exists getter to Run class#1336
pranaygp merged 2 commits into
mainfrom
feat/run-exists-getter

Conversation

@pranaygp

Copy link
Copy Markdown
Contributor

Summary

  • Add an exists async getter to the Run class that returns true if the run is found, false for WorkflowRunNotFoundError, and re-throws other errors
  • Add tests for all three cases (exists, not found, other errors)
  • Add docs example showing the new getter in the getRun API reference

Test plan

  • Unit tests pass: pnpm vitest run packages/core/src/runtime/runs.test.ts (8 tests, 3 new)
  • CI passes

🤖 Generated with Claude Code

Allow checking if a workflow run exists without catching errors.
Returns `true` if the run is found, `false` for WorkflowRunNotFoundError,
and re-throws any other errors.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Mar 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0f9aff5

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

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

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

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

@github-actions

github-actionsBot commented Mar 11, 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.033s (-0.9%)1.005s (~)0.973s101.00x
💻 LocalNitro0.033s (~)1.006s (~)0.973s101.00x
💻 LocalNext.js (Turbopack)0.035s1.005s0.971s101.07x
🌐 RedisNext.js (Turbopack)0.048s (+12.1% 🔺)1.005s (~)0.957s101.48x
🐘 PostgresNext.js (Turbopack)0.051s1.011s0.960s101.57x
🐘 PostgresNitro0.053s (-4.2%)1.012s (~)0.959s101.63x
🐘 PostgresExpress0.053s (-0.9%)1.011s (~)0.958s101.63x
🌐 MongoDBNext.js (Turbopack)0.107s (+29.3% 🔺)1.008s (~)0.901s103.28x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.475s (-4.1%)2.293s (+7.3% 🔺)1.818s101.00x
▲ VercelExpress0.480s (+5.1% 🔺)2.335s (-2.2%)1.855s101.01x
▲ VercelNitro0.496s (-12.1% 🟢)2.338s (-2.0%)1.842s101.04x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.080s2.005s0.925s101.00x
💻 LocalNitro1.103s (~)2.007s (~)0.903s101.02x
💻 LocalExpress1.105s (~)2.005s (~)0.901s101.02x
🌐 RedisNext.js (Turbopack)1.114s (+1.6%)2.007s (~)0.893s101.03x
🐘 PostgresNext.js (Turbopack)1.125s2.012s0.886s101.04x
🐘 PostgresExpress1.127s (~)2.012s (~)0.885s101.04x
🐘 PostgresNitro1.138s (+0.5%)2.012s (~)0.874s101.05x
🌐 MongoDBNext.js (Turbopack)1.296s (-0.7%)2.008s (~)0.713s101.20x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.033s (-4.7%)3.688s (-2.0%)1.655s101.00x
▲ VercelNext.js (Turbopack)2.140s (+2.0%)3.845s (+7.8% 🔺)1.705s101.05x
▲ VercelNitro2.140s (+9.3% 🔺)3.646s (~)1.506s101.05x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.519s11.022s0.503s31.00x
🌐 RedisNext.js (Turbopack)10.727s (+0.6%)11.025s (~)0.298s31.02x
💻 LocalNitro10.780s (~)11.023s (~)0.243s31.02x
💻 LocalExpress10.786s (~)11.023s (~)0.237s31.03x
🐘 PostgresNext.js (Turbopack)10.797s11.040s0.243s31.03x
🐘 PostgresExpress10.831s (~)11.041s (~)0.209s31.03x
🐘 PostgresNitro10.877s (~)11.046s (~)0.169s31.03x
🌐 MongoDBNext.js (Turbopack)12.258s (+0.8%)13.022s (~)0.765s31.17x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.883s (-4.3%)18.520s (-4.1%)1.638s21.00x
▲ VercelNext.js (Turbopack)17.163s (+0.8%)18.531s (~)1.368s21.02x
▲ VercelNitro18.371s (+7.6% 🔺)20.803s (+10.8% 🔺)2.432s21.09x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)26.529s27.050s0.522s31.00x
🌐 RedisNext.js (Turbopack)26.675s (~)27.053s (~)0.379s31.01x
🐘 PostgresNext.js (Turbopack)26.865s27.062s0.197s31.01x
🐘 PostgresNitro26.918s (~)27.064s (-1.2%)0.147s31.01x
🐘 PostgresExpress26.994s (~)27.396s (+1.2%)0.402s31.02x
💻 LocalExpress27.245s (~)28.053s (~)0.808s31.03x
💻 LocalNitro27.302s (~)28.052s (~)0.750s31.03x
🌐 MongoDBNext.js (Turbopack)30.261s (~)31.031s (~)0.771s21.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)43.981s (-0.6%)45.621s (~)1.640s21.00x
▲ VercelExpress44.072s (+1.3%)45.644s (+1.1%)1.571s21.00x
▲ VercelNitro45.357s (-2.2%)46.825s (-3.2%)1.468s21.03x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)53.340s (~)54.101s (~)0.762s21.00x
🐘 PostgresNext.js (Turbopack)53.720s54.106s0.386s21.01x
🐘 PostgresNitro53.788s (~)54.100s (~)0.313s21.01x
🐘 PostgresExpress53.797s (~)54.107s (~)0.309s21.01x
💻 LocalNext.js (Turbopack)54.445s55.094s0.649s21.02x
💻 LocalNitro56.120s (~)57.102s (+1.8%)0.982s21.05x
💻 LocalExpress56.245s (~)57.098s (+1.8%)0.853s21.05x
🌐 MongoDBNext.js (Turbopack)60.477s (~)61.083s (~)0.606s21.13x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express91.067s (-8.6% 🟢)92.518s (-9.0% 🟢)1.451s11.00x
▲ VercelNext.js (Turbopack)93.443s (-9.0% 🟢)95.515s (-9.1% 🟢)2.072s11.03x
▲ VercelNitro93.610s (-1.3%)95.253s (-0.9%)1.643s11.03x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.249s (~)2.007s (~)0.758s151.00x
🐘 PostgresExpress1.361s (-1.6%)2.011s (~)0.650s151.09x
🐘 PostgresNext.js (Turbopack)1.365s2.011s0.645s151.09x
💻 LocalNext.js (Turbopack)1.381s2.006s0.625s151.11x
💻 LocalNitro1.396s (-1.1%)2.005s (~)0.609s151.12x
🐘 PostgresNitro1.400s (+1.5%)2.011s (~)0.611s151.12x
💻 LocalExpress1.422s (+1.0%)2.006s (~)0.584s151.14x
🌐 MongoDBNext.js (Turbopack)2.131s (+0.8%)3.008s (~)0.877s101.71x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.483s (-13.0% 🟢)4.615s (+4.4%)2.133s71.00x
▲ VercelNitro2.484s (-17.7% 🟢)4.322s (-5.5% 🟢)1.838s71.00x
▲ VercelExpress2.572s (-2.9%)4.032s (+1.6%)1.460s81.04x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.944s (-6.9% 🟢)2.478s (-1.5%)0.534s131.00x
🐘 PostgresExpress2.025s (+2.3%)2.598s (+3.3%)0.572s121.04x
🐘 PostgresNext.js (Turbopack)2.057s2.682s0.625s121.06x
💻 LocalNext.js (Turbopack)2.341s2.916s0.574s111.20x
🌐 RedisNext.js (Turbopack)2.578s (+3.4%)3.009s (~)0.431s101.33x
💻 LocalNitro2.609s (+1.0%)3.007s (~)0.398s101.34x
💻 LocalExpress2.621s (~)3.007s (~)0.387s101.35x
🌐 MongoDBNext.js (Turbopack)4.645s (-0.9%)5.177s (~)0.532s62.39x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.221s (+12.7% 🔺)4.628s (+7.4% 🔺)1.407s71.00x
▲ VercelNitro3.330s (+37.1% 🔺)4.522s (+18.7% 🔺)1.192s71.03x
▲ VercelExpress3.841s (+53.3% 🔺)5.132s (+39.2% 🔺)1.291s61.19x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.498s (-2.0%)4.306s (+0.8%)0.808s71.00x
🐘 PostgresNitro3.800s (-7.2% 🟢)4.451s (-6.2% 🟢)0.651s71.09x
🐘 PostgresNext.js (Turbopack)4.108s4.882s0.773s71.17x
🌐 RedisNext.js (Turbopack)4.140s (+2.5%)5.012s (+9.4% 🔺)0.872s61.18x
💻 LocalNext.js (Turbopack)6.420s6.815s0.395s51.84x
💻 LocalNitro7.418s (+1.9%)8.022s (~)0.604s42.12x
💻 LocalExpress7.627s (+2.0%)8.020s (~)0.393s42.18x
🌐 MongoDBNext.js (Turbopack)9.866s (-1.1%)10.349s (~)0.483s32.82x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.649s (-33.0% 🟢)3.791s (-38.9% 🟢)1.143s81.00x
▲ VercelExpress2.760s (-9.5% 🟢)7.697s (+70.1% 🔺)4.937s41.04x
▲ VercelNext.js (Turbopack)3.306s (-12.1% 🟢)5.045s (-21.5% 🟢)1.739s61.25x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.266s (+0.6%)2.007s (~)0.741s151.00x
🐘 PostgresNext.js (Turbopack)1.358s2.012s0.653s151.07x
💻 LocalNext.js (Turbopack)1.399s2.006s0.607s151.11x
🐘 PostgresExpress1.403s (+0.6%)2.011s (~)0.608s151.11x
🐘 PostgresNitro1.405s (+2.3%)2.011s (~)0.606s151.11x
💻 LocalNitro1.431s (~)2.005s (~)0.574s151.13x
💻 LocalExpress1.437s (+0.6%)2.006s (~)0.568s151.14x
🌐 MongoDBNext.js (Turbopack)2.123s (-3.5%)3.008s (~)0.885s101.68x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.122s (-12.7% 🟢)4.683s (+28.8% 🔺)2.562s71.00x
▲ VercelNitro2.177s (-28.1% 🟢)4.697s (-2.4%)2.520s71.03x
▲ VercelExpress2.328s (-7.4% 🟢)3.891s (-15.9% 🟢)1.562s81.10x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.960s (-6.3% 🟢)2.596s (+3.3%)0.636s121.00x
🐘 PostgresNitro1.985s (-4.5%)2.517s (~)0.532s121.01x
🐘 PostgresNext.js (Turbopack)2.095s2.680s0.585s121.07x
💻 LocalNext.js (Turbopack)2.441s2.917s0.476s111.25x
🌐 RedisNext.js (Turbopack)2.639s (+5.4% 🔺)3.109s (+3.3%)0.469s101.35x
💻 LocalExpress2.742s (+2.6%)3.009s (~)0.266s101.40x
💻 LocalNitro2.756s (+0.5%)3.008s (~)0.253s101.41x
🌐 MongoDBNext.js (Turbopack)4.797s (+2.7%)5.177s (~)0.380s62.45x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.452s (-12.4% 🟢)3.875s (-10.7% 🟢)1.423s81.00x
▲ VercelNext.js (Turbopack)2.552s (-3.5%)4.131s (+3.4%)1.579s81.04x
▲ VercelExpress2.699s (-13.4% 🟢)5.110s (+6.8% 🔺)2.411s61.10x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.003s (-8.2% 🟢)3.768s (-6.3% 🟢)0.765s81.00x
🐘 PostgresNext.js (Turbopack)3.625s4.593s0.967s71.21x
🐘 PostgresNitro3.799s (+10.4% 🔺)4.453s (+4.2%)0.655s71.26x
🌐 RedisNext.js (Turbopack)4.168s (+4.4%)5.013s (+6.1% 🔺)0.845s61.39x
💻 LocalNext.js (Turbopack)6.285s6.615s0.330s52.09x
💻 LocalNitro8.078s (~)8.771s (+2.9%)0.693s42.69x
💻 LocalExpress8.181s (+4.0%)9.022s (+12.5% 🔺)0.841s42.72x
🌐 MongoDBNext.js (Turbopack)9.926s (~)10.352s (~)0.426s33.30x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.881s (-7.9% 🟢)4.138s (-12.7% 🟢)1.257s81.00x
▲ VercelNitro3.032s (+6.5% 🔺)4.316s (+5.3% 🔺)1.284s71.05x
▲ VercelNext.js (Turbopack)3.609s (+26.3% 🔺)5.052s (+22.9% 🔺)1.443s71.25x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.111s1.001s0.009s1.015s0.904s101.00x
🌐 RedisNext.js (Turbopack)0.161s (+10.7% 🔺)1.000s (~)0.001s (-17.6% 🟢)1.008s (~)0.847s101.45x
💻 LocalNitro0.168s (-2.5%)1.003s (~)0.011s (-6.9% 🟢)1.016s (~)0.848s101.51x
💻 LocalExpress0.174s (~)1.003s (~)0.012s (+4.5%)1.018s (~)0.843s101.57x
🐘 PostgresNext.js (Turbopack)0.177s1.001s0.002s1.012s0.835s101.59x
🐘 PostgresExpress0.191s (-4.7%)0.995s (~)0.002s (+6.7% 🔺)1.012s (~)0.821s101.72x
🐘 PostgresNitro0.193s (-4.6%)0.991s (~)0.002s (+12.5% 🔺)1.012s (~)0.819s101.74x
🌐 MongoDBNext.js (Turbopack)0.512s (+12.5% 🔺)0.923s (-6.3% 🟢)0.002s (+7.1% 🔺)1.008s (~)0.496s104.61x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.484s (-15.0% 🟢)2.018s (-18.3% 🟢)0.013s (+123.3% 🔺)2.621s (-15.6% 🟢)1.138s101.00x
▲ VercelNitro1.501s (-7.8% 🟢)2.166s (-18.6% 🟢)0.005s (+1.9%)2.725s (-15.5% 🟢)1.224s101.01x
▲ VercelExpress1.659s (-3.8%)2.264s (-9.9% 🟢)0.005s (-2.0%)2.931s (-5.3% 🟢)1.271s101.12x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)11/12
🐘 PostgresNext.js (Turbopack)7/12
▲ VercelNext.js (Turbopack)6/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres6/12
Next.js (Turbopack)💻 Local5/12
Nitro💻 Local5/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 Mar 11, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production571067638
✅ 💻 Local Development612084696
✅ 📦 Local Production612084696
✅ 🐘 Local Postgres612084696
✅ 🪟 Windows550358
❌ 🌍 Community Worlds1185615189
✅ 📋 Other147027174
Total2727563643147

❌ Failed Tests

🌍 Community Worlds (56 failed)

mongodb (3 failed):

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

redis (2 failed):

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

turso (51 failed):

  • addTenWorkflow
  • addTenWorkflow
  • wellKnownAgentWorkflow (.well-known/agent)
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • importedStepOnlyWorkflow
  • hookWorkflow
  • hookWorkflow is not resumable via public webhook endpoint
  • 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
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running
  • 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
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control)

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro5107
✅ example5107
✅ express5107
✅ fastify5107
✅ hono5107
✅ nextjs-turbopack5602
✅ nextjs-webpack5602
✅ nitro5107
✅ nuxt5107
✅ sveltekit5107
✅ vite5107
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4909
✅ express-stable4909
✅ fastify-stable4909
✅ hono-stable4909
✅ nextjs-turbopack-canary5503
✅ nextjs-turbopack-stable5503
✅ nextjs-webpack-canary5503
✅ nextjs-webpack-stable5503
✅ nitro-stable4909
✅ nuxt-stable4909
✅ sveltekit-stable4909
✅ vite-stable4909
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4909
✅ express-stable4909
✅ fastify-stable4909
✅ hono-stable4909
✅ nextjs-turbopack-canary5503
✅ nextjs-turbopack-stable5503
✅ nextjs-webpack-canary5503
✅ nextjs-webpack-stable5503
✅ nitro-stable4909
✅ nuxt-stable4909
✅ sveltekit-stable4909
✅ vite-stable4909
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4909
✅ express-stable4909
✅ fastify-stable4909
✅ hono-stable4909
✅ nextjs-turbopack-canary5503
✅ nextjs-turbopack-stable5503
✅ nextjs-webpack-canary5503
✅ nextjs-webpack-stable5503
✅ nitro-stable4909
✅ nuxt-stable4909
✅ sveltekit-stable4909
✅ vite-stable4909
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack5503
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev302
❌ mongodb5233
✅ redis-dev302
❌ redis5323
✅ turso-dev302
❌ turso4513
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4909
✅ e2e-local-postgres-nest-stable4909
✅ e2e-local-prod-nest-stable4909

📋 View full workflow run

@pranaygp
pranaygp marked this pull request as ready for review March 11, 2026 22:09
@pranaygp
pranaygp requested a review from a team as a code ownerMarch 11, 2026 22:09
CopilotAI review requested due to automatic review settings March 11, 2026 22:09

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an exists async getter to the Run runtime API to allow checking whether a workflow run is present without treating “not found” as an exception, along with unit tests and documentation updates.

Changes:

  • Add Run.exists: Promise<boolean> that returns false for WorkflowRunNotFoundError and rethrows other errors.
  • Add unit tests covering: run exists, run not found, and unexpected error cases.
  • Document the new getter in the getRun API reference and add a changeset.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

FileDescription
packages/core/src/runtime/run.tsAdds the new exists getter on Run.
packages/core/src/runtime/runs.test.tsAdds unit tests for Run.exists.
docs/content/docs/api-reference/workflow-api/get-run.mdxAdds an example showing how to use run.exists.
.changeset/add-run-exists-getter.mdPublishes the API change as a patch changeset.

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

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +120 to +129
get exists(): Promise<boolean> {
return this.world.runs
.get(this.runId)
.then(() => true)
.catch((error) => {
if (WorkflowRunNotFoundError.is(error)) {
return false;
}
throw error;
});

CopilotAIMar 11, 2026

Copy link

Choose a reason for hiding this comment

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

Run.exists calls world.runs.get(this.runId) without resolveData: 'none'. In this codebase the default resolveData is 'all' (e.g., world-local/world-vercel), so this existence check can unnecessarily fetch potentially large input/output payloads just to determine presence. Consider calling this.world.runs.get(this.runId, { resolveData: 'none' }) here (and anywhere else where only metadata is needed).

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

^ this. Good bot.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Done — now passing { resolveData: 'none' } to skip fetching input/output payloads since we only need to check existence.


### Check if a Run Exists

Use the `exists` getter to check whether a workflow run exists without throwing an error:

CopilotAIMar 11, 2026

Copy link

Choose a reason for hiding this comment

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

The docs say the exists getter checks whether a run exists "without throwing an error", but Run.exists only suppresses WorkflowRunNotFoundError and will still throw for other failures (e.g., transport/500s). Please tweak the wording to clarify it's "without throwing when the run is not found" (or similar) so readers don't assume it never throws.

Suggested change
Use the `exists` getter to check whether a workflow run exists without throwing an error:
Use the `exists` getter to check whether a workflow run exists without throwing when the run is not found:

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Updated — now says "without throwing when the run is not found".

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM aside from the comment about data resolution

Comment on lines +120 to +129
get exists(): Promise<boolean> {
return this.world.runs
.get(this.runId)
.then(() => true)
.catch((error) => {
if (WorkflowRunNotFoundError.is(error)) {
return false;
}
throw error;
});

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

^ this. Good bot.

…cs wording
Pass { resolveData: 'none' } to world.runs.get() in the exists getter
to skip fetching input/output payloads. Update docs to say "without
throwing when the run is not found" instead of "without throwing an error".
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pranaygp
pranaygp merged commit fb5a500 into mainMar 11, 2026
166 of 169 checks passed
@pranaygp
pranaygp deleted the feat/run-exists-getter branch March 11, 2026 23:19
pranaygp added a commit that referenced this pull request Mar 12, 2026
…ignal
* origin/main: (26 commits)
Fix flaky streamer test ENOENT when chunks directory does not exist yet (#1330)
Version Packages (beta) (#1325)
[web-shared] Improve workflow observability event list UX (#1337)
feat: add `exists` getter to `Run` class (#1336)
Support client-side tools in DurableAgent (#1329)
[world-postgres] [world-local] Execute Graphile jobs directly instead of defering to world-local queue (#1334)
Merge CLAUDE.md into AGENTS.md and symlink CLAUDE.md (#1326)
[web] Polish loading indicators (#1327)
Fix flaky webhookWorkflow e2e test by polling instead of fixed sleep (#1328)
feat: support `deploymentId: 'latest'` in `start()` to resolve most recent deployment (#1317)
Fix bug where the SWC compiler bug prunes step-only imports in the client-mode transformation
[web] [world-vercel] Ensure user-passed run IDs are URL encoded and call out self-hosted security (#1322)
Version Packages (beta) (#1306)
Remove hard-coded VERCEL_DEPLOYMENT_KEY from nextjs-turbopack workbench (#1319)
fix(web): move react-router deps to devDependencies (#1265)
fix(ai): use workspace:* for workflow peer dependency (#1320)
fix(core): pass resolved deploymentId to getEncryptionKeyForRun in start() (#1318)
fix: surface 429 rate-limit errors in e2e tests and CLI (#1309)
fix(world-local): return HTTP 200 instead of 503 for queue timeout re-enqueue signals (#1307)
[web-shared] [cli] Refactor observability data fetching (#1261)
...
# Conflicts:
#	packages/core/e2e/e2e.test.ts
#	packages/web-shared/src/components/sidebar/attribute-panel.tsx
#	workbench/example/workflows/99_e2e.ts
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

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

feat: add exists getter to Run class - #1336

Merged
pranaygp merged 2 commits into
mainfrom
feat/run-exists-getter
Mar 11, 2026
Merged

feat: add exists getter to Run class#1336
pranaygp merged 2 commits into
mainfrom
feat/run-exists-getter

Conversation

@pranaygp

Copy link
Copy Markdown
Contributor

Summary

  • Add an exists async getter to the Run class that returns true if the run is found, false for WorkflowRunNotFoundError, and re-throws other errors
  • Add tests for all three cases (exists, not found, other errors)
  • Add docs example showing the new getter in the getRun API reference

Test plan

  • Unit tests pass: pnpm vitest run packages/core/src/runtime/runs.test.ts (8 tests, 3 new)
  • CI passes

🤖 Generated with Claude Code

Allow checking if a workflow run exists without catching errors.
Returns `true` if the run is found, `false` for WorkflowRunNotFoundError,
and re-throws any other errors.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Mar 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0f9aff5

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

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

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

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

@github-actions

github-actionsBot commented Mar 11, 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.033s (-0.9%)1.005s (~)0.973s101.00x
💻 LocalNitro0.033s (~)1.006s (~)0.973s101.00x
💻 LocalNext.js (Turbopack)0.035s1.005s0.971s101.07x
🌐 RedisNext.js (Turbopack)0.048s (+12.1% 🔺)1.005s (~)0.957s101.48x
🐘 PostgresNext.js (Turbopack)0.051s1.011s0.960s101.57x
🐘 PostgresNitro0.053s (-4.2%)1.012s (~)0.959s101.63x
🐘 PostgresExpress0.053s (-0.9%)1.011s (~)0.958s101.63x
🌐 MongoDBNext.js (Turbopack)0.107s (+29.3% 🔺)1.008s (~)0.901s103.28x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.475s (-4.1%)2.293s (+7.3% 🔺)1.818s101.00x
▲ VercelExpress0.480s (+5.1% 🔺)2.335s (-2.2%)1.855s101.01x
▲ VercelNitro0.496s (-12.1% 🟢)2.338s (-2.0%)1.842s101.04x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.080s2.005s0.925s101.00x
💻 LocalNitro1.103s (~)2.007s (~)0.903s101.02x
💻 LocalExpress1.105s (~)2.005s (~)0.901s101.02x
🌐 RedisNext.js (Turbopack)1.114s (+1.6%)2.007s (~)0.893s101.03x
🐘 PostgresNext.js (Turbopack)1.125s2.012s0.886s101.04x
🐘 PostgresExpress1.127s (~)2.012s (~)0.885s101.04x
🐘 PostgresNitro1.138s (+0.5%)2.012s (~)0.874s101.05x
🌐 MongoDBNext.js (Turbopack)1.296s (-0.7%)2.008s (~)0.713s101.20x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.033s (-4.7%)3.688s (-2.0%)1.655s101.00x
▲ VercelNext.js (Turbopack)2.140s (+2.0%)3.845s (+7.8% 🔺)1.705s101.05x
▲ VercelNitro2.140s (+9.3% 🔺)3.646s (~)1.506s101.05x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.519s11.022s0.503s31.00x
🌐 RedisNext.js (Turbopack)10.727s (+0.6%)11.025s (~)0.298s31.02x
💻 LocalNitro10.780s (~)11.023s (~)0.243s31.02x
💻 LocalExpress10.786s (~)11.023s (~)0.237s31.03x
🐘 PostgresNext.js (Turbopack)10.797s11.040s0.243s31.03x
🐘 PostgresExpress10.831s (~)11.041s (~)0.209s31.03x
🐘 PostgresNitro10.877s (~)11.046s (~)0.169s31.03x
🌐 MongoDBNext.js (Turbopack)12.258s (+0.8%)13.022s (~)0.765s31.17x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.883s (-4.3%)18.520s (-4.1%)1.638s21.00x
▲ VercelNext.js (Turbopack)17.163s (+0.8%)18.531s (~)1.368s21.02x
▲ VercelNitro18.371s (+7.6% 🔺)20.803s (+10.8% 🔺)2.432s21.09x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)26.529s27.050s0.522s31.00x
🌐 RedisNext.js (Turbopack)26.675s (~)27.053s (~)0.379s31.01x
🐘 PostgresNext.js (Turbopack)26.865s27.062s0.197s31.01x
🐘 PostgresNitro26.918s (~)27.064s (-1.2%)0.147s31.01x
🐘 PostgresExpress26.994s (~)27.396s (+1.2%)0.402s31.02x
💻 LocalExpress27.245s (~)28.053s (~)0.808s31.03x
💻 LocalNitro27.302s (~)28.052s (~)0.750s31.03x
🌐 MongoDBNext.js (Turbopack)30.261s (~)31.031s (~)0.771s21.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)43.981s (-0.6%)45.621s (~)1.640s21.00x
▲ VercelExpress44.072s (+1.3%)45.644s (+1.1%)1.571s21.00x
▲ VercelNitro45.357s (-2.2%)46.825s (-3.2%)1.468s21.03x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)53.340s (~)54.101s (~)0.762s21.00x
🐘 PostgresNext.js (Turbopack)53.720s54.106s0.386s21.01x
🐘 PostgresNitro53.788s (~)54.100s (~)0.313s21.01x
🐘 PostgresExpress53.797s (~)54.107s (~)0.309s21.01x
💻 LocalNext.js (Turbopack)54.445s55.094s0.649s21.02x
💻 LocalNitro56.120s (~)57.102s (+1.8%)0.982s21.05x
💻 LocalExpress56.245s (~)57.098s (+1.8%)0.853s21.05x
🌐 MongoDBNext.js (Turbopack)60.477s (~)61.083s (~)0.606s21.13x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express91.067s (-8.6% 🟢)92.518s (-9.0% 🟢)1.451s11.00x
▲ VercelNext.js (Turbopack)93.443s (-9.0% 🟢)95.515s (-9.1% 🟢)2.072s11.03x
▲ VercelNitro93.610s (-1.3%)95.253s (-0.9%)1.643s11.03x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.249s (~)2.007s (~)0.758s151.00x
🐘 PostgresExpress1.361s (-1.6%)2.011s (~)0.650s151.09x
🐘 PostgresNext.js (Turbopack)1.365s2.011s0.645s151.09x
💻 LocalNext.js (Turbopack)1.381s2.006s0.625s151.11x
💻 LocalNitro1.396s (-1.1%)2.005s (~)0.609s151.12x
🐘 PostgresNitro1.400s (+1.5%)2.011s (~)0.611s151.12x
💻 LocalExpress1.422s (+1.0%)2.006s (~)0.584s151.14x
🌐 MongoDBNext.js (Turbopack)2.131s (+0.8%)3.008s (~)0.877s101.71x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.483s (-13.0% 🟢)4.615s (+4.4%)2.133s71.00x
▲ VercelNitro2.484s (-17.7% 🟢)4.322s (-5.5% 🟢)1.838s71.00x
▲ VercelExpress2.572s (-2.9%)4.032s (+1.6%)1.460s81.04x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.944s (-6.9% 🟢)2.478s (-1.5%)0.534s131.00x
🐘 PostgresExpress2.025s (+2.3%)2.598s (+3.3%)0.572s121.04x
🐘 PostgresNext.js (Turbopack)2.057s2.682s0.625s121.06x
💻 LocalNext.js (Turbopack)2.341s2.916s0.574s111.20x
🌐 RedisNext.js (Turbopack)2.578s (+3.4%)3.009s (~)0.431s101.33x
💻 LocalNitro2.609s (+1.0%)3.007s (~)0.398s101.34x
💻 LocalExpress2.621s (~)3.007s (~)0.387s101.35x
🌐 MongoDBNext.js (Turbopack)4.645s (-0.9%)5.177s (~)0.532s62.39x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.221s (+12.7% 🔺)4.628s (+7.4% 🔺)1.407s71.00x
▲ VercelNitro3.330s (+37.1% 🔺)4.522s (+18.7% 🔺)1.192s71.03x
▲ VercelExpress3.841s (+53.3% 🔺)5.132s (+39.2% 🔺)1.291s61.19x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.498s (-2.0%)4.306s (+0.8%)0.808s71.00x
🐘 PostgresNitro3.800s (-7.2% 🟢)4.451s (-6.2% 🟢)0.651s71.09x
🐘 PostgresNext.js (Turbopack)4.108s4.882s0.773s71.17x
🌐 RedisNext.js (Turbopack)4.140s (+2.5%)5.012s (+9.4% 🔺)0.872s61.18x
💻 LocalNext.js (Turbopack)6.420s6.815s0.395s51.84x
💻 LocalNitro7.418s (+1.9%)8.022s (~)0.604s42.12x
💻 LocalExpress7.627s (+2.0%)8.020s (~)0.393s42.18x
🌐 MongoDBNext.js (Turbopack)9.866s (-1.1%)10.349s (~)0.483s32.82x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.649s (-33.0% 🟢)3.791s (-38.9% 🟢)1.143s81.00x
▲ VercelExpress2.760s (-9.5% 🟢)7.697s (+70.1% 🔺)4.937s41.04x
▲ VercelNext.js (Turbopack)3.306s (-12.1% 🟢)5.045s (-21.5% 🟢)1.739s61.25x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.266s (+0.6%)2.007s (~)0.741s151.00x
🐘 PostgresNext.js (Turbopack)1.358s2.012s0.653s151.07x
💻 LocalNext.js (Turbopack)1.399s2.006s0.607s151.11x
🐘 PostgresExpress1.403s (+0.6%)2.011s (~)0.608s151.11x
🐘 PostgresNitro1.405s (+2.3%)2.011s (~)0.606s151.11x
💻 LocalNitro1.431s (~)2.005s (~)0.574s151.13x
💻 LocalExpress1.437s (+0.6%)2.006s (~)0.568s151.14x
🌐 MongoDBNext.js (Turbopack)2.123s (-3.5%)3.008s (~)0.885s101.68x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.122s (-12.7% 🟢)4.683s (+28.8% 🔺)2.562s71.00x
▲ VercelNitro2.177s (-28.1% 🟢)4.697s (-2.4%)2.520s71.03x
▲ VercelExpress2.328s (-7.4% 🟢)3.891s (-15.9% 🟢)1.562s81.10x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.960s (-6.3% 🟢)2.596s (+3.3%)0.636s121.00x
🐘 PostgresNitro1.985s (-4.5%)2.517s (~)0.532s121.01x
🐘 PostgresNext.js (Turbopack)2.095s2.680s0.585s121.07x
💻 LocalNext.js (Turbopack)2.441s2.917s0.476s111.25x
🌐 RedisNext.js (Turbopack)2.639s (+5.4% 🔺)3.109s (+3.3%)0.469s101.35x
💻 LocalExpress2.742s (+2.6%)3.009s (~)0.266s101.40x
💻 LocalNitro2.756s (+0.5%)3.008s (~)0.253s101.41x
🌐 MongoDBNext.js (Turbopack)4.797s (+2.7%)5.177s (~)0.380s62.45x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.452s (-12.4% 🟢)3.875s (-10.7% 🟢)1.423s81.00x
▲ VercelNext.js (Turbopack)2.552s (-3.5%)4.131s (+3.4%)1.579s81.04x
▲ VercelExpress2.699s (-13.4% 🟢)5.110s (+6.8% 🔺)2.411s61.10x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.003s (-8.2% 🟢)3.768s (-6.3% 🟢)0.765s81.00x
🐘 PostgresNext.js (Turbopack)3.625s4.593s0.967s71.21x
🐘 PostgresNitro3.799s (+10.4% 🔺)4.453s (+4.2%)0.655s71.26x
🌐 RedisNext.js (Turbopack)4.168s (+4.4%)5.013s (+6.1% 🔺)0.845s61.39x
💻 LocalNext.js (Turbopack)6.285s6.615s0.330s52.09x
💻 LocalNitro8.078s (~)8.771s (+2.9%)0.693s42.69x
💻 LocalExpress8.181s (+4.0%)9.022s (+12.5% 🔺)0.841s42.72x
🌐 MongoDBNext.js (Turbopack)9.926s (~)10.352s (~)0.426s33.30x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.881s (-7.9% 🟢)4.138s (-12.7% 🟢)1.257s81.00x
▲ VercelNitro3.032s (+6.5% 🔺)4.316s (+5.3% 🔺)1.284s71.05x
▲ VercelNext.js (Turbopack)3.609s (+26.3% 🔺)5.052s (+22.9% 🔺)1.443s71.25x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.111s1.001s0.009s1.015s0.904s101.00x
🌐 RedisNext.js (Turbopack)0.161s (+10.7% 🔺)1.000s (~)0.001s (-17.6% 🟢)1.008s (~)0.847s101.45x
💻 LocalNitro0.168s (-2.5%)1.003s (~)0.011s (-6.9% 🟢)1.016s (~)0.848s101.51x
💻 LocalExpress0.174s (~)1.003s (~)0.012s (+4.5%)1.018s (~)0.843s101.57x
🐘 PostgresNext.js (Turbopack)0.177s1.001s0.002s1.012s0.835s101.59x
🐘 PostgresExpress0.191s (-4.7%)0.995s (~)0.002s (+6.7% 🔺)1.012s (~)0.821s101.72x
🐘 PostgresNitro0.193s (-4.6%)0.991s (~)0.002s (+12.5% 🔺)1.012s (~)0.819s101.74x
🌐 MongoDBNext.js (Turbopack)0.512s (+12.5% 🔺)0.923s (-6.3% 🟢)0.002s (+7.1% 🔺)1.008s (~)0.496s104.61x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.484s (-15.0% 🟢)2.018s (-18.3% 🟢)0.013s (+123.3% 🔺)2.621s (-15.6% 🟢)1.138s101.00x
▲ VercelNitro1.501s (-7.8% 🟢)2.166s (-18.6% 🟢)0.005s (+1.9%)2.725s (-15.5% 🟢)1.224s101.01x
▲ VercelExpress1.659s (-3.8%)2.264s (-9.9% 🟢)0.005s (-2.0%)2.931s (-5.3% 🟢)1.271s101.12x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)11/12
🐘 PostgresNext.js (Turbopack)7/12
▲ VercelNext.js (Turbopack)6/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres6/12
Next.js (Turbopack)💻 Local5/12
Nitro💻 Local5/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 Mar 11, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production571067638
✅ 💻 Local Development612084696
✅ 📦 Local Production612084696
✅ 🐘 Local Postgres612084696
✅ 🪟 Windows550358
❌ 🌍 Community Worlds1185615189
✅ 📋 Other147027174
Total2727563643147

❌ Failed Tests

🌍 Community Worlds (56 failed)

mongodb (3 failed):

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

redis (2 failed):

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

turso (51 failed):

  • addTenWorkflow
  • addTenWorkflow
  • wellKnownAgentWorkflow (.well-known/agent)
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • importedStepOnlyWorkflow
  • hookWorkflow
  • hookWorkflow is not resumable via public webhook endpoint
  • 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
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running
  • 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
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control)

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro5107
✅ example5107
✅ express5107
✅ fastify5107
✅ hono5107
✅ nextjs-turbopack5602
✅ nextjs-webpack5602
✅ nitro5107
✅ nuxt5107
✅ sveltekit5107
✅ vite5107
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4909
✅ express-stable4909
✅ fastify-stable4909
✅ hono-stable4909
✅ nextjs-turbopack-canary5503
✅ nextjs-turbopack-stable5503
✅ nextjs-webpack-canary5503
✅ nextjs-webpack-stable5503
✅ nitro-stable4909
✅ nuxt-stable4909
✅ sveltekit-stable4909
✅ vite-stable4909
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4909
✅ express-stable4909
✅ fastify-stable4909
✅ hono-stable4909
✅ nextjs-turbopack-canary5503
✅ nextjs-turbopack-stable5503
✅ nextjs-webpack-canary5503
✅ nextjs-webpack-stable5503
✅ nitro-stable4909
✅ nuxt-stable4909
✅ sveltekit-stable4909
✅ vite-stable4909
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4909
✅ express-stable4909
✅ fastify-stable4909
✅ hono-stable4909
✅ nextjs-turbopack-canary5503
✅ nextjs-turbopack-stable5503
✅ nextjs-webpack-canary5503
✅ nextjs-webpack-stable5503
✅ nitro-stable4909
✅ nuxt-stable4909
✅ sveltekit-stable4909
✅ vite-stable4909
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack5503
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev302
❌ mongodb5233
✅ redis-dev302
❌ redis5323
✅ turso-dev302
❌ turso4513
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4909
✅ e2e-local-postgres-nest-stable4909
✅ e2e-local-prod-nest-stable4909

📋 View full workflow run

@pranaygp
pranaygp marked this pull request as ready for review March 11, 2026 22:09
@pranaygp
pranaygp requested a review from a team as a code ownerMarch 11, 2026 22:09
CopilotAI review requested due to automatic review settings March 11, 2026 22:09

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an exists async getter to the Run runtime API to allow checking whether a workflow run is present without treating “not found” as an exception, along with unit tests and documentation updates.

Changes:

  • Add Run.exists: Promise<boolean> that returns false for WorkflowRunNotFoundError and rethrows other errors.
  • Add unit tests covering: run exists, run not found, and unexpected error cases.
  • Document the new getter in the getRun API reference and add a changeset.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

FileDescription
packages/core/src/runtime/run.tsAdds the new exists getter on Run.
packages/core/src/runtime/runs.test.tsAdds unit tests for Run.exists.
docs/content/docs/api-reference/workflow-api/get-run.mdxAdds an example showing how to use run.exists.
.changeset/add-run-exists-getter.mdPublishes the API change as a patch changeset.

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

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +120 to +129
get exists(): Promise<boolean> {
return this.world.runs
.get(this.runId)
.then(() => true)
.catch((error) => {
if (WorkflowRunNotFoundError.is(error)) {
return false;
}
throw error;
});

CopilotAIMar 11, 2026

Copy link

Choose a reason for hiding this comment

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

Run.exists calls world.runs.get(this.runId) without resolveData: 'none'. In this codebase the default resolveData is 'all' (e.g., world-local/world-vercel), so this existence check can unnecessarily fetch potentially large input/output payloads just to determine presence. Consider calling this.world.runs.get(this.runId, { resolveData: 'none' }) here (and anywhere else where only metadata is needed).

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

^ this. Good bot.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Done — now passing { resolveData: 'none' } to skip fetching input/output payloads since we only need to check existence.


### Check if a Run Exists

Use the `exists` getter to check whether a workflow run exists without throwing an error:

CopilotAIMar 11, 2026

Copy link

Choose a reason for hiding this comment

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

The docs say the exists getter checks whether a run exists "without throwing an error", but Run.exists only suppresses WorkflowRunNotFoundError and will still throw for other failures (e.g., transport/500s). Please tweak the wording to clarify it's "without throwing when the run is not found" (or similar) so readers don't assume it never throws.

Suggested change
Use the `exists` getter to check whether a workflow run exists without throwing an error:
Use the `exists` getter to check whether a workflow run exists without throwing when the run is not found:

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Updated — now says "without throwing when the run is not found".

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM aside from the comment about data resolution

Comment on lines +120 to +129
get exists(): Promise<boolean> {
return this.world.runs
.get(this.runId)
.then(() => true)
.catch((error) => {
if (WorkflowRunNotFoundError.is(error)) {
return false;
}
throw error;
});

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

^ this. Good bot.

…cs wording
Pass { resolveData: 'none' } to world.runs.get() in the exists getter
to skip fetching input/output payloads. Update docs to say "without
throwing when the run is not found" instead of "without throwing an error".
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pranaygp
pranaygp merged commit fb5a500 into mainMar 11, 2026
166 of 169 checks passed
@pranaygp
pranaygp deleted the feat/run-exists-getter branch March 11, 2026 23:19
pranaygp added a commit that referenced this pull request Mar 12, 2026
…ignal
* origin/main: (26 commits)
Fix flaky streamer test ENOENT when chunks directory does not exist yet (#1330)
Version Packages (beta) (#1325)
[web-shared] Improve workflow observability event list UX (#1337)
feat: add `exists` getter to `Run` class (#1336)
Support client-side tools in DurableAgent (#1329)
[world-postgres] [world-local] Execute Graphile jobs directly instead of defering to world-local queue (#1334)
Merge CLAUDE.md into AGENTS.md and symlink CLAUDE.md (#1326)
[web] Polish loading indicators (#1327)
Fix flaky webhookWorkflow e2e test by polling instead of fixed sleep (#1328)
feat: support `deploymentId: 'latest'` in `start()` to resolve most recent deployment (#1317)
Fix bug where the SWC compiler bug prunes step-only imports in the client-mode transformation
[web] [world-vercel] Ensure user-passed run IDs are URL encoded and call out self-hosted security (#1322)
Version Packages (beta) (#1306)
Remove hard-coded VERCEL_DEPLOYMENT_KEY from nextjs-turbopack workbench (#1319)
fix(web): move react-router deps to devDependencies (#1265)
fix(ai): use workspace:* for workflow peer dependency (#1320)
fix(core): pass resolved deploymentId to getEncryptionKeyForRun in start() (#1318)
fix: surface 429 rate-limit errors in e2e tests and CLI (#1309)
fix(world-local): return HTTP 200 instead of 503 for queue timeout re-enqueue signals (#1307)
[web-shared] [cli] Refactor observability data fetching (#1261)
...
# Conflicts:
#	packages/core/e2e/e2e.test.ts
#	packages/web-shared/src/components/sidebar/attribute-panel.tsx
#	workbench/example/workflows/99_e2e.ts
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

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

feat: add exists getter to Run class - #1336

Merged
pranaygp merged 2 commits into
mainfrom
feat/run-exists-getter
Mar 11, 2026
Merged

feat: add exists getter to Run class#1336
pranaygp merged 2 commits into
mainfrom
feat/run-exists-getter

Conversation

@pranaygp

Copy link
Copy Markdown
Contributor

Summary

  • Add an exists async getter to the Run class that returns true if the run is found, false for WorkflowRunNotFoundError, and re-throws other errors
  • Add tests for all three cases (exists, not found, other errors)
  • Add docs example showing the new getter in the getRun API reference

Test plan

  • Unit tests pass: pnpm vitest run packages/core/src/runtime/runs.test.ts (8 tests, 3 new)
  • CI passes

🤖 Generated with Claude Code

Allow checking if a workflow run exists without catching errors.
Returns `true` if the run is found, `false` for WorkflowRunNotFoundError,
and re-throws any other errors.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Mar 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0f9aff5

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

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

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

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

@github-actions

github-actionsBot commented Mar 11, 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.033s (-0.9%)1.005s (~)0.973s101.00x
💻 LocalNitro0.033s (~)1.006s (~)0.973s101.00x
💻 LocalNext.js (Turbopack)0.035s1.005s0.971s101.07x
🌐 RedisNext.js (Turbopack)0.048s (+12.1% 🔺)1.005s (~)0.957s101.48x
🐘 PostgresNext.js (Turbopack)0.051s1.011s0.960s101.57x
🐘 PostgresNitro0.053s (-4.2%)1.012s (~)0.959s101.63x
🐘 PostgresExpress0.053s (-0.9%)1.011s (~)0.958s101.63x
🌐 MongoDBNext.js (Turbopack)0.107s (+29.3% 🔺)1.008s (~)0.901s103.28x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.475s (-4.1%)2.293s (+7.3% 🔺)1.818s101.00x
▲ VercelExpress0.480s (+5.1% 🔺)2.335s (-2.2%)1.855s101.01x
▲ VercelNitro0.496s (-12.1% 🟢)2.338s (-2.0%)1.842s101.04x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.080s2.005s0.925s101.00x
💻 LocalNitro1.103s (~)2.007s (~)0.903s101.02x
💻 LocalExpress1.105s (~)2.005s (~)0.901s101.02x
🌐 RedisNext.js (Turbopack)1.114s (+1.6%)2.007s (~)0.893s101.03x
🐘 PostgresNext.js (Turbopack)1.125s2.012s0.886s101.04x
🐘 PostgresExpress1.127s (~)2.012s (~)0.885s101.04x
🐘 PostgresNitro1.138s (+0.5%)2.012s (~)0.874s101.05x
🌐 MongoDBNext.js (Turbopack)1.296s (-0.7%)2.008s (~)0.713s101.20x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.033s (-4.7%)3.688s (-2.0%)1.655s101.00x
▲ VercelNext.js (Turbopack)2.140s (+2.0%)3.845s (+7.8% 🔺)1.705s101.05x
▲ VercelNitro2.140s (+9.3% 🔺)3.646s (~)1.506s101.05x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.519s11.022s0.503s31.00x
🌐 RedisNext.js (Turbopack)10.727s (+0.6%)11.025s (~)0.298s31.02x
💻 LocalNitro10.780s (~)11.023s (~)0.243s31.02x
💻 LocalExpress10.786s (~)11.023s (~)0.237s31.03x
🐘 PostgresNext.js (Turbopack)10.797s11.040s0.243s31.03x
🐘 PostgresExpress10.831s (~)11.041s (~)0.209s31.03x
🐘 PostgresNitro10.877s (~)11.046s (~)0.169s31.03x
🌐 MongoDBNext.js (Turbopack)12.258s (+0.8%)13.022s (~)0.765s31.17x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.883s (-4.3%)18.520s (-4.1%)1.638s21.00x
▲ VercelNext.js (Turbopack)17.163s (+0.8%)18.531s (~)1.368s21.02x
▲ VercelNitro18.371s (+7.6% 🔺)20.803s (+10.8% 🔺)2.432s21.09x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)26.529s27.050s0.522s31.00x
🌐 RedisNext.js (Turbopack)26.675s (~)27.053s (~)0.379s31.01x
🐘 PostgresNext.js (Turbopack)26.865s27.062s0.197s31.01x
🐘 PostgresNitro26.918s (~)27.064s (-1.2%)0.147s31.01x
🐘 PostgresExpress26.994s (~)27.396s (+1.2%)0.402s31.02x
💻 LocalExpress27.245s (~)28.053s (~)0.808s31.03x
💻 LocalNitro27.302s (~)28.052s (~)0.750s31.03x
🌐 MongoDBNext.js (Turbopack)30.261s (~)31.031s (~)0.771s21.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)43.981s (-0.6%)45.621s (~)1.640s21.00x
▲ VercelExpress44.072s (+1.3%)45.644s (+1.1%)1.571s21.00x
▲ VercelNitro45.357s (-2.2%)46.825s (-3.2%)1.468s21.03x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)53.340s (~)54.101s (~)0.762s21.00x
🐘 PostgresNext.js (Turbopack)53.720s54.106s0.386s21.01x
🐘 PostgresNitro53.788s (~)54.100s (~)0.313s21.01x
🐘 PostgresExpress53.797s (~)54.107s (~)0.309s21.01x
💻 LocalNext.js (Turbopack)54.445s55.094s0.649s21.02x
💻 LocalNitro56.120s (~)57.102s (+1.8%)0.982s21.05x
💻 LocalExpress56.245s (~)57.098s (+1.8%)0.853s21.05x
🌐 MongoDBNext.js (Turbopack)60.477s (~)61.083s (~)0.606s21.13x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express91.067s (-8.6% 🟢)92.518s (-9.0% 🟢)1.451s11.00x
▲ VercelNext.js (Turbopack)93.443s (-9.0% 🟢)95.515s (-9.1% 🟢)2.072s11.03x
▲ VercelNitro93.610s (-1.3%)95.253s (-0.9%)1.643s11.03x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.249s (~)2.007s (~)0.758s151.00x
🐘 PostgresExpress1.361s (-1.6%)2.011s (~)0.650s151.09x
🐘 PostgresNext.js (Turbopack)1.365s2.011s0.645s151.09x
💻 LocalNext.js (Turbopack)1.381s2.006s0.625s151.11x
💻 LocalNitro1.396s (-1.1%)2.005s (~)0.609s151.12x
🐘 PostgresNitro1.400s (+1.5%)2.011s (~)0.611s151.12x
💻 LocalExpress1.422s (+1.0%)2.006s (~)0.584s151.14x
🌐 MongoDBNext.js (Turbopack)2.131s (+0.8%)3.008s (~)0.877s101.71x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.483s (-13.0% 🟢)4.615s (+4.4%)2.133s71.00x
▲ VercelNitro2.484s (-17.7% 🟢)4.322s (-5.5% 🟢)1.838s71.00x
▲ VercelExpress2.572s (-2.9%)4.032s (+1.6%)1.460s81.04x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.944s (-6.9% 🟢)2.478s (-1.5%)0.534s131.00x
🐘 PostgresExpress2.025s (+2.3%)2.598s (+3.3%)0.572s121.04x
🐘 PostgresNext.js (Turbopack)2.057s2.682s0.625s121.06x
💻 LocalNext.js (Turbopack)2.341s2.916s0.574s111.20x
🌐 RedisNext.js (Turbopack)2.578s (+3.4%)3.009s (~)0.431s101.33x
💻 LocalNitro2.609s (+1.0%)3.007s (~)0.398s101.34x
💻 LocalExpress2.621s (~)3.007s (~)0.387s101.35x
🌐 MongoDBNext.js (Turbopack)4.645s (-0.9%)5.177s (~)0.532s62.39x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.221s (+12.7% 🔺)4.628s (+7.4% 🔺)1.407s71.00x
▲ VercelNitro3.330s (+37.1% 🔺)4.522s (+18.7% 🔺)1.192s71.03x
▲ VercelExpress3.841s (+53.3% 🔺)5.132s (+39.2% 🔺)1.291s61.19x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.498s (-2.0%)4.306s (+0.8%)0.808s71.00x
🐘 PostgresNitro3.800s (-7.2% 🟢)4.451s (-6.2% 🟢)0.651s71.09x
🐘 PostgresNext.js (Turbopack)4.108s4.882s0.773s71.17x
🌐 RedisNext.js (Turbopack)4.140s (+2.5%)5.012s (+9.4% 🔺)0.872s61.18x
💻 LocalNext.js (Turbopack)6.420s6.815s0.395s51.84x
💻 LocalNitro7.418s (+1.9%)8.022s (~)0.604s42.12x
💻 LocalExpress7.627s (+2.0%)8.020s (~)0.393s42.18x
🌐 MongoDBNext.js (Turbopack)9.866s (-1.1%)10.349s (~)0.483s32.82x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.649s (-33.0% 🟢)3.791s (-38.9% 🟢)1.143s81.00x
▲ VercelExpress2.760s (-9.5% 🟢)7.697s (+70.1% 🔺)4.937s41.04x
▲ VercelNext.js (Turbopack)3.306s (-12.1% 🟢)5.045s (-21.5% 🟢)1.739s61.25x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.266s (+0.6%)2.007s (~)0.741s151.00x
🐘 PostgresNext.js (Turbopack)1.358s2.012s0.653s151.07x
💻 LocalNext.js (Turbopack)1.399s2.006s0.607s151.11x
🐘 PostgresExpress1.403s (+0.6%)2.011s (~)0.608s151.11x
🐘 PostgresNitro1.405s (+2.3%)2.011s (~)0.606s151.11x
💻 LocalNitro1.431s (~)2.005s (~)0.574s151.13x
💻 LocalExpress1.437s (+0.6%)2.006s (~)0.568s151.14x
🌐 MongoDBNext.js (Turbopack)2.123s (-3.5%)3.008s (~)0.885s101.68x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.122s (-12.7% 🟢)4.683s (+28.8% 🔺)2.562s71.00x
▲ VercelNitro2.177s (-28.1% 🟢)4.697s (-2.4%)2.520s71.03x
▲ VercelExpress2.328s (-7.4% 🟢)3.891s (-15.9% 🟢)1.562s81.10x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.960s (-6.3% 🟢)2.596s (+3.3%)0.636s121.00x
🐘 PostgresNitro1.985s (-4.5%)2.517s (~)0.532s121.01x
🐘 PostgresNext.js (Turbopack)2.095s2.680s0.585s121.07x
💻 LocalNext.js (Turbopack)2.441s2.917s0.476s111.25x
🌐 RedisNext.js (Turbopack)2.639s (+5.4% 🔺)3.109s (+3.3%)0.469s101.35x
💻 LocalExpress2.742s (+2.6%)3.009s (~)0.266s101.40x
💻 LocalNitro2.756s (+0.5%)3.008s (~)0.253s101.41x
🌐 MongoDBNext.js (Turbopack)4.797s (+2.7%)5.177s (~)0.380s62.45x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.452s (-12.4% 🟢)3.875s (-10.7% 🟢)1.423s81.00x
▲ VercelNext.js (Turbopack)2.552s (-3.5%)4.131s (+3.4%)1.579s81.04x
▲ VercelExpress2.699s (-13.4% 🟢)5.110s (+6.8% 🔺)2.411s61.10x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.003s (-8.2% 🟢)3.768s (-6.3% 🟢)0.765s81.00x
🐘 PostgresNext.js (Turbopack)3.625s4.593s0.967s71.21x
🐘 PostgresNitro3.799s (+10.4% 🔺)4.453s (+4.2%)0.655s71.26x
🌐 RedisNext.js (Turbopack)4.168s (+4.4%)5.013s (+6.1% 🔺)0.845s61.39x
💻 LocalNext.js (Turbopack)6.285s6.615s0.330s52.09x
💻 LocalNitro8.078s (~)8.771s (+2.9%)0.693s42.69x
💻 LocalExpress8.181s (+4.0%)9.022s (+12.5% 🔺)0.841s42.72x
🌐 MongoDBNext.js (Turbopack)9.926s (~)10.352s (~)0.426s33.30x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.881s (-7.9% 🟢)4.138s (-12.7% 🟢)1.257s81.00x
▲ VercelNitro3.032s (+6.5% 🔺)4.316s (+5.3% 🔺)1.284s71.05x
▲ VercelNext.js (Turbopack)3.609s (+26.3% 🔺)5.052s (+22.9% 🔺)1.443s71.25x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.111s1.001s0.009s1.015s0.904s101.00x
🌐 RedisNext.js (Turbopack)0.161s (+10.7% 🔺)1.000s (~)0.001s (-17.6% 🟢)1.008s (~)0.847s101.45x
💻 LocalNitro0.168s (-2.5%)1.003s (~)0.011s (-6.9% 🟢)1.016s (~)0.848s101.51x
💻 LocalExpress0.174s (~)1.003s (~)0.012s (+4.5%)1.018s (~)0.843s101.57x
🐘 PostgresNext.js (Turbopack)0.177s1.001s0.002s1.012s0.835s101.59x
🐘 PostgresExpress0.191s (-4.7%)0.995s (~)0.002s (+6.7% 🔺)1.012s (~)0.821s101.72x
🐘 PostgresNitro0.193s (-4.6%)0.991s (~)0.002s (+12.5% 🔺)1.012s (~)0.819s101.74x
🌐 MongoDBNext.js (Turbopack)0.512s (+12.5% 🔺)0.923s (-6.3% 🟢)0.002s (+7.1% 🔺)1.008s (~)0.496s104.61x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.484s (-15.0% 🟢)2.018s (-18.3% 🟢)0.013s (+123.3% 🔺)2.621s (-15.6% 🟢)1.138s101.00x
▲ VercelNitro1.501s (-7.8% 🟢)2.166s (-18.6% 🟢)0.005s (+1.9%)2.725s (-15.5% 🟢)1.224s101.01x
▲ VercelExpress1.659s (-3.8%)2.264s (-9.9% 🟢)0.005s (-2.0%)2.931s (-5.3% 🟢)1.271s101.12x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)11/12
🐘 PostgresNext.js (Turbopack)7/12
▲ VercelNext.js (Turbopack)6/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres6/12
Next.js (Turbopack)💻 Local5/12
Nitro💻 Local5/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 Mar 11, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production571067638
✅ 💻 Local Development612084696
✅ 📦 Local Production612084696
✅ 🐘 Local Postgres612084696
✅ 🪟 Windows550358
❌ 🌍 Community Worlds1185615189
✅ 📋 Other147027174
Total2727563643147

❌ Failed Tests

🌍 Community Worlds (56 failed)

mongodb (3 failed):

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

redis (2 failed):

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

turso (51 failed):

  • addTenWorkflow
  • addTenWorkflow
  • wellKnownAgentWorkflow (.well-known/agent)
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • importedStepOnlyWorkflow
  • hookWorkflow
  • hookWorkflow is not resumable via public webhook endpoint
  • 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
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running
  • 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
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control)

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro5107
✅ example5107
✅ express5107
✅ fastify5107
✅ hono5107
✅ nextjs-turbopack5602
✅ nextjs-webpack5602
✅ nitro5107
✅ nuxt5107
✅ sveltekit5107
✅ vite5107
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4909
✅ express-stable4909
✅ fastify-stable4909
✅ hono-stable4909
✅ nextjs-turbopack-canary5503
✅ nextjs-turbopack-stable5503
✅ nextjs-webpack-canary5503
✅ nextjs-webpack-stable5503
✅ nitro-stable4909
✅ nuxt-stable4909
✅ sveltekit-stable4909
✅ vite-stable4909
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4909
✅ express-stable4909
✅ fastify-stable4909
✅ hono-stable4909
✅ nextjs-turbopack-canary5503
✅ nextjs-turbopack-stable5503
✅ nextjs-webpack-canary5503
✅ nextjs-webpack-stable5503
✅ nitro-stable4909
✅ nuxt-stable4909
✅ sveltekit-stable4909
✅ vite-stable4909
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4909
✅ express-stable4909
✅ fastify-stable4909
✅ hono-stable4909
✅ nextjs-turbopack-canary5503
✅ nextjs-turbopack-stable5503
✅ nextjs-webpack-canary5503
✅ nextjs-webpack-stable5503
✅ nitro-stable4909
✅ nuxt-stable4909
✅ sveltekit-stable4909
✅ vite-stable4909
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack5503
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev302
❌ mongodb5233
✅ redis-dev302
❌ redis5323
✅ turso-dev302
❌ turso4513
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4909
✅ e2e-local-postgres-nest-stable4909
✅ e2e-local-prod-nest-stable4909

📋 View full workflow run

@pranaygp
pranaygp marked this pull request as ready for review March 11, 2026 22:09
@pranaygp
pranaygp requested a review from a team as a code ownerMarch 11, 2026 22:09
CopilotAI review requested due to automatic review settings March 11, 2026 22:09

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an exists async getter to the Run runtime API to allow checking whether a workflow run is present without treating “not found” as an exception, along with unit tests and documentation updates.

Changes:

  • Add Run.exists: Promise<boolean> that returns false for WorkflowRunNotFoundError and rethrows other errors.
  • Add unit tests covering: run exists, run not found, and unexpected error cases.
  • Document the new getter in the getRun API reference and add a changeset.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

FileDescription
packages/core/src/runtime/run.tsAdds the new exists getter on Run.
packages/core/src/runtime/runs.test.tsAdds unit tests for Run.exists.
docs/content/docs/api-reference/workflow-api/get-run.mdxAdds an example showing how to use run.exists.
.changeset/add-run-exists-getter.mdPublishes the API change as a patch changeset.

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

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +120 to +129
get exists(): Promise<boolean> {
return this.world.runs
.get(this.runId)
.then(() => true)
.catch((error) => {
if (WorkflowRunNotFoundError.is(error)) {
return false;
}
throw error;
});

CopilotAIMar 11, 2026

Copy link

Choose a reason for hiding this comment

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

Run.exists calls world.runs.get(this.runId) without resolveData: 'none'. In this codebase the default resolveData is 'all' (e.g., world-local/world-vercel), so this existence check can unnecessarily fetch potentially large input/output payloads just to determine presence. Consider calling this.world.runs.get(this.runId, { resolveData: 'none' }) here (and anywhere else where only metadata is needed).

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

^ this. Good bot.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Done — now passing { resolveData: 'none' } to skip fetching input/output payloads since we only need to check existence.


### Check if a Run Exists

Use the `exists` getter to check whether a workflow run exists without throwing an error:

CopilotAIMar 11, 2026

Copy link

Choose a reason for hiding this comment

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

The docs say the exists getter checks whether a run exists "without throwing an error", but Run.exists only suppresses WorkflowRunNotFoundError and will still throw for other failures (e.g., transport/500s). Please tweak the wording to clarify it's "without throwing when the run is not found" (or similar) so readers don't assume it never throws.

Suggested change
Use the `exists` getter to check whether a workflow run exists without throwing an error:
Use the `exists` getter to check whether a workflow run exists without throwing when the run is not found:

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Updated — now says "without throwing when the run is not found".

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM aside from the comment about data resolution

Comment on lines +120 to +129
get exists(): Promise<boolean> {
return this.world.runs
.get(this.runId)
.then(() => true)
.catch((error) => {
if (WorkflowRunNotFoundError.is(error)) {
return false;
}
throw error;
});

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

^ this. Good bot.

…cs wording
Pass { resolveData: 'none' } to world.runs.get() in the exists getter
to skip fetching input/output payloads. Update docs to say "without
throwing when the run is not found" instead of "without throwing an error".
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pranaygp
pranaygp merged commit fb5a500 into mainMar 11, 2026
166 of 169 checks passed
@pranaygp
pranaygp deleted the feat/run-exists-getter branch March 11, 2026 23:19
pranaygp added a commit that referenced this pull request Mar 12, 2026
…ignal
* origin/main: (26 commits)
Fix flaky streamer test ENOENT when chunks directory does not exist yet (#1330)
Version Packages (beta) (#1325)
[web-shared] Improve workflow observability event list UX (#1337)
feat: add `exists` getter to `Run` class (#1336)
Support client-side tools in DurableAgent (#1329)
[world-postgres] [world-local] Execute Graphile jobs directly instead of defering to world-local queue (#1334)
Merge CLAUDE.md into AGENTS.md and symlink CLAUDE.md (#1326)
[web] Polish loading indicators (#1327)
Fix flaky webhookWorkflow e2e test by polling instead of fixed sleep (#1328)
feat: support `deploymentId: 'latest'` in `start()` to resolve most recent deployment (#1317)
Fix bug where the SWC compiler bug prunes step-only imports in the client-mode transformation
[web] [world-vercel] Ensure user-passed run IDs are URL encoded and call out self-hosted security (#1322)
Version Packages (beta) (#1306)
Remove hard-coded VERCEL_DEPLOYMENT_KEY from nextjs-turbopack workbench (#1319)
fix(web): move react-router deps to devDependencies (#1265)
fix(ai): use workspace:* for workflow peer dependency (#1320)
fix(core): pass resolved deploymentId to getEncryptionKeyForRun in start() (#1318)
fix: surface 429 rate-limit errors in e2e tests and CLI (#1309)
fix(world-local): return HTTP 200 instead of 503 for queue timeout re-enqueue signals (#1307)
[web-shared] [cli] Refactor observability data fetching (#1261)
...
# Conflicts:
#	packages/core/e2e/e2e.test.ts
#	packages/web-shared/src/components/sidebar/attribute-panel.tsx
#	workbench/example/workflows/99_e2e.ts
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

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

feat: add exists getter to Run class - #1336

Merged
pranaygp merged 2 commits into
mainfrom
feat/run-exists-getter
Mar 11, 2026
Merged

feat: add exists getter to Run class#1336
pranaygp merged 2 commits into
mainfrom
feat/run-exists-getter

Conversation

@pranaygp

Copy link
Copy Markdown
Contributor

Summary

  • Add an exists async getter to the Run class that returns true if the run is found, false for WorkflowRunNotFoundError, and re-throws other errors
  • Add tests for all three cases (exists, not found, other errors)
  • Add docs example showing the new getter in the getRun API reference

Test plan

  • Unit tests pass: pnpm vitest run packages/core/src/runtime/runs.test.ts (8 tests, 3 new)
  • CI passes

🤖 Generated with Claude Code

Allow checking if a workflow run exists without catching errors.
Returns `true` if the run is found, `false` for WorkflowRunNotFoundError,
and re-throws any other errors.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Mar 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0f9aff5

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

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

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

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

@github-actions

github-actionsBot commented Mar 11, 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.033s (-0.9%)1.005s (~)0.973s101.00x
💻 LocalNitro0.033s (~)1.006s (~)0.973s101.00x
💻 LocalNext.js (Turbopack)0.035s1.005s0.971s101.07x
🌐 RedisNext.js (Turbopack)0.048s (+12.1% 🔺)1.005s (~)0.957s101.48x
🐘 PostgresNext.js (Turbopack)0.051s1.011s0.960s101.57x
🐘 PostgresNitro0.053s (-4.2%)1.012s (~)0.959s101.63x
🐘 PostgresExpress0.053s (-0.9%)1.011s (~)0.958s101.63x
🌐 MongoDBNext.js (Turbopack)0.107s (+29.3% 🔺)1.008s (~)0.901s103.28x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.475s (-4.1%)2.293s (+7.3% 🔺)1.818s101.00x
▲ VercelExpress0.480s (+5.1% 🔺)2.335s (-2.2%)1.855s101.01x
▲ VercelNitro0.496s (-12.1% 🟢)2.338s (-2.0%)1.842s101.04x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.080s2.005s0.925s101.00x
💻 LocalNitro1.103s (~)2.007s (~)0.903s101.02x
💻 LocalExpress1.105s (~)2.005s (~)0.901s101.02x
🌐 RedisNext.js (Turbopack)1.114s (+1.6%)2.007s (~)0.893s101.03x
🐘 PostgresNext.js (Turbopack)1.125s2.012s0.886s101.04x
🐘 PostgresExpress1.127s (~)2.012s (~)0.885s101.04x
🐘 PostgresNitro1.138s (+0.5%)2.012s (~)0.874s101.05x
🌐 MongoDBNext.js (Turbopack)1.296s (-0.7%)2.008s (~)0.713s101.20x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.033s (-4.7%)3.688s (-2.0%)1.655s101.00x
▲ VercelNext.js (Turbopack)2.140s (+2.0%)3.845s (+7.8% 🔺)1.705s101.05x
▲ VercelNitro2.140s (+9.3% 🔺)3.646s (~)1.506s101.05x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.519s11.022s0.503s31.00x
🌐 RedisNext.js (Turbopack)10.727s (+0.6%)11.025s (~)0.298s31.02x
💻 LocalNitro10.780s (~)11.023s (~)0.243s31.02x
💻 LocalExpress10.786s (~)11.023s (~)0.237s31.03x
🐘 PostgresNext.js (Turbopack)10.797s11.040s0.243s31.03x
🐘 PostgresExpress10.831s (~)11.041s (~)0.209s31.03x
🐘 PostgresNitro10.877s (~)11.046s (~)0.169s31.03x
🌐 MongoDBNext.js (Turbopack)12.258s (+0.8%)13.022s (~)0.765s31.17x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.883s (-4.3%)18.520s (-4.1%)1.638s21.00x
▲ VercelNext.js (Turbopack)17.163s (+0.8%)18.531s (~)1.368s21.02x
▲ VercelNitro18.371s (+7.6% 🔺)20.803s (+10.8% 🔺)2.432s21.09x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)26.529s27.050s0.522s31.00x
🌐 RedisNext.js (Turbopack)26.675s (~)27.053s (~)0.379s31.01x
🐘 PostgresNext.js (Turbopack)26.865s27.062s0.197s31.01x
🐘 PostgresNitro26.918s (~)27.064s (-1.2%)0.147s31.01x
🐘 PostgresExpress26.994s (~)27.396s (+1.2%)0.402s31.02x
💻 LocalExpress27.245s (~)28.053s (~)0.808s31.03x
💻 LocalNitro27.302s (~)28.052s (~)0.750s31.03x
🌐 MongoDBNext.js (Turbopack)30.261s (~)31.031s (~)0.771s21.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)43.981s (-0.6%)45.621s (~)1.640s21.00x
▲ VercelExpress44.072s (+1.3%)45.644s (+1.1%)1.571s21.00x
▲ VercelNitro45.357s (-2.2%)46.825s (-3.2%)1.468s21.03x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)53.340s (~)54.101s (~)0.762s21.00x
🐘 PostgresNext.js (Turbopack)53.720s54.106s0.386s21.01x
🐘 PostgresNitro53.788s (~)54.100s (~)0.313s21.01x
🐘 PostgresExpress53.797s (~)54.107s (~)0.309s21.01x
💻 LocalNext.js (Turbopack)54.445s55.094s0.649s21.02x
💻 LocalNitro56.120s (~)57.102s (+1.8%)0.982s21.05x
💻 LocalExpress56.245s (~)57.098s (+1.8%)0.853s21.05x
🌐 MongoDBNext.js (Turbopack)60.477s (~)61.083s (~)0.606s21.13x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express91.067s (-8.6% 🟢)92.518s (-9.0% 🟢)1.451s11.00x
▲ VercelNext.js (Turbopack)93.443s (-9.0% 🟢)95.515s (-9.1% 🟢)2.072s11.03x
▲ VercelNitro93.610s (-1.3%)95.253s (-0.9%)1.643s11.03x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.249s (~)2.007s (~)0.758s151.00x
🐘 PostgresExpress1.361s (-1.6%)2.011s (~)0.650s151.09x
🐘 PostgresNext.js (Turbopack)1.365s2.011s0.645s151.09x
💻 LocalNext.js (Turbopack)1.381s2.006s0.625s151.11x
💻 LocalNitro1.396s (-1.1%)2.005s (~)0.609s151.12x
🐘 PostgresNitro1.400s (+1.5%)2.011s (~)0.611s151.12x
💻 LocalExpress1.422s (+1.0%)2.006s (~)0.584s151.14x
🌐 MongoDBNext.js (Turbopack)2.131s (+0.8%)3.008s (~)0.877s101.71x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.483s (-13.0% 🟢)4.615s (+4.4%)2.133s71.00x
▲ VercelNitro2.484s (-17.7% 🟢)4.322s (-5.5% 🟢)1.838s71.00x
▲ VercelExpress2.572s (-2.9%)4.032s (+1.6%)1.460s81.04x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.944s (-6.9% 🟢)2.478s (-1.5%)0.534s131.00x
🐘 PostgresExpress2.025s (+2.3%)2.598s (+3.3%)0.572s121.04x
🐘 PostgresNext.js (Turbopack)2.057s2.682s0.625s121.06x
💻 LocalNext.js (Turbopack)2.341s2.916s0.574s111.20x
🌐 RedisNext.js (Turbopack)2.578s (+3.4%)3.009s (~)0.431s101.33x
💻 LocalNitro2.609s (+1.0%)3.007s (~)0.398s101.34x
💻 LocalExpress2.621s (~)3.007s (~)0.387s101.35x
🌐 MongoDBNext.js (Turbopack)4.645s (-0.9%)5.177s (~)0.532s62.39x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.221s (+12.7% 🔺)4.628s (+7.4% 🔺)1.407s71.00x
▲ VercelNitro3.330s (+37.1% 🔺)4.522s (+18.7% 🔺)1.192s71.03x
▲ VercelExpress3.841s (+53.3% 🔺)5.132s (+39.2% 🔺)1.291s61.19x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.498s (-2.0%)4.306s (+0.8%)0.808s71.00x
🐘 PostgresNitro3.800s (-7.2% 🟢)4.451s (-6.2% 🟢)0.651s71.09x
🐘 PostgresNext.js (Turbopack)4.108s4.882s0.773s71.17x
🌐 RedisNext.js (Turbopack)4.140s (+2.5%)5.012s (+9.4% 🔺)0.872s61.18x
💻 LocalNext.js (Turbopack)6.420s6.815s0.395s51.84x
💻 LocalNitro7.418s (+1.9%)8.022s (~)0.604s42.12x
💻 LocalExpress7.627s (+2.0%)8.020s (~)0.393s42.18x
🌐 MongoDBNext.js (Turbopack)9.866s (-1.1%)10.349s (~)0.483s32.82x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.649s (-33.0% 🟢)3.791s (-38.9% 🟢)1.143s81.00x
▲ VercelExpress2.760s (-9.5% 🟢)7.697s (+70.1% 🔺)4.937s41.04x
▲ VercelNext.js (Turbopack)3.306s (-12.1% 🟢)5.045s (-21.5% 🟢)1.739s61.25x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.266s (+0.6%)2.007s (~)0.741s151.00x
🐘 PostgresNext.js (Turbopack)1.358s2.012s0.653s151.07x
💻 LocalNext.js (Turbopack)1.399s2.006s0.607s151.11x
🐘 PostgresExpress1.403s (+0.6%)2.011s (~)0.608s151.11x
🐘 PostgresNitro1.405s (+2.3%)2.011s (~)0.606s151.11x
💻 LocalNitro1.431s (~)2.005s (~)0.574s151.13x
💻 LocalExpress1.437s (+0.6%)2.006s (~)0.568s151.14x
🌐 MongoDBNext.js (Turbopack)2.123s (-3.5%)3.008s (~)0.885s101.68x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.122s (-12.7% 🟢)4.683s (+28.8% 🔺)2.562s71.00x
▲ VercelNitro2.177s (-28.1% 🟢)4.697s (-2.4%)2.520s71.03x
▲ VercelExpress2.328s (-7.4% 🟢)3.891s (-15.9% 🟢)1.562s81.10x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.960s (-6.3% 🟢)2.596s (+3.3%)0.636s121.00x
🐘 PostgresNitro1.985s (-4.5%)2.517s (~)0.532s121.01x
🐘 PostgresNext.js (Turbopack)2.095s2.680s0.585s121.07x
💻 LocalNext.js (Turbopack)2.441s2.917s0.476s111.25x
🌐 RedisNext.js (Turbopack)2.639s (+5.4% 🔺)3.109s (+3.3%)0.469s101.35x
💻 LocalExpress2.742s (+2.6%)3.009s (~)0.266s101.40x
💻 LocalNitro2.756s (+0.5%)3.008s (~)0.253s101.41x
🌐 MongoDBNext.js (Turbopack)4.797s (+2.7%)5.177s (~)0.380s62.45x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.452s (-12.4% 🟢)3.875s (-10.7% 🟢)1.423s81.00x
▲ VercelNext.js (Turbopack)2.552s (-3.5%)4.131s (+3.4%)1.579s81.04x
▲ VercelExpress2.699s (-13.4% 🟢)5.110s (+6.8% 🔺)2.411s61.10x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.003s (-8.2% 🟢)3.768s (-6.3% 🟢)0.765s81.00x
🐘 PostgresNext.js (Turbopack)3.625s4.593s0.967s71.21x
🐘 PostgresNitro3.799s (+10.4% 🔺)4.453s (+4.2%)0.655s71.26x
🌐 RedisNext.js (Turbopack)4.168s (+4.4%)5.013s (+6.1% 🔺)0.845s61.39x
💻 LocalNext.js (Turbopack)6.285s6.615s0.330s52.09x
💻 LocalNitro8.078s (~)8.771s (+2.9%)0.693s42.69x
💻 LocalExpress8.181s (+4.0%)9.022s (+12.5% 🔺)0.841s42.72x
🌐 MongoDBNext.js (Turbopack)9.926s (~)10.352s (~)0.426s33.30x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.881s (-7.9% 🟢)4.138s (-12.7% 🟢)1.257s81.00x
▲ VercelNitro3.032s (+6.5% 🔺)4.316s (+5.3% 🔺)1.284s71.05x
▲ VercelNext.js (Turbopack)3.609s (+26.3% 🔺)5.052s (+22.9% 🔺)1.443s71.25x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.111s1.001s0.009s1.015s0.904s101.00x
🌐 RedisNext.js (Turbopack)0.161s (+10.7% 🔺)1.000s (~)0.001s (-17.6% 🟢)1.008s (~)0.847s101.45x
💻 LocalNitro0.168s (-2.5%)1.003s (~)0.011s (-6.9% 🟢)1.016s (~)0.848s101.51x
💻 LocalExpress0.174s (~)1.003s (~)0.012s (+4.5%)1.018s (~)0.843s101.57x
🐘 PostgresNext.js (Turbopack)0.177s1.001s0.002s1.012s0.835s101.59x
🐘 PostgresExpress0.191s (-4.7%)0.995s (~)0.002s (+6.7% 🔺)1.012s (~)0.821s101.72x
🐘 PostgresNitro0.193s (-4.6%)0.991s (~)0.002s (+12.5% 🔺)1.012s (~)0.819s101.74x
🌐 MongoDBNext.js (Turbopack)0.512s (+12.5% 🔺)0.923s (-6.3% 🟢)0.002s (+7.1% 🔺)1.008s (~)0.496s104.61x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.484s (-15.0% 🟢)2.018s (-18.3% 🟢)0.013s (+123.3% 🔺)2.621s (-15.6% 🟢)1.138s101.00x
▲ VercelNitro1.501s (-7.8% 🟢)2.166s (-18.6% 🟢)0.005s (+1.9%)2.725s (-15.5% 🟢)1.224s101.01x
▲ VercelExpress1.659s (-3.8%)2.264s (-9.9% 🟢)0.005s (-2.0%)2.931s (-5.3% 🟢)1.271s101.12x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)11/12
🐘 PostgresNext.js (Turbopack)7/12
▲ VercelNext.js (Turbopack)6/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres6/12
Next.js (Turbopack)💻 Local5/12
Nitro💻 Local5/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 Mar 11, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production571067638
✅ 💻 Local Development612084696
✅ 📦 Local Production612084696
✅ 🐘 Local Postgres612084696
✅ 🪟 Windows550358
❌ 🌍 Community Worlds1185615189
✅ 📋 Other147027174
Total2727563643147

❌ Failed Tests

🌍 Community Worlds (56 failed)

mongodb (3 failed):

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

redis (2 failed):

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

turso (51 failed):

  • addTenWorkflow
  • addTenWorkflow
  • wellKnownAgentWorkflow (.well-known/agent)
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • importedStepOnlyWorkflow
  • hookWorkflow
  • hookWorkflow is not resumable via public webhook endpoint
  • 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
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running
  • 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
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control)

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro5107
✅ example5107
✅ express5107
✅ fastify5107
✅ hono5107
✅ nextjs-turbopack5602
✅ nextjs-webpack5602
✅ nitro5107
✅ nuxt5107
✅ sveltekit5107
✅ vite5107
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4909
✅ express-stable4909
✅ fastify-stable4909
✅ hono-stable4909
✅ nextjs-turbopack-canary5503
✅ nextjs-turbopack-stable5503
✅ nextjs-webpack-canary5503
✅ nextjs-webpack-stable5503
✅ nitro-stable4909
✅ nuxt-stable4909
✅ sveltekit-stable4909
✅ vite-stable4909
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4909
✅ express-stable4909
✅ fastify-stable4909
✅ hono-stable4909
✅ nextjs-turbopack-canary5503
✅ nextjs-turbopack-stable5503
✅ nextjs-webpack-canary5503
✅ nextjs-webpack-stable5503
✅ nitro-stable4909
✅ nuxt-stable4909
✅ sveltekit-stable4909
✅ vite-stable4909
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4909
✅ express-stable4909
✅ fastify-stable4909
✅ hono-stable4909
✅ nextjs-turbopack-canary5503
✅ nextjs-turbopack-stable5503
✅ nextjs-webpack-canary5503
✅ nextjs-webpack-stable5503
✅ nitro-stable4909
✅ nuxt-stable4909
✅ sveltekit-stable4909
✅ vite-stable4909
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack5503
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev302
❌ mongodb5233
✅ redis-dev302
❌ redis5323
✅ turso-dev302
❌ turso4513
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4909
✅ e2e-local-postgres-nest-stable4909
✅ e2e-local-prod-nest-stable4909

📋 View full workflow run

@pranaygp
pranaygp marked this pull request as ready for review March 11, 2026 22:09
@pranaygp
pranaygp requested a review from a team as a code ownerMarch 11, 2026 22:09
CopilotAI review requested due to automatic review settings March 11, 2026 22:09

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an exists async getter to the Run runtime API to allow checking whether a workflow run is present without treating “not found” as an exception, along with unit tests and documentation updates.

Changes:

  • Add Run.exists: Promise<boolean> that returns false for WorkflowRunNotFoundError and rethrows other errors.
  • Add unit tests covering: run exists, run not found, and unexpected error cases.
  • Document the new getter in the getRun API reference and add a changeset.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

FileDescription
packages/core/src/runtime/run.tsAdds the new exists getter on Run.
packages/core/src/runtime/runs.test.tsAdds unit tests for Run.exists.
docs/content/docs/api-reference/workflow-api/get-run.mdxAdds an example showing how to use run.exists.
.changeset/add-run-exists-getter.mdPublishes the API change as a patch changeset.

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

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +120 to +129
get exists(): Promise<boolean> {
return this.world.runs
.get(this.runId)
.then(() => true)
.catch((error) => {
if (WorkflowRunNotFoundError.is(error)) {
return false;
}
throw error;
});

CopilotAIMar 11, 2026

Copy link

Choose a reason for hiding this comment

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

Run.exists calls world.runs.get(this.runId) without resolveData: 'none'. In this codebase the default resolveData is 'all' (e.g., world-local/world-vercel), so this existence check can unnecessarily fetch potentially large input/output payloads just to determine presence. Consider calling this.world.runs.get(this.runId, { resolveData: 'none' }) here (and anywhere else where only metadata is needed).

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

^ this. Good bot.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Done — now passing { resolveData: 'none' } to skip fetching input/output payloads since we only need to check existence.


### Check if a Run Exists

Use the `exists` getter to check whether a workflow run exists without throwing an error:

CopilotAIMar 11, 2026

Copy link

Choose a reason for hiding this comment

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

The docs say the exists getter checks whether a run exists "without throwing an error", but Run.exists only suppresses WorkflowRunNotFoundError and will still throw for other failures (e.g., transport/500s). Please tweak the wording to clarify it's "without throwing when the run is not found" (or similar) so readers don't assume it never throws.

Suggested change
Use the `exists` getter to check whether a workflow run exists without throwing an error:
Use the `exists` getter to check whether a workflow run exists without throwing when the run is not found:

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Updated — now says "without throwing when the run is not found".

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM aside from the comment about data resolution

Comment on lines +120 to +129
get exists(): Promise<boolean> {
return this.world.runs
.get(this.runId)
.then(() => true)
.catch((error) => {
if (WorkflowRunNotFoundError.is(error)) {
return false;
}
throw error;
});

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

^ this. Good bot.

…cs wording
Pass { resolveData: 'none' } to world.runs.get() in the exists getter
to skip fetching input/output payloads. Update docs to say "without
throwing when the run is not found" instead of "without throwing an error".
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pranaygp
pranaygp merged commit fb5a500 into mainMar 11, 2026
166 of 169 checks passed
@pranaygp
pranaygp deleted the feat/run-exists-getter branch March 11, 2026 23:19
pranaygp added a commit that referenced this pull request Mar 12, 2026
…ignal
* origin/main: (26 commits)
Fix flaky streamer test ENOENT when chunks directory does not exist yet (#1330)
Version Packages (beta) (#1325)
[web-shared] Improve workflow observability event list UX (#1337)
feat: add `exists` getter to `Run` class (#1336)
Support client-side tools in DurableAgent (#1329)
[world-postgres] [world-local] Execute Graphile jobs directly instead of defering to world-local queue (#1334)
Merge CLAUDE.md into AGENTS.md and symlink CLAUDE.md (#1326)
[web] Polish loading indicators (#1327)
Fix flaky webhookWorkflow e2e test by polling instead of fixed sleep (#1328)
feat: support `deploymentId: 'latest'` in `start()` to resolve most recent deployment (#1317)
Fix bug where the SWC compiler bug prunes step-only imports in the client-mode transformation
[web] [world-vercel] Ensure user-passed run IDs are URL encoded and call out self-hosted security (#1322)
Version Packages (beta) (#1306)
Remove hard-coded VERCEL_DEPLOYMENT_KEY from nextjs-turbopack workbench (#1319)
fix(web): move react-router deps to devDependencies (#1265)
fix(ai): use workspace:* for workflow peer dependency (#1320)
fix(core): pass resolved deploymentId to getEncryptionKeyForRun in start() (#1318)
fix: surface 429 rate-limit errors in e2e tests and CLI (#1309)
fix(world-local): return HTTP 200 instead of 503 for queue timeout re-enqueue signals (#1307)
[web-shared] [cli] Refactor observability data fetching (#1261)
...
# Conflicts:
#	packages/core/e2e/e2e.test.ts
#	packages/web-shared/src/components/sidebar/attribute-panel.tsx
#	workbench/example/workflows/99_e2e.ts
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

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

feat: add exists getter to Run class - #1336

Merged
pranaygp merged 2 commits into
mainfrom
feat/run-exists-getter
Mar 11, 2026
Merged

feat: add exists getter to Run class#1336
pranaygp merged 2 commits into
mainfrom
feat/run-exists-getter

Conversation

@pranaygp

Copy link
Copy Markdown
Contributor

Summary

  • Add an exists async getter to the Run class that returns true if the run is found, false for WorkflowRunNotFoundError, and re-throws other errors
  • Add tests for all three cases (exists, not found, other errors)
  • Add docs example showing the new getter in the getRun API reference

Test plan

  • Unit tests pass: pnpm vitest run packages/core/src/runtime/runs.test.ts (8 tests, 3 new)
  • CI passes

🤖 Generated with Claude Code

Allow checking if a workflow run exists without catching errors.
Returns `true` if the run is found, `false` for WorkflowRunNotFoundError,
and re-throws any other errors.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Mar 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0f9aff5

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

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

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

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

@github-actions

github-actionsBot commented Mar 11, 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.033s (-0.9%)1.005s (~)0.973s101.00x
💻 LocalNitro0.033s (~)1.006s (~)0.973s101.00x
💻 LocalNext.js (Turbopack)0.035s1.005s0.971s101.07x
🌐 RedisNext.js (Turbopack)0.048s (+12.1% 🔺)1.005s (~)0.957s101.48x
🐘 PostgresNext.js (Turbopack)0.051s1.011s0.960s101.57x
🐘 PostgresNitro0.053s (-4.2%)1.012s (~)0.959s101.63x
🐘 PostgresExpress0.053s (-0.9%)1.011s (~)0.958s101.63x
🌐 MongoDBNext.js (Turbopack)0.107s (+29.3% 🔺)1.008s (~)0.901s103.28x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.475s (-4.1%)2.293s (+7.3% 🔺)1.818s101.00x
▲ VercelExpress0.480s (+5.1% 🔺)2.335s (-2.2%)1.855s101.01x
▲ VercelNitro0.496s (-12.1% 🟢)2.338s (-2.0%)1.842s101.04x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.080s2.005s0.925s101.00x
💻 LocalNitro1.103s (~)2.007s (~)0.903s101.02x
💻 LocalExpress1.105s (~)2.005s (~)0.901s101.02x
🌐 RedisNext.js (Turbopack)1.114s (+1.6%)2.007s (~)0.893s101.03x
🐘 PostgresNext.js (Turbopack)1.125s2.012s0.886s101.04x
🐘 PostgresExpress1.127s (~)2.012s (~)0.885s101.04x
🐘 PostgresNitro1.138s (+0.5%)2.012s (~)0.874s101.05x
🌐 MongoDBNext.js (Turbopack)1.296s (-0.7%)2.008s (~)0.713s101.20x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.033s (-4.7%)3.688s (-2.0%)1.655s101.00x
▲ VercelNext.js (Turbopack)2.140s (+2.0%)3.845s (+7.8% 🔺)1.705s101.05x
▲ VercelNitro2.140s (+9.3% 🔺)3.646s (~)1.506s101.05x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.519s11.022s0.503s31.00x
🌐 RedisNext.js (Turbopack)10.727s (+0.6%)11.025s (~)0.298s31.02x
💻 LocalNitro10.780s (~)11.023s (~)0.243s31.02x
💻 LocalExpress10.786s (~)11.023s (~)0.237s31.03x
🐘 PostgresNext.js (Turbopack)10.797s11.040s0.243s31.03x
🐘 PostgresExpress10.831s (~)11.041s (~)0.209s31.03x
🐘 PostgresNitro10.877s (~)11.046s (~)0.169s31.03x
🌐 MongoDBNext.js (Turbopack)12.258s (+0.8%)13.022s (~)0.765s31.17x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.883s (-4.3%)18.520s (-4.1%)1.638s21.00x
▲ VercelNext.js (Turbopack)17.163s (+0.8%)18.531s (~)1.368s21.02x
▲ VercelNitro18.371s (+7.6% 🔺)20.803s (+10.8% 🔺)2.432s21.09x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)26.529s27.050s0.522s31.00x
🌐 RedisNext.js (Turbopack)26.675s (~)27.053s (~)0.379s31.01x
🐘 PostgresNext.js (Turbopack)26.865s27.062s0.197s31.01x
🐘 PostgresNitro26.918s (~)27.064s (-1.2%)0.147s31.01x
🐘 PostgresExpress26.994s (~)27.396s (+1.2%)0.402s31.02x
💻 LocalExpress27.245s (~)28.053s (~)0.808s31.03x
💻 LocalNitro27.302s (~)28.052s (~)0.750s31.03x
🌐 MongoDBNext.js (Turbopack)30.261s (~)31.031s (~)0.771s21.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)43.981s (-0.6%)45.621s (~)1.640s21.00x
▲ VercelExpress44.072s (+1.3%)45.644s (+1.1%)1.571s21.00x
▲ VercelNitro45.357s (-2.2%)46.825s (-3.2%)1.468s21.03x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)53.340s (~)54.101s (~)0.762s21.00x
🐘 PostgresNext.js (Turbopack)53.720s54.106s0.386s21.01x
🐘 PostgresNitro53.788s (~)54.100s (~)0.313s21.01x
🐘 PostgresExpress53.797s (~)54.107s (~)0.309s21.01x
💻 LocalNext.js (Turbopack)54.445s55.094s0.649s21.02x
💻 LocalNitro56.120s (~)57.102s (+1.8%)0.982s21.05x
💻 LocalExpress56.245s (~)57.098s (+1.8%)0.853s21.05x
🌐 MongoDBNext.js (Turbopack)60.477s (~)61.083s (~)0.606s21.13x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express91.067s (-8.6% 🟢)92.518s (-9.0% 🟢)1.451s11.00x
▲ VercelNext.js (Turbopack)93.443s (-9.0% 🟢)95.515s (-9.1% 🟢)2.072s11.03x
▲ VercelNitro93.610s (-1.3%)95.253s (-0.9%)1.643s11.03x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.249s (~)2.007s (~)0.758s151.00x
🐘 PostgresExpress1.361s (-1.6%)2.011s (~)0.650s151.09x
🐘 PostgresNext.js (Turbopack)1.365s2.011s0.645s151.09x
💻 LocalNext.js (Turbopack)1.381s2.006s0.625s151.11x
💻 LocalNitro1.396s (-1.1%)2.005s (~)0.609s151.12x
🐘 PostgresNitro1.400s (+1.5%)2.011s (~)0.611s151.12x
💻 LocalExpress1.422s (+1.0%)2.006s (~)0.584s151.14x
🌐 MongoDBNext.js (Turbopack)2.131s (+0.8%)3.008s (~)0.877s101.71x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.483s (-13.0% 🟢)4.615s (+4.4%)2.133s71.00x
▲ VercelNitro2.484s (-17.7% 🟢)4.322s (-5.5% 🟢)1.838s71.00x
▲ VercelExpress2.572s (-2.9%)4.032s (+1.6%)1.460s81.04x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.944s (-6.9% 🟢)2.478s (-1.5%)0.534s131.00x
🐘 PostgresExpress2.025s (+2.3%)2.598s (+3.3%)0.572s121.04x
🐘 PostgresNext.js (Turbopack)2.057s2.682s0.625s121.06x
💻 LocalNext.js (Turbopack)2.341s2.916s0.574s111.20x
🌐 RedisNext.js (Turbopack)2.578s (+3.4%)3.009s (~)0.431s101.33x
💻 LocalNitro2.609s (+1.0%)3.007s (~)0.398s101.34x
💻 LocalExpress2.621s (~)3.007s (~)0.387s101.35x
🌐 MongoDBNext.js (Turbopack)4.645s (-0.9%)5.177s (~)0.532s62.39x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.221s (+12.7% 🔺)4.628s (+7.4% 🔺)1.407s71.00x
▲ VercelNitro3.330s (+37.1% 🔺)4.522s (+18.7% 🔺)1.192s71.03x
▲ VercelExpress3.841s (+53.3% 🔺)5.132s (+39.2% 🔺)1.291s61.19x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.498s (-2.0%)4.306s (+0.8%)0.808s71.00x
🐘 PostgresNitro3.800s (-7.2% 🟢)4.451s (-6.2% 🟢)0.651s71.09x
🐘 PostgresNext.js (Turbopack)4.108s4.882s0.773s71.17x
🌐 RedisNext.js (Turbopack)4.140s (+2.5%)5.012s (+9.4% 🔺)0.872s61.18x
💻 LocalNext.js (Turbopack)6.420s6.815s0.395s51.84x
💻 LocalNitro7.418s (+1.9%)8.022s (~)0.604s42.12x
💻 LocalExpress7.627s (+2.0%)8.020s (~)0.393s42.18x
🌐 MongoDBNext.js (Turbopack)9.866s (-1.1%)10.349s (~)0.483s32.82x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.649s (-33.0% 🟢)3.791s (-38.9% 🟢)1.143s81.00x
▲ VercelExpress2.760s (-9.5% 🟢)7.697s (+70.1% 🔺)4.937s41.04x
▲ VercelNext.js (Turbopack)3.306s (-12.1% 🟢)5.045s (-21.5% 🟢)1.739s61.25x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.266s (+0.6%)2.007s (~)0.741s151.00x
🐘 PostgresNext.js (Turbopack)1.358s2.012s0.653s151.07x
💻 LocalNext.js (Turbopack)1.399s2.006s0.607s151.11x
🐘 PostgresExpress1.403s (+0.6%)2.011s (~)0.608s151.11x
🐘 PostgresNitro1.405s (+2.3%)2.011s (~)0.606s151.11x
💻 LocalNitro1.431s (~)2.005s (~)0.574s151.13x
💻 LocalExpress1.437s (+0.6%)2.006s (~)0.568s151.14x
🌐 MongoDBNext.js (Turbopack)2.123s (-3.5%)3.008s (~)0.885s101.68x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.122s (-12.7% 🟢)4.683s (+28.8% 🔺)2.562s71.00x
▲ VercelNitro2.177s (-28.1% 🟢)4.697s (-2.4%)2.520s71.03x
▲ VercelExpress2.328s (-7.4% 🟢)3.891s (-15.9% 🟢)1.562s81.10x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.960s (-6.3% 🟢)2.596s (+3.3%)0.636s121.00x
🐘 PostgresNitro1.985s (-4.5%)2.517s (~)0.532s121.01x
🐘 PostgresNext.js (Turbopack)2.095s2.680s0.585s121.07x
💻 LocalNext.js (Turbopack)2.441s2.917s0.476s111.25x
🌐 RedisNext.js (Turbopack)2.639s (+5.4% 🔺)3.109s (+3.3%)0.469s101.35x
💻 LocalExpress2.742s (+2.6%)3.009s (~)0.266s101.40x
💻 LocalNitro2.756s (+0.5%)3.008s (~)0.253s101.41x
🌐 MongoDBNext.js (Turbopack)4.797s (+2.7%)5.177s (~)0.380s62.45x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.452s (-12.4% 🟢)3.875s (-10.7% 🟢)1.423s81.00x
▲ VercelNext.js (Turbopack)2.552s (-3.5%)4.131s (+3.4%)1.579s81.04x
▲ VercelExpress2.699s (-13.4% 🟢)5.110s (+6.8% 🔺)2.411s61.10x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.003s (-8.2% 🟢)3.768s (-6.3% 🟢)0.765s81.00x
🐘 PostgresNext.js (Turbopack)3.625s4.593s0.967s71.21x
🐘 PostgresNitro3.799s (+10.4% 🔺)4.453s (+4.2%)0.655s71.26x
🌐 RedisNext.js (Turbopack)4.168s (+4.4%)5.013s (+6.1% 🔺)0.845s61.39x
💻 LocalNext.js (Turbopack)6.285s6.615s0.330s52.09x
💻 LocalNitro8.078s (~)8.771s (+2.9%)0.693s42.69x
💻 LocalExpress8.181s (+4.0%)9.022s (+12.5% 🔺)0.841s42.72x
🌐 MongoDBNext.js (Turbopack)9.926s (~)10.352s (~)0.426s33.30x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.881s (-7.9% 🟢)4.138s (-12.7% 🟢)1.257s81.00x
▲ VercelNitro3.032s (+6.5% 🔺)4.316s (+5.3% 🔺)1.284s71.05x
▲ VercelNext.js (Turbopack)3.609s (+26.3% 🔺)5.052s (+22.9% 🔺)1.443s71.25x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.111s1.001s0.009s1.015s0.904s101.00x
🌐 RedisNext.js (Turbopack)0.161s (+10.7% 🔺)1.000s (~)0.001s (-17.6% 🟢)1.008s (~)0.847s101.45x
💻 LocalNitro0.168s (-2.5%)1.003s (~)0.011s (-6.9% 🟢)1.016s (~)0.848s101.51x
💻 LocalExpress0.174s (~)1.003s (~)0.012s (+4.5%)1.018s (~)0.843s101.57x
🐘 PostgresNext.js (Turbopack)0.177s1.001s0.002s1.012s0.835s101.59x
🐘 PostgresExpress0.191s (-4.7%)0.995s (~)0.002s (+6.7% 🔺)1.012s (~)0.821s101.72x
🐘 PostgresNitro0.193s (-4.6%)0.991s (~)0.002s (+12.5% 🔺)1.012s (~)0.819s101.74x
🌐 MongoDBNext.js (Turbopack)0.512s (+12.5% 🔺)0.923s (-6.3% 🟢)0.002s (+7.1% 🔺)1.008s (~)0.496s104.61x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.484s (-15.0% 🟢)2.018s (-18.3% 🟢)0.013s (+123.3% 🔺)2.621s (-15.6% 🟢)1.138s101.00x
▲ VercelNitro1.501s (-7.8% 🟢)2.166s (-18.6% 🟢)0.005s (+1.9%)2.725s (-15.5% 🟢)1.224s101.01x
▲ VercelExpress1.659s (-3.8%)2.264s (-9.9% 🟢)0.005s (-2.0%)2.931s (-5.3% 🟢)1.271s101.12x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)11/12
🐘 PostgresNext.js (Turbopack)7/12
▲ VercelNext.js (Turbopack)6/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres6/12
Next.js (Turbopack)💻 Local5/12
Nitro💻 Local5/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 Mar 11, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production571067638
✅ 💻 Local Development612084696
✅ 📦 Local Production612084696
✅ 🐘 Local Postgres612084696
✅ 🪟 Windows550358
❌ 🌍 Community Worlds1185615189
✅ 📋 Other147027174
Total2727563643147

❌ Failed Tests

🌍 Community Worlds (56 failed)

mongodb (3 failed):

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

redis (2 failed):

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

turso (51 failed):

  • addTenWorkflow
  • addTenWorkflow
  • wellKnownAgentWorkflow (.well-known/agent)
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • importedStepOnlyWorkflow
  • hookWorkflow
  • hookWorkflow is not resumable via public webhook endpoint
  • 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
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running
  • 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
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control)

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro5107
✅ example5107
✅ express5107
✅ fastify5107
✅ hono5107
✅ nextjs-turbopack5602
✅ nextjs-webpack5602
✅ nitro5107
✅ nuxt5107
✅ sveltekit5107
✅ vite5107
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4909
✅ express-stable4909
✅ fastify-stable4909
✅ hono-stable4909
✅ nextjs-turbopack-canary5503
✅ nextjs-turbopack-stable5503
✅ nextjs-webpack-canary5503
✅ nextjs-webpack-stable5503
✅ nitro-stable4909
✅ nuxt-stable4909
✅ sveltekit-stable4909
✅ vite-stable4909
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4909
✅ express-stable4909
✅ fastify-stable4909
✅ hono-stable4909
✅ nextjs-turbopack-canary5503
✅ nextjs-turbopack-stable5503
✅ nextjs-webpack-canary5503
✅ nextjs-webpack-stable5503
✅ nitro-stable4909
✅ nuxt-stable4909
✅ sveltekit-stable4909
✅ vite-stable4909
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4909
✅ express-stable4909
✅ fastify-stable4909
✅ hono-stable4909
✅ nextjs-turbopack-canary5503
✅ nextjs-turbopack-stable5503
✅ nextjs-webpack-canary5503
✅ nextjs-webpack-stable5503
✅ nitro-stable4909
✅ nuxt-stable4909
✅ sveltekit-stable4909
✅ vite-stable4909
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack5503
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev302
❌ mongodb5233
✅ redis-dev302
❌ redis5323
✅ turso-dev302
❌ turso4513
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4909
✅ e2e-local-postgres-nest-stable4909
✅ e2e-local-prod-nest-stable4909

📋 View full workflow run

@pranaygp
pranaygp marked this pull request as ready for review March 11, 2026 22:09
@pranaygp
pranaygp requested a review from a team as a code ownerMarch 11, 2026 22:09
CopilotAI review requested due to automatic review settings March 11, 2026 22:09

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an exists async getter to the Run runtime API to allow checking whether a workflow run is present without treating “not found” as an exception, along with unit tests and documentation updates.

Changes:

  • Add Run.exists: Promise<boolean> that returns false for WorkflowRunNotFoundError and rethrows other errors.
  • Add unit tests covering: run exists, run not found, and unexpected error cases.
  • Document the new getter in the getRun API reference and add a changeset.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

FileDescription
packages/core/src/runtime/run.tsAdds the new exists getter on Run.
packages/core/src/runtime/runs.test.tsAdds unit tests for Run.exists.
docs/content/docs/api-reference/workflow-api/get-run.mdxAdds an example showing how to use run.exists.
.changeset/add-run-exists-getter.mdPublishes the API change as a patch changeset.

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

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +120 to +129
get exists(): Promise<boolean> {
return this.world.runs
.get(this.runId)
.then(() => true)
.catch((error) => {
if (WorkflowRunNotFoundError.is(error)) {
return false;
}
throw error;
});

CopilotAIMar 11, 2026

Copy link

Choose a reason for hiding this comment

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

Run.exists calls world.runs.get(this.runId) without resolveData: 'none'. In this codebase the default resolveData is 'all' (e.g., world-local/world-vercel), so this existence check can unnecessarily fetch potentially large input/output payloads just to determine presence. Consider calling this.world.runs.get(this.runId, { resolveData: 'none' }) here (and anywhere else where only metadata is needed).

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

^ this. Good bot.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Done — now passing { resolveData: 'none' } to skip fetching input/output payloads since we only need to check existence.


### Check if a Run Exists

Use the `exists` getter to check whether a workflow run exists without throwing an error:

CopilotAIMar 11, 2026

Copy link

Choose a reason for hiding this comment

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

The docs say the exists getter checks whether a run exists "without throwing an error", but Run.exists only suppresses WorkflowRunNotFoundError and will still throw for other failures (e.g., transport/500s). Please tweak the wording to clarify it's "without throwing when the run is not found" (or similar) so readers don't assume it never throws.

Suggested change
Use the `exists` getter to check whether a workflow run exists without throwing an error:
Use the `exists` getter to check whether a workflow run exists without throwing when the run is not found:

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Updated — now says "without throwing when the run is not found".

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM aside from the comment about data resolution

Comment on lines +120 to +129
get exists(): Promise<boolean> {
return this.world.runs
.get(this.runId)
.then(() => true)
.catch((error) => {
if (WorkflowRunNotFoundError.is(error)) {
return false;
}
throw error;
});

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

^ this. Good bot.

…cs wording
Pass { resolveData: 'none' } to world.runs.get() in the exists getter
to skip fetching input/output payloads. Update docs to say "without
throwing when the run is not found" instead of "without throwing an error".
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pranaygp
pranaygp merged commit fb5a500 into mainMar 11, 2026
166 of 169 checks passed
@pranaygp
pranaygp deleted the feat/run-exists-getter branch March 11, 2026 23:19
pranaygp added a commit that referenced this pull request Mar 12, 2026
…ignal
* origin/main: (26 commits)
Fix flaky streamer test ENOENT when chunks directory does not exist yet (#1330)
Version Packages (beta) (#1325)
[web-shared] Improve workflow observability event list UX (#1337)
feat: add `exists` getter to `Run` class (#1336)
Support client-side tools in DurableAgent (#1329)
[world-postgres] [world-local] Execute Graphile jobs directly instead of defering to world-local queue (#1334)
Merge CLAUDE.md into AGENTS.md and symlink CLAUDE.md (#1326)
[web] Polish loading indicators (#1327)
Fix flaky webhookWorkflow e2e test by polling instead of fixed sleep (#1328)
feat: support `deploymentId: 'latest'` in `start()` to resolve most recent deployment (#1317)
Fix bug where the SWC compiler bug prunes step-only imports in the client-mode transformation
[web] [world-vercel] Ensure user-passed run IDs are URL encoded and call out self-hosted security (#1322)
Version Packages (beta) (#1306)
Remove hard-coded VERCEL_DEPLOYMENT_KEY from nextjs-turbopack workbench (#1319)
fix(web): move react-router deps to devDependencies (#1265)
fix(ai): use workspace:* for workflow peer dependency (#1320)
fix(core): pass resolved deploymentId to getEncryptionKeyForRun in start() (#1318)
fix: surface 429 rate-limit errors in e2e tests and CLI (#1309)
fix(world-local): return HTTP 200 instead of 503 for queue timeout re-enqueue signals (#1307)
[web-shared] [cli] Refactor observability data fetching (#1261)
...
# Conflicts:
#	packages/core/e2e/e2e.test.ts
#	packages/web-shared/src/components/sidebar/attribute-panel.tsx
#	workbench/example/workflows/99_e2e.ts
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

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

feat: add exists getter to Run class - #1336

Merged
pranaygp merged 2 commits into
mainfrom
feat/run-exists-getter
Mar 11, 2026
Merged

feat: add exists getter to Run class#1336
pranaygp merged 2 commits into
mainfrom
feat/run-exists-getter

Conversation

@pranaygp

Copy link
Copy Markdown
Contributor

Summary

  • Add an exists async getter to the Run class that returns true if the run is found, false for WorkflowRunNotFoundError, and re-throws other errors
  • Add tests for all three cases (exists, not found, other errors)
  • Add docs example showing the new getter in the getRun API reference

Test plan

  • Unit tests pass: pnpm vitest run packages/core/src/runtime/runs.test.ts (8 tests, 3 new)
  • CI passes

🤖 Generated with Claude Code

Allow checking if a workflow run exists without catching errors.
Returns `true` if the run is found, `false` for WorkflowRunNotFoundError,
and re-throws any other errors.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Mar 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0f9aff5

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

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

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

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

@github-actions

github-actionsBot commented Mar 11, 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.033s (-0.9%)1.005s (~)0.973s101.00x
💻 LocalNitro0.033s (~)1.006s (~)0.973s101.00x
💻 LocalNext.js (Turbopack)0.035s1.005s0.971s101.07x
🌐 RedisNext.js (Turbopack)0.048s (+12.1% 🔺)1.005s (~)0.957s101.48x
🐘 PostgresNext.js (Turbopack)0.051s1.011s0.960s101.57x
🐘 PostgresNitro0.053s (-4.2%)1.012s (~)0.959s101.63x
🐘 PostgresExpress0.053s (-0.9%)1.011s (~)0.958s101.63x
🌐 MongoDBNext.js (Turbopack)0.107s (+29.3% 🔺)1.008s (~)0.901s103.28x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.475s (-4.1%)2.293s (+7.3% 🔺)1.818s101.00x
▲ VercelExpress0.480s (+5.1% 🔺)2.335s (-2.2%)1.855s101.01x
▲ VercelNitro0.496s (-12.1% 🟢)2.338s (-2.0%)1.842s101.04x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.080s2.005s0.925s101.00x
💻 LocalNitro1.103s (~)2.007s (~)0.903s101.02x
💻 LocalExpress1.105s (~)2.005s (~)0.901s101.02x
🌐 RedisNext.js (Turbopack)1.114s (+1.6%)2.007s (~)0.893s101.03x
🐘 PostgresNext.js (Turbopack)1.125s2.012s0.886s101.04x
🐘 PostgresExpress1.127s (~)2.012s (~)0.885s101.04x
🐘 PostgresNitro1.138s (+0.5%)2.012s (~)0.874s101.05x
🌐 MongoDBNext.js (Turbopack)1.296s (-0.7%)2.008s (~)0.713s101.20x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.033s (-4.7%)3.688s (-2.0%)1.655s101.00x
▲ VercelNext.js (Turbopack)2.140s (+2.0%)3.845s (+7.8% 🔺)1.705s101.05x
▲ VercelNitro2.140s (+9.3% 🔺)3.646s (~)1.506s101.05x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.519s11.022s0.503s31.00x
🌐 RedisNext.js (Turbopack)10.727s (+0.6%)11.025s (~)0.298s31.02x
💻 LocalNitro10.780s (~)11.023s (~)0.243s31.02x
💻 LocalExpress10.786s (~)11.023s (~)0.237s31.03x
🐘 PostgresNext.js (Turbopack)10.797s11.040s0.243s31.03x
🐘 PostgresExpress10.831s (~)11.041s (~)0.209s31.03x
🐘 PostgresNitro10.877s (~)11.046s (~)0.169s31.03x
🌐 MongoDBNext.js (Turbopack)12.258s (+0.8%)13.022s (~)0.765s31.17x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.883s (-4.3%)18.520s (-4.1%)1.638s21.00x
▲ VercelNext.js (Turbopack)17.163s (+0.8%)18.531s (~)1.368s21.02x
▲ VercelNitro18.371s (+7.6% 🔺)20.803s (+10.8% 🔺)2.432s21.09x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)26.529s27.050s0.522s31.00x
🌐 RedisNext.js (Turbopack)26.675s (~)27.053s (~)0.379s31.01x
🐘 PostgresNext.js (Turbopack)26.865s27.062s0.197s31.01x
🐘 PostgresNitro26.918s (~)27.064s (-1.2%)0.147s31.01x
🐘 PostgresExpress26.994s (~)27.396s (+1.2%)0.402s31.02x
💻 LocalExpress27.245s (~)28.053s (~)0.808s31.03x
💻 LocalNitro27.302s (~)28.052s (~)0.750s31.03x
🌐 MongoDBNext.js (Turbopack)30.261s (~)31.031s (~)0.771s21.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)43.981s (-0.6%)45.621s (~)1.640s21.00x
▲ VercelExpress44.072s (+1.3%)45.644s (+1.1%)1.571s21.00x
▲ VercelNitro45.357s (-2.2%)46.825s (-3.2%)1.468s21.03x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)53.340s (~)54.101s (~)0.762s21.00x
🐘 PostgresNext.js (Turbopack)53.720s54.106s0.386s21.01x
🐘 PostgresNitro53.788s (~)54.100s (~)0.313s21.01x
🐘 PostgresExpress53.797s (~)54.107s (~)0.309s21.01x
💻 LocalNext.js (Turbopack)54.445s55.094s0.649s21.02x
💻 LocalNitro56.120s (~)57.102s (+1.8%)0.982s21.05x
💻 LocalExpress56.245s (~)57.098s (+1.8%)0.853s21.05x
🌐 MongoDBNext.js (Turbopack)60.477s (~)61.083s (~)0.606s21.13x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express91.067s (-8.6% 🟢)92.518s (-9.0% 🟢)1.451s11.00x
▲ VercelNext.js (Turbopack)93.443s (-9.0% 🟢)95.515s (-9.1% 🟢)2.072s11.03x
▲ VercelNitro93.610s (-1.3%)95.253s (-0.9%)1.643s11.03x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.249s (~)2.007s (~)0.758s151.00x
🐘 PostgresExpress1.361s (-1.6%)2.011s (~)0.650s151.09x
🐘 PostgresNext.js (Turbopack)1.365s2.011s0.645s151.09x
💻 LocalNext.js (Turbopack)1.381s2.006s0.625s151.11x
💻 LocalNitro1.396s (-1.1%)2.005s (~)0.609s151.12x
🐘 PostgresNitro1.400s (+1.5%)2.011s (~)0.611s151.12x
💻 LocalExpress1.422s (+1.0%)2.006s (~)0.584s151.14x
🌐 MongoDBNext.js (Turbopack)2.131s (+0.8%)3.008s (~)0.877s101.71x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.483s (-13.0% 🟢)4.615s (+4.4%)2.133s71.00x
▲ VercelNitro2.484s (-17.7% 🟢)4.322s (-5.5% 🟢)1.838s71.00x
▲ VercelExpress2.572s (-2.9%)4.032s (+1.6%)1.460s81.04x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.944s (-6.9% 🟢)2.478s (-1.5%)0.534s131.00x
🐘 PostgresExpress2.025s (+2.3%)2.598s (+3.3%)0.572s121.04x
🐘 PostgresNext.js (Turbopack)2.057s2.682s0.625s121.06x
💻 LocalNext.js (Turbopack)2.341s2.916s0.574s111.20x
🌐 RedisNext.js (Turbopack)2.578s (+3.4%)3.009s (~)0.431s101.33x
💻 LocalNitro2.609s (+1.0%)3.007s (~)0.398s101.34x
💻 LocalExpress2.621s (~)3.007s (~)0.387s101.35x
🌐 MongoDBNext.js (Turbopack)4.645s (-0.9%)5.177s (~)0.532s62.39x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.221s (+12.7% 🔺)4.628s (+7.4% 🔺)1.407s71.00x
▲ VercelNitro3.330s (+37.1% 🔺)4.522s (+18.7% 🔺)1.192s71.03x
▲ VercelExpress3.841s (+53.3% 🔺)5.132s (+39.2% 🔺)1.291s61.19x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.498s (-2.0%)4.306s (+0.8%)0.808s71.00x
🐘 PostgresNitro3.800s (-7.2% 🟢)4.451s (-6.2% 🟢)0.651s71.09x
🐘 PostgresNext.js (Turbopack)4.108s4.882s0.773s71.17x
🌐 RedisNext.js (Turbopack)4.140s (+2.5%)5.012s (+9.4% 🔺)0.872s61.18x
💻 LocalNext.js (Turbopack)6.420s6.815s0.395s51.84x
💻 LocalNitro7.418s (+1.9%)8.022s (~)0.604s42.12x
💻 LocalExpress7.627s (+2.0%)8.020s (~)0.393s42.18x
🌐 MongoDBNext.js (Turbopack)9.866s (-1.1%)10.349s (~)0.483s32.82x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.649s (-33.0% 🟢)3.791s (-38.9% 🟢)1.143s81.00x
▲ VercelExpress2.760s (-9.5% 🟢)7.697s (+70.1% 🔺)4.937s41.04x
▲ VercelNext.js (Turbopack)3.306s (-12.1% 🟢)5.045s (-21.5% 🟢)1.739s61.25x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.266s (+0.6%)2.007s (~)0.741s151.00x
🐘 PostgresNext.js (Turbopack)1.358s2.012s0.653s151.07x
💻 LocalNext.js (Turbopack)1.399s2.006s0.607s151.11x
🐘 PostgresExpress1.403s (+0.6%)2.011s (~)0.608s151.11x
🐘 PostgresNitro1.405s (+2.3%)2.011s (~)0.606s151.11x
💻 LocalNitro1.431s (~)2.005s (~)0.574s151.13x
💻 LocalExpress1.437s (+0.6%)2.006s (~)0.568s151.14x
🌐 MongoDBNext.js (Turbopack)2.123s (-3.5%)3.008s (~)0.885s101.68x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.122s (-12.7% 🟢)4.683s (+28.8% 🔺)2.562s71.00x
▲ VercelNitro2.177s (-28.1% 🟢)4.697s (-2.4%)2.520s71.03x
▲ VercelExpress2.328s (-7.4% 🟢)3.891s (-15.9% 🟢)1.562s81.10x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.960s (-6.3% 🟢)2.596s (+3.3%)0.636s121.00x
🐘 PostgresNitro1.985s (-4.5%)2.517s (~)0.532s121.01x
🐘 PostgresNext.js (Turbopack)2.095s2.680s0.585s121.07x
💻 LocalNext.js (Turbopack)2.441s2.917s0.476s111.25x
🌐 RedisNext.js (Turbopack)2.639s (+5.4% 🔺)3.109s (+3.3%)0.469s101.35x
💻 LocalExpress2.742s (+2.6%)3.009s (~)0.266s101.40x
💻 LocalNitro2.756s (+0.5%)3.008s (~)0.253s101.41x
🌐 MongoDBNext.js (Turbopack)4.797s (+2.7%)5.177s (~)0.380s62.45x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.452s (-12.4% 🟢)3.875s (-10.7% 🟢)1.423s81.00x
▲ VercelNext.js (Turbopack)2.552s (-3.5%)4.131s (+3.4%)1.579s81.04x
▲ VercelExpress2.699s (-13.4% 🟢)5.110s (+6.8% 🔺)2.411s61.10x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.003s (-8.2% 🟢)3.768s (-6.3% 🟢)0.765s81.00x
🐘 PostgresNext.js (Turbopack)3.625s4.593s0.967s71.21x
🐘 PostgresNitro3.799s (+10.4% 🔺)4.453s (+4.2%)0.655s71.26x
🌐 RedisNext.js (Turbopack)4.168s (+4.4%)5.013s (+6.1% 🔺)0.845s61.39x
💻 LocalNext.js (Turbopack)6.285s6.615s0.330s52.09x
💻 LocalNitro8.078s (~)8.771s (+2.9%)0.693s42.69x
💻 LocalExpress8.181s (+4.0%)9.022s (+12.5% 🔺)0.841s42.72x
🌐 MongoDBNext.js (Turbopack)9.926s (~)10.352s (~)0.426s33.30x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.881s (-7.9% 🟢)4.138s (-12.7% 🟢)1.257s81.00x
▲ VercelNitro3.032s (+6.5% 🔺)4.316s (+5.3% 🔺)1.284s71.05x
▲ VercelNext.js (Turbopack)3.609s (+26.3% 🔺)5.052s (+22.9% 🔺)1.443s71.25x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.111s1.001s0.009s1.015s0.904s101.00x
🌐 RedisNext.js (Turbopack)0.161s (+10.7% 🔺)1.000s (~)0.001s (-17.6% 🟢)1.008s (~)0.847s101.45x
💻 LocalNitro0.168s (-2.5%)1.003s (~)0.011s (-6.9% 🟢)1.016s (~)0.848s101.51x
💻 LocalExpress0.174s (~)1.003s (~)0.012s (+4.5%)1.018s (~)0.843s101.57x
🐘 PostgresNext.js (Turbopack)0.177s1.001s0.002s1.012s0.835s101.59x
🐘 PostgresExpress0.191s (-4.7%)0.995s (~)0.002s (+6.7% 🔺)1.012s (~)0.821s101.72x
🐘 PostgresNitro0.193s (-4.6%)0.991s (~)0.002s (+12.5% 🔺)1.012s (~)0.819s101.74x
🌐 MongoDBNext.js (Turbopack)0.512s (+12.5% 🔺)0.923s (-6.3% 🟢)0.002s (+7.1% 🔺)1.008s (~)0.496s104.61x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.484s (-15.0% 🟢)2.018s (-18.3% 🟢)0.013s (+123.3% 🔺)2.621s (-15.6% 🟢)1.138s101.00x
▲ VercelNitro1.501s (-7.8% 🟢)2.166s (-18.6% 🟢)0.005s (+1.9%)2.725s (-15.5% 🟢)1.224s101.01x
▲ VercelExpress1.659s (-3.8%)2.264s (-9.9% 🟢)0.005s (-2.0%)2.931s (-5.3% 🟢)1.271s101.12x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)11/12
🐘 PostgresNext.js (Turbopack)7/12
▲ VercelNext.js (Turbopack)6/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres6/12
Next.js (Turbopack)💻 Local5/12
Nitro💻 Local5/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 Mar 11, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production571067638
✅ 💻 Local Development612084696
✅ 📦 Local Production612084696
✅ 🐘 Local Postgres612084696
✅ 🪟 Windows550358
❌ 🌍 Community Worlds1185615189
✅ 📋 Other147027174
Total2727563643147

❌ Failed Tests

🌍 Community Worlds (56 failed)

mongodb (3 failed):

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

redis (2 failed):

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

turso (51 failed):

  • addTenWorkflow
  • addTenWorkflow
  • wellKnownAgentWorkflow (.well-known/agent)
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • importedStepOnlyWorkflow
  • hookWorkflow
  • hookWorkflow is not resumable via public webhook endpoint
  • 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
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running
  • 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
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control)

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro5107
✅ example5107
✅ express5107
✅ fastify5107
✅ hono5107
✅ nextjs-turbopack5602
✅ nextjs-webpack5602
✅ nitro5107
✅ nuxt5107
✅ sveltekit5107
✅ vite5107
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4909
✅ express-stable4909
✅ fastify-stable4909
✅ hono-stable4909
✅ nextjs-turbopack-canary5503
✅ nextjs-turbopack-stable5503
✅ nextjs-webpack-canary5503
✅ nextjs-webpack-stable5503
✅ nitro-stable4909
✅ nuxt-stable4909
✅ sveltekit-stable4909
✅ vite-stable4909
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4909
✅ express-stable4909
✅ fastify-stable4909
✅ hono-stable4909
✅ nextjs-turbopack-canary5503
✅ nextjs-turbopack-stable5503
✅ nextjs-webpack-canary5503
✅ nextjs-webpack-stable5503
✅ nitro-stable4909
✅ nuxt-stable4909
✅ sveltekit-stable4909
✅ vite-stable4909
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4909
✅ express-stable4909
✅ fastify-stable4909
✅ hono-stable4909
✅ nextjs-turbopack-canary5503
✅ nextjs-turbopack-stable5503
✅ nextjs-webpack-canary5503
✅ nextjs-webpack-stable5503
✅ nitro-stable4909
✅ nuxt-stable4909
✅ sveltekit-stable4909
✅ vite-stable4909
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack5503
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev302
❌ mongodb5233
✅ redis-dev302
❌ redis5323
✅ turso-dev302
❌ turso4513
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4909
✅ e2e-local-postgres-nest-stable4909
✅ e2e-local-prod-nest-stable4909

📋 View full workflow run

@pranaygp
pranaygp marked this pull request as ready for review March 11, 2026 22:09
@pranaygp
pranaygp requested a review from a team as a code ownerMarch 11, 2026 22:09
CopilotAI review requested due to automatic review settings March 11, 2026 22:09

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an exists async getter to the Run runtime API to allow checking whether a workflow run is present without treating “not found” as an exception, along with unit tests and documentation updates.

Changes:

  • Add Run.exists: Promise<boolean> that returns false for WorkflowRunNotFoundError and rethrows other errors.
  • Add unit tests covering: run exists, run not found, and unexpected error cases.
  • Document the new getter in the getRun API reference and add a changeset.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

FileDescription
packages/core/src/runtime/run.tsAdds the new exists getter on Run.
packages/core/src/runtime/runs.test.tsAdds unit tests for Run.exists.
docs/content/docs/api-reference/workflow-api/get-run.mdxAdds an example showing how to use run.exists.
.changeset/add-run-exists-getter.mdPublishes the API change as a patch changeset.

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

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +120 to +129
get exists(): Promise<boolean> {
return this.world.runs
.get(this.runId)
.then(() => true)
.catch((error) => {
if (WorkflowRunNotFoundError.is(error)) {
return false;
}
throw error;
});

CopilotAIMar 11, 2026

Copy link

Choose a reason for hiding this comment

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

Run.exists calls world.runs.get(this.runId) without resolveData: 'none'. In this codebase the default resolveData is 'all' (e.g., world-local/world-vercel), so this existence check can unnecessarily fetch potentially large input/output payloads just to determine presence. Consider calling this.world.runs.get(this.runId, { resolveData: 'none' }) here (and anywhere else where only metadata is needed).

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

^ this. Good bot.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Done — now passing { resolveData: 'none' } to skip fetching input/output payloads since we only need to check existence.


### Check if a Run Exists

Use the `exists` getter to check whether a workflow run exists without throwing an error:

CopilotAIMar 11, 2026

Copy link

Choose a reason for hiding this comment

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

The docs say the exists getter checks whether a run exists "without throwing an error", but Run.exists only suppresses WorkflowRunNotFoundError and will still throw for other failures (e.g., transport/500s). Please tweak the wording to clarify it's "without throwing when the run is not found" (or similar) so readers don't assume it never throws.

Suggested change
Use the `exists` getter to check whether a workflow run exists without throwing an error:
Use the `exists` getter to check whether a workflow run exists without throwing when the run is not found:

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Updated — now says "without throwing when the run is not found".

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM aside from the comment about data resolution

Comment on lines +120 to +129
get exists(): Promise<boolean> {
return this.world.runs
.get(this.runId)
.then(() => true)
.catch((error) => {
if (WorkflowRunNotFoundError.is(error)) {
return false;
}
throw error;
});

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

^ this. Good bot.

…cs wording
Pass { resolveData: 'none' } to world.runs.get() in the exists getter
to skip fetching input/output payloads. Update docs to say "without
throwing when the run is not found" instead of "without throwing an error".
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pranaygp
pranaygp merged commit fb5a500 into mainMar 11, 2026
166 of 169 checks passed
@pranaygp
pranaygp deleted the feat/run-exists-getter branch March 11, 2026 23:19
pranaygp added a commit that referenced this pull request Mar 12, 2026
…ignal
* origin/main: (26 commits)
Fix flaky streamer test ENOENT when chunks directory does not exist yet (#1330)
Version Packages (beta) (#1325)
[web-shared] Improve workflow observability event list UX (#1337)
feat: add `exists` getter to `Run` class (#1336)
Support client-side tools in DurableAgent (#1329)
[world-postgres] [world-local] Execute Graphile jobs directly instead of defering to world-local queue (#1334)
Merge CLAUDE.md into AGENTS.md and symlink CLAUDE.md (#1326)
[web] Polish loading indicators (#1327)
Fix flaky webhookWorkflow e2e test by polling instead of fixed sleep (#1328)
feat: support `deploymentId: 'latest'` in `start()` to resolve most recent deployment (#1317)
Fix bug where the SWC compiler bug prunes step-only imports in the client-mode transformation
[web] [world-vercel] Ensure user-passed run IDs are URL encoded and call out self-hosted security (#1322)
Version Packages (beta) (#1306)
Remove hard-coded VERCEL_DEPLOYMENT_KEY from nextjs-turbopack workbench (#1319)
fix(web): move react-router deps to devDependencies (#1265)
fix(ai): use workspace:* for workflow peer dependency (#1320)
fix(core): pass resolved deploymentId to getEncryptionKeyForRun in start() (#1318)
fix: surface 429 rate-limit errors in e2e tests and CLI (#1309)
fix(world-local): return HTTP 200 instead of 503 for queue timeout re-enqueue signals (#1307)
[web-shared] [cli] Refactor observability data fetching (#1261)
...
# Conflicts:
#	packages/core/e2e/e2e.test.ts
#	packages/web-shared/src/components/sidebar/attribute-panel.tsx
#	workbench/example/workflows/99_e2e.ts
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@pranaygp@TooTallNate@VaguelySerious