Yes, you can start tomorrow, but fix two gaps in the settlement logic first. The core flow is sound: stock is reserved in a transaction, the payment call happens outside any transaction, the provider receives an idempotency key, and a reconciliation job covers unknown outcomes. The design is also proportionate to 200 to 2,000 orders a day. The gaps below are all small edits to `design.md`.

## Fix before building

**1. High: stock is never restored when reconciliation settles an order as `FAILED`.** Step 5 restores stock on a decline, but step 6 only says "settles as PAID or FAILED".
- Example: the provider times out on all 4 attempts and the client gets `202`. Reconciliation later learns the charge was declined and marks the order `FAILED`. The reserved units stay deducted from `stock` permanently.
- Fix: say that every move to `FAILED`, from any path, restores stock in the same transaction. Put that in one shared `fail_order` function so both paths use it.

**2. High: status changes are not guarded, so stock can be restored twice or an order can flip state.** The request thread and the reconciliation job can both settle the same order. The request thread may still be retrying while reconciliation checks the provider after 2 minutes.
- Example: the request thread marks an order `FAILED` and restores 3 units. Reconciliation read `PENDING` earlier, so it also marks the order `FAILED` and restores 3 more units. Stock is now inflated by 3.
- Fix: make every transition conditional, `UPDATE orders SET status=… WHERE id=:id AND status='PENDING'`. Restore stock only when that update changes a row.

**3. Medium: the reconciliation job has no rule for a charge the provider has never heard of.** If the service crashes after step 2 and before step 3, the order is `PENDING` with stock reserved, and no charge exists.
- Currently the only handling is the 30-minute alert, which leaves a person to clean up.
- Fix: decide whether "not found, and older than N minutes" means `FAILED` plus a stock restore, or means retry the charge.

**4. Medium: nothing stops two instances from running reconciliation at once.** There are two instances, so both will run the job every 5 minutes. Combined with item 2, they will race on the same orders. Fix: pick one lock, for example `SELECT … FOR UPDATE SKIP LOCKED` on the pending rows.

**5. Medium: a `202` response has no follow-up.** The client gets `202` but there is no `GET /orders/{id}` in the design, so it cannot find out whether the order became `PAID` or `FAILED`. Add that endpoint, or state that the confirmation email is the only channel.

## Small items, fix while building

- **Idempotency key scope (low):** a globally unique key means two customers who send the same key collide. If customer B's key matches customer A's, B receives A's order. Make the constraint `(customer_id, idempotency_key)`.
- **Concurrent duplicate requests (low):** the second request fails on the unique constraint and rolls back. It should then read and return the winner's order, retrying briefly if that order has not committed yet. Add this case to the duplicate-`POST` test.
- **Deadlocks on multi-item carts (low):** step 2 updates `stock` row by row. Two carts with the same SKUs in opposite order can deadlock. Sort items by `sku` before reserving.
- **Lost confirmation email (low):** a crash between the `PAID` commit and queueing the email loses the email silently. A small outbox table written in the `PAID` transaction closes this. Also name the queue technology, since only Postgres is listed.
- **Schema gaps (low):** the data model lists no primary keys, foreign key from `order_items`, unique `stock.sku`, or index on `(status, created_at)` for the reconciliation query. It also doesn't store the provider's charge id.
- **Synchronous wait (low):** 4 attempts at 5 seconds plus backoff can hold a request open for about 30 seconds or more. Check this against the load balancer and client timeouts.
- **Test list (low):** add tests for reconciliation (declined, paid, not found), the double-settle race from item 2, and stock restoration on the `FAILED` path.

## Not verified or not specified (speculative)

- The design doesn't say where `unit_price` comes from. If it comes from the client's cart, the client could set its own prices. Confirm it is read server-side.
- There are no requirements or non-goals section. Cancellation, refunds, and authentication are absent, so I assumed they are out of scope. Say so in the doc if that's right.

VERDICT: READY WITH CHANGES
