**Not quite ready to build from as written, but the architecture is sound.** The problems are a handful of unanswered decisions, mostly about what happens when a step fails halfway. Settle them in the doc first and you can start tomorrow. The first four below are the ones that can lose money or leave orders stuck.

## Must settle before coding

1. **Crash between step 2 and step 3 leaves an order that is never charged.**
   - Example: the instance dies right after committing the `PENDING` order. The stock is held and no charge exists at the provider.
   - Step 6 only says "ask the provider for the charge status". It doesn't say what to do when the provider answers "no such charge".
   - Pick one. Either the reconciler charges the order (safe, because the order id is the provider's idempotency key), or it fails the order and restores the stock.
   - As written, the order sits `PENDING` until the 30-minute alert fires.

2. **The reconciler can mark an order `FAILED` when the charge later succeeds.**
   - Step 6 handles only `PAID` and `FAILED`. Providers also report "processing" or "requires action".
   - If the reconciler maps those to `FAILED` and restores the stock, the customer is charged for an order that no longer exists.
   - Define the full mapping from provider statuses to your three. Say what stays `PENDING`.
   - Say what happens if a charge succeeds after the order is `FAILED`. You probably need an automatic refund path.

3. **Nothing stops two actors from settling the same order twice.**
   - The original request (step 5) and the reconciler (step 6) can both settle an order.
   - With two instances, both also run the reconciler.
   - Example: both mark an order `FAILED` and both restore stock, so `available` is inflated.
   - Make every transition `UPDATE ... WHERE status='PENDING'`. Restore stock only if that update changed a row.
   - Make the reconciler take `FOR UPDATE SKIP LOCKED` or an advisory lock.

4. **The reconciler's ability to look up a charge is an unchecked assumption.**
   - Confirm the provider can look up a charge by the idempotency key or order id.
   - Confirm how long it remembers idempotency keys.
   - Also store the provider's charge id on the order. There is no column for it today.

5. **There is no way for the client to learn the outcome of a `202`.**
   - No `GET /orders/{id}` is specified. Add it, with ownership checks. The doc doesn't mention authentication at all.

6. **Idempotency details are missing.**
   - Scope the unique key to `(customer_id, idempotency_key)`. A global key lets one customer collide with another's order.
   - Say what happens on the same key with a different cart. Return `422`, not the old order.
   - Say how concurrent duplicates resolve. The second insert blocks on the unique index, then must return the first order instead of a `500`.
   - Say which status code a replay returns.

7. **The "no module reads another module's tables" rule conflicts with step 2.**
   - Step 2 reserves stock (inventory) and inserts the order (orders) in one transaction.
   - Name how a transaction is shared across modules. A unit-of-work object passed in by `OrderCheckout` is the usual way. Otherwise the boundary rule is fiction.

## Fix in the schema and spec, small but real

- **Deadlocks:** reserve stock in a fixed order, sorted by `sku`. Two carts with the same items in different order will deadlock otherwise.
- **Pricing:** state that the server computes `unit_price` and `total` from its own catalog, never from the client cart. Validate `quantity > 0`.
- **Constraints:** none are specified. Add primary keys, a foreign key from `order_items`, `CHECK (available >= 0)`, a `CHECK` on `status`, and an index on `(status, created_at)` for the reconciler.
- **Request duration:** worst case is roughly 4 attempts × 5 s plus backoff, so the HTTP call can run 20+ seconds. Say whether that is acceptable. Also say that only network errors and 5xx responses are retried, never declines.
- **Email:** a crash between the `PAID` commit and the enqueue loses the email silently. Use a transactional outbox, or accept the loss and say so.

## Tests are missing the scenarios that matter

The six listed tests cover the happy paths and the simple failures. Add these:
- A concurrent duplicate `POST` with the same key.
- Concurrent buyers of the last unit. Buying the last unit sequentially proves little.
- A crash after the order commit and before the charge.
- The reconciler settling `PAID`, `FAILED`, "processing" and "not found".
- A race between the reconciler and the original request.
- The decline path restoring stock exactly once.
- The 30-minute alert.

## What's good

- The charge sits outside the database transaction.
- The order id is the provider idempotency key.
- The unknown-result path is designed, not ignored.
- The reconciler exists at all.
- The module layering is clear.

Items 1–4 and 7 are decisions, not rewrites. Expect about half a day of editing the doc before you start.

VERDICT: READY WITH CHANGES
