feat(event-predicates): warn on unhandled recurrence overrides and multiple masters

- Add `warn_unhandled_recurring` collector that emits a warning when
  `RECURRENCE-ID` overrides are present but not yet handled, emitting
  the master event as-is
- Register `warn_unhandled_recurring` in `all_collectors`
- Warn when more than one master event (no `RECURRENCE-ID`) is found for
  a UID in `separate_master_and_recurrence`, using only the first
This commit is contained in:
2026-05-17 19:19:51 +02:00
parent a1f31042e0
commit a5e15fa84f
2 changed files with 20 additions and 2 deletions

View File

@@ -182,4 +182,8 @@ let separate_master_and_recurrence (events : Icalendar.event list) : Icalendar.e
in
match master_and_recurrences with
| [], _ -> failwith "No master event found"
| master :: _, recurrences -> (master, recurrences)
| [ master ], recurrences -> (master, recurrences)
| master :: rest, recurrences ->
Printf.eprintf "Warning: %d extra master events (no RECURRENCE-ID) for UID: %s — only first used\n"
(List.length rest) (get_uid master);
(master, recurrences)