Reasoning about ambiguous mutation outcomes after network timeouts. The key question is which durable record, uniqueness rule, transaction boundary, and stored result are minimally necessary so concurrent or later retries cannot repeat the business effect. The answer should also distinguish local database effects from external side effects and trace a concrete failure sequence.
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.