**CONTEXT** - waitlist currently only supports joining via `POST /events/:id/waitlist` — it inserts a document and does nothing else - when a registration is canceled or a seat opens up, waitlisted users are never promoted automatically - event admins would need to manually manage promotions, which doesn't scale **CHANGES NEEDED** - detect when a seat becomes available (registration canceled, event capacity increased) - promote the next waitlisted user(s) to a pending registration, fed into the Kafka pipeline - maintain FIFO ordering by `created_at` on the waitlist - handle edge cases: what if the promoted user already registered via another path? what if the event is closed?
CONTEXT
POST /events/:id/waitlist— it inserts a document and does nothing elseCHANGES NEEDED
created_aton the waitlist