Active marketplace listings require completed seller payout onboarding and at least one unit in stock before publication.
- `src/app/api/marketplace/listings/route.ts`
- `src/app/api/marketplace/listings/[itemId]/route.ts`
This artifact summarizes how HOWFAR prevents active zero-stock listings, deducts stock during checkout, marks listings sold out, and rejects oversell attempts once the final unit has been purchased.
HOWFAR now exposes an explicit proof artifact for stock-sensitive commerce paths so reviewers can see what is guarded in code, what is covered in tests, and what happens when inventory reaches zero.
Active marketplace listings require completed seller payout onboarding and at least one unit in stock before publication.
Order creation decrements inventory inside a transaction and only succeeds when the requested quantity is still available.
When remaining inventory reaches zero, the listing moves out of the active catalog and is marked sold out.
The integration suite now proves single-unit purchase, catalog removal after sell-out, and oversell rejection on a second checkout attempt.