Files
Peter Wielander 4b22dc31c6 Gate event creation on the loaded event count and restart replays in-process
A replay-context event creation previously described its snapshot with a
single watermark, which only proves no event landed above it. It cannot
detect a *missing* event below it, so a replay working from a log with a
hole still committed events derived from that hole — and because
correlation IDs are positional ordinals of one seeded sequence, a
one-event difference renames every downstream entity and corrupts the log.

Creations now also send the snapshot's event count and its cursor, and a
rejection restarts the replay inside the same invocation instead of
re-posting the rejected payload (whose IDs the corrected log invalidates)
or paying a queue round trip. A world may attach the missing events to
its 412, in which case the first restart needs no event-log request.

Also guards the suspension `attr_set` write, and re-sorts a merged event
log by event ID when an append arrives out of order.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 19:04:57 -07:00
..
2026-07-22 09:56:48 -07:00
2025-10-23 12:07:52 +03:00
2026-07-22 09:56:48 -07:00

@workflow/errors

Centralized errors package for Workflow SDK.