---
id: ADR-CRM-DQ-001
title: Record ownership and the two Data Quality modules
product_area: crm
module: data-quality
revision: 1
status: proposed
design_intent: proposed
source_sha:
  services-crm: a8d1364f1dd44b723bb5f9acba12f983e9ec8d69
decision: >-
  CRM separates duplicate detection and review from merge planning and
  execution; Entities retains record ownership, while merge persistence manages
  the reference moves needed for the transaction.
constrains:
  - SVC-CRM-DQ-duplicates
  - SVC-CRM-DQ-merges
  - DOM-CRM-DQ-001
  - DOM-CRM-DQ-003
  - DOM-CRM-DQ-004
  - RESP-CRM
origin: >-
  services-crm:docs/merging/decisions.md#Settled by inspection or engineering
  practice (not up for decision): Where it lives
alternatives:
  - option: Create a separate service
    why_not: >-
      Splitting storage would require coordination across databases to preserve
      atomic merging.
  - option: Combine the two modules
    why_not: >-
      Separate execution functions let review and merge workloads scale and fail
      independently.
consequences:
  - >-
    The duplicates module uses a re-check queue; the merges module uses a state
    machine.
  - Record changes cross module boundaries through local persistence calls.
  - >-
    Entities hosts the record routes and uses the merge wrapper for absorbed
    identities.
supersedes: []
evidence:
  - >-
    services-crm at a8d1364f: modules/duplicates/aws/duplicates.module.ts;
    modules/merges/aws/merges.module.ts; docs/merging/architecture.md §1 and §2.
---

# Record ownership and the two Data Quality modules

## Context

Review runs continuously; merging is a privileged transaction against the same CRM records.

## Decision

CRM separates duplicate detection and review from merge planning and execution; Entities retains record ownership, while merge persistence manages the reference moves needed for the transaction.

## Alternatives Considered

Create a separate service. Splitting storage would require coordination across databases to preserve atomic merging.

Combine the two modules. Separate execution functions let review and merge workloads scale and fail independently.

## Consequences

The duplicates module uses a re-check queue; the merges module uses a state machine. Record changes cross module boundaries through local persistence calls. Entities hosts the record routes and uses the merge wrapper for absorbed identities.
