Conversation
Co-authored-by: Rohan Patnaik <rohan-patnaik@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0967f53931
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| groupKeys := map[int]map[string]bool{} | ||
| for i, p := range contacts { | ||
| for _, key := range contactsDedupeKeys(p, match) { | ||
| keyCounts[key]++ |
There was a problem hiding this comment.
Count match keys per contact before building matched_on
keyCounts is incremented for every occurrence in a contact, so repeated values inside a single person (for example the same email stored twice) are treated as if the key matched multiple contacts. When that person is grouped with others via a different key, the output can incorrectly list that repeated key in matched_on, which makes the merge plan claim evidence that does not actually exist between members. De-duplicating keys per person before incrementing keyCounts avoids these false-positive match reasons.
Useful? React with 👍 / 👎.
Summary
gog contacts dedupewith email/phone matching by default and opt-in name matchingTesting