**Almost ready.** The overall shape is sound and fits your scale. The main sequence (reserve stock, charge outside the transaction, reconcile unknown results) is the right one. But several gaps sit in the money and stock paths, and they're cheap to fix on paper today. They'd be expensive to find after the code exists.

## Fix before building

1. **Two actors can settle the same order, and the design doesn't say how they're kept apart.**
   - The request thread (steps 4 and 5) and the reconciliation job (step 6) can both act on one `PENDING` order.
   - Example: the charge times out and the client gets `202`. The provider's confirmation then arrives late, and the reconciler reads "declined" or "not found" while the request thread marks it `PAID`.
   - The design needs two rules:
     - Every status change is `UPDATE ... SET status=:new WHERE id=:id AND status='PENDING'`, and only the caller whose update changed a row may act on the outcome.
     - Stock is restored only by the caller that wins the `PENDING` → `FAILED` change. Otherwise stock is restored twice and you oversell.

2. **Step 6 doesn't say what the reconciler does when the provider's answer is neither paid nor declined.**
   - "Not found", "processing", and provider errors are all unaddressed.
   - Example: the provider says "processing" and the job marks the order `FAILED`. The charge then completes, so the customer is charged for an order you released.
   - Specify that only an explicit paid or declined answer settles an order. Anything else leaves it `PENDING` and the 30-minute alert covers it.
   - Also say that the reconciler's `FAILED` path restores stock, since step 5 describes that only for the request thread.

3. **The reconciler would run on both instances.**
   - You have two instances and a job every 5 minutes, so both will run it and race on the same orders.
   - Pick one approach: `SELECT ... FOR UPDATE SKIP LOCKED` on the batch, or a Postgres advisory lock. Either is small.

4. **"No module reads another module's tables" conflicts with step 2.**
   - Step 2 reserves stock (inventory) and inserts the order (orders) in one transaction.
   - Decide which of these you want:
     - The inventory module exposes `reserve(items)` that takes the caller's transaction (simplest, and fine at this scale).
     - Or `OrderCheckout` owns the transaction and passes it to both modules.
   - Write the decision down. Otherwise the first implementer will quietly break the rule.

5. **Stock updates can deadlock.**
   - Two carts containing the same SKUs in different order lock rows in opposite order.
   - Example: cart A is [X, Y] and cart B is [Y, X]. Fix: sort the items by SKU before the updates.

6. **Duplicate requests that arrive at the same time aren't covered.**
   - The unique constraint makes the second insert fail and roll back, which is correct. The design doesn't say it then looks up and returns the existing order instead of a `500` or `409`.
   - Scope the key to `(customer_id, idempotency_key)`. A global unique key lets one customer's key collide with another's.

## Smaller gaps

- **Schema.** There are no primary keys or constraints listed: `stock.sku`, `order_items`, and the idempotency unique index. Add `CHECK (available >= 0)` as a backstop.
- **Email queue.** The design doesn't say what the queue is, and the context lists only Postgres.
  - If it's an external broker, a crash between the commit and the enqueue loses the email.
  - An `outbox` table in the same transaction as the `PAID` update fixes that, and it's the natural choice at your size.
  - If you accept the loss window instead, say so.
- **Pricing.** The design doesn't say where `unit_price` and `total` come from. They must be computed server-side from your own source, never taken from the cart the client sends.
- **Logging.** Alerting on orders `PENDING` for more than 30 minutes is good. Also log or count each reconciler outcome, so you can see it working.

## Tests

The test list never mentions the reconciliation job, which is the riskiest part. Add:
- reconciler settles to `PAID`, and to `FAILED` with stock restored
- reconciler gets an unknown answer from the provider, so the order stays `PENDING`
- reconciler and request thread race on one order, and stock is restored exactly once
- two concurrent `POST`s with the same key create one order and one charge
- a multi-item cart where the second item is out of stock rolls back the first reservation
- email failure leaves the order `PAID`

None of these need a redesign. They're about an hour of editing to `design.md`, and then you can start.

VERDICT: READY WITH CHANGES
