Skip to content

feat(contacts): add dedupe preview#555

Merged
steipete merged 1 commit intomainfrom
feat/contacts-dedupe-preview
May 5, 2026
Merged

feat(contacts): add dedupe preview#555
steipete merged 1 commit intomainfrom
feat/contacts-dedupe-preview

Conversation

@steipete
Copy link
Copy Markdown
Collaborator

@steipete steipete commented May 5, 2026

Summary

  • extract the useful contacts dedupe idea from feat: drive reporting/sync + contacts dedupe #116 as a preview-only command
  • add gog contacts dedupe with email/phone matching by default and opt-in name matching
  • emit JSON/table merge plans without applying updates or deletes
  • add generated command docs, README/spec coverage, changelog credit, and regression tests

Testing

Co-authored-by: Rohan Patnaik <rohan-patnaik@users.noreply.github.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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]++
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@steipete steipete merged commit 62a7257 into main May 5, 2026
10 checks passed
@steipete steipete deleted the feat/contacts-dedupe-preview branch May 5, 2026 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant