Skip to content

[upstream-adapt] Detect and merge duplicate contacts with a safe dry-run path #187

Closed

Description

@itsjeremyjohnson

Outcome

Users can find duplicate contacts and optionally apply merges only after an exact dry-run plan and confirmation, preserving updatable fields.

Why

Contact hygiene is painful in the UI; upstream guarded dedupe is the outcome.

Context

  • Source: upstream feature review of openclaw/gogcli (2026-08-11)
  • Intake rule: adapt the outcome in our architecture — do not cherry-pick or copy upstream implementation
  • Suggested triage priority: P1
  • Area: Contacts

Non-goals for this issue

  • No prescribed flags, package layout, or upstream file ports
  • No requirement to match upstream UX naming
  • Implementation design happens during triage / agent brief

Acceptance (triage will refine)

  • Desired user/agent-visible outcome is clear and still wanted
  • Not already fully covered by current main
  • Scope is bounded enough for an agent brief (or split)
  • Priority confirmed or re-bucketed

Activity

  1. added
    enhancementNew feature or request
    needs-triageMaintainer needs to evaluate this issue
    upstream-adaptFeature adapted from upstream openclaw/gogcli (rebuild our way)
    on Aug 11, 2026
  2. itsjeremyjohnson commented on Aug 12, 2026

    @itsjeremyjohnson
    CollaboratorAuthor

    This was generated by AI during triage.

    Triage Notes

    Contacts expose search, full CRUD, and batch operations, but there is no duplicate detector or merge planner. No closed issue, merged pull request, or local rejected-request record covers this workflow.

    The request is not yet safe to delegate because duplicate identity and merge conflict semantics are undefined: exact versus normalized email/phone/name matching, whether directory profiles participate, which contact survives, how conflicting multi-value/custom fields are retained, and whether source contacts are deleted. A dry run cannot be "exact" until those rules are fixed.

    Recommendation: keep needs-triage until the maintainer defines matching tiers, survivor selection, field-union/conflict rules, and the irreversible apply boundary.

  3. itsjeremyjohnson commented on Aug 13, 2026

    @itsjeremyjohnson
    CollaboratorAuthor

    This was generated by AI during triage.

    Triage Notes

    Contacts supports search, CRUD, contact groups, photos, and batch operations, but the snapshot has no duplicate detector, merge planner, or merge workflow. Closed issues and merged pull requests contain no equivalent implementation, and no prior-rejection record exists.

    An exact dry-run plan is impossible until the merge contract is fixed: which normalized identifiers constitute a duplicate, whether matches are automatic or confidence-tiered, whether directory and other-contact records participate, which record survives, how repeated and conflicting fields are retained, and whether applying a plan deletes source contacts. These choices define both safety and acceptance tests.

    Recommendation: retain needs-triage until matching tiers, survivor selection, field-union/conflict rules, and the irreversible apply boundary are approved.

  4. itsjeremyjohnson commented on Aug 14, 2026

    @itsjeremyjohnson
    CollaboratorAuthor

    This was generated by AI during triage.

    Triage Notes

    Contacts supports search, individual and batch CRUD, contact groups, photos, directory records, and other contacts. It has no duplicate detector, merge planner, or guarded merge workflow.

    No equivalent implementation appears in the closed-issue or merged-PR snapshots, and no prior-rejection record exists.

    An exact dry-run plan cannot be specified until the merge contract is fixed. A maintainer must define which normalized identifiers constitute duplicates, whether matching is automatic or confidence-tiered, which record types participate, how the survivor is selected, how repeated and conflicting fields are retained, and whether applying a plan deletes source contacts. These choices define the irreversible boundary and the acceptance tests.

    Recommendation: retain needs-triage until matching tiers, survivor selection, field-union and conflict rules, and apply semantics are approved.

  5. itsjeremyjohnson commented on Aug 15, 2026

    @itsjeremyjohnson
    CollaboratorAuthor

    This was generated by AI during triage.

    Triage Notes

    Contacts supports search, individual and batch CRUD, contact groups, photos, directory records, and other contacts. It has no duplicate detector, merge planner, or guarded merge workflow. No equivalent implementation or prior-rejection record was found.

    An exact dry-run plan cannot be specified until the merge contract is fixed. A maintainer must define which normalized identifiers constitute duplicates, whether matching is automatic or confidence-tiered, which record types participate, how the survivor is selected, how repeated and conflicting fields are retained, and whether applying a plan deletes source contacts. These choices define the irreversible boundary and its acceptance tests.

    Recommendation: retain needs-triage until matching tiers, survivor selection, field-union and conflict rules, and apply semantics are approved.

  6. itsjeremyjohnson commented on Aug 16, 2026

    @itsjeremyjohnson
    CollaboratorAuthor

    This was generated by AI during triage.

    Triage Notes

    Contacts supports search, individual and batch CRUD, contact groups, photos, directory records, and other contacts. It has no duplicate detector, merge planner, or guarded merge workflow. No equivalent implementation or prior-rejection record was found.

    An exact dry-run plan cannot be specified until the merge contract is fixed. A maintainer must define which normalized identifiers constitute duplicates, whether matching is automatic or confidence-tiered, which record types participate, how the survivor is selected, how repeated and conflicting fields are retained, and whether applying a plan deletes source contacts. These choices define the irreversible boundary and its acceptance tests. Retain needs-triage until those rules are approved.

  7. itsjeremyjohnson commented on Aug 16, 2026

    @itsjeremyjohnson
    CollaboratorAuthor

    This was generated by AI during triage.

    Triage Notes

    Contacts supports search, individual and batch CRUD, contact groups, photos, directory records, and other contacts. It has no duplicate detector, merge planner, or guarded merge workflow. No equivalent implementation appears in the closed-issue or merged-PR snapshots, and no prior-rejection record exists.

    An exact dry-run plan cannot be specified until the merge contract is fixed. A maintainer must define which normalized identifiers constitute duplicates, whether matching is automatic or confidence-tiered, which record types participate, how the survivor is selected, how repeated and conflicting fields are retained, and whether applying a plan deletes source contacts. Retain needs-triage until the matching, survivor, field-conflict, and apply rules are approved.

  8. itsjeremyjohnson commented on Aug 17, 2026

    @itsjeremyjohnson
    CollaboratorAuthor

    This was generated by AI during triage.

    Triage Notes

    Contacts supports search, individual and batch CRUD, contact groups, photos, directory records, and other contacts. It has no duplicate detector, merge planner, or guarded merge workflow. The supplied closed-issue and merged-PR snapshots contain no equivalent implementation, and there is no prior-rejection record.

    An exact dry-run plan cannot be specified until the merge contract is fixed. A maintainer must define which normalized identifiers constitute duplicates, whether matching is automatic or confidence-tiered, which record types participate, how the survivor is selected, how repeated and conflicting fields are retained, and whether applying a plan deletes source contacts. Retain needs-triage until the matching, survivor, field-conflict, and apply rules are approved.

  9. itsjeremyjohnson commented on Aug 18, 2026

    @itsjeremyjohnson
    CollaboratorAuthor

    This was generated by AI during triage.

    Triage Notes

    Contacts supports search, individual and batch CRUD, contact groups, photos, directory records, and other contacts. It has no duplicate detector, merge planner, or guarded merge workflow. The closed-issue and merged-PR snapshots contain no equivalent implementation, and there is no prior-rejection record.

    An exact dry-run plan cannot be specified until the merge contract is fixed. A maintainer must define which normalized identifiers constitute duplicates, whether matching is automatic or confidence-tiered, which record types participate, how the survivor is selected, how repeated and conflicting fields are retained, and whether applying a plan deletes source contacts. Retain needs-triage until the matching, survivor, field-conflict, and apply rules are approved.

  10. itsjeremyjohnson commented on Aug 20, 2026

    @itsjeremyjohnson
    CollaboratorAuthor

    This was generated by AI during triage.

    Triage Notes

    Contacts supports search, individual and batch CRUD, contact groups, photos, directory records, and other contacts. It has no duplicate detector, merge planner, or guarded merge workflow. The current source and supplied closed-issue and merged-PR histories contain no equivalent implementation, and there is no prior-rejection record.

    An exact dry-run plan cannot be specified until the merge contract is fixed. A maintainer must define which normalized identifiers constitute duplicates, whether matching is automatic or confidence-tiered, which record types participate, how the survivor is selected, how repeated and conflicting fields are retained, and whether applying a plan deletes source contacts. Retain needs-triage until the matching, survivor, field-conflict, and apply rules are approved.

  11. itsjeremyjohnson commented on Aug 21, 2026

    @itsjeremyjohnson
    CollaboratorAuthor

    This was generated by AI during triage.

    Triage Notes

    Contacts supports search, individual and batch CRUD, contact groups, photos, directory records, and other contacts. It has no duplicate detector, merge planner, or guarded merge workflow. Searches across the People and Contacts surfaces and supplied histories found no equivalent implementation or duplicate; no prior-rejection record exists.

    An exact dry-run plan cannot be specified until the merge contract is fixed. A maintainer must define which normalized identifiers constitute duplicates, whether matching is automatic or confidence-tiered, which record types participate, how the survivor is selected, how repeated and conflicting fields are retained, and whether applying a plan deletes source contacts. Retain needs-triage until the matching, survivor, field-conflict, and apply rules are approved.

  12. itsjeremyjohnson commented on Aug 23, 2026

    @itsjeremyjohnson
    CollaboratorAuthor

    This was generated by AI during triage.

    Triage Notes

    Contacts supports search, CRUD, contact groups, photos, directory records, and other contacts. It has no duplicate detector, merge planner, or guarded merge workflow. Searches of the People and Contacts concepts and supplied histories found no equivalent implementation or duplicate, and there is no prior-rejection record.

    An exact dry-run plan cannot be specified until the merge contract is fixed. A maintainer must define which normalized identifiers constitute duplicates, whether matching is automatic or confidence-tiered, which record types participate, how the survivor is selected, how repeated and conflicting fields are retained, and whether applying a plan deletes source contacts. Retain needs-triage until the matching, survivor, field-conflict, and apply rules are approved.

  13. itsjeremyjohnson commented on Aug 24, 2026

    @itsjeremyjohnson
    CollaboratorAuthor

    This was generated by AI during triage.

    Triage Notes

    Contacts supports search, CRUD, contact groups, photos, directory records, and other contacts. It has no duplicate detector, merge planner, or guarded merge workflow. Searches of Contacts and People command concepts and the supplied closed-issue and merged-PR histories found no equivalent implementation or duplicate; no prior-rejection record exists.

    An exact dry-run plan cannot be specified until the merge contract is fixed. A maintainer must define which normalized identifiers constitute duplicates, whether matching is automatic or confidence-tiered, which record types participate, how the survivor is selected, how repeated and conflicting fields are retained, and whether applying a plan deletes source contacts. Keep this in needs-triage until the matching, survivor, conflict, and apply rules are approved.

  14. itsjeremyjohnson commented on Aug 25, 2026

    @itsjeremyjohnson
    CollaboratorAuthor

    This was generated by AI during triage.

    Triage Notes

    Contacts supports search, CRUD, contact groups, photos, directory records, and other contacts. It has no duplicate detector, merge planner, or guarded merge workflow. Concept searches of Contacts and People behavior and the supplied histories found no equivalent implementation or duplicate, and there is no prior-rejection record.

    An exact dry-run plan cannot be specified until the merge contract is fixed. A maintainer must define which normalized identifiers constitute duplicates, whether matching is automatic or confidence-tiered, which record types participate, how the survivor is selected, how repeated and conflicting fields are retained, and whether applying a plan deletes source contacts. Retain needs-triage until the matching, survivor, conflict, and apply rules are approved.

  15. added and removed
    needs-triageMaintainer needs to evaluate this issue
    on Sep 15, 2026
  16. itsjeremyjohnson commented on Sep 15, 2026

    @itsjeremyjohnson
    CollaboratorAuthor

    This was generated by AI during triage.

    Agent Brief

    Category: enhancement
    Summary: Users can find duplicate contacts and optionally apply merges only after an exact dry-run plan and confirmation, preserving updatable fields.

    Current behavior:
    Fork lacks this upstream-adapt capability (or only partial primitives exist). Prior triage notes on this issue document the current surface.

    Desired behavior:
    Users can find duplicate contacts and optionally apply merges only after an exact dry-run plan and confirmation, preserving updatable fields.

    Key interfaces:

    • Existing gog CLI command surface and auth/safety controls
    • Google API surface named in the issue outcome
    • Script-friendly machine-readable output consistent with sibling commands

    Acceptance criteria:

    • Outcome in the issue body is met under this fork’s architecture (adapt, do not cherry-pick upstream patches)
    • Behavior is covered by tests or documented manual verification
    • Safety/auth constraints match the rest of gog

    Out of scope:

    • Copying upstream implementation wholesale
    • Unrelated Google services

    Why not delegable

    Product priority and contract semantics are still open (what ships first, audit/lifecycle meaning, and whether this fork needs the capability at all). An agent should not invent those decisions. Once Jeremy ranks or rejects this upstream-adapt item, retarget to ready-for-agent or wontfix.

    Prior triage notes remain the technical baseline; this comment only advances state out of needs-triage.

  17. itsjeremyjohnson commented on Oct 12, 2026

    @itsjeremyjohnson
    CollaboratorAuthor

    Closing as obsolete (GitHub sweep 2026-10-12). This [upstream-adapt] request asked to port an upstream steipete/gogcli CLI feature into our gog CLI. That CLI was retired in 91336b7 (#269); main builds only gog-mcp, so the command surface this request targets no longer exists. gog-mcp's pinned API catalog (internal/googlecatalog/manifest.json) already exposes the underlying Google method(s) (people.people.searchContacts, people.people.updateContact) through --discovery=compact --api-catalog, subject to grants. New needs on the MCP side are filed as MCP-scoped issues (see #271, #273, #274, #278).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestready-for-humanRequires human implementationupstream-adaptFeature adapted from upstream openclaw/gogcli (rebuild our way)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions