# ADR-JPA-003 โ€” Completion unknown is never retried - Status: Accepted - Date: 2026-08-11 - Design: ยง17 ## Context A connection can break while a commit is in flight. The server may have committed; the acknowledgement may simply have been lost. The driver cannot tell the two apart. ## Decision `TransactionCompletionUnknownException` is never retried, automatically or otherwise. It is produced only by a failure observed while the transaction phase is `COMMITTING`, and only for SQLSTATE `40003`, a connection-class (`08*`) state, or a transport break. Recovery is domain-specific reconciliation through `TransactionCompletionResolver`. ## Consequences Retrying a possibly-committed write is the most damaging thing this platform could do: a duplicate payment, a duplicate order, a double decrement. There is no budget or backoff that makes it safe, because the failure is epistemic rather than transient. The invariant is enforced at the type level rather than by policy alone. `JpaFailureContext` refuses to construct a retryable completion-unknown context, and the exception rebuilds its context through the safe factory whatever it is handed. A future policy bug therefore cannot produce an unsafe retry โ€” the value it would need does not exist. The rule is deliberately narrow in the other direction too. Classifying every connection failure as completion-unknown would push ordinary pool exhaustion and server restarts into the reconciliation queue, which trains operators to clear that queue without reading it โ€” and then the one entry that mattered gets cleared with the rest. The cost is that the domain must supply the resolver. The platform cannot: only the domain knows which idempotency record, business row, or outbox entry proves the write happened. ## Enforcement `JpaFailureContextTest`; `DefaultJpaRetryPolicyTest`; `CommitFailureClassifierTest`; release gate `completion-unknown-no-retry`.