Files
vmall/openspec/changes/archive/2026-09-18-add-flash-sales/tasks.md
T
james c93bff28b0 chore(openspec): archive add-flash-sales
Sync the flash-sales capability plus the order, frontend-mall, and
frontend-shop-admin requirements into the main specs, and write the capability
Purpose the archive leaves as a placeholder.

Restate the flash-price and coupon-exclusion scenarios in the group-buying
order delta, since its MODIFIED checkout block must carry the scenarios the main
order spec now has.
2026-09-18 12:53:26 +00:00

1.9 KiB

1. Flash-sale domain and contract

  • 1.1 Add additive migrations for shop flash-sale sessions, SKU activity items, reserved stock, per-customer limits, and order-item activity snapshots.
  • 1.2 Implement the Rust flash-sale module with shop-scoped session/item management and public active-session discovery.
  • 1.3 Add shared flash-sale types, client methods, localized strings, and fixed-data adapter parity.

2. Checkout price and inventory resolution

  • 2.1 Resolve active eligible activity items server-side during checkout and snapshot final line pricing and activity identity. Reject coupon selection on any shop order that applied flash pricing; restate coupon persistence for non-flash shop orders.
  • 2.2 Conditionally decrement and restore activity inventory with SKU inventory in deterministic lock order; enforce the per-customer limit. Pending-payment cancellation restores both inventories and any redeemed coupon.
  • 2.3 Add integration tests for inactive-window fallback, cross-shop configuration rejection, overlapping group-buy SKU rejection, final reserved-stock contention, customer limits, coupon rejection on flash-priced shop orders, coupon restore on cancel, and cancellation restoration.

3. Merchant and mall surfaces

  • 3.1 Add shop-admin session and activity-item management and a flash-sale nav entry scoped to the authenticated shop.
  • 3.2 Replace the mall flash-sale fixture page with active live sessions, products, price, stock, sell-through, and countdown; show snapshotted activity prices on payment and order-detail views.
  • 3.3 Remove affected direct flash-sale fixture imports while retaining fixed-data adapter support.

4. Verification and specification

  • 4.1 Seed an active deterministic flash sale and browser-smoke its discovery and checkout pricing path.
  • 4.2 Run cargo test for vmall-api, builds for mall and shop-admin, and strict validation for this OpenSpec change.