1. One event, several deliveries
A delivery is an attempt to bring an event to your system. Retrying the same event should not repeat an external business action. Start by naming the event identity and the business effect separately. A sender delivery ID, business order ID and resource version can mean different things. In this exercise, event IDs and resource versions are deliberately synthetic. The guarded example keeps completed event IDs in memory. Run the same event twice and inspect the write count. That demonstrates a local pattern; it is not a durable production ledger.
Exercise
Replace the example with two identical deliveries of evt-A. Run both modes. Record why guarded mode writes once and naive mode writes twice.