Skip to content

[core] Backport #3700 (log-order correlation-id draws) to stable, and fail on a mismatched duplicate step_created - #4089

Open
pranaygp wants to merge 3 commits into
stablefrom
pgp/stable-log-order-draws
Open

pranaygp wants to merge 3 commits into
stablefrom
pgp/stable-log-order-draws

Conversation

@pranaygp

Copy link
Copy Markdown
Contributor

Backport of #3406 and #3700 to stable, plus a new guard that turns the silent variant of the same bug into a run failure.

Why

A production run on workflow@4.8.5 completed successfully while one branch of a Promise.allSettled fan-out wrote another branch's step result to its own row. The event log shows how: the fan-out's 14 findCurrentStatusStep creates were minted by two concurrent invocations (a queue-woken replay and the original invocation continuing after its inline step), each drawing the run's ordinal correlation ids in a different order and each losing 6-8 of its step_created writes to the other as duplicates. The step body ran with the first writer's arguments; a later replay bound the same id to a different branch and handed that branch the result.

This is exactly the draw-order dependence #3700 fixes on main. stable has #3554 (delivery retirement pinned to log order) but not #3700 (draw order pinned to log order), so 4.8.5 through 4.8.8 are all affected. It stayed silent because the step consumer only checks the step name on an incoming event, and the suspension handler swallows the 409 on a duplicate step_created with an info log; when both branches call the same step function nothing notices.

What's in here

  1. [core] Keep step results ordered behind waits parked on unread hook payloads #3406 (gatesOn extraction; prerequisite for [core] Pin correlation-id draw order to event-log order #3700's private.ts changes). This is the same commit as the open backport [core] Keep step results ordered behind waits parked on unread hook payloads (#3406) (backport to stable) #3718, cherry-picked here because [core] Pin correlation-id draw order to event-log order #3700 doesn't apply without it. If [core] Keep step results ordered behind waits parked on unread hook payloads (#3406) (backport to stable) #3718 merges first this PR rebases trivially; otherwise [core] Keep step results ordered behind waits parked on unread hook payloads (#3406) (backport to stable) #3718 can be closed as included.
  2. [core] Pin correlation-id draw order to event-log order #3700, ported by hand:
    • workflow.ts on stable has drifted from main (no onDuplicateEvent, no clock guard, generateUlid inline on the context), so the mintCount plumbing was rewritten against the stable shape.
    • stable had vmGlobalThis[STABLE_ULID] = ulid (the raw factory, unseeded). It now installs the counting, startedAt-seeded generator, which is what [core] Pin correlation-id draw order to event-log order #3700 relies on for quiescence and is also [core] Derive correlation ids from per-kind sequences (opt-in) #3301's fix for a stream id minted during dehydration latching the host wall clock into the id sequence.
    • test-support/orchestrator-context.ts doesn't exist on stable (it came with [core] Ignore duplicate events per event class instead of failing the run #3381); the four affected suites here each define their own context and received the same mintCount addition. log-order-draws.test.ts uses runWorkflow and ports unchanged.
    • The changeset bump is patch, not minor: on stable this is a bug fix, and a workflow minor would force a major on @workflow/ai's peer range.
    • The runtime-tuning.mdx docs hunk targets the v5 docs tree, which stable doesn't have; stable has no runtime env-var reference page to add WORKFLOW_LOG_ORDER_DRAWS to, so it's documented in the changeset only.
  3. New: verifyDuplicateStepCreate (runtime/step-create-conflict.ts). On a 409 for step_created, read the persisted step and compare its name and its decrypted input bytes with ours. Same invocation: continue as before. Different name or arguments: throw CorruptedEventLogError, which runtime.ts now routes to the normal terminal path so the run fails as CORRUPTED_EVENT_LOG instead of redelivering or continuing with the wrong result. Best-effort by design: if the persisted step can't be read or compared, it logs and continues, so the check can't turn a transient read failure into a failed run. A concurrent serialization-failure placeholder is left to its own step_failed.

