**The design is sound and you can start building tomorrow, but four gaps in `design.md` need a rule written down first.** Two of them corrupt stock or strand orders. Each is a few lines in the doc, not a restructure.

## Must fix before coding

**1. An order can be settled twice, which restores stock twice.**
Nothing says a status change only applies while the order is still `PENDING`, and the reconciliation job runs on both instances.
- **Case:** order for 1 unit of SKU A is `PENDING`, stock is 4. Both instances' jobs pick it up, both see "declined", and both run step 5.
- **Wrong result:** stock is 6.
- **Expected:** stock is 5.
- **Fix:** every transition uses `UPDATE orders SET status = … WHERE id = … AND status = 'PENDING'`, and stock is restored only if that update changed a row. This covers steps 4, 5 and 6.

**2. Reconciliation has no rule for "the provider has never heard of this order".**
Step 6 only settles as `PAID` or `FAILED`.
- **Case:** an instance is restarted (any deploy) after step 2 commits but before the charge call goes out. The provider returns "not found".
- **Wrong result:** the order stays `PENDING` forever and its stock stays reserved until the 30-minute alert pulls in a human.
- **Expected:** the order becomes `FAILED` and the stock is restored.
- **Fix:** treat "not found" on an order older than 2 minutes as `FAILED`. The window is safe because the request path gives up after roughly 30 seconds.

**3. The idempotency key's uniqueness scope is not stated.**
If it is globally unique, customer B sending a key that customer A already used gets A's order back. Make the constraint `(customer_id, idempotency_key)`. Also decide what happens when the same key arrives with a different cart; I'd return `422`.

**4. Multi-item orders can deadlock on `stock`.**
- **Case:** order 1 reserves SKU A then B while order 2 reserves B then A.
- **Wrong result:** Postgres kills one transaction and the customer gets a `500`.
- **Expected:** both succeed, or one gets a clean `409`.
- **Fix:** always update stock rows in sorted `sku` order.

## Decide, but not blocking

- **Where prices come from.** There is no price table, and the doc does not say `unit_price` and `total` are computed server-side. If they come from the client cart, a customer can set their own price.
- **Worst-case request time.** Four attempts at 5 s plus backoff is about 30 s, which is likely at or past the load balancer timeout. Either cut retries to one in the request path and let reconciliation handle the rest, or confirm the timeout.
- **How the client learns the outcome after `202`.** The doc needs a `GET /orders/{id}`.
- **Lost confirmation email.** A crash between the `PAID` commit and queueing the email in step 4 drops it silently. It is acceptable at this volume if you accept it on purpose; otherwise write the email job in the same transaction.
- **Schema details.** Add a primary key on `stock.sku` and on `order_items (order_id, sku)`, a `CHECK (available >= 0)`, and an index on `orders (status, created_at)` for the job.

## Tests to add to the plan

- Two reconciliation runs settle the same declined order; stock is restored once.
- A `PENDING` order with no charge at the provider becomes `FAILED` and stock is restored.
- Two concurrent `POST /orders` with the same key produce one order and one reservation.
- The same key from a different customer creates a separate order.
- Two concurrent orders with the same SKUs in opposite order both complete without a `500`.
- A crash after a successful charge but before the `PAID` update is settled as `PAID` by reconciliation.

## What holds up

Charging outside the transaction, using the order id as the provider idempotency key, the conditional stock decrement, and reconciliation instead of a queue or saga are the right choices for 200 to 2,000 orders a day and a team of four. I would not add anything heavier.

VERDICT: READY WITH CHANGES
