61237134f04e0760cc618e49a40561ace93dc589
The per-calendar preservation added in the previous fix only kicks in when a sync error carries a calendar_id. But account-level failures — most commonly a Home Assistant or Google token-refresh failure — abort the entire account fetch and arrive WITHOUT a calendar_id. Those events were still being evicted, so HA/Google calendars kept vanishing on a transient token hiccup. failedCalendarKeys() now returns both per-calendar keys and whole sources: an error without a calendar_id protects every cached calendar of that source. mergeIntoCache() keeps events whose source is in keepSourcesInRange, and the cached range is only extended when neither set is populated (auto-retry). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Description
No description provided
Languages
Swift
100%