---
id: STATE-CRM-DQ-006
title: Absorbed identity
object: DOM-CRM-DQ-004
product_area: crm
module: data-quality
revision: 1
status: draft
design_intent: proposed
implementation_evidence: partially-observed
source_sha:
  services-crm: a8d1364f1dd44b723bb5f9acba12f983e9ec8d69
states:
  - name: live record
    meaning: The identity belongs to an existing business record.
  - name: absorbed
    meaning: Merging removed the record and retained its destination alias.
  - name: dangling
    meaning: >-
      An ordinary deletion removed the alias destination without removing the
      pointer.
  - name: purged
    meaning: Workspace reset or purge removed the retained merge identities.
transitions:
  - from: live record
    to: absorbed
    trigger: A successful merge removes this participant.
    guard: The alias is written in the committing merge transaction.
    side_effects:
      - retain destination and merge attribution with prior integration identity
      - deny later identity reuse
    who: merge task
    provenance: test
    source: >-
      services-crm:modules/merges/tests/integration/db/merged-record-aliases.table.integration.spec.js#refuses
      a second alias of the same merged id, so following one is never a choice
  - from: absorbed
    to: absorbed
    trigger: A later merge absorbs the existing survivor.
    guard: The later merge transaction applies alias compression.
    side_effects:
      - redirect the alias while retaining its original merge attribution
    who: merge task
    provenance: test
    source: >-
      services-crm:modules/merges/tests/integration/services/persistence/merged-record-aliases.integration.spec.js#leaves
      C holding both aliases, so the survivor can say what it is made of
  - from: absorbed
    to: dangling
    trigger: Ordinary deletion removes the survivor.
    guard: No implemented destination-liveness guard prevents this.
    side_effects:
      - retain a pointer to a missing destination
    who: An Entities deletion
    provenance: unknown
    source: FND-CRM-DQ-022
  - from: absorbed
    to: purged
    trigger: Workspace lifecycle removes absorbed identity history.
    guard: Privileged purge capability performs the deletion.
    side_effects:
      - remove aliases before their merge history
    who: workspace lifecycle participant
    provenance: test
    source: >-
      services-crm:modules/merges/tests/integration/db/merged-record-aliases.table.integration.spec.js#may
      not erase an alias, which would make a merged id answerable and reusable
      again
  - from: dangling
    to: purged
    trigger: Workspace lifecycle removes a dangling alias.
    guard: Deletion requires the privileged workspace capability.
    side_effects:
      - remove the retained pointer
    who: workspace lifecycle participant
    provenance: test
    source: >-
      services-crm:modules/merges/tests/integration/db/merged-record-aliases.table.integration.spec.js#may
      not erase an alias, which would make a merged id answerable and reusable
      again
invalid:
  - from: absorbed
    to: live record
    why: >-
      Ordinary application operations cannot remove the alias to make its old
      identity live again.
  - from: absorbed
    to: absorbed
    why: The composite alias identity permits only one current destination.
concurrency: >-
  Aliases and compression commit with the merge under participant locks. Record
  insert triggers reject identity reuse. Alias retention does not itself prevent
  ordinary deletion of the survivor.
invariants:
  - INV-DOM-CRM-DQ-004-06
  - INV-DOM-CRM-DQ-004-07
  - INV-DOM-CRM-DQ-004-08
  - INV-DOM-CRM-DQ-004-09
evidence:
  - >-
    services-crm at a8d1364f: modules/merges/db/merged-record-aliases.table.ts;
    services/persistence/merged-record-aliases.ts;
    services/aliases/merged-record-resolution.ts;
    aws/api/merged-record-routes.ts;
    modules/tenant-lifecycle/services/participants/merges-participant.ts.
---

# Absorbed Identity

## The Lifecycle

```mermaid
stateDiagram-v2
  state "live record" as live_record
  state "absorbed" as absorbed
  state "dangling" as dangling
  state "purged" as purged
  live_record --> absorbed: A successful merge removes this participant
  absorbed --> absorbed: A later merge absorbs the existing survivor
  absorbed --> dangling: Ordinary deletion removes the survivor
  absorbed --> purged: Workspace lifecycle removes absorbed identity history
  dangling --> purged: Workspace lifecycle removes a dangling alias
```

## Transitions Explained

An alias distinguishes an absorbed identity from an ordinary missing record. Record routes report the merge and destination, and a later merge rewrites incoming aliases directly to its survivor while retaining original attribution.

## What Cannot Happen

The application cannot erase aliases or recreate an absorbed identity within the same workspace and type. Workspace lifecycle owns privileged removal.

## Concurrency and Timing

Alias writes share the successful transaction, but destination liveness is incomplete. Ordinary survivor deletion can leave a dangling alias, as the planning findings already record.
