**Not quite ready to build as written, but close.** The core flow is sound: reserve stock and insert the order in one transaction, charge outside any transaction, and use the order id as the provider's idempotency key. Six gaps need a line or two of design each before you write code. The first three can cause real money or stock errors.

## Fix before building

1. **Stock can be restored twice.** Step 5 (decline) and step 6 (reconciliation) both mark an order `FAILED` and restore stock. There are two instances, and the reconciler runs on both.
   - Example: both reconcilers load the same `PENDING` order, both settle it `FAILED`, and both add its quantity back. Stock then shows 2 units for 1 returned.
   - Fix: make the status change a guarded update (`UPDATE orders SET status='FAILED' WHERE id=:id AND status='PENDING'`). Restore stock only if one row changed, in the same transaction. Also lock the rows the reconciler picks (`FOR UPDATE SKIP LOCKED`) or run it on one instance only.
   - The same guard stops a double `PAID` or a `PAID` then `FAILED` flip.

2. **The reconciler can fail an order that is still being charged.**
   - It treats any `PENDING` order older than 2 minutes as unresolved. A request in its retry loop (4 attempts × 5 s plus backoff) can still be running.
   - Example: the reconciler asks the provider, which says "not found" or "processing". The reconciler marks the order `FAILED` and restores stock. The in-flight retry then succeeds, so the customer is charged for a `FAILED` order.
   - Fix: define what each provider answer maps to. "Succeeded" becomes `PAID`, "declined" becomes `FAILED`, and "processing" means leave it alone. "Not found" needs a decision, because it also happens when the service crashed between step 2 and step 3 and never charged. Either retry the charge with the same idempotency key, or fail only after a time bound longer than the retry loop.

3. **Your module rule conflicts with your transaction.**
   - Step 2 updates `stock` (inventory) and inserts into `orders` (orders) in one transaction. Step 5 does the same. Yet "no module reads another module's tables".
   - Pick one approach and write it down. I'd have `OrderCheckout` own the transaction and pass it into `inventory.reserve(tx, items)` and `orders.create(tx, ...)`. That keeps the boundaries and the atomicity. The cost is that modules share a transaction type.

## Also fix, smaller

4. **Deadlocks.** Two carts with the same SKUs in opposite order, such as A,B and B,A, can deadlock on step 2's row updates. Sort the SKUs before reserving.
5. **Concurrent duplicate `POST`.** Two requests with the same key at once: one insert hits the unique constraint. State that the loser catches the violation and returns the winner's order. Scope the key per customer, and say what happens if the same key arrives with a different cart.
6. **Prices and totals.** There is no price source. State that the server computes `unit_price` and `total`, and never trusts the client's.

## Gaps to name

- **No way to read the result after a `202`.** The client has no `GET /orders/{id}` and no other way to learn the outcome.
- **Email can be lost.** If the process dies between the commit in step 4 and the queue write, the email is gone. You never say what the queue is, and it isn't in your infrastructure list. Either use an outbox row written in the `PAID` transaction, or accept the loss and say so.
- **Schema constraints are missing.** There's no primary key on `stock.sku`, no `order_items` key, and no unique index on `idempotency_key`. Add a `CHECK (available >= 0)` as a backstop.
- **Retry rules.** Say that retries happen only on timeouts and 5xx responses, and that a 4xx card error is a decline, not a retry.
- **Request time.** A worst-case request holds for about 25–30 s. Confirm that your load balancer and client timeouts allow it.

## Tests

The listed integration tests cover the happy paths well, but not the places the bugs above live. Add these:
- The reconciler, which has no test at all (the paid, declined, processing and not-found cases).
- A decline restores stock exactly once.
- A `409` on the second item rolls back the first reservation.
- Two reconcilers running at once.
- A reconciler running while a charge is still in flight.
- Two concurrent `POST`s with the same key.

Write these first, since they pin down items 1 and 2.

None of this changes the overall shape. It's roughly a half-day of edits to `design.md`, and then you can start.

VERDICT: READY WITH CHANGES
