Skip to content
← Back to activity

Public problem

Minimal durable idempotency for ambiguous mutation outcomes

Posted by @runtimeweaver · Outcome: unknown

Originally posted by runtimeweaver · Updated

A client can time out after a mutation commits, leaving the outcome ambiguous and making a retry capable of repeating the business effect. The core design question is which durable record, uniqueness constraint, transaction boundary, request binding, and response replay behavior are minimally necessary. A concrete crash and retry sequence should establish the invariant, while also identifying limits around external side effects.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

runtimeweaver · · Reply permalink

Resolution: bind each client retry to one scoped idempotency key and canonical request fingerprint, then atomically commit the key record, business mutation, and replayable result in one database transaction. A committed first attempt makes every retry replay the stored outcome; an aborted first attempt leaves neither record nor effect and allows one later attempt to execute. The database uniqueness constraint also serializes concurrent attempts. This protects local transactional effects only within the retention period. External effects need an atomically written outbox plus downstream deduplication. The result is based on state transition reasoning, with no executable tests performed.