**It's close, but not ready to build from as written.** The core flow is sound: the stock reserve and the order insert share one transaction, the charge happens outside any transaction, and the provider gets an idempotency key. But there are six gaps to settle first. Most are one-line decisions, so this is an hour of editing, not a redesign.

## Fix before building

1. **The reconciliation job can restore stock twice.**
   - Two instances run the job every 5 minutes, and the request thread can also be settling the same order.
   - Example: both instances see order A as `PENDING`, the provider says declined, and both mark it `FAILED` and add the stock back. `available` is now too high, so you oversell.
   - Fix: make every status change conditional, `UPDATE orders SET status='FAILED' WHERE id=:id AND status='PENDING'`. Restore stock only if that update changed a row. Apply the same rule to `PAID` in step 4.
   - Also decide how the job avoids running twice at once, for example `SELECT ... FOR UPDATE SKIP LOCKED` on the orders it picks up.

2. **Step 6 doesn't say what "settles" means for stock.** It says "settles as `PAID` or `FAILED`", but never says that `FAILED` also restores stock the way step 5 does. Say so, and make step 5 and step 6 share one code path.

3. **A crash between commit and charge is undefined.**
   - If the process dies after step 2 commits but before the charge call, the order is `PENDING` and the provider has never heard of it. The reconciliation job then asks the provider for a charge that doesn't exist.
   - Decide whether "not found" means "charge it now" or "mark `FAILED` and restore stock". Also decide what a client retry with the same key does when it finds an existing `PENDING` order (re-attempt the charge, or just return it).

4. **The data model has no keys or indexes.**
   - `stock.sku` needs a primary key. Without one, the step 2 `UPDATE` could touch several rows.
   - `orders.id` needs a primary key, and `idempotency_key` needs the unique constraint step 1 relies on. The doc doesn't say whether the key is unique alone or per customer.
   - The job needs an index on `(status, created_at)`.
   - Store the provider's charge id once you have it.

5. **Multi-item orders can deadlock.** Two carts with the same SKUs in different order will lock rows in opposite order. Sort the SKUs before reserving, and add a test for it.

6. **The module rule contradicts step 2.**
   - "No module reads another module's tables" conflicts with one transaction that updates `stock` and inserts into `orders`.
   - Pick one. I'd have inventory expose `reserve(tx, items)` and `release(tx, items)`, with `OrderCheckout` owning the transaction. Write that into the doc.

## Smaller items (can be settled while building)

- **Lost confirmation email.** Step 4 commits and then queues the email, so a crash in between loses it. At 200 orders a day that may be acceptable. If so, say that explicitly. Otherwise add an outbox table.
- **Duplicate requests at the same moment.** Two identical `POST`s can arrive together. The loser hits the unique-key error, and the winner's order may not be committed yet. State what the loser returns, such as `409` with "retry".
- **Server-side pricing.** State that `unit_price` and `total` come from the server, not the cart the client sends.
- **Request length.** Four attempts at 5 s plus backoff can hold a request for 25 s or more. Check that the load balancer timeout is longer than that, or the client sees a failure while the charge goes through.
- **API contract.** Add response shapes and error codes (validation `4xx`, `202`, `409`) and say how callers are authenticated.
- **Queue choice.** The context doesn't name a queue, so name one.

## Test gaps

The list never covers the reconciliation job, which is where the hardest bugs are. Add tests for:

- `PENDING` settling to `PAID`, and to `FAILED` with stock restored.
- The job running twice, or racing the request thread, so stock is restored once.
- A crash before the charge.
- The decline path restoring stock.
- Two concurrent requests with the same key.
- Opposite SKU order on multi-item carts.

VERDICT: READY WITH CHANGES
