The reporter's silent events sit in a calendar Calendula created itself, so
`Calendars.VISIBLE` is 1 and the visibility fix cannot be what they hit. What is
left is the class AOSP's own unbundled calendar already carries three
workarounds for: OEM providers that retarget the `EVENT_REMINDER` broadcast, or
that only write the `CalendarAlerts` row at alert time. An app that can only
react to that broadcast cannot tell "no reminder was due" from "the broadcast
never came", so reacting has to stop being the whole design.
This is the decision layer, kept pure and off Android: reminder offsets and
occurrences in, fire instants out, plus which of them a given scan owes.
The watermark is what replaces the provider's `STATE_FIRED` bookkeeping. Due
means the fire instant falls in `(lastFired, now]` — half-open, so a scan that
runs twice cannot post the same reminder twice, while a scan that runs late
still posts everything the missed alarm would have. A reboot or an app update
that drops our alarm therefore costs nothing.
All-day offsets are measured from the raw `begin` with no timezone correction,
because `AllDayReminderEncoding` already folded the wanted wall-clock time into
the stored offset measured from exactly that UTC midnight.
The query horizon stretches past the longest offset any reminder row carries, so
a "two weeks before" reminder is planned before it comes due rather than firing
late — the limitation Etar's equivalent documents and lives with.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>