---
id: TST-CRM-REG-056
title: Regional duplicate reversed and failed deliveries
kind: integration
product_area: crm
module: regions
revision: 1
status: draft
source_sha:
  services-crm: a8d1364f1dd44b723bb5f9acba12f983e9ec8d69
repository: services-crm
files:
  - >-
    modules/regions/tests/integration/services/region-assignment/region-assignment-delivery.integration.spec.js
implements:
  - ATS-CRM-REG-008-08
  - ATS-CRM-REG-008-09
  - ATS-CRM-REG-008-10
  - ATS-CRM-REG-008-13
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 2
isolation: Suite-owned workspace and records in the prepared test database.
evidence:
  - >-
    services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment-delivery.integration.spec.js
assertions:
  - scenario: ATS-CRM-REG-008-08
    source: >-
      services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment-delivery.integration.spec.js#two
      messages delivered out of order › ends in the region of the address the contact has now, not of the
      one the older message described
  - scenario: ATS-CRM-REG-008-08
    source: >-
      services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment-delivery.integration.spec.js#two
      messages delivered out of order › writes once for the two deliveries, because the second finds the
      fingerprint the first wrote
  - scenario: ATS-CRM-REG-008-08
    source: >-
      services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment-delivery.integration.spec.js#the
      same message delivered twice › writes nothing the second time: the fingerprint says the deciding
      address is the one it decided from
  - scenario: ATS-CRM-REG-008-09
    source: >-
      services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment-delivery.integration.spec.js#one
      delivery of one address change › records its own write as a change of the region and the
      fingerprint, and of no address
  - scenario: ATS-CRM-REG-008-09
    source: >-
      services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment-delivery.integration.spec.js#one
      delivery of one address change › is not called again by its own write, so an assignment cannot set
      off another
  - scenario: ATS-CRM-REG-008-10
    source: >-
      services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment-delivery.integration.spec.js#a
      deciding-address change that leaves the region where it was › bumps no version, so the contact
      stands at the version its save answered
  - scenario: ATS-CRM-REG-008-10
    source: >-
      services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment-delivery.integration.spec.js#a
      deciding-address change that leaves the region where it was › leaves the last-modified stamp the
      save wrote
  - scenario: ATS-CRM-REG-008-10
    source: >-
      services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment-delivery.integration.spec.js#a
      deciding-address change that moves the region › bumps the version exactly once past the save,
      because the region moved
  - scenario: ATS-CRM-REG-008-13
    source: >-
      services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment-delivery.integration.spec.js#a
      delivery that fails and is made again › assigned nothing while it was failing
  - scenario: ATS-CRM-REG-008-13
    source: >-
      services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment-delivery.integration.spec.js#a
      delivery that fails and is made again › assigns the region on the next delivery of the same message
binding_scope: >-
  Exact assertion anchors identify the contribution of this file. Scenario-level bindings may compose
  several files; registration does not assert that every file alone executes every scenario step.
---

# Regional duplicate reversed and failed deliveries

## Verification Boundary

The suite exercises real regional persistence and processing against the prepared database. It verifies the source assertions linked in this register.

## What This Suite Proves

The linked source assertions contribute checks for current state defeats duplicate and reversed delivery; assignment changes do not loop; version effects depend on placement change; redelivery can recover assignment. A scenario spanning several files relies on those assertions together; this file supplies only its named checks.

## What It Does Not Prove

The register establishes neither a current passing run nor verified conformance. Unbound scenarios, broader feature chains and the delegated infrastructure beyond this execution boundary remain unproved.

## Real Dependencies and Test Doubles

PostgreSQL, event capture, dispatch, consumer routing and regional processing are real. The delivery harness replaces the external queue with an in-memory message list.

## Must Not Be Doubled

Regional matching, regional persistence and the stored values under assertion must remain real. A substitute answer for these dependencies cannot qualify the linked regional outcomes.
