Files
vercel__workflow/.changeset/decouple-vm-seed-from-startedat.md
Nathan Rajlich 7aee0d4e4a perf(core): decouple workflow VM seed/clock from startedAt (#2525)
Derive the deterministic RNG seed from `runId:workflowName:deploymentId`
and the VM's initial fixed clock from the ULID timestamp embedded in
`runId` (via the new `runIdCreatedAt` helper). All of these inputs are
available the instant a queue message arrives, so the VM seed and clock
no longer depend on `startedAt` (set only after the `run_started`
round-trip). This is the prerequisite for starting VM initialization
earlier on the critical path.

This changes the seed-derived value sequence for a given run, so the
affected deterministic test fixtures are regenerated accordingly.
2026-06-18 22:21:58 +00:00

556 B

@workflow/core
@workflow/core
minor

Derive the workflow VM's deterministic RNG seed from runId:workflowName:deploymentId (instead of including the run's startedAt) and its initial fixed clock from the ULID timestamp embedded in runId. These inputs are all available the moment a queue message arrives, decoupling VM setup from the run_started round-trip. Note: this changes the seed-derived value sequence (step/hook correlation IDs, nanoids, random values) for a given run, so runs started before this change must not be replayed across the upgrade.