fix(account): dedupe colliding identities on merge, journaling to the dossier #167

Merged
developer merged 1 commits from feature/merge-email-dedupe into development 2026-07-03 17:48:49 +00:00
Owner

Follow-up to the VK-web-link merge discussion. A merge blanket-reassigned all secondary identities to the primary, so merging two accounts that each had a confirmed email (or tg/vk) left the survivor with two identities of one kind — profile + retention dossier both treat those as singular. Now the merge keeps the primary's identity and journals the secondary's colliding one to retained_identities (reason=merge) before dropping it.

  • migration 00008: widen retained_identities.reason CHECK to admit 'merge' (expand-contract).
  • accountmerge: dedupeIdentities + retainMergedIdentity before the identity reassign.
  • inttest TestAccountMergeDedupesEmail; docs ARCHITECTURE §4 + retention.go note.

Local: build/vet/gofmt, backend unit, integration merge+link suite all green.

Follow-up to the VK-web-link merge discussion. A merge blanket-reassigned all secondary identities to the primary, so merging two accounts that each had a confirmed email (or tg/vk) left the survivor with two identities of one kind — profile + retention dossier both treat those as singular. Now the merge keeps the primary's identity and journals the secondary's colliding one to retained_identities (reason=merge) before dropping it. - migration 00008: widen retained_identities.reason CHECK to admit 'merge' (expand-contract). - accountmerge: dedupeIdentities + retainMergedIdentity before the identity reassign. - inttest TestAccountMergeDedupesEmail; docs ARCHITECTURE §4 + retention.go note. Local: build/vet/gofmt, backend unit, integration merge+link suite all green.
developer added 1 commit 2026-07-03 17:33:02 +00:00
fix(account): dedupe colliding identities on merge, journaling to the dossier
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 10s
CI / integration (pull_request) Successful in 16s
CI / ui (pull_request) Has been skipped
CI / conformance (pull_request) Successful in 9s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 2m2s
0eefbfd6a4
An account merge blanket-reassigned all of the secondary's identities to the primary,
so merging two accounts that each had a confirmed email (or telegram/vk) left the
survivor with two identities of one kind — which the profile and the retention dossier
both treat as singular (the profile showed an arbitrary one; a later change-email
journaled only one). The merge now keeps the primary's identity and journals the
secondary's colliding one to retained_identities (reason=merge) before dropping it, so
the survivor has one identity per kind and the absorbed credential still lands in the
legal dossier.

- migration 00008: widen retained_identities.reason CHECK to admit 'merge'
  (expand-contract — Up only widens the set, so an image rollback stays DB-safe).
- accountmerge: dedupeIdentities + retainMergedIdentity before the identity reassign.
- inttest TestAccountMergeDedupesEmail; docs ARCHITECTURE §4 + retention.go reason note.
owner approved these changes 2026-07-03 17:48:34 +00:00
developer merged commit 72e9b600b0 into development 2026-07-03 17:48:49 +00:00
developer deleted branch feature/merge-email-dedupe 2026-07-03 17:48:49 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: developer/scrabble-game#167