Description
Background
Sometimes a workflow causes a new Person object to be created when an existing Person should have been used. We have tooling to merge these duplicate Person objects (and the objects associated with them). We're only acknowledging here that duplicates happen and get merged — preventing them is out of scope for this issue.
Problem
Systems outside the datatracker — e.g. MeetEcho and purple — pass Person references around using the datatracker's database pk. When we merge duplicate Person records, a pk that an external system is holding disappears. Without synchronous, coordinated changes across every relying system, there is no simple way to reattach a reference to a Person pk that has gone away (because of a merge) to the right surviving pk. Merging people in those external systems is difficult, and the pk was the wrong thing to export in the first place.
Proposal
Add a set of UUIDs to Person, with exactly one marked primary.
- Relying applications are handed the primary UUID as the person identifier — never the pk.
- When two
Person records are merged, the UUIDs from both records are added to the surviving record's set (union). A single primary is retained.
- When a relying application later asks about a UUID it holds and a merge has since happened, the lookup consults the whole set, so the old UUID still finds the right (surviving)
Person.
- On such a lookup, the application can then be told the new primary UUID so it can update its own stored reference at its own pace — no synchronous cross-system migration required.
Relationship to #6087
This replaces #6087 ("Capture Person/User merges going forward"). #6087 proposed MergedPersons/MergedUsers tables so APIs could follow old_pk → new_pk; a UUID set decouples external identity from the pk entirely and makes old identifiers self-resolving, so relying systems no longer need to chase a merge chain keyed on an internal pk. Adopting this obviates #6087, which should be closed in favor of this issue.
Sketch of work
- Add UUID storage to
Person (a related PersonUUID table or equivalent) with a uniqueness constraint and a single "primary" flag; migration to backfill one UUID per existing Person.
- Update the merge flow to union the UUID sets of the merged records and keep exactly one primary.
- Add a resolver (API + internal helper): UUID →
Person, returning the current primary UUID so callers can self-heal.
- Expose the primary UUID through the API surfaces that MeetEcho and purple consume; document the "we may hand you back a new primary UUID" contract.
Code of Conduct
Description
Background
Sometimes a workflow causes a new
Personobject to be created when an existingPersonshould have been used. We have tooling to merge these duplicatePersonobjects (and the objects associated with them). We're only acknowledging here that duplicates happen and get merged — preventing them is out of scope for this issue.Problem
Systems outside the datatracker — e.g. MeetEcho and purple — pass
Personreferences around using the datatracker's database pk. When we merge duplicatePersonrecords, a pk that an external system is holding disappears. Without synchronous, coordinated changes across every relying system, there is no simple way to reattach a reference to aPersonpk that has gone away (because of a merge) to the right surviving pk. Merging people in those external systems is difficult, and the pk was the wrong thing to export in the first place.Proposal
Add a set of UUIDs to
Person, with exactly one marked primary.Personrecords are merged, the UUIDs from both records are added to the surviving record's set (union). A single primary is retained.Person.Relationship to #6087
This replaces #6087 ("Capture Person/User merges going forward"). #6087 proposed
MergedPersons/MergedUserstables so APIs could followold_pk → new_pk; a UUID set decouples external identity from the pk entirely and makes old identifiers self-resolving, so relying systems no longer need to chase a merge chain keyed on an internal pk. Adopting this obviates #6087, which should be closed in favor of this issue.Sketch of work
Person(a relatedPersonUUIDtable or equivalent) with a uniqueness constraint and a single "primary" flag; migration to backfill one UUID per existingPerson.Person, returning the current primary UUID so callers can self-heal.Code of Conduct