Skip to content

Commit ace1549

Browse files
KrisBraunclaude
andcommitted
connector-apple-calendar: lifecycle hardening
Port five lifecycle/sync-machinery improvements; one is a critical data-loss bug fix. 1. Selective per-event deletion. Previously startIncrementalSync called archiveLinks({channelId, meta:{syncProvider, syncableId}}) on any deletion — a containment filter that matches every event on the channel. One deleted event wiped the whole calendar. Store href→uid mapping alongside etags and archive per uid. 2. initChannel queues the first batch via runTask instead of awaiting syncBatch inline, so the init task returns immediately after setup. Matches google-calendar's initCalendar. 3. TTL sync lock via Store.acquireLock so the 15-min poll, manual reconnect, and in-progress initial sync can't race each other. 4. channelSyncCompleted signal so the Flutter UI's "Syncing…" indicator clears after the initial backfill. 5. Recovery clear on context.recovering: drop ctag, etags/events map, sync state, and any scheduled poll task so a re-credentialed connection re-walks history and picks up changes that landed during the auth gap. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 410366a commit ace1549

1 file changed

Lines changed: 318 additions & 107 deletions

File tree

0 commit comments

Comments
 (0)