M1: Wire RRULE recurrence expansion into calendar event queries #215

Merged
KofTwentyTwo merged 2 commits from story/m1-rrule-recurrence into dev 2026-07-29 22:35:45 +00:00
2 Commits
Author SHA1 Message Date
James Maes 84ac82b29d docs(nunciod): reword stale comment referencing removed rrule fallback 2026-07-29 17:33:52 -05:00
James Maes 4499054228 feat(calendar): expand RRULE recurrence in ListEvents and filter by calendar_id
Wire the previously-dead nuncio_cal::RecurrenceEngine into
CalendarGrpcService::list_events: non-recurring events pass through
unchanged, while recurring masters are expanded into real occurrences
for the requested window via a new store method
(list_recurring_calendar_events, no time filter since a master's own
timestamps can precede the window while its occurrences fall inside
it) and a pure expand_events_for_window merge helper that keeps
recurring rows sourced only from expansion, never double-counting a
master that also overlaps the window in the raw query.

Fix expand_occurrences to stop trusting an empty match as "return the
raw master": that fabricated an out-of-window result whenever a
window fell entirely outside a bounded (UNTIL/COUNT) series, and could
hang scanning an unbounded series for a match that would never come.
skip_while/take_while over the RRuleSet's monotonic iterator bounds
the walk and returns a genuinely empty result instead.

Also apply the calendar_id filter list_events accepted but ignored,
closing the gap between it and the mock backend's own filtering.

Refs #186
2026-07-29 17:27:12 -05:00