Recovering the export on either side of commit
The caller sees the same silence in two different database states. Follow the original request key through rollback, a committed-but-lost reply or a conflicting retry.
One intended export
Before sending, the client stores key K for snapshot 7 and the requested format. It keeps the key across timeouts for this same operation.
Validate and scope
Authorize the tenant and snapshot, apply defaults and normalize the validated fields. Trace IDs are transport metadata and do not change the export identity.
Claim or find K
The unique tenant, operation and key identify the receipt. A concurrent insert may wait for the first transaction. A bounded wait can end in a retry with the same K.
Uncommitted writes
Stage the request receipt, conditional credit debit, job for the immutable input and outbox dispatch intent inside the same database transaction.
Outgoing
Cut A · before commit
After restart the uncommitted request, debit, job and outbox are absent. A valid retry can win admission and perform all four writes together.
Cut B · after commit
All four changes exist before the HTTP receipt reaches the client. If the reply is lost, the caller cannot infer whether a credit has been spent.
Outgoing
Repeat with the same key
An unknown commit outcome takes the same recovery route as a missing reply. Reconnect, check permission again and look up the original intent.
Compare the input
For an existing key, read the winning row and compare the normalized fingerprint. Under the described Read Committed design, the subsequent lookup gets a new statement snapshot.
Outgoing
Same 202 receipt
Return the recorded job ID and stable status URL. Recovery adds no new job, debit or outbox entry. A separate status read reports later progress.
409 on changed intent
The same scoped key with a different snapshot or format conflicts with the accepted request. The original durable state and remaining credit are preserved.