events: booking lifecycle notifications + 11 tests
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 38s

booking-notify.sx walks the booking stream into ordered notifications by kind
(booked/promoted/held/confirmed/released/cancelled/waitlisted). Promotion
detected by folding the waitlist (a booking for a waitlisted actor is a
promotion). id=occ-key/seq -> idempotent re-derivation, no double-ping.
Connects ticketing to the delivery layer. 265/265 green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-07 07:20:39 +00:00
parent b308effb9f
commit 98ed2eebdf
6 changed files with 257 additions and 5 deletions

View File

@@ -18,7 +18,7 @@ capacity rules, transactional booking, and a flow-driven notification dispatcher
## Status (rolling)
`bash lib/events/conformance.sh`**254/254** (Phases 1-4 + ext: fed free/busy, waitlist, EXDATE/RDATE, overrides)
`bash lib/events/conformance.sh`**265/265** (Phases 1-4 + ext: fed free/busy, waitlist, EXDATE/RDATE, overrides, booking-notify)
## Ground rules
@@ -86,6 +86,15 @@ lib/events/api.sx ── (events/schedule) (events/book) (events/agenda) ──
## Progress log
- 2026-06-07 — Booking lifecycle notifications (extension). `booking-notify.sx`
walks the booking stream into ordered notifications classified by kind:
:booked / :promoted / :held / :confirmed / :released / :cancelled /
:waitlisted. Promotion is detected by folding the waitlist as we walk (a
:booking for a currently-waitlisted actor is a promotion, not a fresh
booking). id = occ-key/seq (stable stream seq → idempotent re-derivation, no
double-ping). `ev/booking-notifications`, `ev/notify-of-kind`,
`ev/booking-notify->msg` (notify wire shape). Connects ticketing to the
delivery layer. +11 tests, 265/265 green.
- 2026-06-07 — Per-occurrence overrides / reschedule (RFC 5545 RECURRENCE-ID).
`ev-with-override event orig-start new-start new-duration` adds an :overrides
entry keyed by the occurrence's original start. `ev-expand` applies overrides