The archive keeps one row per card UID, so a CardDAV server that lists the same card in two address books made the second INSERT fail, on every run. The second book now joins the first row's address_book_ids, and sync_id_dav lets two server items map to one local row (older archives are rebuilt without that UNIQUE). A vanished item takes only its book off a card another item still maps; deleting an address book deletes only the cards no other book holds. The in-memory DAV server from mock_export_dav moves to tests/fake_dav, gaining multiget and DELETE, and drives a new import test that fails on the old code.