Skip to content
Home/Trust Center/Marketplace inventory proof
PUBLIC PROOF ARTIFACT

Marketplace stock controls that can be inspected, not merely promised.

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.

Sprint 2 proofCatalog + checkout + inventoryUpdated 2026-03-31
4
Published proof checks
1
Public artifact
0
Decorative claims
WHY THIS EXISTS
Inventory claims should come with receipts.

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.

  • Seller publishing requires payout readiness
  • Stock deduction is transaction-backed
  • Oversell attempts are rejected after sell-out
4Published proof checks
1Public artifact
0Decorative claims

Published checks

Seller publish guards

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`
Transactional inventory deduction

Order creation decrements inventory inside a transaction and only succeeds when the requested quantity is still available.

  • `src/app/api/marketplace/orders/route.ts`
Sold-out transition

When remaining inventory reaches zero, the listing moves out of the active catalog and is marked sold out.

  • `src/app/api/marketplace/orders/route.ts`
  • `src/lib/server/marketplaceCatalog.ts`
Integration proof published

The integration suite now proves single-unit purchase, catalog removal after sell-out, and oversell rejection on a second checkout attempt.

  • `tests/integration/next-app-routes.integration.spec.ts`
  • `docs/ops/P1_MARKETPLACE_INVENTORY_PROOF_2026-03-31.md`

What this proves

Catalog proof
Buyers only see active in-stock listings in the catalog after sell-out transitions.
Checkout proof
Orders only succeed while inventory remains available and seller payout onboarding is complete.
Inventory proof
The last unit can be bought exactly once. After that, the listing is sold out and later attempts are rejected.