---
id: TST-CRM-DQ-184
title: Merge reference catalog integration
kind: integration
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:
  - tests/integration/db/merge-coverage.integration.spec.ts
implements:
  - ATS-CRM-DQ-015-01
environment: local
command: npx mocha --timeout 60000 tests/integration/db/merge-coverage.integration.spec.ts
gate: Prepare the test database first. This selection belongs to the database integration 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:tests/integration/db/merge-coverage.integration.spec.ts'
  - provenance: documented
    source: 'rhythm-v2-docs:specs/CONVENTIONS.md#10.6 Executable Test Suite'
---

# Merge reference catalog integration

## Verification Boundary

PostgreSQL catalog discovery and CRM reference declarations are real. Passing discovery is not proof that every external application supplies an apply participant.

## What This Suite Proves

The database reference catalog is compared with declared merge policies so unclassified CRM references fail the coverage check. 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

A real database is needed to check constraints, row visibility and transaction outcomes. In-memory doubles cannot establish those guarantees.

## Real Dependencies and Test Doubles

PostgreSQL catalog discovery and CRM reference declarations are real. Passing discovery is not proof that every external application supplies an apply participant.

## Must Not Be Doubled

Keep PostgreSQL constraints and the production persistence or catalog operations real; replacing them would bypass the boundary this selection exists to check.

## 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.
