The design is sound enough to start building tomorrow, provided you fix two gaps in the reconciliation job first; both are small design edits, not rework.

The core holds up: the stock reservation is atomic, the payment call sits outside any transaction, the charge is idempotent on order id, and an unknown payment result has a defined path.

## Must fix before building

**1. Settling an order can restore stock twice.**
Nothing in the design says the move out of `PENDING` is conditional, or that only one instance runs the reconciliation job.
- **Failing case:** an order holds 1 unit of SKU A, so `available` is 0. Both instances run the job in the same 5-minute tick, and both see the charge as declined. Each marks the order `FAILED` and adds 1 back, so `available` is 2 when it should be 1. The next two buyers both succeed against one physical unit.
- **Fix:** make every transition `UPDATE orders SET status = ... WHERE id = :id AND status = 'PENDING'`, and restore stock or queue the email only if that update changed a row. This applies to steps 4, 5 and 6.

**2. The job has no rule for "provider has never heard of this order".**
Step 6 says the job settles orders as `PAID` or `FAILED`, but there is a third answer.
- **Failing case:** the instance crashes after step 2 commits and before step 3 sends the charge. The provider returns "not found", so the order stays `PENDING` and its stock stays reserved until someone responds to the 30-minute alert.
- **Expected:** "not found" on an order older than 2 minutes settles as `FAILED` and restores stock. Also state that "still processing" leaves the order `PENDING`.

## Should fix, can land during the build

- **Deadlocks on multi-item carts:** order 1 reserves SKU A then B while order 2 reserves B then A, and Postgres aborts one. Reserve in sorted SKU order.
- **Concurrent duplicate `POST /orders`:** two requests with the same key can both pass the "does it exist" check. The loser must catch the unique violation, roll back its reservation, and return the existing order.
- **Idempotency key scope:** make the unique constraint `(customer_id, idempotency_key)`, so one customer's key cannot collide with another's. Decide what a repeated key with a different cart returns; I suggest `422`.
- **Lost confirmation emails:** a crash between the `PAID` commit and the enqueue in step 4 loses the email for good. The design also does not say whether orders the job settles as `PAID` get an email. Having the job or a small sweep enqueue for any `PAID` order with no email sent covers both.
- **Price source:** the design does not say where `unit_price` and `total` come from. State that the server computes them and never trusts the cart.
- **Client after `202`:** there is no `GET /orders/{id}` for the client to poll.
- **Schema constraints:** add a primary key on `order_items`, a primary key on `stock.sku`, and `CHECK (available >= 0)`.

## Test plan gaps

The reconciliation job has no tests listed, and it is where both must-fix items are. Add:
- the job settling an order as `PAID`, as `FAILED`, and on "not found";
- two job runs settling the same order, with stock restored once;
- two concurrent buyers for the last unit, with exactly one success;
- concurrent duplicate `POST /orders` with the same key;
- opposite-order multi-item carts.

VERDICT: READY WITH CHANGES
