557 B
557 B
Inventory Module — Manual Review Checklist
High-risk module: stock/inventory changes require human confirmation.
- Stock decrement is atomic (conditional UPDATE, not read-then-write)
- Oversell prevented:
UPDATE ... SET qty = qty - ? WHERE qty >= ? - Reservation vs. deduction semantics are consistent
- Concurrent orders cannot both reserve the last unit
- Restock/return increments handled correctly
- Inventory events are idempotent (retry-safe)
- Async stock updates propagate to downstream (warehouse, carts) safely