**You can start building tomorrow, but settle the first four items below before you write the order and reconciliation code.** The design is sound overall. The charge sits outside the transaction, the provider gets an idempotency key, and the reconciler is a good safety net. The gaps are mostly in what happens when things fail halfway.

## Fix before building

**1. High: the reconciler's "not found" case is undefined (step 6).**
- The service can crash after step 2 commits and before the charge request is sent. The order stays `PENDING`, stock is reserved, and the provider has never heard of the order.
- The design doesn't say what the reconciler does when the provider returns "no such charge". Settling it as `FAILED` is the obvious answer, but then a slow charge that lands late leaves a customer charged for a `FAILED` order. You need a rule, for example: only settle as `FAILED` after a cancel or void call, or after a longer grace period.

**2. High: settling an order as `FAILED` in the reconciler must also restore stock.**
- Step 5 restores stock on a decline. Step 6 says only "settles them as `PAID` or `FAILED`".
- Example: the charge times out on every attempt, the reconciler later finds it declined, and the order becomes `FAILED` but the units stay reserved forever.
- Make the status change conditional (`... WHERE status = 'PENDING'`) so the checkout path and the reconciler can't both restore stock for the same order.

**3. Medium: two instances will both run the reconciliation job.**
- The design has two service instances and says nothing about job coordination.
- Without a lock, both settle the same orders at once. Use `SELECT ... FOR UPDATE SKIP LOCKED` or a Postgres advisory lock.

**4. Medium: the module rule conflicts with steps 2 and 5.**
- "No module reads another module's tables" is incompatible with one transaction that changes `stock` and `orders` together, which steps 2 and 5 both require.
- Pick an approach and write it down. The simplest is for `OrderCheckout` to own the transaction and pass it into the inventory and orders modules.

## Fix during the build

**5. Medium: a duplicate `POST /orders` sent at the same moment as the original.**
- Both requests reserve stock. The second then fails on the unique key, and its rollback surfaces as an error instead of returning the existing order.
- If the last unit is already reserved, the second request gets `409` instead of the existing order.
- Insert the order first, catch the unique violation, and return the existing order.

**6. Medium: the idempotency key's scope.**
- A single global unique constraint lets one customer's key collide with another's. Make it unique on `(customer_id, idempotency_key)`.
- Also decide what happens when a repeated key arrives with a different cart.

**7. Medium: the source of prices is not stated.**
- `unit_price` and `total` must come from the server's own catalog, not from the cart the client sends. The design has no price source.

**8. Medium: missing tests.**
- Nothing covers the reconciler: settling as `PAID`, settling as `FAILED` with stock restored, a provider "not found" result, and two instances running at once.
- Also add tests for a decline restoring stock, and for concurrent duplicate requests (item 5).

**9. Low: the data model has no constraints or indexes.**
- Add a primary key on `orders.id`, a primary key or unique constraint on `stock.sku`, a foreign key from `order_items`, `CHECK (available >= 0)`, and an index on `(status, created_at)` for the reconciler and the 30-minute alert.

**10. Low: the confirmation email can be lost.**
- A crash between the commit and the queue call drops it silently.
- At 2,000 orders a day, accepting that is reasonable, but say so. A transactional outbox is the fix if you later want it.

**11. Low: the client can wait about 25 s.**
- Four attempts at 5 s each, plus backoff, can take that long before the `202`. Check that this fits the client's timeout.

## What is fine

- Scale, instance count, and Postgres with point-in-time recovery are adequate for 2,000 orders a day.
- Keeping the provider call outside any transaction is correct.
- The alert threshold is consistent with the 5-minute reconciler.

VERDICT: READY WITH CHANGES
