mirror of
https://github.com/vercel/workflow.git
synced 2026-09-14 19:59:43 +08:00
ee40e67149
The wait_created escalation anchored on the ULID timestamp inside the wait's correlation id, assuming it was the wait's scheduling instant. It is not: the workflow VM mints every correlation id as ulid(fixedTimestamp), the RUN's creation epoch, held constant for replay stability — so the anchor is a run-wide constant and any run older than the threshold would fail with CORRUPTED_EVENT_LOG on a single benign concurrent-suspension race (whenever the winner's row was not yet visible to the verification read). The wait_created site now warns only: the run epoch serves as a cheap pre-filter (young runs skip the verification read entirely) and the fresh log read still gates the warning, but escalation is left to backend-side wedge recovery, which classifies against entity state the SDK cannot see. The wait_completed site is unchanged — its resumeAt anchor is durable and genuinely per-wait, so warn-then-fail remains. Also restructures the conflict branch so the narrowing of the decoded timestamp is a direct if-condition rather than an aliased boolean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Pranay Prakash <pranay.gp@gmail.com>