Description
Emit a supplier-facing webhook slot.reservation.expired whenever a slot hold is released due to booking-intent expiry, containing slot id, tz-aware start, and reason.
Requirements and context
- Must be secure, tested, and documented
- Should be efficient and easy to review
- Relevant code:
src/webhooks/dispatch.ts, src/workers/expireBookingIntents.ts
Suggested execution
- Fork the repo and create a branch
git checkout -b feat/slot-reservation-expired-webhook
- Implement changes
- Add webhook event type + JSON schema
- Dispatch on release with signature per existing webhook contract
- Add supplier setting to opt in/out of this event
- Validate security and correctness assumptions
Test and commit
- Run tests
- Cover edge cases
- supplier opted-out (no dispatch), delivery failure retries with backoff, duplicate release (dedupe)
- Include test output and notes
Example commit message
feat: slot.reservation.expired webhook
Guidelines
- Minimum 95 percent test coverage
- Clear documentation
- Timeframe: 96 hours
Description
Emit a supplier-facing webhook
slot.reservation.expiredwhenever a slot hold is released due to booking-intent expiry, containing slot id, tz-aware start, and reason.Requirements and context
src/webhooks/dispatch.ts,src/workers/expireBookingIntents.tsSuggested execution
git checkout -b feat/slot-reservation-expired-webhookTest and commit
npm testExample commit message
feat: slot.reservation.expired webhookGuidelines