**You can start tomorrow if you settle the two high-severity items below first. I'd put them in design.md before the first commit. They're short decisions, not rework.** I found 11 problems. Nothing is wrong with the overall shape: the charge sits outside the transaction, the provider call is idempotent, and reconciliation is a good safety net.

## High

1. **Reconciliation can leak stock or restore it twice.**
   - Step 5 restores stock when a charge is declined. Step 6 says reconciliation settles orders as `PAID` or `FAILED`, but it doesn't say whether that also restores stock.
   - Failing case: the provider times out four times, so the order stays `PENDING`. Reconciliation later learns the charge was declined and marks it `FAILED` without restoring stock. Those units are lost until someone fixes them by hand.
   - The opposite also happens. The request thread and the reconciliation job can both settle the same order, and both restore stock, so stock is double-counted.
   - **Fix:** one `settle(order, outcome)` function used by steps 4, 5 and 6. It runs `UPDATE orders SET status=… WHERE id=… AND status='PENDING'` and restores stock only if that update changed a row.

2. **The reconciliation job runs on both instances.**
   - The context section has two instances, and nothing says only one runs the job. Both would settle the same orders. The conditional update from item 1 makes this safe, but the job should still use `FOR UPDATE SKIP LOCKED` or an advisory lock so the work isn't duplicated.

## Medium

3. **A `PENDING` order with no charge at the provider is undefined.** If the service crashes after step 2 and before step 3, the provider has never heard of the order. The design doesn't say what reconciliation does when the provider answers "not found". I'd retry the charge, or mark the order `FAILED` and restore stock. Pick one.

4. **Concurrent duplicate `POST`s are not handled.** If two requests with the same key arrive together, the second insert fails on the unique constraint. The design says a repeated key returns the existing order, but it doesn't say the service catches that error and returns the first order. Two related gaps:
   - Scope the key per customer.
   - Decide what happens when the same key arrives with a different cart.

5. **The source of `unit_price` is not stated.** There is no catalog table. The server must price items itself. If it takes prices from the client, anyone can order at any price. Say where prices come from.

6. **The tests miss the risky paths.** The list covers the happy and failure cases at the HTTP level but leaves out:
   - reconciliation, in all three outcomes: paid, declined, and not found
   - the concurrent duplicate `POST`
   - a crash between charge success and `PAID`
   - stock being restored exactly once
   - a failed email not failing the order

   Add these to the plan. Your standards say tests come first, so the reconciliation and concurrency tests should be written before that code.

7. **The `orders` and `stock` update has to share one transaction, but modules can't read each other's tables.** Step 2 updates `stock` (inventory) and inserts into `orders` in one transaction, yet the design forbids modules reading each other's tables. Decide how the transaction is shared, for example `OrderCheckout` opens it and passes it to both modules. Write that decision down.

## Low

8. **Stock updates can deadlock.** Two carts with the same SKUs in different order can lock rows in opposite order. Sort the SKUs before reserving.

9. **The client request can run about 25 seconds or longer.** Four attempts at 5 s each, plus backoff, all happen inside the request. Many clients and load balancers time out before that. Either lower the budget or accept it and say so.

10. **A crash after commit loses the confirmation email.** Step 4 commits and then queues the email. A crash in between drops it. This is acceptable for email, but state it, or use an outbox table.

11. **Small gaps:**
    - Provider responses other than success or decline (a 4xx for a bad request, a 5xx) have no defined handling.
    - `stock` and `order_items` have no primary keys or foreign keys.
    - Authentication, and where `customer_id` comes from, isn't mentioned.

At about 2,000 orders a day, none of the scale choices (single database, two instances, a 5-minute job) need to change.

VERDICT: READY WITH CHANGES
