Skip to content

Backport #4326: [core] Fix Run.returnValue retrying its accessor step for a terminal run - #4346

Merged
VaguelySerious merged 1 commit into
stablefrom
backport/pr-4326-to-stable
Sep 24, 2026
Merged

VaguelySerious merged 1 commit into
stablefrom
backport/pr-4326-to-stable

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Automated backport of #4326 to stable (backport job run).

AI recommendation: This is a correctness bug fix: WorkflowRunFailedError and WorkflowRunCancelledError were treated as transient, so await run.returnValue on an already-terminal run burned its full retry budget re-reading an immutable record and ultimately surfaced a retry-exhaustion FatalError wrapper instead of the documented error class. Both classes and the FatalError.is() own-property gate already exist on stable (verified in packages/errors/src/index.ts), so the defect affects the maintenance line. The commit is fix + tests + doc corrections only, with no new API surface (the two changed v5 error doc pages don't exist on stable, so that part may simply be dropped during the cherry-pick).

Merge conflicts were resolved by AI (opencode with anthropic/claude-opus-5). Please review the conflict resolution carefully before merging.

…run (#4326)

Signed-off-by: Pranay Prakash <pranay.gp@gmail.com>
@changeset-bot

changeset-bot Bot commented Sep 24, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7d226ff

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

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

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

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

@vercel

vercel Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
example-nextjs-workflow-turbopack Ready Ready Preview, v0 Sep 24, 2026 12:23am UTC
example-nextjs-workflow-webpack Ready Ready Preview, v0 Sep 24, 2026 12:23am UTC
example-workflow Ready Ready Preview, v0 Sep 24, 2026 12:23am UTC
workbench-astro-workflow Ready Ready Preview, v0 Sep 24, 2026 12:23am UTC
workbench-express-workflow Ready Ready Preview, v0 Sep 24, 2026 12:23am UTC
workbench-fastify-workflow Ready Ready Preview, v0 Sep 24, 2026 12:23am UTC
workbench-hono-workflow Ready Ready Preview, v0 Sep 24, 2026 12:23am UTC
workbench-nestjs-workflow Ready Ready Preview, v0 Sep 24, 2026 12:23am UTC
workbench-nitro-workflow Ready Ready Preview, v0 Sep 24, 2026 12:23am UTC
workbench-nuxt-workflow Ready Ready Preview, v0 Sep 24, 2026 12:23am UTC
workbench-python-workflow Error Error v0 Sep 24, 2026 12:23am UTC
workbench-sveltekit-workflow Ready Ready Preview, v0 Sep 24, 2026 12:23am UTC
workbench-tanstack-start-workflow Ready Ready Preview, v0 Sep 24, 2026 12:23am UTC
workbench-vite-workflow Ready Ready Preview, v0 Sep 24, 2026 12:23am UTC
workflow-docs Ready Ready Preview, v0 Sep 24, 2026 12:23am UTC
workflow-swc-playground Ready Ready Preview, v0 Sep 24, 2026 12:23am UTC
workflow-tarballs Ready Ready Preview, v0 Sep 24, 2026 12:23am UTC
workflow-web Ready Ready Preview, v0 Sep 24, 2026 12:23am UTC

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor Author

🧪 E2E Test Results

❌ Some tests failed

Summary

Passed Failed Skipped Total
✅ ▲ Vercel Production 1099 0 78 1177
✅ 💻 Local Development 1198 0 86 1284
✅ 📦 Local Production 1198 0 86 1284
✅ 🐘 Local Postgres 1198 0 86 1284
✅ 🪟 Windows 107 0 0 107
❌ 🌍 Community Worlds 82 106 9 197
✅ 📋 Other 606 0 36 642
Total 5488 106 381 5975

❌ Failed Tests

🌍 Community Worlds (106 failed)

redis (21 failed):

  • hookWorkflow | wrun_01M3ACSJZ6S4SNMV9KTZGZA9TC
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01M3ACSTG3FRD6X3GQGR8H15VB
  • parallelStepsThenWebhookWorkflow - no hook_conflict from same-tick replay race | wrun_01M3ACT3RRNH1NYAKYDHV3FP2S
  • sleepingWorkflow | wrun_01M3ACV28KWT5Y8WBC6Q6E94DS
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • error handling serialization failures step-argument serialization failure is catchable in workflow code
  • error handling serialization failures uncaught step-argument serialization failure fails the run as USER_ERROR without redelivery retries
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01M3AD2M70AHQ88EEADBM481SG
  • hookGetConflictWorkflow - awaiting hook.getConflict() registers hook without payload | wrun_01M3AD2YGNMYGFCCV39TBE0SKJ
  • hookGetConflictThenStepParallelWorkflow - hook.getConflict() continuation step runs alongside other steps | wrun_01M3AD35BA4QSBJVFRG2TJPC8A
  • hookGetConflictWorkflow - hook.getConflict() resolves with the conflicting run when token is already registered | wrun_01M3AD3JV1A9FZ0207R3EDJYNG
  • hookClaimOnlyMutexWorkflow - hook works as a pure run mutex without payload data | wrun_01M3AD4C3X13F8ZTKDWV2SZARN
  • hookAdoptOwnerResultWorkflow - duplicate adopts the owner result via conflict.returnValue | wrun_01M3AD4F6TBPP8PXM3NGVS96EJ
  • hookSignalOwnerWorkflow - duplicate forwards its payload to the owner via resumeHook | wrun_01M3AD4KZ90EFVGB0T3VX3PMVG
  • hookSupersedeOwnerWorkflow - duplicate cancels the owner and claims the released token | wrun_01M3AD4S8KY68EKWTK07PZ0B6B
  • resume-or-start route pattern - resumeHook retried after start() reaches the new run | wrun_01M3AD516860KCN6ZV079XK095
  • pages router sleepingWorkflow via pages router
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01M3AD9T7YP17ZFWFK0CSV0SRV

turso (85 failed):

  • addTenWorkflow | wrun_01M3ACRFBNSNEYP4HMCCVKTFXJ
  • addTenWorkflow | wrun_01M3ACRFBNSNEYP4HMCCVKTFXJ
  • deploymentId: 'latest' is a no-op in non-Vercel worlds
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01M3ACRWK5410BJQ10RA5FDXZ2
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01M3ACRPGC71X8JFTFFE91DSWP
  • promiseRaceWorkflow | wrun_01M3ACRW2BAK5X56GZBM1GFBCC
  • promiseAnyWorkflow | wrun_01M3ACS0F6N9WRG1S4A4G055MN
  • importedStepOnlyWorkflow | wrun_01M3ACS70FG66P0P65PPN0PBX0
  • readableStreamWorkflow | wrun_01M3ACS2HYMS187C4KT2PMFDN6
  • hookWorkflow | wrun_01M3ACSJZ6S4SNMV9KTZGZA9TC
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01M3ACSTG3FRD6X3GQGR8H15VB
  • webhookWorkflow | wrun_01M3ACSYDBW45T6KA7ET71V41T
  • parallelStepsThenWebhookWorkflow - no hook_conflict from same-tick replay race | wrun_01M3ACT3RRNH1NYAKYDHV3FP2S
  • sleepingWorkflow | wrun_01M3ACV28KWT5Y8WBC6Q6E94DS
  • parallelSleepWorkflow | wrun_01M3ACVHJJX4JYWJXQ528ZY2HV
  • sleepWinsRaceWorkflow | wrun_01M3ACVMYPQ8Z9FBNADVSQ0C57
  • stepWinsRaceWorkflow | wrun_01M3ACVR61XP6JR1G02HQME06D
  • nullByteWorkflow | wrun_01M3ACVVAWQEGRW7AK5GBZWQM6
  • workflowAndStepMetadataWorkflow | wrun_01M3ACVXF14TKJRF1DAJY4JY1S
  • outputStreamWorkflow no startIndex (reads all chunks)
  • outputStreamWorkflow positive startIndex (skips first chunk)
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions | wrun_01M3ACY6PM3TN09SWY4FR0PYAB
  • writableForwardedFromWorkflowWorkflow | wrun_01M3ACYJXHWMT95JSA7KZXSZDA
  • writableForwardedFromStepWorkflow | wrun_01M3ACYPBKWH788V722CRW1C7W
  • fetchWorkflow | wrun_01M3ACYRSYY8FDAT0NJP5EXJ4Z
  • promiseRaceStressTestWorkflow | wrun_01M3ACYW299GEK51K3BW4MVP2K
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • error handling serialization failures step-argument serialization failure is catchable in workflow code
  • error handling serialization failures uncaught step-argument serialization failure fails the run as USER_ERROR without redelivery retries
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01M3AD2ABAPA0NDD5FSZBP39ET
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01M3AD2M70AHQ88EEADBM481SG
  • hookGetConflictWorkflow - awaiting hook.getConflict() registers hook without payload | wrun_01M3AD2YGNMYGFCCV39TBE0SKJ
  • 'hookGetConflictWithPriorStepWorkflow' - hook.getConflict() does not block step execution | wrun_01M3AD30SAXTX3YJFQQAFS41RN
  • 'hookGetConflictWithParallelStepWorkfl…' - hook.getConflict() does not block step execution | wrun_01M3AD333FQ61KY1P02T62N9CK
  • hookGetConflictThenStepParallelWorkflow - hook.getConflict() continuation step runs alongside other steps | wrun_01M3AD35BA4QSBJVFRG2TJPC8A
  • hookGetConflictWorkflow - hook.getConflict() resolves with the conflicting run when token is already registered | wrun_01M3AD3JV1A9FZ0207R3EDJYNG
  • hookClaimOnlyMutexWorkflow - hook works as a pure run mutex without payload data | wrun_01M3AD4C3X13F8ZTKDWV2SZARN
  • hookAdoptOwnerResultWorkflow - duplicate adopts the owner result via conflict.returnValue | wrun_01M3AD4F6TBPP8PXM3NGVS96EJ
  • hookSignalOwnerWorkflow - duplicate forwards its payload to the owner via resumeHook | wrun_01M3AD4KZ90EFVGB0T3VX3PMVG
  • hookSupersedeOwnerWorkflow - duplicate cancels the owner and claims the released token | wrun_01M3AD4S8KY68EKWTK07PZ0B6B
  • resume-or-start route pattern - resumeHook retried after start() reaches the new run | wrun_01M3AD516860KCN6ZV079XK095
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01M3AD57ST4ZGPSA03SME237PX
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01M3AD5N0SCK8QPP7S73YQWR8M
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01M3AD5WKB8GN15KHEK3P3JB67
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01M3AD61BQ47K06FP6D8352NTE
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01M3AD63FYM7T9J0MEXEDA8YTQ
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01M3AD6GX4JVCFZ2QJ47TZ3SAB
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01M3AD6NQKHRRD8PDGP1WEE4M5
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01M3AD6VR303SPY03W8Q607SSX
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01M3AD70HHGET9EGBAQNFRVKZ4
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01M3AD75BTAQSAM4TCJF4MTNVC
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01M3AD7BFGKPRWMA9TM0J5WAQZ
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01M3AD7HF0CZN1BTWAK6X6EC50
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01M3AD7WC3YADMSEBT98VSJ191
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01M3AD83G4PFQKYD78HB83G15S
  • cancelRun - cancelling a running workflow | wrun_01M3AD89BAMHQXG4HCKX8MM23F
  • cancelRun via CLI - cancelling a running workflow | wrun_01M3AD8DEG4ZPAP31BP4PGDM3N
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01M3AD8KSS44KDGZR0G8HWE9B4
  • hookWithSleepFinalStepWorkflow - step only on final payload | wrun_01M3AD8Y5WRS3GBEFEYBA9PYK8
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01M3AD962XRE0EZSHJ052KKWSV
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01M3AD9G9FQMMJK4XP4D77ZHBX
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01M3AD9P2NATESWF3FZRFESKB5
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01M3AD9R5M4WVFHHXKRH11WQDK
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01M3AD9T7YP17ZFWFK0CSV0SRV

Details by Category

✅ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 99 0 8
✅ example 99 0 8
✅ express 99 0 8
✅ fastify 99 0 8
✅ hono 99 0 8
✅ nextjs-turbopack 104 0 3
✅ nextjs-webpack 104 0 3
✅ nitro 99 0 8
✅ nuxt 99 0 8
✅ sveltekit 99 0 8
✅ vite 99 0 8
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 101 0 6
✅ express-stable 101 0 6
✅ fastify-stable 101 0 6
✅ hono-stable 101 0 6
✅ nextjs-turbopack-canary 88 0 19
✅ nextjs-turbopack-stable 107 0 0
✅ nextjs-webpack-canary 88 0 19
✅ nextjs-webpack-stable 107 0 0
✅ nitro-stable 101 0 6
✅ nuxt-stable 101 0 6
✅ sveltekit-stable 101 0 6
✅ vite-stable 101 0 6
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 101 0 6
✅ express-stable 101 0 6
✅ fastify-stable 101 0 6
✅ hono-stable 101 0 6
✅ nextjs-turbopack-canary 88 0 19
✅ nextjs-turbopack-stable 107 0 0
✅ nextjs-webpack-canary 88 0 19
✅ nextjs-webpack-stable 107 0 0
✅ nitro-stable 101 0 6
✅ nuxt-stable 101 0 6
✅ sveltekit-stable 101 0 6
✅ vite-stable 101 0 6
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 101 0 6
✅ express-stable 101 0 6
✅ fastify-stable 101 0 6
✅ hono-stable 101 0 6
✅ nextjs-turbopack-canary 88 0 19
✅ nextjs-turbopack-stable 107 0 0
✅ nextjs-webpack-canary 88 0 19
✅ nextjs-webpack-stable 107 0 0
✅ nitro-stable 101 0 6
✅ nuxt-stable 101 0 6
✅ sveltekit-stable 101 0 6
✅ vite-stable 101 0 6
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 107 0 0
❌ 🌍 Community Worlds
App Passed Failed Skipped
✅ mongodb-dev 4 0 3
✅ redis-dev 4 0 3
❌ redis 67 21 0
✅ turso-dev 4 0 3
❌ turso 3 85 0
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 101 0 6
✅ e2e-local-dev-tanstack-start-stable 101 0 6
✅ e2e-local-postgres-nest-stable 101 0 6
✅ e2e-local-postgres-tanstack-start-stable 101 0 6
✅ e2e-local-prod-nest-stable 101 0 6
✅ e2e-local-prod-tanstack-start-stable 101 0 6

📋 View full workflow run

@VaguelySerious
VaguelySerious merged commit 5e6c79c into stable Sep 24, 2026
96 of 100 checks passed
@VaguelySerious
VaguelySerious deleted the backport/pr-4326-to-stable branch September 24, 2026 22:43

This branch had an error being deployed

1 failed and 17 active deployments
Preview – workflow-swc-playground — 7d226ffd Deployed Sep 24, 2026 by vercel[bot]
Preview – example-nextjs-workflow-webpack — 7d226ffd Deployed Sep 24, 2026 by vercel[bot]
Preview – workbench-vite-workflow — 7d226ffd Deployed Sep 24, 2026 by vercel[bot]
Preview – workbench-fastify-workflow — 7d226ffd Deployed Sep 24, 2026 by vercel[bot]
Preview – example-nextjs-workflow-turbopack — 7d226ffd Deployed Sep 24, 2026 by vercel[bot]
Preview – workbench-nuxt-workflow — 7d226ffd Deployed Sep 24, 2026 by vercel[bot]
Preview – workbench-sveltekit-workflow — 7d226ffd Deployed Sep 24, 2026 by vercel[bot]
Preview – workbench-tanstack-start-workflow — 7d226ffd Deployed Sep 24, 2026 by vercel[bot]
Preview – example-workflow — 7d226ffd Deployed Sep 24, 2026 by vercel[bot]
Preview – workbench-nitro-workflow — 7d226ffd Deployed Sep 24, 2026 by vercel[bot]
Preview – workbench-astro-workflow — 7d226ffd Deployed Sep 24, 2026 by vercel[bot]
Preview – workbench-express-workflow — 7d226ffd Deployed Sep 24, 2026 by vercel[bot]
Preview – workbench-hono-workflow — 7d226ffd Deployed Sep 24, 2026 by vercel[bot]
Preview – workflow-tarballs — 7d226ffd Deployed Sep 24, 2026 by vercel[bot]
Preview – workbench-nestjs-workflow — 7d226ffd Deployed Sep 24, 2026 by vercel[bot]
Preview – workflow-docs — 7d226ffd Deployed Sep 24, 2026 by vercel[bot]
Preview – workflow-web — 7d226ffd Deployed Sep 24, 2026 by vercel[bot]
Preview – workbench-python-workflow — 7d226ffd Deployed Sep 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant