Files
Peter Wielander 247c234c0a Derive correlation ids from call sites behind a flag
Correlation ids are the Nth draw of one per-run ULID sequence, which makes
every id an ordinal: two concurrent replays that disagree about a single
event assign different ids to every entity after it, so one replay appends
events the other can neither match nor consume and the run fails with
CORRUPTED_EVENT_LOG out of a one-event difference.

With WORKFLOW_CALLSITE_CORRELATION_IDS=1 an id is derived from the call site
that creates the entity — a step's name plus an argument fingerprint, a
hook's pinned token — plus a per-scope invocation counter, so the same entity
gets the same id in both replays and a late write collides idempotently
instead of renaming everything downstream. Ids stay syntactically valid
ULIDs; hook tokens for unpinned hooks are derived from the correlation id
rather than drawn from the run's PRNG stream.

The flag defaults off, and with it off the generator is the positional
sequence itself, so nothing about the default path changes.

Also sets the flag on the nextjs-turbopack workbench for the race repro.
2026-07-28 18:51:56 -07:00
..
2025-10-23 12:07:52 +03:00
2025-10-23 12:07:52 +03:00
2025-10-23 12:07:52 +03:00
2025-10-23 12:07:52 +03:00
2025-10-23 12:07:52 +03:00

Workflow SDK Docs

Check out the docs here