Repository navigation
[4.x] Preserve workflow continuations after terminal step conflicts - #5028
Merged
Merged
Conversation
Signed-off-by: Karthik Kalyanaraman <karthik.kalyanaraman@vercel.com>
Contributor
🦋 Changeset detectedLatest commit: dad20e3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
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 |
Contributor
🧪 E2E Test Results❌ Some tests failed Summary
❌ Failed Tests🌍 Community Worlds (105 failed)redis (20 failed):
turso (85 failed):
Details by Category✅ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
✅ 🪟 Windows
❌ 🌍 Community Worlds
✅ 📋 Other
|
VaguelySerious
approved these changes
Oct 23, 2026
Co-authored-by: Peter Wielander <mittgfu@gmail.com> Signed-off-by: Karthik Kalyan <105607645+karthikscale3@users.noreply.github.com>
VaguelySerious
left a comment
Member
There was a problem hiding this comment.
(AI) Preliminary review: AI review: no blocking issues
Signed-off-by: Karthik Kalyanaraman <karthik.kalyanaraman@vercel.com>
Merged
karthikscale3
pushed a commit
that referenced
this pull request
Oct 26, 2026
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to stable, this PR will be updated. # Releases ## @workflow/astro@4.0.30 ### Patch Changes - Updated dependencies [[`e01fe25`](e01fe25)]: - @workflow/builders@4.1.20 - @workflow/rollup@4.0.30 - @workflow/vite@4.0.30 ## @workflow/builders@4.1.20 ### Patch Changes - [#4999](#4999) [`e01fe25`](e01fe25) Thanks [@joelfickson](https://github.com/joelfickson)! - Fix module error reporting when the offending import spans multiple lines, and fix multi-line imports not being checked for modules correctly. - Updated dependencies [[`0f518c6`](0f518c6)]: - @workflow/core@4.8.15 ## @workflow/cli@4.3.19 ### Patch Changes - Updated dependencies [[`0f518c6`](0f518c6), [`e01fe25`](e01fe25)]: - @workflow/core@4.8.15 - @workflow/builders@4.1.20 - @workflow/web@4.1.31 ## @workflow/core@4.8.15 ### Patch Changes - [#5028](#5028) [`0f518c6`](0f518c6) Thanks [@karthikscale3](https://github.com/karthikscale3)! - Queue the workflow continuation when a step completion or failure retry reports an already finished step, preventing runs from remaining stuck in the running state. ## @workflow/nest@4.0.31 ### Patch Changes - Updated dependencies [[`e01fe25`](e01fe25)]: - @workflow/builders@4.1.20 ## @workflow/next@4.1.19 ### Patch Changes - Updated dependencies [[`0f518c6`](0f518c6), [`e01fe25`](e01fe25)]: - @workflow/core@4.8.15 - @workflow/builders@4.1.20 ## @workflow/nitro@4.1.21 ### Patch Changes - Updated dependencies [[`0f518c6`](0f518c6), [`e01fe25`](e01fe25)]: - @workflow/core@4.8.15 - @workflow/builders@4.1.20 - @workflow/web@4.1.31 - @workflow/rollup@4.0.30 - @workflow/vite@4.0.30 ## @workflow/nuxt@4.0.31 ### Patch Changes - Updated dependencies []: - @workflow/nitro@4.1.21 ## @workflow/rollup@4.0.30 ### Patch Changes - Updated dependencies [[`e01fe25`](e01fe25)]: - @workflow/builders@4.1.20 ## @workflow/sveltekit@4.0.30 ### Patch Changes - Updated dependencies [[`e01fe25`](e01fe25)]: - @workflow/builders@4.1.20 - @workflow/rollup@4.0.30 - @workflow/vite@4.0.30 ## @workflow/vite@4.0.30 ### Patch Changes - Updated dependencies [[`e01fe25`](e01fe25)]: - @workflow/builders@4.1.20 ## @workflow/vitest@4.0.31 ### Patch Changes - Updated dependencies [[`0f518c6`](0f518c6), [`e01fe25`](e01fe25)]: - @workflow/core@4.8.15 - @workflow/builders@4.1.20 - @workflow/rollup@4.0.30 ## @workflow/web-shared@4.1.31 ### Patch Changes - Updated dependencies [[`0f518c6`](0f518c6)]: - @workflow/core@4.8.15 ## workflow@4.8.15 ### Patch Changes - Updated dependencies [[`0f518c6`](0f518c6)]: - @workflow/core@4.8.15 - @workflow/cli@4.3.19 - @workflow/next@4.1.19 - @workflow/nitro@4.1.21 - @workflow/typescript-plugin@4.0.3 - @workflow/astro@4.0.30 - @workflow/nest@4.0.31 - @workflow/rollup@4.0.30 - @workflow/sveltekit@4.0.30 - @workflow/nuxt@4.0.31 ## @workflow/world-testing@4.1.30 ### Patch Changes - Updated dependencies [[`0f518c6`](0f518c6)]: - @workflow/core@4.8.15 - @workflow/cli@4.3.19 - workflow@4.8.15 ## @workflow/web@4.1.31 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
A
step_completedorstep_failedwrite can commit before its HTTP response is lost. When the transport retries the write, it receives an already-finished409; the 4.x step handler currently acknowledges the delivery before sending the workflow continuation, leaving the run stuck inrunning.Always queue the continuation after a completion conflict and all five failure-conflict paths: missing function, pre-execution retry limit, missing
startedAt,FatalError, and post-execution retry limit. Completion conflicts record skipped-step trace attributes and an event. Queue-send failures still propagate so redelivery retries the continuation through the existing terminalstep_startedconflict path without rerunning the step body. A redundant wake can cause an extra replay.This patch targets the 4.x maintenance branch and includes a patch changeset.
The equivalent recovery behavior in 5.x was introduced in #1338 — Combine flow+step bundle and process steps eagerly: the step executor returns
skippedon a completion conflict, and the combined runtime reloads the committed events and continues replay for that outcome. This PR adapts that behavior to the 4.x step handler by preserving its continuation enqueue.How did you test your changes?
pnpm --filter @workflow/core test: 52 test files passed; 936 tests passed, 3 expected failures, 3 skipped.pnpm exec turbo build --filter=@workflow/core... --env-mode=loose: all 7 build tasks passed.git diff --checkpassed.PR Checklist - Required to merge
pnpm changesetwas run to create a patch changeset.