dav: href/ETag remote identity for calendar and contacts #392

Open
opened 2026-08-10 19:28:30 +00:00 by KofTwentyTwo · 0 comments
KofTwentyTwo commented 2026-08-10 19:28:30 +00:00 (Migrated from github.com)

Prerequisite for DAV change enumeration and for any write-back.

DAV objects have no stable remote identity. Ids are positional — format!("caldav-evt-{}", events.len() + dropped + 1) and format!("carddav-{account_id}-{}", …) — and combined with INSERT OR REPLACE on id, every re-sync reshuffles which local row holds which remote object whenever ordering or count changes.

getetag is requested in the query XML and never parsed. calendar_events and contacts have no href, no etag, no UID column.

Scope

  • href = placement, iCalendar/vCard UID = identity, ETag = version — the DAV analogue of the mail identity split.
  • Persist all three; migrate existing rows.
  • Add AccountProtocol::CardDav (#255) — a CardDAV account is currently not representable, which is why contacts sync is unwireable rather than merely unwired.

Depends on #257 (a namespace-aware multistatus reader — without it there is no href to extract).

Design: ADR 0002 · review evidence (PR #385)

**Prerequisite for DAV change enumeration and for any write-back.** DAV objects have no stable remote identity. Ids are **positional** — `format!("caldav-evt-{}", events.len() + dropped + 1)` and `format!("carddav-{account_id}-{}", …)` — and combined with `INSERT OR REPLACE` on id, **every re-sync reshuffles which local row holds which remote object** whenever ordering or count changes. `getetag` is requested in the query XML and never parsed. `calendar_events` and `contacts` have no href, no etag, no UID column. ### Scope - href = placement, iCalendar/vCard `UID` = identity, ETag = version — the DAV analogue of the mail identity split. - Persist all three; migrate existing rows. - Add `AccountProtocol::CardDav` (#255) — a CardDAV account is currently **not representable**, which is why contacts sync is unwireable rather than merely unwired. Depends on #257 (a namespace-aware multistatus reader — without it there is no href to extract). Design: [ADR 0002](https://github.com/KofTwentyTwo/nuncio/blob/dev/docs/adr/0002-multi-engine-sync-model.md) · [review evidence](https://github.com/KofTwentyTwo/nuncio/blob/dev/docs/reviews/2026-08-10-multi-engine-design-review.md) (PR #385)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KofTwentyTwo/nuncio#392