feat(contacts): build a real CardDAV engine, replacing the fabricated client #217

Merged
KofTwentyTwo merged 1 commits from story/m2-contacts-engine into dev 2026-07-29 22:53:55 +00:00
1 Commits
Author SHA1 Message Date
James Maes e3e3a01fe5 feat(contacts): build a real CardDAV engine, replacing the fabricated client
Replace CardDavClient::fetch_remote_vcards's hardcoded "Google CardDAV
Sync Contact" return with a real reqwest REPORT/addressbook-query
client that parses a genuine multistatus response. Add a real vCard
(RFC 6350) parser -- the crate previously only had a generator -- and
prove round-trip fidelity through Contact::to_vcard(). Add the
ContactsBackend trait and MockContactsBackend, mirroring
nuncio_cal::CalendarBackend/MockCalendarBackend. Distinguish transport
failures from parse failures via CardDavError::TransportFailed/
ParseFailed rather than ever silently succeeding with fabricated data.

Give nuncio-store real, tested save_contact/list_contacts/get_contact
CRUD backed by a genuine SQLite table + trigram FTS mirror, so contacts
persist through the daemon's own store instead of nuncio-contacts's
disconnected ContactsDatabase pool. This takes nuncio-store as a
narrow, deliberate dependency on nuncio-contacts::Contact.

Opt nuncio-contacts into the workspace lint gate ([lints] workspace,
#![forbid(unsafe_code)]) for parity with every other crate.

Wiremock-only, offline: no live network calls in tests.
2026-07-29 17:48:48 -05:00