Testing

  • packages/core: 20 tests in suspension-handler.test.ts + log-order-draws.test.ts pass, including 7 new guard tests (same input, different input, different name, encrypted compare by plaintext, unreadable step, missing input, placeholder).
  • Full @workflow/core suite: 866 passed, 7 failed. The 7 are serialization.test.ts > DOMException serialization and fail identically on an untouched origin/stable checkout with Node 22.18, so they are unrelated to this change.
  • tsc --noEmit clean.

🤖 Generated with Claude Code

VaguelySerious and others added 3 commits September 10, 2026 15:55
…ent invocation

A concurrent replay that already created a step under the same correlation id
used to be tolerated with an info log regardless of what it created. When the
two replays bound the id to different step calls, the step body ran with the
winner's arguments and the loser's branch received its result: silent
cross-wiring when both calls were the same step function. Read the persisted
step on the 409 and compare its name and (decrypted) input with ours; a
mismatch is a non-deterministic replay and now fails the run as
CORRUPTED_EVENT_LOG instead of continuing.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 10, 2026 23:01
@pranaygp
pranaygp requested review from a team and ijjk as code owners September 10, 2026 23:01
@changeset-bot

changeset-bot Bot commented Sep 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7e6492e

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

This PR includes changesets to release 16 packages
Name Type
workflow Patch
@workflow/core Patch
@workflow/world-testing Patch
@workflow/builders Patch
@workflow/cli Patch
@workflow/next Patch
@workflow/nitro Patch
@workflow/vitest Patch
@workflow/web-shared Patch
@workflow/web 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 10, 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 10, 2026 11:06pm UTC
example-nextjs-workflow-webpack Ready Ready Preview, v0 Sep 10, 2026 11:06pm UTC
example-workflow Ready Ready Preview, v0 Sep 10, 2026 11:06pm UTC
workbench-astro-workflow Ready Ready Preview, v0 Sep 10, 2026 11:06pm UTC
workbench-express-workflow Ready Ready Preview, v0 Sep 10, 2026 11:06pm UTC
workbench-fastify-workflow Ready Ready Preview, v0 Sep 10, 2026 11:06pm UTC
workbench-hono-workflow Ready Ready Preview, v0 Sep 10, 2026 11:06pm UTC
workbench-nestjs-workflow Ready Ready Preview, v0 Sep 10, 2026 11:06pm UTC
workbench-nitro-workflow Ready Ready Preview, v0 Sep 10, 2026 11:06pm UTC
workbench-nuxt-workflow Ready Ready Preview, v0 Sep 10, 2026 11:06pm UTC
workbench-python-workflow Error Error v0 Sep 10, 2026 11:06pm UTC
workbench-sveltekit-workflow Ready Ready Preview, v0 Sep 10, 2026 11:06pm UTC
workbench-tanstack-start-workflow Ready Ready Preview, v0 Sep 10, 2026 11:06pm UTC
workbench-vite-workflow Ready Ready Preview, v0 Sep 10, 2026 11:06pm UTC
workflow-docs Ready Ready Preview, v0 Sep 10, 2026 11:06pm UTC
workflow-swc-playground Ready Ready Preview, v0 Sep 10, 2026 11:06pm UTC
workflow-tarballs Ready Ready Preview, v0 Sep 10, 2026 11:06pm UTC
workflow-web Ready Ready Preview, v0 Sep 10, 2026 11:06pm UTC

@github-actions

github-actions Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

🧪 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 83 105 9 197
✅ 📋 Other 606 0 36 642
Total 5489 105 381 5975

❌ Failed Tests

🌍 Community Worlds (105 failed)

