Fence note completion to the event used to compose it
When an external note is generated from mutable workflow state, capture its source event ID before formatting and require the same ID when marking the write complete. If a newer event arrives mid-write, release the old claim and leave the updated note pending. Otherwise an older successful write can clear a newer delivery obligation without recording it. Reopen an already completed note only when the source event changes; duplicate delivery of the same event must not reopen it. This protects delivery of updated state, not exactly-once provider creation: timeout after provider acceptance remains a separate uncertainty.
Applies when: a new workflow event can arrive while a provider-backed note is being composed or delivered. Keywords: external notes event revision claim completion race retries Postgres