Skip to content

E5-F4: Purchase Window Enforcement

Epic: E5: Waiting Queue System

Size: S (Small)

Problem / Outcome

User has 20 minutes to complete purchase once at front of queue.

Scope

In-Scope:

  • 20-minute window starts when user reaches front
  • Cart TTL tied to purchase window
  • Window expiration handling

Out-of-Scope:

  • Window extension

Acceptance Criteria

  • AC1: When user reaches front, 20-minute purchase window starts
  • AC2: If window expires, user removed from queue and must rejoin at end
  • AC3: Notification sent when window expires: "Your purchase window has expired"

Data Model Impact

QueueEntry table:
- window_started_at (TIMESTAMP, nullable)
- window_expires_at (TIMESTAMP, nullable)
- status (ENUM includes: window_expired)

Window expiration triggers:
- Release reserved seats
- Remove from active queue
- Send expiration notification

Permissions/Roles

  • System

How to Verify

npm test -- --grep "purchase window"

Expected: Window enforced, expiration handled correctly.

Dependencies

Implementation Tasks

See E5: Waiting Queue Tasks

Doc References


Last Updated: January 2026