Hypothetical scenario. Northwind has a reservation, a recorded payment intention and no provider reply. A support reader sees the reservation; a regional view shows an older quantity. A replacement worker offers to start payment again. Priya asks everyone to stop and list which facts each source can establish.
Maya: “Can we tell the buyer this purchase is complete?”
Dev: “Only if the evidence supports that outcome, not merely because our worker finished waiting.”
Build the reconciliation ledger before choosing another transition. Separate confirmed local state, unresolved external effects, permissible reader observations and current worker authority. Use the preceding lessons together; the case adds no unstated traffic or provider guarantee.
Which response can the current evidence justify?
Choose what the buyer should hear now: completed purchase, definite rejection or an explicit pending outcome. Identify the evidence required for your answer. Then state whether the replacement worker may create a new provider identity, release the reserved unit, or return the regional catalogue quantity as authoritative proof.
The exercise intentionally withholds the provider’s final result. There is no hidden correct guess about whether the payment succeeded. A correct design preserves safety under either compatible history and has a recovery policy for learning which history occurred. Explaining that limit is part of the answer.
Separate the authorities in the ledger
The local PostgreSQL transaction committed reservation R, its quantity decrement, the logical operation result and durable payment intent K. Those records establish the local accepted transition. They do not establish provider completion. A caller losing the database commit response would need to inspect that same local identity as well, but the selected exercise gives inspectable local completion.
The provider owns its external action. Northwind retains the exact identity and material request parameters submitted to it. A supported provider lookup or documented matching retry can supply evidence about K. Searching for a similar amount or using a new identifier does not establish the original outcome.
The regional catalogue is a derived view. Its older quantity may be permitted for a descriptive read under a declared contract, but it cannot override reservation authority. Similarly, a support session observing its own accepted change has a narrower guarantee than every buyer seeing current global state.
Resolve uncertainty without inventing a new operation
Hypothetical scenario. A reservation request K loses its reply just as the authoritative owner changes. The client retains tenant, K and its original fingerprint. A retry asks for the result of K; it does not create K2 merely because a different server now receives it.
| Evidence for K | Allowed response | Forbidden shortcut |
|---|---|---|
| Committed result | Return original reservation | Create another intention |
| Authoritative absence | Admit same K conditionally | Trust a stale replica miss |
| History unavailable | Pending / unavailable | Treat timeout as rejection |
The replacement must recover the operation record and business state under the new ownership epoch. If K committed, return its protected result after current authorization checks. If K is definitively absent within the recovered authoritative history, the same K can be admitted by the original protocol. If the required history is unavailable, retain uncertainty rather than assuming absence.
A review packet joins the operation table, invariant owner, replicated history and fencing rule. The safety test uses two concurrent attempts plus a paused old owner. The progress test states when a quorum or recovered authority becomes available. These are separate arguments: a service can preserve the single reservation while temporarily unable to tell the caller its result.
Count pending obligations without guessing outcomes
Hypothetical worked example. Select twelve accepted reservation workflows, independent of the earlier hundred-workflow illustration. Seven have confirmed provider success. Two have definite provider rejection and require a protected reservation release. Three have unresolved provider outcomes. The ledger balances because 7 + 2 + 3 = 12.
Confirmed success and definite rejection account for 7 + 2 = 9 known provider outcomes. The unresolved group is 12 − 9 = 3. Calling all twelve completed would overstate confirmed purchases; calling the three unknown outcomes rejected would invent evidence. Their reserved units remain governed by the declared pending and expiry policy.
Suppose the release worker receives one duplicate for each of the two definite rejections. It sees 2 × 2 = 4 release deliveries for two logical releases. Under the protected local release transition, only two units are restored. Restoring on every delivery would restore four units and exceed the intended release by 4 − 2 = 2 units.
These are selected counts, not observed failure rates. They show why reconciliation must distinguish attempts, logical operations and effects. The same separation appears in the pipeline checkpoint: a transport counter cannot certify business completion.
Replace an owner without replacing the intention
The original worker might have stopped, paused or lost communication. A replacement acquires a guarded local generation according to the ownership contract and retains K. Updating that generation protects later local state writes only where the record checks it. It does not revoke an already submitted provider request.
If the original worker returns with a late success response, it must not overwrite a newer workflow decision blindly. The current owner can record supported evidence and apply the authorized transition under the operation state machine. The result must refer to K and its bound parameters. Neither the late worker nor the replacement may turn uncertainty into a fresh purchase.
A consensus-backed coordinator can preserve the assignment history under its failure model. It cannot determine whether an unresponsive provider committed K. Agreement over a pending state is useful precisely because it preserves one shared recovery obligation without pretending to know the missing external fact.
An expiry policy still needs late-evidence handling
Maya may choose a business deadline after which the reservation is no longer held. That is a policy transition, not proof of payment rejection. The workflow must specify what happens if provider success is confirmed after release: possible actions include reacquiring availability under a new authorized decision or issuing a separately protected refund where appropriate.
Do not silently select one of those policies in the storage layer. They change the buyer’s experience and can introduce additional uncertainty. The draft’s decision is to expose pending status and keep the unresolved obligation visible until the selected business policy and available evidence justify a transition.
In the wild: compare each contract with its boundary
Stripe’s documented idempotent-request behavior illustrates how a provider can bind repeated attempts to one identity. PostgreSQL’s isolation documentation describes the local concurrency boundary. Neither contract makes the other resource part of its transaction. The ledger must compose their actual promises.
A refund creates another unresolved operation
Hypothetical failure scenario. An operator sees the pending purchase and orders a refund without checking K. The refund succeeds remotely, but its reply is lost. Another operator repeats the correction using a new refund identity. The recovery path has duplicated an effect even though the original reservation protocol was careful.
Corrective actions need their own durable identities, authorization and evidence. Record the relationship to the original workflow and distinguish requested, confirmed and unresolved compensation. Human recovery must inspect the same ledger that automation uses; a dashboard button is still an effect boundary.
Challenge the proposed mechanism
Write a counterexample where the same retry reaches both old and new owners. What must the repair include?
Reveal the design reasoning
Both operation deduplication and current-owner enforcement at the protected transition. Deduplication alone can miss divergent stores, and fencing alone can permit two different business identities. Explain recovery from committed history.
Decision and reconsideration: Keep uncertainty visible until authoritative evidence resolves it. Verify the original intention through failover, restore and expiry.
Defend the unresolved result
Three provider outcomes are unresolved. May the interface label all accepted reservations paid?
Report only confirmed meaning
No. Local acceptance establishes the reservation and retained obligation. It does not establish provider success. Expose pending state for the unresolved group.
Does a new ownership generation make a new provider identity safe?
Preserve the logical intention
No. Ownership and provider identity protect different boundaries. The replacement must reconcile K; the original remote effect may already exist.
Four release deliveries represent two releases. How many units should return?
Apply the protected transition
Two in the stated one-unit model. Repeated deliveries must recognize the completed release. Adding on every attempt would create two unauthorized extra units.
A truthful pending result protects correctness. Page 32 returns to performance and asks whether a local cache can save work without weakening the freshness and authority rules the team has just established.
Northwind decision log
Keep confirmed local facts separate from unresolved external facts.
Retain identity and evidence through takeover, expiry and compensation.
Next, preserve an observation contract while caching data for faster delivery.
Go deeper: failure models and composed decisions
- Book chapter: Introduction to Reliable and Secure Distributed Programming, chapter 2: Basic Abstractions — Christian Cachin, Rachid Guerraoui and Luís Rodrigues. Revisit the assumptions behind suspected failure.
- Book chapter: Introduction to Reliable and Secure Distributed Programming, chapter 6: Consensus Variants — the same authors. Distinguish related agreement abstractions.
- Video lecture: F2023 #15: Concurrency Control Theory — CMU Database Group. Check the local part of the invariant argument.
- Primary document: Idempotent requests — Stripe. Inspect the provider boundary separately from local isolation.