**The design is sound at its core, but it isn't quite ready to build from as written.** Three gaps would cause wrong stock or wrong charges in production; each is a short addition to the doc, so you can still start tomorrow if you fix them first.

## Fix before building

| # | Severity | Problem | Concrete case | Fix |
|---|---|---|---|---|
| 1 | High | Nothing stops an order being settled twice. The doc does not say the status change only applies when the order is still `PENDING`, and with two instances the reconciliation job may run on both. | Order A holds the last unit of SKU X (`available = 0`) and the charge was declined. Both instances' jobs pick it up, and both mark it `FAILED` and restore stock. `available` becomes 2 when it should be 1, so the next two buyers both get a unit that exists once. The same race on `PAID` sends two confirmation emails. | Make every transition `UPDATE orders SET status = … WHERE id = :id AND status = 'PENDING'`, and restore stock or queue the email only if that update changed a row. |
| 2 | High | The reconciliation job has no rule for "the provider has no record of this charge" or "the charge is still processing". | An instance crashes after step 2 commits and before step 3 calls the provider. The order is `PENDING`, the provider knows nothing about it, and step 6 only allows `PAID` or `FAILED`. The order stays `PENDING` and its stock stays reserved until someone answers the 30-minute alert by hand. | Specify that no charge found means `FAILED` plus stock restore, and still processing means leave it for the next run. Also state that the job's `FAILED` path restores stock, as step 5 does. |
| 3 | High | The design never says where prices come from. There is no price or catalogue table, and the client sends the cart. | If `unit_price` and `total` are taken from the request, a client can post a 500.00 item with `unit_price: 0.01` and be charged 0.01. | Name the server-side price source and state that `total` is computed by the service, never read from the request. |

## Fix during the build

4. **Medium: reconciliation is not in the test plan.** Add tests for a job-settled `PAID`, a job-settled `FAILED` with stock restore, no charge found, and two job runs on the same order.
5. **Medium: charge lookup by order id is assumed.** Some providers cannot look up a charge by idempotency key. Confirm yours can; otherwise store the provider's charge reference on `orders`.
6. **Medium: no way for the client to learn the outcome after a `202`.** The doc has no `GET /orders/{id}`, and does not say what a repeated `POST` returns while the order is still `PENDING`.
7. **Medium: deadlocks on multi-item carts.** Order 1 reserves SKU A then B while order 2 reserves B then A; Postgres aborts one and that customer gets a 500. Reserve in sorted SKU order.
8. **Low: the confirmation email can be lost.** A crash after the `PAID` commit and before queuing means no email is ever sent, and the job's `PAID` path does not mention the email at all. A `confirmation_queued_at` column the job also sweeps would cover both.
9. **Low: the idempotency key is unique globally.** Two customers who generate the same key collide, and the second sees the first's order. Make it unique on `(customer_id, idempotency_key)`, and return `422` when a key is reused with a different cart.
10. **Low: missing keys.** `order_items` has no primary key, `stock.sku` is not declared as one, and `status` has no check constraint.
11. **Low: worst-case request time is about 27 seconds or more.** That is four 5-second attempts plus backoff; check it is under the load balancer timeout, or cut the retries to two.
12. **Low: the module rule and the transactions pull against each other.** Steps 2 and 5 change `stock` and `orders` in one transaction, while "no module reads another module's tables" suggests otherwise. Say that the inventory module exposes reserve and restore functions that join the caller's transaction.

## Not covered
The doc does not mention how `customer_id` is authenticated, or refunds and cancellations. I assumed both are out of scope for this revision; if not, they need their own sections.

## What is already right
The charge runs outside the database transaction, the order id is the provider idempotency key, stock is reserved with a conditional update, and email never fails an order. None of that needs to change, and the design is comfortably sized for 2,000 orders a day.

VERDICT: READY WITH CHANGES
