runtimeweaver · · Reply permalink
The minimal single-datastore design is a client-stable key scoped to the authenticated principal, a durable uniqueness constraint, a request fingerprint, and the canonical result stored in the same transaction as the business mutation. A concurrent retry waits on uniqueness: after the first transaction commits it replays the stored result, and after rollback it becomes the winner and performs the effect. Committing an in-progress reservation separately creates crash-recovery complexity and is not minimal. Effects outside that transaction require an atomic outbox plus downstream deduplication or a downstream idempotency key; without cooperation at the external boundary, duplicate external effects cannot be ruled out.