**The design is sound and you can start building tomorrow, provided four gaps in the failure paths are written into the doc first.** None needs a redesign; each is a sentence or two in `design.md`. The core is right: stock is reserved atomically, the payment call sits outside any transaction, both idempotency layers are in place, and unknown outcomes are reconciled.

## Fix before building

**1. Stock can be restored twice (High).** Steps 5 and 6 don't say the move out of `PENDING` is conditional, and the doc doesn't say where the reconciliation job runs.
- **Failing case:** both instances run the job, both see order A as `PENDING`, both learn it was declined, and both restore its stock. A SKU with 0 left now shows 1 more than exists, and the next buyer is sold a unit you don't have. On the `PAID` side, the same race sends two confirmation emails.
- **Fix:** settle with `UPDATE orders SET status = … WHERE id = :id AND status = 'PENDING'`, and restore stock or queue the email only if that changed a row. Apply it in steps 4, 5 and 6.

**2. No outcome for "provider has never heard of this order" (High).** Step 6 settles only as `PAID` or `FAILED`.
- **Failing case:** an instance crashes after step 2 commits and before step 3 reaches the provider. The job asks about the order and the provider returns not found. The order stays `PENDING` and its stock stays reserved until the 30-minute alert.
- **Fix:** treat not found as `FAILED` and restore the stock. Leave "still processing" as `PENDING`.

**3. How the job looks up a charge is unspecified (Medium, check tonight).** `orders` has no provider charge id, and in the timeout case you never receive one. Some providers can't look up a charge by idempotency key. Confirm yours can find a charge by order id (for example via metadata sent on the charge), and add a `payment_reference` column if not.

**4. Overlapping carts can deadlock (Medium).** Step 2 updates several `stock` rows in cart order.
- **Failing case:** order 1 buys SKUs X then Y, order 2 buys Y then X at the same moment. Postgres aborts one, and that customer gets a 500 instead of an order.
- **Fix:** update the rows in sorted SKU order.

## Smaller gaps, fine to fix during the build

- **Confirmation email can be lost (Low).** Step 4 commits `PAID` and then queues the email, so a crash in between loses it. Step 6 doesn't say the job queues the email either. Have the job queue it, or write an outbox row in the `PAID` transaction.
- **Idempotency key is unique globally, not per customer (Low).** A key reused by another customer returns the first customer's order. Make the constraint `(customer_id, idempotency_key)`. Also say what happens when the same key arrives with a different cart; a `422` is the usual answer.
- **No way to learn the result after a `202` (Low).** The doc has no `GET /orders/{id}`.
- **A declined order can't be retried with the same key (Low).** It returns the existing `FAILED` order, so the client needs a fresh key. Document it for client developers.
- **Constraints are missing from the data model (Low).** There are no primary keys on `order_items` or `stock`, no `CHECK (available >= 0)`, and no constraint on `status` values.
- **Test plan misses the riskiest paths (Medium for your standards).** Add tests for:
  - the reconciliation job: paid, declined, not found, and run twice concurrently;
  - two buyers racing for the last unit;
  - two simultaneous `POST`s with the same key;
  - stock restored after a decline;
  - a crash between reserve and charge.

## Speculative, worth a quick check

- **Where prices come from.** There is no price table, and the doc doesn't say the server computes `unit_price` and `total`. If they come from the client's cart, a customer can set their own price.
- **Request duration.** The worst case in step 3 is four 5-second attempts plus backoff, roughly 25 to 35 seconds. Check that the load balancer and client timeouts are longer, or the client will never see the `202`.
- **Transactions across modules.** Steps 2 and 5 span the inventory and orders modules in one transaction. That fits the "no module reads another's tables" rule only if `OrderCheckout` owns the transaction and passes it to both; say so in the doc.

VERDICT: READY WITH CHANGES
