**Short answer:** You can start building tomorrow, but fix four gaps in the design first. The core approach is sound, and each fix is a few lines of design.

The sound parts:
- Stock is reserved with a conditional update.
- The payment call sits outside the database transaction.
- The provider is sent the order id as its idempotency key.
- A reconciliation job covers crashes and unknown results.

The load (200 to 2,000 orders a day, one Postgres) is comfortable.

## Issues to fix before building

**1. High: stock leaks when reconciliation settles an order as `FAILED` (step 6).**
- Step 5 restores stock on a decline, but step 6 says only that the job settles orders as `PAID` or `FAILED`.
- Example: a charge times out on every attempt, so the order stays `PENDING`. Reconciliation later learns the charge failed and marks it `FAILED`. Nothing returns the reserved units, so they are lost until someone fixes the `stock` table by hand.
- The same step doesn't say the job queues the confirmation email when it settles an order as `PAID`.
- Fix: say that both the decline path and the reconciliation path call one shared "fail order" operation that restores stock. Say that the same applies to "mark paid", which also queues the email.

**2. High: settling an order can race with the original request (steps 4–6).**
- The design doesn't say the status change is conditional, for example `UPDATE ... SET status = 'FAILED' WHERE id = :id AND status = 'PENDING'`.
- Without that, the job and a slow request could both settle the same order, and stock would be restored twice.
- Fix: make every status change conditional on `PENDING`, and restore stock only if that update changed a row.

**3. Medium: the reconciliation job will run on both instances.**
- The context section says there are two service instances, and the job runs every 5 minutes. Nothing stops both from settling the same order. Issue 2's conditional update makes this safe, but the duplicate provider calls are still wasted.
- Fix: choose a lock, such as a Postgres advisory lock or `SELECT ... FOR UPDATE SKIP LOCKED` on the pending orders.

**4. Medium: the "separate modules" rule conflicts with step 2.**
- The design says no module reads another module's tables.
- Step 2 reserves stock (inventory) and inserts the order (orders) in one transaction.
- The design doesn't say how the two modules share that transaction. This is the structural decision you need to make before writing code.
- Fix: for example, `OrderCheckout` opens the transaction and passes it to both modules.

## Smaller items

- **Low: deadlock risk.** Step 2 updates stock one SKU at a time. Two carts containing the same SKUs in opposite order can deadlock. Fix: sort SKUs before reserving.
- **Low: schema gaps.**
  - No primary key is given on `stock.sku` or `order_items`, and no foreign keys.
  - The unique constraint on `idempotency_key` is described in the flow but not in the data model.
  - Make the key unique per customer, not globally.
  - Add an index on `(status, created_at)` for the reconciliation query.
- **Low: tests are missing the reconciliation job.** The list covers the checkout paths but has no case for settling an order as `PAID` or `FAILED`, restoring stock, or a double run. Given the fixes above, add those. Also add a concurrent duplicate `POST` test and an email-failure test.
- **Low: the email can be lost.** If the process dies between the `PAID` commit and queuing the email, the email is never sent. That may be acceptable, but say so.

## Questions I can't answer from the document (speculative)

- Where does `unit_price` come from? If the client sends it in the cart, a client could set its own prices. If the server looks it up, the design doesn't show where.
- Which provider errors are retried? A decline should not be retried. A 5xx or a timeout should be.
- How is `customer_id` authenticated? This may be out of scope for this document.
- What does a repeated key return while the first request is still in flight?

VERDICT: READY WITH CHANGES
