Fixed in https://github.com/badbundle/vault-app/pull/625 (merged as 736be18f), alongside VAULT-42.
- The fix:
PersistedLocalVaultStorenow updates items and tags in place instead of relying on SwiftData's unique-id upsert, which merged the old tags into the new model. - Tags: an item's tags are replaced outright.
- Details: a detail of the same kind is updated in place, and a detail the item no longer has is deleted, so no orphaned rows are left behind.
- Tests: the contract suite now covers removing tags on update, changing an item's kind, and a newer import replacing tags, all on SQLite as well as in memory.