---
id: TST-CRM-DQ-183
title: Merge public API lifecycle
kind: api-lifecycle
product_area: crm
module: data-quality
revision: 1
status: draft
source_sha:
  services-crm: a8d1364f1dd44b723bb5f9acba12f983e9ec8d69
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
  rhythm-v2-docs: 61315bb0538e230286687677da2b04b1d33f162b
repository: services-crm
files:
  - modules/merges/tests/e2e/business-events.e2e.spec.js
  - modules/merges/tests/e2e/merged-from-history.e2e.spec.js
  - modules/merges/tests/e2e/merged-records.e2e.spec.js
  - modules/merges/tests/e2e/merges.e2e.spec.js
implements:
  - ATS-CRM-DQ-010-03
  - ATS-CRM-DQ-012-02
  - ATS-CRM-DQ-012-05
  - ATS-CRM-DQ-012-16
  - ATS-CRM-DQ-013-03
  - ATS-CRM-DQ-013-04
  - ATS-CRM-DQ-013-05
  - ATS-CRM-DQ-013-06
  - ATS-CRM-DQ-013-09
  - ATS-CRM-DQ-013-18
  - ATS-CRM-DQ-013-20
  - ATS-CRM-DQ-014-11
  - ATS-CRM-DQ-016-01
  - ATS-CRM-DQ-016-02
  - ATS-CRM-DQ-016-04
  - ATS-CRM-DQ-016-05
  - ATS-CRM-DQ-016-12
  - ATS-CRM-DQ-016-24
  - ATS-CRM-DQ-016-33
  - ATS-CRM-DQ-018-04
  - ATS-CRM-DQ-018-05
  - ATS-CRM-DQ-019-01
  - ATS-CRM-DQ-019-02
  - ATS-CRM-DQ-019-03
  - ATS-CRM-DQ-019-04
  - ATS-CRM-DQ-019-06
environment: local
command: npx mocha --timeout 60000 'modules/merges/tests/e2e/**/*.spec.js'
gate: Prepare the test database first. This selection belongs to the local service API tier.
implementation_state: implemented
implementation_evidence: observed
latest_result: not-run
conformance: not-verified
estimated_minutes: 10
isolation: Use the suite fixture workspace and remove its test identities; run database selections sequentially.
retries: none
proves_controls: []
evidence:
  - provenance: test
    source:
      - 'services-crm:modules/merges/tests/e2e/business-events.e2e.spec.js'
      - 'services-crm:modules/merges/tests/e2e/merged-from-history.e2e.spec.js'
      - 'services-crm:modules/merges/tests/e2e/merged-records.e2e.spec.js'
      - 'services-crm:modules/merges/tests/e2e/merges.e2e.spec.js'
  - provenance: documented
    source: 'rhythm-v2-docs:specs/CONVENTIONS.md#10.6 Executable Test Suite'
lifecycles:
  create: partial
  change: partial
  archive: not-applicable
  delete: partial
  merge: partial
  reconcile: partial
lifecycle_gaps:
  - FND-CRM-DQ-074
lifecycle_notes:
  archive: Archiving ordinary CRM records belongs to Entities; these tests concern duplicate review and identity combination.
  reconcile: 'Local assertions cover portions of durable execution, not deployed redelivery.'
---

# Merge public API lifecycle

## Verification Boundary

The signed local API harness and PostgreSQL are real. Test-controlled job execution does not establish deployed delivery recovery or downstream subscriber policies.

## What This Suite Proves

Public merge operations check authority, expose working plans and retained history, and return absorbed-record destinations and committed event information. The scenario bindings identify the assertions inspected in this examination. No control claim is assigned without a check that fails when the control is removed.

## What It Does Not Prove

Local database assertions do not establish hosted console behavior, deployed message delivery or the policies of unavailable owner services.

## Level and Rationale

The real dispatcher is needed to check request validation and permission conjunctions. Direct service calls cannot establish the public refusal boundary.

## Lifecycle Coverage

Create, change and cleanup receive partial credit because these tests select data-quality behavior rather than the complete ordinary record lifecycle. Merge receives partial credit where it appears: a test selection does not establish every contact, organization and external participant variant. Archive belongs to the ordinary record module; deployed reconciliation remains outside these browser and local API selections. The lifecycle finding records these limits.

## Real Dependencies and Test Doubles

The signed local API harness and PostgreSQL are real. Test-controlled job execution does not establish deployed delivery recovery or downstream subscriber policies.

## Must Not Be Doubled

Keep route dispatch, permission evaluation and database writes real; replacing them would hide the refusals and persisted outcomes.

## Fixtures and Isolation

Use the suite fixture workspace and remove its test identities; run database selections sequentially. The test support constructs fixture contexts and test-specific identities. Failure-injection participants belong to the run and must be removed with its fixtures.

## Determinism and Retries

The register records no new runtime result. Existing polling and fixture clocks remain part of the authored tests; polling for completion is not a retry of a failed case. Run with at most three workers and diagnose a failure before rerunning it.

## How It Runs

The frontmatter records the scoped command and its runner tier. Run the test-database preparation command before invoking this selection.

## Coverage Gaps

Mapped scenarios retain their exact execution sources for review; combined multi-source scenarios can still leave an ordered handoff unproved. The capability gap records identify unbound obligations, and the grouped-suite finding records incomplete lifecycle and runtime coverage.
