Reserve one active hold for a contested maintenance slot
Two customers reach checkout together and each receives a valid hold token for the same appointment.
- Focused work estimate
- 4h + prerequisites
- Priority in the scenario
- High
- Engineering practice
- Concurrency · Database constraints
Estimated field mix
- Database engineering60%
- Backend40%
Field percentages are editorial estimates of the ticket's engineering focus. They total 100%; they are not measured time, proficiency scores, or ownership evidence.
Review it, then add it to your workspace.
The board opens an editable draft; nothing is saved until you confirm it. Sign-in and workspace permissions apply, and Demo boards remain ephemeral.
Project context
A fictional equipment service books maintenance visits. Expiring checkout holds and reschedules occasionally double-book a technician.
Setup prerequisites
- Build synthetic technicians, slots and booking records.
- Use an injectable clock and separate clients for concurrency probes.
Preceding work
Complete these dependencies, or supply their agreed outputs before taking this ticket.
Acceptance criteria
- One active hold wins for a slot under concurrent requests.
- The loser gets a conflict without another customer's details.
- Hold creation and its expiry time commit atomically.
Implementation constraints
- Use a database invariant as the final concurrency guard.
Verification to include
- Start two clients at a barrier and assert one live hold.
- Force commit failure and assert no usable token escapes.
Deliverables
- Hold command and concurrent reservation test
Rollout and recovery
Enable holds on synthetic slots; pause new holds if invariant monitoring detects duplicates.
Value of the work
For the engineer: Practice resource allocation, interval conflicts and durable workflows.
For the team: Review scheduling correctness and recovery before exposing scarce capacity.
Evidence boundaries
Outcome Evidence: Tests, patches, and runbooks are requested deliverables. They become Outcome Evidence only through a qualified Mission and immutable Evidence IDs.
Ownership Evidence: Independent adaptation must be observed under a declared verification policy and cite immutable Evidence IDs. Completing a planning ticket establishes no Ownership Evidence.