events: waitlist + auto-promotion + 21 tests
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 34s

When full, ev/waitlist! queues actors FIFO (:waitlist/:unwaitlist on the
booking stream; waiting fold independent of the seat fold). ev/waitlist,
ev/waitlist-position, ev/leave-waitlist!. ev/cancel-promote! frees a seat and
auto-promotes the head of the queue to a confirmed booking. Idempotent.
240/240 green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-07 05:59:19 +00:00
parent 29127d8613
commit 7446c24bde
5 changed files with 175 additions and 7 deletions

View File

@@ -18,7 +18,7 @@ capacity rules, transactional booking, and a flow-driven notification dispatcher
## Status (rolling)
`bash lib/events/conformance.sh`**219/219** (Phases 1-4 + ext: federated free/busy)
`bash lib/events/conformance.sh`**240/240** (Phases 1-4 + ext: federated free/busy, waitlist)
## Ground rules
@@ -86,6 +86,13 @@ lib/events/api.sx ── (events/schedule) (events/book) (events/agenda) ──
## Progress log
- 2026-06-07 — Waitlist + auto-promotion (extension). When an occurrence is
full, `ev/waitlist!` queues actors FIFO (:waitlist/:unwaitlist events on the
same stream; waiting fold is independent of the seat fold since taking a seat
removes from the queue). `ev/waitlist` (queue), `ev/waitlist-position`,
`ev/leave-waitlist!`. `ev/cancel-promote!` cancels a seat and auto-promotes
the head of the queue to a confirmed booking when capacity opens. Idempotent
(:already / :already-waiting). +21 tests, 240/240 green.
- 2026-06-07 — Federated free/busy (extension). Peers publish BUSY intervals
per actor (iCal free/busy model — privacy-preserving, not event details).
`ev/peer-with-busy`, `ev/peer-busy`; `ev/federated-busy` unions local