Skip to content

CAP-CRM-DQ-004Check drafts and account for block overrides

Markdown

CAP-CRM-DQ-004

Check drafts and account for block overrides

Markdown
  • DocumentDraft
  • Product intentConfirmed
  • ImplementationObserved

KindCapabilityProduct areaCRMModuleDuplicate Review and Record MergingRevision1

Read atservices-crm a8d1364freact-console baf6dae3

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Outcomes
Draft matching reveals likely counterparts without retaining form checks.Authorized blocking exceptions retain their author, time and explanation.
Surfaces
consoleapi
Intent sources
services-crm:docs/milestones/CRM-M4-duplicates-and-merge.md#D-32services-crm:docs/merging/experience/functional-requirements.md#CON-6 (package approved by Andrew 2026-10-13)

Controls

22 controls apply, from the corpus control catalogue.

TC-AZ-001 TC-AZ-002 TC-AZ-003 TC-AZ-004 TC-AZ-005 TC-AZ-006 TC-CRY-004 TC-DAT-001 TC-DAT-002 TC-DAT-003 TC-LOG-001 TC-LOG-002 TC-LOG-003 TC-LOG-004 TC-LOG-005 TC-PI-001 TC-PI-003 TC-PRV-001 TC-PRV-002 TC-TEN-001 TC-TEN-002 TC-TEN-003

Permissions

KeyChecked atScope
crm.duplicates.readapitenant
crm.contacts.create-despite-duplicate-blockservicetenant
crm.organizations.create-despite-duplicate-blockservicetenant

Business Rules

13 rules, 10 to be proved before approval. A rule's product intent is derived from its origin: 13 confirmed by a product decision, the rest inheriting this capability's confirmed.

IdRuleKindEnforced atProvenance
01must prove
Confirmed
Draft checks use detection's keys and scoring within the workspace and exclude the edited record from its own results.
no proof recorded yet
calculationservicetest
services-crm:modules/duplicates/tests/integration/services/detection/duplicate-checks.integration.spec.js#does not answer the record itself, a record never being its own duplicate
02must prove
Confirmed
A check returns at most five matches in descending score order, using the weakest active-rule confidence floor for that type or medium when there are no active rules.
no proof recorded yet
calculationservicetest
03
Confirmed
Each result supplies record number, name, score, confidence and reasons, and the response indicates whether a blocking rule applies.
policyapi, servicetest
services-crm:modules/duplicates/tests/e2e/duplicates.e2e.spec.js#says the tenant’s block rule fires on it, which is what makes the create refuse
04must prove
Confirmed
Checking a draft writes no record, match key or review candidate.
no proof recorded yet
invariantservicetest
services-crm:modules/duplicates/tests/e2e/duplicates.e2e.spec.js#writes nothing: the draft is not a record, so the queue is as it was
05must prove
Confirmed
The duplicate-read permission is required for a draft check, and callers lacking it are refused.
origin: services-crm:docs/merging/architecture.md#9. Security and tenant isolation
no proof recorded yet
permissionapitest
services-crm:modules/duplicates/tests/e2e/duplicates.e2e.spec.js#answers 403 to a caller with no duplicates permission at all
06must prove
Confirmed
An overridden create and its override record share a transaction; the record retains the author, time, trimmed reason, distinct blocking rules and bypassed matches, and an audit-write failure rolls back creation.
no proof recorded yet
invariantservice, databasetest
07must prove
Confirmed
An override requires a nonempty reason and at least one rule, with at most one override record for a created record.
no proof recorded yet
validationservice, databasetest
08must prove
Confirmed
Application updates cannot alter an existing override record.
no proof recorded yet
invariantdatabasetest
09
Confirmed
The created record does not store override confirmation or explanation; the separate override record stores those details.
policyservicetest
services-crm:modules/duplicates/tests/e2e/duplicates.e2e.spec.js#stores neither the confirmation nor the reason on the record, both being about the create and not fields
10must prove
Confirmed
Organization creation uses organization matching settings and requires the organization-specific override permission.
no proof recorded yet
policyapi, servicetest
services-crm:modules/duplicates/tests/e2e/organization-block-rules.e2e.spec.js#audits the override with its reason, its rule and the organization it was let past
11must prove
Confirmed
The console presents Create Anyway with a required explanation only when the refusal reports override authority; service checks decide whether creation proceeds.
no proof recorded yet
permissionconsoleobserved
12
Confirmed
Workspace data exports include duplicate-block override records.
policyserviceobserved
13must prove
Confirmed
A draft check rejects record types other than contacts or organizations as an invalid request.
no proof recorded yet
validationapiobserved

Scenarios

IdGivenWhenThenProvenance
01A coordinator enters a new contact resembling an existing member's name and postal code.The form requests matching suggestions.The member appears with score and reasons without a write.test
02An authorized administrator encounters a blocked create.They choose an exception and supply its explanation.The contact and override retain administrator, reason, rule and bypassed match.test
services-crm:modules/duplicates/tests/e2e/duplicates.e2e.spec.js#audits the override with its reason and the record it was let past

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.