The design isn't quite ready. The structure is sound, but a few correctness gaps should be fixed in the doc before you build, because each one changes code you'll write on day one. None of them needs a redesign. All are small edits.

## What's solid
- Stock is reserved with a conditional `UPDATE` inside the same transaction as the order insert. That avoids overselling with no locks or extra reads.
- The payment call happens outside any transaction, and the order id is sent as the provider's idempotency key. That's the right shape.
- An unknown payment result is handled explicitly: the order stays `PENDING`, the client gets `202`, a reconciliation job settles it, and an alert covers anything left behind.
- At 2,000 orders a day, nothing here is under real load pressure.

## Must fix before building

**1. Stock can be restored twice.** You run two instances, and the doc doesn't say the reconciliation job runs on only one. Steps 5 and 6 both "mark FAILED and restore stock" without checking that the order is still `PENDING`.
- *Case:* SKU `A` has `available = 0`. An order for 1 unit has an unknown payment result. Both instances' jobs pick it up, both get "declined", and both restore stock. You get `available = 2` when it should be `1`, and you oversell one unit.
- *Fix:* make every status change conditional: `UPDATE orders SET status = 'FAILED' WHERE id = :id AND status = 'PENDING'`. Only restore stock if that update changed exactly one row, in the same transaction. Apply the same guard to `PAID`. This also covers a slow request racing the job.

**2. Reconciliation has no "charge not found" outcome.** If an instance crashes after step 2 commits but before step 3 reaches the provider, the provider has no record of the charge. The doc only defines `PAID` and `FAILED`, so the order stays stuck at `PENDING` with its stock held until the 30-minute alert fires, and then someone has to fix it by hand.
- *Fix:* state that "not found, and older than N minutes" settles as `FAILED` and releases the stock. N must be safely longer than the longest possible charge attempt: 4 × 5 s plus backoff.

**3. Orders settled by reconciliation send no confirmation email.** Only step 4 queues the email.
- *Case:* all 4 charge attempts time out, but the provider did charge. The job marks the order `PAID`, and the customer is charged but never gets an email.
- *Fix:* queue the email wherever an order becomes `PAID`. Better still, write the email job as a row in the same transaction as the status change (the outbox pattern). That also closes the gap in step 4, where a crash between "commit" and "queue" loses the email.

**4. Concurrent checkouts can deadlock.** Order X reserves `A` then `B`. At the same moment, order Y reserves `B` then `A`. Postgres kills one transaction with a deadlock error, and that client gets a `500` when it should have succeeded or got a `409`.
- *Fix:* merge duplicate SKU lines and lock rows in SKU order.

## Should fix (smaller)
- **Idempotency key scope and mismatch.** Make the unique key `(customer_id, idempotency_key)`, not a global one. Also define what happens when the same key arrives with a different cart: I'd return `422`, not silently return the old order. Handle the unique-constraint error from two simultaneous duplicate requests by returning the existing order, not a `500`.
- **Where prices come from.** The doc says the client sends "the cart". `unit_price` and `total` must come from the server-side catalog, never from the client. If that's already the plan, write it down.
- **How the client learns the result after a `202`.** There's no `GET /orders/{id}` (or webhook) in the design.
- **Transaction across modules.** Step 2 writes the `stock` and `orders` tables in one transaction, while the design also says "no module reads another module's tables". Say how `OrderCheckout` shares one transaction across the inventory and orders modules, so nobody breaks the boundary to make it work.

## Missing tests
The test list has none of the new behaviour above. Add integration tests for:
- reconciliation settling `PAID`, `FAILED`, and "not found"
- two jobs settling the same order (stock restored exactly once)
- a decline restoring stock
- concurrent duplicate `POST /orders` requests
- the same key with a different cart
- two orders reserving overlapping SKUs in opposite order

## Order lifecycle after the fixes
Every arrow below is a conditional update from `PENDING`. Stock is released only when the `FAILED` update actually changes a row.

```mermaid
stateDiagram-v2
    [*] --> PENDING: stock reserved + order inserted (one transaction)
    PENDING --> PAID: charge succeeded (request or reconciliation) → queue email
    PENDING --> FAILED: declined, or "not found" after N min → release stock
    PAID --> [*]
    FAILED --> [*]
```

Items 1–4 are about an hour of doc edits. Once they're in, I'd start building.

VERDICT: READY WITH CHANGES
