events: api.sx — public events facade + 14 tests (Phase 1 complete)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 37s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 37s
Immutable store ({:events :bookings}) over calendar+availability:
ev/schedule, ev/book, ev/agenda, ev/agenda-for, ev/free?, ev/next-free,
ev/conflicts. Availability queries auto-widen expansion by longest event.
73/73 green. Phase 1 done.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -18,7 +18,7 @@ capacity rules, transactional booking, and a flow-driven notification dispatcher
|
||||
|
||||
## Status (rolling)
|
||||
|
||||
`bash lib/events/conformance.sh` → **59/59** (Phase 1: calendar + availability)
|
||||
`bash lib/events/conformance.sh` → **73/73** (Phase 1 complete: calendar + availability + api)
|
||||
|
||||
## Ground rules
|
||||
|
||||
@@ -58,8 +58,8 @@ lib/events/api.sx ── (events/schedule) (events/book) (events/agenda) ──
|
||||
- [x] `calendar.sx` — MONTHLY (bymonthday + nth-weekday byday)
|
||||
- [x] `availability.sx` — free/busy rules (busy/conflict/busy_in on Datalog)
|
||||
- [x] `availability.sx` — next-free slot search (same rules, different bindings)
|
||||
- [ ] `api.sx` — public entry points (schedule/agenda/free-check)
|
||||
- [ ] tests + scoreboard + conformance.sh [done incrementally; api.sx pending]
|
||||
- [x] `api.sx` — public entry points (schedule/agenda/book/free/next-free/conflicts)
|
||||
- [x] tests + scoreboard + conformance.sh (73/73)
|
||||
|
||||
## Phase 2 — Ticketing + booking
|
||||
- [ ] capacity rules; transactional booking → `persist` (no overbooking)
|
||||
@@ -79,6 +79,13 @@ lib/events/api.sx ── (events/schedule) (events/book) (events/agenda) ──
|
||||
|
||||
## Progress log
|
||||
|
||||
- 2026-06-07 — **Phase 1 complete.** `api.sx`: immutable `store`
|
||||
({:events :bookings}) facade over calendar + availability. `ev/schedule`,
|
||||
`ev/book`, `ev/agenda`, `ev/agenda-for`, `ev/free?`, `ev/next-free`,
|
||||
`ev/conflicts`. Availability queries auto-widen the expansion window back by
|
||||
the longest event so any overlapping occurrence is captured. 14 tests,
|
||||
73/73 green. Phase 2 (transactional booking on persist) is next — `ev/book`
|
||||
becomes capacity-safe via a persist append at that point.
|
||||
- 2026-06-07 — `next-free` slot search: earliest start ≥ after where
|
||||
[s,s+duration) is free and ends ≤ horizon, else nil. Candidates are `after`
|
||||
plus each busy-interval end (interval-packing); each probe reuses the
|
||||
|
||||
Reference in New Issue
Block a user