**No, it isn't ready.** Three flaws in the checkout flow can double-charge a customer, oversell stock, or create duplicate orders. Each fix is small, but the design should change before you build.

## Must fix before building

1. **Retries can charge the customer twice (step 3).**
   - The payment key is `<order id>-<attempt number>`, so every retry is a new key to the provider.
   - Example: attempt 1 times out after the provider has already charged the card. Attempt 2 uses a different key, so the provider charges again.
   - The key should be the order id alone, identical on every attempt. The provider's dashboard already shows each attempt, so you don't need the attempt number in the key. Keeping the key stable also lets the reconciliation job in step 6 look up the charge unambiguously.

2. **Duplicate-request protection doesn't work with two instances (step 1).**
   - Each instance keeps its own in-memory map of keys, which is also lost on restart.
   - Example: a client retries `POST /orders` with the same key and the load balancer sends it to the other instance. That instance has never seen the key and creates a second order and a second charge.
   - Store the key in Postgres with a unique constraint, in the same transaction as the order insert.

3. **Stock can be oversold (step 2).**
   - The service reads `available` and then writes `available - quantity`, with no lock.
   - Example: two buyers each see `available = 1` at the same moment, both pass the check, and both commit. You've sold two units of one item.
   - Use `UPDATE stock SET available = available - :q WHERE sku = :s AND available >= :q` and treat zero rows updated as "short". Alternatively, use `SELECT ... FOR UPDATE`. Add a `CHECK (available >= 0)` constraint as a backstop.
   - The "buying the last unit" test must run two requests concurrently. A single-threaded test will pass against the broken design.

## Should fix (cheap now, painful later)

4. **Money is stored as `double precision`** in `total` and `unit_price`. Use `numeric(12,2)`, or integer minor units such as cents.
5. **The reconciliation job isn't safe to run on two instances (step 6).**
   - Both instances will run it, and it can race with step 4 or 5 on the same order.
   - Claim rows with `FOR UPDATE SKIP LOCKED`, and make status changes conditional (`WHERE status = 'PENDING'`).
   - Say explicitly that reconciliation also restores stock when it settles an order as `FAILED`. Step 5 does this, but step 6 doesn't mention it.
6. **The confirmation email can be lost.** If the service crashes after committing `PAID` but before queuing the email, no email is ever sent. Write the email request in the same transaction as `PAID` (a transactional outbox), or accept the gap and state it.
7. **The schema is missing constraints.** `stock.sku` needs a primary key. `order_items` needs a primary key on `(order_id, sku)` and a foreign key to `orders`. Add an index for the reconciliation query on `orders(status, created_at)`.
8. **The module rule contradicts step 2.** "No module reads another module's tables" conflicts with one transaction that writes `stock` and `orders`. Decide which module owns that transaction (probably `OrderCheckout` calling an inventory interface that takes the open transaction), and write it down.

## Tests to add

- Concurrent last-unit purchase: one wins, one gets `409`.
- Duplicate `POST /orders` routed to different instances.
- Timeout on the first attempt, where the provider actually charged: the retry must reuse the same key and not charge twice.
- Reconciliation racing with a late success response.
- Crash between charge success and `PAID` is recovered by reconciliation.

## What's already good

The overall flow shape is sound. The external call sits outside the transaction, the `PENDING` plus reconciliation approach is the right pattern, and the `202` for an unknown result and the 30-minute alert are sensible. The layering and the test list are also reasonable. For about 2,000 orders a day, a single Postgres database and two instances are plenty.

Once items 1–3 are in the design, with 4–8 settled or explicitly deferred, you can start building. I can make those edits to `design.md` if you want.

VERDICT: NOT READY
