M6.5 [P1]: Production-wire Calendar sync (per-account CalDAV config + real client) #254

Closed
opened 2026-07-31 14:42:48 +00:00 by KofTwentyTwo · 2 comments
KofTwentyTwo commented 2026-07-31 14:42:48 +00:00 (Migrated from github.com)

Calendar/Sync (grpc.rs:926, calendar_sync.rs:7) is non-functional in production: no per-account CalDAV configuration exists, so the prod path always hits the honest-error branch and only works via a test-injected mock backend. M1 met its offline-E2E bar but not real use. Goal: add CalDAV account configuration (endpoint URL + credentials via the keyring, mirroring mail accounts) and construct a REAL CalDavClient in the Calendar/Sync path from that config so a configured CalDAV account genuinely syncs over gRPC. Offline E2E (wiremock CalDAV) proving the production path (not just the injected mock).

Source: full-tree audit 2026-07-30 (scratchpad/audit/AUDIT-SUMMARY.md). Follow docs/STORY-WORKFLOW.md: engine+proto(if surface)+CLI+offline E2E, mock-only tests, no fabricated data, comment convention, PR to dev, PO reviews before close.

Calendar/Sync (grpc.rs:926, calendar_sync.rs:7) is non-functional in production: no per-account CalDAV configuration exists, so the prod path always hits the honest-error branch and only works via a test-injected mock backend. M1 met its offline-E2E bar but not real use. Goal: add CalDAV account configuration (endpoint URL + credentials via the keyring, mirroring mail accounts) and construct a REAL CalDavClient in the Calendar/Sync path from that config so a configured CalDAV account genuinely syncs over gRPC. Offline E2E (wiremock CalDAV) proving the production path (not just the injected mock). Source: full-tree audit 2026-07-30 (scratchpad/audit/AUDIT-SUMMARY.md). Follow docs/STORY-WORKFLOW.md: engine+proto(if surface)+CLI+offline E2E, mock-only tests, no fabricated data, comment convention, PR to dev, PO reviews before close.
KofTwentyTwo commented 2026-07-31 17:09:44 +00:00 (Migrated from github.com)

Account-model decision (owner): SEPARATE account entries per service. A CalDAV/CardDAV account is its own AddAccount entry with protocol=CALDAV/CARDDAV + a fully-qualified collection URL + its own keyring credential, decoupled from mail accounts. Implemented additively: new AccountProtocol variant(s) + a generic AccountConfig.collection_url field (reused by both). #254 adds CALDAV + the collection_url field/column; #255 reuses collection_url + adds CARDDAV. Both are [PROTO] -> serialize (#254 first).

Account-model decision (owner): SEPARATE account entries per service. A CalDAV/CardDAV account is its own AddAccount entry with protocol=CALDAV/CARDDAV + a fully-qualified collection URL + its own keyring credential, decoupled from mail accounts. Implemented additively: new AccountProtocol variant(s) + a generic AccountConfig.collection_url field (reused by both). #254 adds CALDAV + the collection_url field/column; #255 reuses collection_url + adds CARDDAV. Both are [PROTO] -> serialize (#254 first).
KofTwentyTwo commented 2026-07-31 17:41:27 +00:00 (Migrated from github.com)

Delivered via PR #272 (squash-merged to dev). Calendar sync is now production-wired per the owner's separate-account-per-service model: additive ACCOUNT_PROTOCOL_CALDAV + generic collection_url field (golden regenerated), a backfill-safe store column, protocol-aware AddAccount validation, and a Calendar/Sync production path that builds a REAL nuncio_cal::CalDavClient from a configured CalDAV account's collection_url + keyring credential. Production E2E (default overrides = no injected backend → wiremock CalDAV → events persisted+listed) proves it; honest FailedPrecondition when unconfigured; auth holds. collection_url is generic for #255 (CARDDAV) to reuse. Reconciles #178.

Delivered via PR #272 (squash-merged to dev). Calendar sync is now production-wired per the owner's separate-account-per-service model: additive ACCOUNT_PROTOCOL_CALDAV + generic collection_url field (golden regenerated), a backfill-safe store column, protocol-aware AddAccount validation, and a Calendar/Sync production path that builds a REAL nuncio_cal::CalDavClient from a configured CalDAV account's collection_url + keyring credential. Production E2E (default overrides = no injected backend → wiremock CalDAV → events persisted+listed) proves it; honest FailedPrecondition when unconfigured; auth holds. collection_url is generic for #255 (CARDDAV) to reuse. Reconciles #178.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KofTwentyTwo/nuncio#254