feat(sync): reconcile secondary Graph calendars

Read documented Graph v1 calendarView pages for secondary calendars and publish each finite window only after the complete bounded listing validates.

Add schema-v2 per-window event membership so moved-out occurrences are evicted without being mislabeled as remote tombstones, while overlapping windows retain shared instances.

Verified: 18/18 fresh normal, 18/18 -Werror, and 18/18 ASan/UBSan tests.
This commit is contained in:
2026-07-18 13:05:21 +01:00
parent 0582444c61
commit 98e07e287e
11 changed files with 1520 additions and 60 deletions

View File

@@ -84,11 +84,18 @@ Completed Microsoft Graph read phase:
- Half-open UTC event windows and per-page event/tombstone/cursor transactions
- Resumable primary-calendar v1 delta synchronization
Completed secondary-calendar stable-v1 reconciliation:
- Documented per-calendar `calendarView` reads with complete bounded paging
- Schema-v2 durable per-window event membership
- Atomic complete-window replacement after every page validates
- Range omission distinguished from a remote deletion tombstone
- Overlapping windows retain events until their last membership is removed
- No beta or undocumented per-calendar delta dependency
Next provider-boundary slices:
- Account setup and CLI/TUI orchestration with live credential integration
- Choose secondary-calendar behavior: v1 full-window reconciliation with
deletion semantics, or an explicit beta-specific delta dependency
- Generic `SyncProvider` integration and observable sync status
## 0.3 — CalDAV
@@ -104,12 +111,11 @@ Next provider-boundary slices:
ETag-aware remote writes after the conflict boundary is proven
- Account/calendar management UI and per-calendar ANSI identity
The Graph read phase discovers all calendars but uses stable v1 delta only for
the primary calendar; it deliberately avoids beta and undocumented
per-calendar routes. No account UI/CLI orchestration or live Microsoft
credential integration exists yet, and remote writes remain out of scope. Do
not claim Outlook-equivalent coverage until the secondary-calendar strategy is
chosen and verified.
The Graph read boundary uses stable v1 delta for the primary calendar and
complete stable-v1 calendar views for secondary calendars; it deliberately
avoids beta and undocumented per-calendar delta routes. No account UI/CLI
orchestration or live Microsoft credential integration exists yet, and remote
writes remain out of scope.
## 1.0 — distribution quality