Files
Pranay Prakash ee40e67149 [core] Make wait_created wedge detection warn-only (run-epoch ULID cannot anchor escalation)
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>
2026-08-14 20:06:43 -07:00
..