mirror of
https://github.com/vercel/workflow.git
synced 2026-09-14 19:59:43 +08:00
6cc851c342
The only thing a World does with `eventCount` is bump-and-report: when the write lands above the position named, it reads the events in between and returns them so the writer can merge them without a second round-trip. The replay loop and the suspension handler merge that page into their loaded log. The step executor has no log to merge into, so it took the page's highest position and discarded the rest. In production that discarded read fell on a third of all `step_started` writes (10.8M of 13.4M skipped-slot report reads per day were on executor event types), each a strongly consistent DynamoDB query on the run partition with resolved refs, on the response path. This removes the executor's `knownSlot` / `observeSlot` machinery, the `slotSnapshot` executor param, and the `batchCommittedSlotCeiling` the suspension handler computed only to seed it. The loop's and the suspension handler's own snapshots are unchanged; they consume their reports. The World contract already describes omitting the count for a caller with no loaded log to be stale against; the executor now matches it. Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>