redis (20 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01M26S09YK4SYPK6ET3W5QPRMX
  • parallelStepsThenWebhookWorkflow - no hook_conflict from same-tick replay race | wrun_01M26S0MFQC0SQRN0SZ300GS2B
  • sleepingWorkflow | wrun_01M26S1FQV9XHD5J6AA5037V8D
  • 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_01M26S90W1D3AJW7WT8TSDSX0G
  • hookGetConflictWorkflow - awaiting hook.getConflict() registers hook without payload | wrun_01M26S9BM5NJ9MAE4P9C0EBRZ6
  • hookGetConflictThenStepParallelWorkflow - hook.getConflict() continuation step runs alongside other steps | wrun_01M26S9JYP8WYK2J09GSRRGJHP
  • hookGetConflictWorkflow - hook.getConflict() resolves with the conflicting run when token is already registered | wrun_01M26S9ZVKRCK6DNSCHSREN3TR
  • hookClaimOnlyMutexWorkflow - hook works as a pure run mutex without payload data | wrun_01M26SATJMAZQTFJX08BT26AK1
  • hookAdoptOwnerResultWorkflow - duplicate adopts the owner result via conflict.returnValue | wrun_01M26SAY3V4MBN7W5P33HH8PAM
  • hookSignalOwnerWorkflow - duplicate forwards its payload to the owner via resumeHook | wrun_01M26SB4SNHMF0HKX01TSM3W1R
  • hookSupersedeOwnerWorkflow - duplicate cancels the owner and claims the released token | wrun_01M26SB8B8JQS28JK9P0W1XV85
  • resume-or-start route pattern - resumeHook retried after start() reaches the new run | wrun_01M26SBG9YNNFBDTW2TDXV83J1
  • pages router sleepingWorkflow via pages router
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01M26SGFDDWTDJJR9DQHQZY82T

turso (85 failed):

  • addTenWorkflow | wrun_01M26RZ77MEN5GA63E7K5DF5HB
  • addTenWorkflow | wrun_01M26RZ77MEN5GA63E7K5DF5HB
  • deploymentId: 'latest' is a no-op in non-Vercel worlds
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01M26S08EHYFE28C3ZDT6Q4CPK
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01M26RZD91ZD73N5AXV9CEWAHC
  • promiseRaceWorkflow | wrun_01M26RZJ7C2CEJV62E72CFK7YT
  • promiseAnyWorkflow | wrun_01M26RZMQHFEM7WRC6YAKNS60Y
  • importedStepOnlyWorkflow | wrun_01M26S0P41TF3SQ3DYD8C1KCPN
  • readableStreamWorkflow | wrun_01M26RZQ90RYHSM8YNP5FJ1R0Y
  • hookWorkflow | wrun_01M26S03PXSS36ES9CW8CC3KX5
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01M26S09YK4SYPK6ET3W5QPRMX
  • webhookWorkflow | wrun_01M26S0EVCJ1YS57CWMKN4QKC4
  • parallelStepsThenWebhookWorkflow - no hook_conflict from same-tick replay race | wrun_01M26S0MFQC0SQRN0SZ300GS2B
  • sleepingWorkflow | wrun_01M26S1FQV9XHD5J6AA5037V8D
  • parallelSleepWorkflow | wrun_01M26S1Y9Z979ET5NQYHK8FS1M
  • sleepWinsRaceWorkflow | wrun_01M26S21JVM6A3NSGZ7X8FPR6M
  • stepWinsRaceWorkflow | wrun_01M26S24XCN4NQEA8HQKADJ2Q6
  • nullByteWorkflow | wrun_01M26S288F2ARWYZ0ACRF4JPCT
  • workflowAndStepMetadataWorkflow | wrun_01M26S2ADCES6FTZT5G5DVYJBT
  • 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_01M26S4JK2EWNE9JSQPQDN0T0G
  • writableForwardedFromWorkflowWorkflow | wrun_01M26S4YWR5J3HN52QMHCZG8D0
  • writableForwardedFromStepWorkflow | wrun_01M26S528H25WWT99VYEP650QG
  • fetchWorkflow | wrun_01M26S54STX6R7QFFD2ZHK6PH5
  • promiseRaceStressTestWorkflow | wrun_01M26S585QG1GC6S404RGH1ZX9
  • 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_01M26S8PQMD0PR5HAPQ0R74ETJ
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01M26S90W1D3AJW7WT8TSDSX0G
  • hookGetConflictWorkflow - awaiting hook.getConflict() registers hook without payload | wrun_01M26S9BM5NJ9MAE4P9C0EBRZ6
  • 'hookGetConflictWithPriorStepWorkflow' - hook.getConflict() does not block step execution | wrun_01M26S9E8H7F920795JE448V8Z
  • 'hookGetConflictWithParallelStepWorkfl…' - hook.getConflict() does not block step execution | wrun_01M26S9GMF8MT6BSB9HQB6WDY0
  • hookGetConflictThenStepParallelWorkflow - hook.getConflict() continuation step runs alongside other steps | wrun_01M26S9JYP8WYK2J09GSRRGJHP
  • hookGetConflictWorkflow - hook.getConflict() resolves with the conflicting run when token is already registered | wrun_01M26S9ZVKRCK6DNSCHSREN3TR
  • hookClaimOnlyMutexWorkflow - hook works as a pure run mutex without payload data | wrun_01M26SATJMAZQTFJX08BT26AK1
  • hookAdoptOwnerResultWorkflow - duplicate adopts the owner result via conflict.returnValue | wrun_01M26SAY3V4MBN7W5P33HH8PAM
  • hookSignalOwnerWorkflow - duplicate forwards its payload to the owner via resumeHook | wrun_01M26SB4SNHMF0HKX01TSM3W1R
  • hookSupersedeOwnerWorkflow - duplicate cancels the owner and claims the released token | wrun_01M26SB8B8JQS28JK9P0W1XV85
  • resume-or-start route pattern - resumeHook retried after start() reaches the new run | wrun_01M26SBG9YNNFBDTW2TDXV83J1
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01M26SBQ4NRYRCKF875329V4KR
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01M26SC57QJFGVFJ9DEGD2SM24
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01M26SCCW3FJK20YPRD8CHKHXW
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01M26SCHVCHQP51V1F77FEGCDX
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01M26SCKZTF3R56EN5851D0ZJP
  • 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_01M26SD1Z8B0SCMFJPFP2X7VQ7
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01M26SD7ACGQEKS77141C8MP9Y
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01M26SDDJVH1FSJXPPW8HKZS0P
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01M26SDKV780B8YQ0B9JBJV4R6
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01M26SDRSE8241BVBY2TG75JWS
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01M26SDYPJHMAW2ZEZNCGXP39P
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01M26SE4SR9TG563J5KGGB1Y3H
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01M26SEEPKG5KMMMPKHMJ6W25V
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01M26SENY4ERX4306XFBJ2HTVC
  • cancelRun - cancelling a running workflow | wrun_01M26SEX7YCYYTAZ1NTPZ0325C
  • cancelRun via CLI - cancelling a running workflow | wrun_01M26SF1MBA4KV88QGTBTPS1AH
  • 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_01M26SF7XEPRQNKZXB5VAR6CEF
  • hookWithSleepFinalStepWorkflow - step only on final payload | wrun_01M26SFJQT57HYGVG1F0VY01MT
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01M26SFTVG0HSDBKPNN4JSFC7N
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01M26SG54ZGH2NSYQD3J5H2C6V
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01M26SGB196RT9AS894T77YJYC
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01M26SGD3QFMZWVDQPS3PWXNFH
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01M26SGFDDWTDJJR9DQHQZY82T

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 68 20 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

Copilot AI 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.

🟡 Changes recommended

Unresolved critical and moderate findings remain in duplicate-step conflict handling.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Backports log-order correlation-ID fixes to stable and adds validation for conflicting duplicate step_created events.

Changes:

  • Pins correlation-ID draws and delivery ordering to the event log.
  • Detects conflicting duplicate steps and routes corruption to terminal failure.
  • Adds regression tests and release changesets.
File summaries
File Reviewed change
packages/core/src/workflow.ts Adds seeded ULID generation and draw counting.
packages/core/src/storm-log-sweep.test.ts Updates mint-count test coverage.
packages/core/src/storm-log-replay.test.ts Updates replay draw-count coverage.
packages/core/src/step-delivery-ordering.test.ts Tests parked delivery ordering.
packages/core/src/runtime/suspension-handler.ts Invokes duplicate-step verification; placeholder conflicts still lack name validation.
packages/core/src/runtime/suspension-handler.test.ts Tests duplicate-step conflict handling.
packages/core/src/runtime/step-create-conflict.ts Compares duplicate step names and inputs; placeholder detection uses marker text matching.
packages/core/src/runtime.ts Routes corruption errors to terminal run failure.
packages/core/src/private.ts Implements log-order quiescence; the awaitEarlierDeliveries JSDoc is detached from its declaration.
packages/core/src/log-order-draws.test.ts Tests prefix-stable draw ordering.
packages/core/src/delivery-barrier-dispenser.test.ts Adds mint-count test parity.
packages/core/src/delivery-barrier-coverage.test.ts Tests barrier idle reachability and termination.
.changeset/step-created-conflict-guard.md Documents the duplicate-step guard release.
.changeset/quiet-donkeys-repeat.md Documents delivery-ordering fixes.
.changeset/log-order-draws.md Documents log-ordered draws.
Review details

Suppressed comments (1)

packages/core/src/private.ts:437

  • The detailed JSDoc immediately above this block describes awaitEarlierDeliveries, but these newly inserted helper declarations now sit between that comment and the exported function. As a result the ordering contract is detached from awaitEarlierDeliveries in generated docs/tooltips and the function appears undocumented; move the helpers or move the JSDoc next to its declaration.
/**
  • Files reviewed: 15/15 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 475 to +479
if (EntityConflictError.is(err)) {
runtimeLogger.info('Step already exists, continuing', {
workflowRunId: runId,
// A concurrent handler wrote this step first. Benign when it
// wrote the same invocation; a different name or input under
// this id is a non-deterministic replay and fails the run.
await verifyDuplicateStepCreate({
Comment on lines +125 to +129
// The winner recorded the placeholder `finalizeUnserializableStep`
// writes when a step's arguments refuse to serialize. That branch is
// about to fail the step with the serialization error, which is the
// outcome the user should see; do not mask it with a corruption report.
if (isUnserializablePlaceholder(a)) return 'incomparable';

This branch had an error being deployed

1 failed and 17 active deployments
Preview – workflow-swc-playground — 7e6492e0 Deployed Sep 10, 2026 by vercel[bot]
Preview – workbench-sveltekit-workflow — 7e6492e0 Deployed Sep 10, 2026 by vercel[bot]
Preview – example-nextjs-workflow-webpack — 7e6492e0 Deployed Sep 10, 2026 by vercel[bot]
Preview – workbench-nitro-workflow — 7e6492e0 Deployed Sep 10, 2026 by vercel[bot]
Preview – workbench-astro-workflow — 7e6492e0 Deployed Sep 10, 2026 by vercel[bot]
Preview – example-nextjs-workflow-turbopack — 7e6492e0 Deployed Sep 10, 2026 by vercel[bot]
Preview – workbench-vite-workflow — 7e6492e0 Deployed Sep 10, 2026 by vercel[bot]
Preview – workbench-fastify-workflow — 7e6492e0 Deployed Sep 10, 2026 by vercel[bot]
Preview – workbench-nuxt-workflow — 7e6492e0 Deployed Sep 10, 2026 by vercel[bot]
Preview – example-workflow — 7e6492e0 Deployed Sep 10, 2026 by vercel[bot]
Preview – workbench-tanstack-start-workflow — 7e6492e0 Deployed Sep 10, 2026 by vercel[bot]
Preview – workflow-tarballs — 7e6492e0 Deployed Sep 10, 2026 by vercel[bot]
Preview – workflow-web — 7e6492e0 Deployed Sep 10, 2026 by vercel[bot]
Preview – workbench-express-workflow — 7e6492e0 Deployed Sep 10, 2026 by vercel[bot]
Preview – workbench-hono-workflow — 7e6492e0 Deployed Sep 10, 2026 by vercel[bot]
Preview – workbench-nestjs-workflow — 7e6492e0 Deployed Sep 10, 2026 by vercel[bot]
Preview – workflow-docs — 7e6492e0 Deployed Sep 10, 2026 by vercel[bot]
Preview – workbench-python-workflow — 7e6492e0 Deployed Sep 10, 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.

3 participants