E12-F3: Petrol Reservation Management¶
Epic: E12: Physical Sales (Petrol)
Size: S (Small)
Problem / Outcome¶
Handle reservation timeout and cancellation.
Scope¶
In-Scope:
- 20-minute TTL enforcement
- Warning display at 5 minutes and 1 minute remaining
- Auto-release on timeout
- Manual cancellation by staff
Out-of-Scope:
- Reservation extension
Acceptance Criteria¶
- AC1: Reservation expires after 20 minutes, seats released
- AC2: Staff can manually cancel reservation, seats released immediately
- AC3: Warnings displayed at 5 minutes and 1 minute remaining
Data Model Impact¶
PetrolReservation table:
- status = EXPIRED (on timeout)
- status = CANCELLED (on manual cancel)
- cancelled_by (UUID, FK, nullable)
- cancellation_reason (VARCHAR, nullable)
Reservation timeout triggers:
- Release seats to Petrol quota pool
- Update PetrolPIN status to expired
- Log expiration event
Warning thresholds:
- 5 minutes remaining
- 1 minute remaining
Permissions/Roles¶
- Petrol Staff
How to Verify¶
npm test -- --grep "petrol reservation"
Expected: TTL enforced, cancellation works.
Dependencies¶
Implementation Tasks¶
See E12: Physical Sales (Petrol) Tasks
Doc References¶
Last Updated: January 2026