**Not ready to start building tomorrow.** The payment step in `design.md` can charge a customer twice, or charge them and leave no order. The fixes are small, but they change the flow, so settle them before you write code.

## Must fix before building

1. **Retrying the charge can double-charge (step 4).**
   - Case: the charge API takes 6 seconds and succeeds on the provider's side, but your 5-second timeout fires. You retry, and the customer is charged twice.
   - Fix: send an idempotency key with every charge call, for example the order id plus an attempt-independent token. Most providers support this. Confirm yours does.

2. **A timeout after the last retry leaves the outcome unknown, and the design treats it as a failure (step 6).**
   - Case: all 3 attempts time out, but one actually went through. You roll back and tell the client "error". The customer is charged and there is no order.
   - Fix: add an explicit `PAYMENT_UNKNOWN` state. A background job asks the provider what happened and settles the order.

3. **The database transaction stays open during the payment call (steps 3–5).**
   - Case: the service crashes after the provider confirms the charge but before `commit`. The `PENDING` insert is gone and the payment is real, so there is no record of it.
   - Holding the transaction also ties up a database connection for up to 15 seconds or more (3 × 5s) on every checkout.
   - Fix: commit `PENDING` first, then call the provider outside any transaction, then update the status in a second short transaction. A crash then leaves a `PENDING` row that the reconciliation job can resolve.

4. **A client retry creates a duplicate order (step 1).** If the client's request times out and it resends `POST /orders`, you get two orders. Require a client-supplied idempotency key with a unique constraint on it.

5. **Stock is checked but never reserved (step 2).**
   - Case: the cache says 1 unit is left, and two customers check out within the same 5-minute window. Both pass, and both pay.
   - The design doesn't say who decrements stock or what happens on oversell. Pick one: reserve stock atomically at order time, or accept oversell and define a cancel-and-refund path. The 5-minute staleness is fine at your volume only if that path exists.

6. **Nightly backups on a single instance mean you can lose up to 24 hours of paid orders.** For payment data that is too much. Turn on WAL archiving (point-in-time recovery) before launch. The cost is small compared to the exposure.

7. **The test plan skips the failure paths.** The risks above are all in failure paths, and the plan has one happy-path integration test. Before building, add tests using a fake payment provider for:
   - a timeout followed by a retry that succeeds
   - a timeout where the charge actually went through
   - a crash between the charge and the status update
   - a duplicate client request
   - an oversell

## Gaps to decide, not blockers

- **State machine:** only `PENDING` and `PAID` exist. You need at least `FAILED`, `PAYMENT_UNKNOWN` and `CANCELLED`, plus a refund path.
- **Email:** sending it inline after commit means a crash or provider outage silently drops it. Write an outbox row in the same transaction as `PAID`, and send from a worker.
- **Latency:** the worst-case request takes more than 15 seconds. Check this against the client's timeout, or make checkout return `202` and poll.
- **Missing topics:**
  - Where prices come from. If the cart carries them, the client can set its own price.
  - Authentication.
  - Metrics and alerts. Logging alone won't tell you that `PAYMENT_UNKNOWN` orders are piling up.
- **Module boundaries:** "no module reads another's tables" is good. Say how the orders and payments modules coordinate once the single transaction is split in two (point 3).

## What's good

- Module separation and a thin-routes rule.
- An honest, quantified reason for accepting the stale cache.
- Order id on every log line.

Items 1–6 and the test list in item 7 are about a day of design edits. Once those are written into `design.md`, you can start.

VERDICT: NOT READY
