The design is close but not ready to build as written: the core approach is sound, but it has two gaps that cause wrong stock or stuck orders if built literally, plus three smaller ones. All five are spec additions of a few lines each, not redesigns.

The parts that hold up: reserving stock in one transaction with a conditional `UPDATE`, charging outside the transaction, using the order id as the provider idempotency key, and reconciling unknown outcomes. It is also sized correctly for 2,000 orders a day, with no queue or saga machinery you don't need.

## Must fix before building

**1. Settling an order is not guarded against running twice.**
- **Failing case:** an order for the last unit of SKU X ends `PENDING` with `available = 0`. The reconciliation job runs on both instances (the design doesn't say where it runs), and both see "declined" from the provider. Both run step 5, so `available` becomes 2 with one physical unit and the next two buyers both succeed. Expected: `available = 1`.
- **Same gap on the paid path:** a double `PAID` settlement sends two confirmation emails.
- **Fix:** make every transition conditional, `UPDATE orders SET status = ... WHERE id = :id AND status = 'PENDING'`, and restore stock or queue the email only if one row changed. Also state where the job runs: one instance, or behind an advisory lock.

**2. Reconciliation has no rule for "provider has never heard of this order".**
- **Failing case:** an instance crashes after step 2 commits and before the charge call goes out. The order is `PENDING`, stock is reserved, and the provider returns not-found. Step 6 only allows `PAID` or `FAILED`, so the order stays `PENDING` forever, the stock stays locked, and the 30-minute alert fires. Expected: the order fails and the stock is released.
- **Fix:** treat not-found as `FAILED` and restore stock. That is safe only if the 2-minute threshold is longer than the worst-case request (4 attempts × 5 s plus backoff), so write that invariant down.
- **Also define:** what happens when the provider reports "still processing". The order should stay `PENDING`.

## Should fix (cheap, do them now)

**3. Idempotency key scope.**
- **Cross-customer leak:** the unique constraint is on the key alone. Customer B sending a key that customer A already used gets A's order back. Make it unique on `(customer_id, idempotency_key)`.
- **Simultaneous duplicates:** the second insert hits the constraint. Say that the service catches the violation and returns the existing order, not a 500.
- **Same key, different cart:** say what this returns. I'd use `422`.

**4. Deadlock on multi-item carts.**
- **Failing case:** order 1 reserves SKUs A then B while order 2 reserves B then A. Postgres aborts one of them and the customer gets a 500. Expected: both succeed, or one gets a clean `409`.
- **Fix:** reserve SKUs in sorted order.

**5. Missing constraints.** The stock `UPDATE` assumes one row per SKU, but the data model declares no keys. Add a primary key on `stock.sku`, a key on `order_items`, and `CHECK (available >= 0)`.

## Test plan gaps

The listed tests cover the request path only. Add:
- **Reconciliation:** each provider answer (paid, declined, not-found, still processing).
- **Double settlement:** settling the same order twice restores stock once.
- **Concurrency:** two concurrent buyers for the last unit, where exactly one wins.
- **Duplicates:** two concurrent `POST /orders` with the same key.
- **Deadlock:** opposite-order carts.

## Questions the design should answer

None of these block the build.
- **Prices:** does `unit_price` come from the client's cart or from a server-side lookup? It must be server-side, or a client can set its own price.
- **After a `202`:** how does the client learn the outcome? Presumably `GET /orders/{id}`, but it isn't stated.
- **Lost email:** a crash between the `PAID` commit and queuing the email loses it permanently. That may be acceptable at this scale, but say so, or write the email job in the same transaction.

Fixes 1 to 5 are about an hour of edits to the doc, so starting tomorrow is realistic if you make them first.

VERDICT: READY WITH CHANGES
