---
id: ATS-MBR-STR-003
scope: CAP-MBR-STR-003
product_area: membership
module: structure
revision: 2
status: proposed
approved_by: null
approved_at: null
source_sha:
  services-membership: 5994c270e8a37a30f848e99ba5b5ee6b87c08893
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
scenarios:
  - id: ATS-MBR-STR-003-01
    title: Invalid survivors leave the source unchanged
    level: api
    proves:
      - BR-CAP-MBR-STR-003-01
      - INV-DOM-MBR-STR-002-03
    preconditions: >-
      An isolated Membership-licensed workspace contains the relevant records, with caller permissions
      selected for the case.
    steps: 'Attempt self, descendant and inactive survivors, then attempt another merge of a merged source.'
    expected: Each invalid combination fails before retained records change.
    negative: true
    data_needs: The FAA example records or equivalent records prepared within the isolated workspace.
    bound_to:
      - >-
        services-membership:modules/structure/tests/unit/services/tree-edits.spec.ts#the tree edits ›
        merge › refuses a survivor below the merged unit
      - >-
        services-membership:tests/acceptance/structure/MBR-ACC-0019.acceptance.ts#MBR-ACC-0019 merges
        refused, all or none, backdated, of an inactive unit, in a chain
      - TST-MBR-STR-010
      - TST-MBR-STR-078
    provenance: test
    source: >-
      services-membership:modules/structure/tests/unit/services/tree-edits.spec.ts#the tree edits › merge
      › refuses a survivor below the merged unit
    category: validation
  - id: ATS-MBR-STR-003-02
    title: Children move together or remain together
    level: api
    proves:
      - BR-CAP-MBR-STR-003-02
    preconditions: >-
      An isolated Membership-licensed workspace contains the relevant records, with caller permissions
      selected for the case.
    steps: >-
      Merge a source with a valid section placement, then test a child whose survivor placement is
      invalid.
    expected: The valid section relocates; the invalid combination leaves the whole source branch unchanged.
    negative: false
    data_needs: The FAA example records or equivalent records prepared within the isolated workspace.
    bound_to:
      - >-
        services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#organizational
        units in the database › merge › moves the children under the survivor, marks the unit merged and
        lists what it left
      - >-
        services-membership:tests/acceptance/structure/MBR-ACC-0019.acceptance.ts#MBR-ACC-0019 merges
        refused, all or none, backdated, of an inactive unit, in a chain
      - TST-MBR-STR-006
      - TST-MBR-STR-078
    provenance: test
    source: >-
      services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#organizational
      units in the database › merge › moves the children under the survivor, marks the unit merged and
      lists what it left
    category: failure
  - id: ATS-MBR-STR-003-03
    title: The source records its survivor
    level: api
    proves:
      - BR-CAP-MBR-STR-003-03
      - AS-JNY-MBR-STR-003-01
    preconditions: >-
      An isolated Membership-licensed workspace contains the relevant records, with caller permissions
      selected for the case.
    steps: Combine Savannah into Atlanta and read the source record.
    expected: Savannah records merged status with Atlanta as survivor.
    negative: false
    data_needs: The FAA example records or equivalent records prepared within the isolated workspace.
    bound_to:
      - >-
        services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#organizational
        units in the database › merge › moves the children under the survivor, marks the unit merged and
        lists what it left
      - >-
        services-membership:tests/acceptance/structure/MBR-ACC-0018.acceptance.ts#MBR-ACC-0018 Savannah
        Chapter is merged into Atlanta
      - TST-MBR-STR-006
      - TST-MBR-STR-077
    provenance: test
    source: >-
      services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#organizational
      units in the database › merge › moves the children under the survivor, marks the unit merged and
      lists what it left
    category: transition
  - id: ATS-MBR-STR-003-04
    title: Members transfer without duplicate survivor ties
    level: api
    proves:
      - BR-CAP-MBR-STR-003-04
      - AS-JNY-MBR-STR-003-02
    preconditions: >-
      An isolated Membership-licensed workspace contains the relevant records, with caller permissions
      selected for the case.
    steps: Merge Savannah into Atlanta with Pat only at Savannah and Jo already at both.
    expected: 'Pat continues at Atlanta, Jo’s duplicate source tie ends and the result counts both outcomes.'
    negative: false
    data_needs: The FAA example records or equivalent records prepared within the isolated workspace.
    bound_to:
      - >-
        services-membership:tests/e2e/s13-unit-merge.e2e.spec.ts#a unit merge moves its members: Savannah
        into Atlanta › merges Savannah, counting one affiliation moved and one ended on the survivor
      - >-
        services-membership:tests/e2e/s13-unit-merge.e2e.spec.ts#a unit merge moves its members: Savannah
        into Atlanta › ends Pat’s Savannah affiliation yesterday and continues it in Atlanta as primary
        from today
      - >-
        services-membership:tests/e2e/s13-unit-merge.e2e.spec.ts#a unit merge moves its members: Savannah
        into Atlanta › keeps Jo’s Atlanta affiliation and ends her Savannah one yesterday
      - >-
        services-membership:tests/e2e/s13-unit-merge.e2e.spec.ts#a unit merge moves its members: Savannah
        into Atlanta › lists Jo and Pat on Atlanta’s roster today, and no one on Savannah’s
      - TST-MBR-STR-099
    provenance: test
    source: >-
      services-membership:tests/e2e/s13-unit-merge.e2e.spec.ts#a unit merge moves its members: Savannah
      into Atlanta › merges Savannah, counting one affiliation moved and one ended on the survivor
    category: rule
  - id: ATS-MBR-STR-003-05
    title: Affiliation conflicts roll back the merge
    level: api
    proves:
      - BR-CAP-MBR-STR-003-05
    preconditions: >-
      An isolated Membership-licensed workspace contains the relevant records, with caller permissions
      selected for the case.
    steps: >-
      Attempt a combination introducing a package minimum violation and inspect the response and saved
      records.
    expected: 'The refusal names the membership and leaves units, placement periods and affiliations intact.'
    negative: true
    data_needs: The FAA example records or equivalent records prepared within the isolated workspace.
    bound_to:
      - >-
        services-membership:modules/structure/tests/integration/services/tree/unit-merge.integration.spec.ts#the
        tree edits affiliations bind › a merge an affiliation cannot follow › is refused 409
        affiliations_not_movable, naming the membership and unit_minimum
      - >-
        services-membership:modules/structure/tests/integration/services/tree/unit-merge.integration.spec.ts#the
        tree edits affiliations bind › a merge an affiliation cannot follow › changes nothing: the units,
        their history and every affiliation, the movable ones included, are as they were
      - >-
        services-membership:modules/structure/tests/unit/services/tree-edits.spec.ts#the tree edits ›
        merge › refuses the whole merge 409 affiliations_not_movable before any write when the plan
        refuses
      - TST-MBR-STR-008
      - TST-MBR-STR-010
    provenance: test
    source: >-
      services-membership:modules/structure/tests/integration/services/tree/unit-merge.integration.spec.ts#the
      tree edits affiliations bind › a merge an affiliation cannot follow › is refused 409
      affiliations_not_movable, naming the membership and unit_minimum
    category: failure
  - id: ATS-MBR-STR-003-06
    title: Membership identity moves only without conflict
    level: api
    proves:
      - BR-CAP-MBR-STR-003-06
    preconditions: >-
      An isolated Membership-licensed workspace contains the relevant records, with caller permissions
      selected for the case.
    steps: >-
      Merge Macon into Atlanta with Kim identified by Macon, then test a source whose owner already holds
      the survivor’s identity.
    expected: The first identity changes; the conflicting combination leaves identities and source state intact.
    negative: false
    data_needs: The FAA example records or equivalent records prepared within the isolated workspace.
    bound_to:
      - >-
        services-membership:modules/memberships/tests/integration/services/identity-unit-merge.integration.spec.ts#a
        unit merge moves the identity of identity-bound memberships › the merge of Macon into Atlanta ›
        makes Atlanta the identity of Kim’s membership, at the next version
      - >-
        services-membership:modules/memberships/tests/integration/services/identity-unit-merge.integration.spec.ts#a
        unit merge moves the identity of identity-bound memberships › a merge whose survivor’s membership
        an owner already holds › changes nothing: Savannah stays active and Pat’s and Jo’s identities
        stay Savannah at the versions they had
      - TST-MBR-STR-003
    provenance: test
    source: >-
      services-membership:modules/memberships/tests/integration/services/identity-unit-merge.integration.spec.ts#a
      unit merge moves the identity of identity-bound memberships › the merge of Macon into Atlanta ›
      makes Atlanta the identity of Kim’s membership, at the next version
    category: interaction
  - id: ATS-MBR-STR-003-07
    title: Merged record mutations are refused
    level: api
    proves:
      - BR-CAP-MBR-STR-003-09
      - AS-JNY-MBR-STR-003-03
    preconditions: >-
      An isolated Membership-licensed workspace contains the relevant records, with caller permissions
      selected for the case.
    steps: 'Try replacing details, relocating, deactivating and merging the merged source.'
    expected: Every attempt returns the merged-unit refusal.
    negative: true
    data_needs: The FAA example records or equivalent records prepared within the isolated workspace.
    bound_to:
      - >-
        services-membership:tests/acceptance/structure/MBR-ACC-0018.acceptance.ts#MBR-ACC-0018 Savannah
        Chapter is merged into Atlanta
      - TST-MBR-STR-077
    provenance: test
    source: >-
      services-membership:tests/acceptance/structure/MBR-ACC-0018.acceptance.ts#MBR-ACC-0018 Savannah
      Chapter is merged into Atlanta
    category: edge
  - id: ATS-MBR-STR-003-08
    title: Merge history prevents source removal
    category: interaction
    level: api
    proves:
      - BR-CAP-MBR-STR-003-04
      - BR-CAP-MBR-STR-004-04
    preconditions: An isolated workspace contains the records and current versions needed for the case.
    steps: 'Merge a source whose member affiliation transfers to the survivor, then attempt source deletion.'
    expected: The retained source affiliation prevents deletion even though the current roster has moved.
    negative: false
    data_needs: Separate fixture records for the accepted and refused operations.
    bound_to:
      - TST-MBR-STR-099
      - >-
        services-membership:tests/e2e/s13-unit-merge.e2e.spec.ts#refuses to delete Savannah while
        affiliations name it (unit_has_affiliations)
    provenance: test
    source:
      - 'services-membership:docs/migrations/unit-merge/README.md#The behaviour'
      - >-
        services-membership:modules/structure/tests/integration/services/tree/unit-merge.integration.spec.ts#the
        tree edits affiliations bind › delete and deactivate › refuses to delete a unit a closed
        affiliation names, 409 unit_has_affiliations with the count
      - >-
        services-membership:tests/e2e/s13-unit-merge.e2e.spec.ts#refuses to delete Savannah while
        affiliations name it (unit_has_affiliations)
    exercises:
      - CAP-MBR-STR-003
      - CAP-MBR-STR-004
  - id: ATS-MBR-STR-003-09
    title: Merge leaves local dues and settlement work on the source
    category: interaction
    level: api
    proves:
      - BR-CAP-MBR-STR-003-07
      - BR-CAP-MBR-STR-008-09
    preconditions: An isolated workspace contains the records and current versions needed for the case.
    steps: >-
      Prepare source dues and financial settings, merge the source, inspect the returned follow-up list
      and reread the source facets.
    expected: >-
      The result identifies the source’s dues and settings as follow-up work; both remain readable on the
      source.
    negative: false
    data_needs: Separate fixture records for the accepted and refused operations.
    bound_to:
      - TST-MBR-STR-077
      - >-
        services-membership:tests/acceptance/structure/MBR-ACC-0018.acceptance.ts#not_moved: the dues
        product, the settings, the legal-entity link
    provenance: test
    source:
      - >-
        services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#organizational
        units in the database › merge › moves the children under the survivor, marks the unit merged and
        lists what it left
      - >-
        services-membership:modules/structure/services/persistence/organizational-unit-dues-products.ts:createDuesProduct
      - >-
        services-membership:tests/acceptance/structure/MBR-ACC-0018.acceptance.ts#not_moved: the dues
        product, the settings, the legal-entity link
    exercises:
      - CAP-MBR-STR-003
      - CAP-MBR-STR-008
  - id: ATS-MBR-STR-003-10
    title: Workspace authority gates this capability
    category: permission
    level: api
    proves:
      - BR-CAP-MBR-STR-019-01
    preconditions: An isolated workspace contains the records and current versions needed for the case.
    steps: >-
      Exercise the capability’s exposed operations with its read-only and management callers, then repeat
      with application access removed, an unlicensed workspace and an unavailable workspace.
    expected: >-
      Each named operation requires its declared authority; admission failures occur before any record or
      calculated result is exposed.
    negative: true
    data_needs: Separate fixture records for the accepted and refused operations.
    bound_to: []
    provenance: proposed
    source:
      - >-
        services-membership:tests/unit/route-authorization.spec.ts#route authorization: every Membership
        operation names its permission › requires membership.structure.read of every structure read and
        membership.structure.manage of every change
      - >-
        services-membership:modules/configuration/aws/api/configuration.routes.ts:configurationModuleRoutes
      - >-
        services-membership:tests/e2e/terms-api.e2e.spec.ts#the terms API, end to end in process ›
        refuses a caller who holds no key in the tenant
    exercises:
      - CAP-MBR-STR-003
      - CAP-MBR-STR-019
evidence:
  - >-
    services-membership:modules/memberships/tests/integration/services/identity-unit-merge.integration.spec.ts
  - >-
    services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts
  - 'services-membership:modules/structure/tests/integration/services/tree/unit-merge.integration.spec.ts'
  - 'services-membership:modules/structure/tests/unit/services/tree-edits.spec.ts'
  - 'services-membership:tests/acceptance/structure/MBR-ACC-0018.acceptance.ts'
  - 'services-membership:tests/acceptance/structure/MBR-ACC-0019.acceptance.ts'
  - 'services-membership:tests/e2e/s13-unit-merge.e2e.spec.ts'
  - >-
    services-membership:modules/structure/tests/unit/services/tree-edits.spec.ts#the tree edits › merge ›
    refuses a survivor below the merged unit
  - >-
    services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#organizational
    units in the database › merge › moves the children under the survivor, marks the unit merged and
    lists what it left
  - 'services-membership:docs/migrations/unit-merge/README.md#The behaviour'
  - >-
    services-membership:modules/structure/tests/integration/services/tree/unit-merge.integration.spec.ts#the
    tree edits affiliations bind › a merge an affiliation cannot follow › is refused 409
    affiliations_not_movable, naming the membership and unit_minimum
  - >-
    services-membership:modules/memberships/tests/integration/services/identity-unit-merge.integration.spec.ts#a
    unit merge moves the identity of identity-bound memberships › the merge of Macon into Atlanta › makes
    Atlanta the identity of Kim’s membership, at the next version
  - 'services-membership:modules/structure/services/tree/tree-edits.ts:mergeUnit'
  - >-
    services-membership:modules/structure/services/persistence/organizational-units.ts:updateOrganizationalUnit
  - >-
    services-membership:modules/structure/tests/unit/services/tree-edits.spec.ts#the tree edits › merge ›
    states membership.unit.reparented for each child that moved under the survivor, naming the merged
    unit
  - >-
    services-membership:tests/e2e/s13-unit-merge.e2e.spec.ts#a unit merge moves its members: Savannah
    into Atlanta › merges Savannah, counting one affiliation moved and one ended on the survivor
  - >-
    services-membership:tests/acceptance/structure/MBR-ACC-0018.acceptance.ts#MBR-ACC-0018 Savannah
    Chapter is merged into Atlanta
  - >-
    services-membership:modules/structure/tests/integration/services/tree/unit-merge.integration.spec.ts#the
    tree edits affiliations bind › delete and deactivate › refuses to delete a unit a closed affiliation
    names, 409 unit_has_affiliations with the count
  - >-
    services-membership:modules/structure/services/persistence/organizational-unit-dues-products.ts:createDuesProduct
  - membership.structure.manage
  - membership.application.access
  - >-
    services-membership:tests/unit/route-authorization.spec.ts#route authorization: every Membership
    operation names its permission › requires membership.structure.read of every structure read and
    membership.structure.manage of every change
  - 'services-membership:modules/configuration/aws/api/configuration.routes.ts:configurationModuleRoutes'
  - >-
    services-membership:tests/e2e/terms-api.e2e.spec.ts#the terms API, end to end in process › refuses a
    caller who holds no key in the tenant
coverage:
  rule: covered
  transition: covered
  validation: covered
  permission: covered
  edge: covered
  failure: covered
  boundary: 'gap: FND-MBR-STR-056'
  concurrency: 'gap: FND-MBR-STR-056'
  invariant: 'gap: FND-MBR-STR-056'
  interaction: covered
coverage_notes:
  boundary: >-
    No dedicated scenario establishes this category across the capability’s declared operations and
    design obligations.
  concurrency: >-
    No dedicated scenario establishes this category across the capability’s declared operations and
    design obligations.
  invariant: >-
    No dedicated scenario establishes this category across the capability’s declared operations and
    design obligations.
unproved_rules: []
coverage_obligations:
  permissions:
    - key: membership.structure.manage
      scenario_ids:
        - ATS-MBR-STR-019-01
      local_scenario_ids:
        - ATS-MBR-STR-003-10
      coverage: partial
      gap: FND-MBR-STR-056
      provenance: unknown
      source: FND-MBR-STR-056
      note: >-
        These cases establish declared authority or representative admission; exhaustive operation and
        caller combinations remain open.
    - key: membership.application.access
      scenario_ids:
        - ATS-MBR-STR-019-04
      local_scenario_ids:
        - ATS-MBR-STR-003-10
      coverage: partial
      gap: FND-MBR-STR-056
      provenance: unknown
      source: FND-MBR-STR-056
      note: >-
        These cases establish declared authority or representative admission; exhaustive operation and
        caller combinations remain open.
  state_models:
    - id: STATE-MBR-STR-001
      transitions:
        - from: active
          to: inactive
          trigger: Staff close the unit.
          provenance: unknown
          source: FND-MBR-STR-056
          scenario_ids: []
          coverage: gap
          gap: FND-MBR-STR-056
        - from: inactive
          to: inactive
          trigger: Staff repeat closure of an inactive unit.
          provenance: unknown
          source: FND-MBR-STR-056
          scenario_ids: []
          coverage: gap
          gap: FND-MBR-STR-056
        - from: active
          to: merged
          trigger: Staff combine the source into a surviving unit.
          provenance: unknown
          source: FND-MBR-STR-056
          scenario_ids:
            - ATS-MBR-STR-003-03
          coverage: specified
          gap: null
        - from: inactive
          to: merged
          trigger: Staff merge an inactive source.
          provenance: unknown
          source: FND-MBR-STR-056
          scenario_ids: []
          coverage: gap
          gap: FND-MBR-STR-056
        - from: active
          to: removed
          trigger: Staff remove an unused active unit.
          provenance: unknown
          source: FND-MBR-STR-056
          scenario_ids: []
          coverage: gap
          gap: FND-MBR-STR-056
        - from: inactive
          to: removed
          trigger: Staff remove an unused inactive unit.
          provenance: unknown
          source: FND-MBR-STR-056
          scenario_ids: []
          coverage: gap
          gap: FND-MBR-STR-056
        - from: merged
          to: removed
          trigger: Staff request deletion of a merged source.
          provenance: unknown
          source: FND-MBR-STR-056
          scenario_ids: []
          coverage: gap
          gap: FND-MBR-STR-056
      gap: FND-MBR-STR-056
  related:
    - capability: CAP-MBR-STR-004
      scenario: ATS-MBR-STR-003-08
      provenance: proposed
    - capability: CAP-MBR-STR-008
      scenario: ATS-MBR-STR-003-09
      provenance: proposed
  invariants:
    - id: INV-DOM-MBR-STR-001-01
      scenario_ids: []
      coverage: gap
      gap: FND-MBR-STR-056
      provenance: unknown
      source: FND-MBR-STR-056
    - id: INV-DOM-MBR-STR-001-02
      scenario_ids: []
      coverage: gap
      gap: FND-MBR-STR-056
      provenance: unknown
      source: FND-MBR-STR-056
    - id: INV-DOM-MBR-STR-001-03
      scenario_ids: []
      coverage: gap
      gap: FND-MBR-STR-056
      provenance: unknown
      source: FND-MBR-STR-056
    - id: INV-DOM-MBR-STR-001-04
      scenario_ids: []
      coverage: gap
      gap: FND-MBR-STR-056
      provenance: unknown
      source: FND-MBR-STR-056
    - id: INV-DOM-MBR-STR-001-05
      scenario_ids: []
      coverage: gap
      gap: FND-MBR-STR-056
      provenance: unknown
      source: FND-MBR-STR-056
    - id: INV-DOM-MBR-STR-001-06
      scenario_ids: []
      coverage: gap
      gap: FND-MBR-STR-056
      provenance: unknown
      source: FND-MBR-STR-056
    - id: INV-DOM-MBR-STR-001-07
      scenario_ids: []
      coverage: gap
      gap: FND-MBR-STR-056
      provenance: unknown
      source: FND-MBR-STR-056
    - id: INV-DOM-MBR-STR-002-01
      scenario_ids: []
      coverage: gap
      gap: FND-MBR-STR-056
      provenance: unknown
      source: FND-MBR-STR-056
    - id: INV-DOM-MBR-STR-002-02
      scenario_ids: []
      coverage: gap
      gap: FND-MBR-STR-056
      provenance: unknown
      source: FND-MBR-STR-056
    - id: INV-DOM-MBR-STR-002-03
      scenario_ids:
        - ATS-MBR-STR-003-01
      coverage: specified
      gap: null
      provenance: documented
      source:
        - >-
          services-membership:modules/structure/tests/unit/services/tree-edits.spec.ts#the tree edits ›
          merge › refuses a survivor below the merged unit
    - id: INV-DOM-MBR-STR-002-04
      scenario_ids: []
      coverage: gap
      gap: FND-MBR-STR-056
      provenance: unknown
      source: FND-MBR-STR-056
    - id: INV-DOM-MBR-STR-002-05
      scenario_ids: []
      coverage: gap
      gap: FND-MBR-STR-056
      provenance: unknown
      source: FND-MBR-STR-056
    - id: INV-DOM-MBR-STR-002-06
      scenario_ids: []
      coverage: gap
      gap: FND-MBR-STR-056
      provenance: unknown
      source: FND-MBR-STR-056
    - id: INV-DOM-MBR-STR-002-07
      scenario_ids: []
      coverage: gap
      gap: FND-MBR-STR-056
      provenance: unknown
      source: FND-MBR-STR-056
    - id: INV-DOM-MBR-STR-002-08
      scenario_ids: []
      coverage: gap
      gap: FND-MBR-STR-056
      provenance: unknown
      source: FND-MBR-STR-056
    - id: INV-DOM-MBR-STR-002-09
      scenario_ids: []
      coverage: gap
      gap: FND-MBR-STR-056
      provenance: unknown
      source: FND-MBR-STR-056
  workflows:
    - id: WF-MBR-STR-002
      scenarios:
        - ATS-MBR-STR-003-02
        - ATS-MBR-STR-003-05
        - ATS-MBR-STR-003-06
        - ATS-MBR-STR-003-08
        - ATS-MBR-STR-003-09
      unproved_failure_and_concurrency: FND-MBR-STR-056
      provenance: unknown
      source: FND-MBR-STR-056
  workflow_interactions: []
rule_coverage:
  - rule: BR-CAP-MBR-STR-003-01
    scenarios:
      - ATS-MBR-STR-003-01
    gap: null
    provenance: documented
    source:
      - >-
        services-membership:modules/structure/tests/unit/services/tree-edits.spec.ts#the tree edits ›
        merge › refuses a survivor below the merged unit
  - rule: BR-CAP-MBR-STR-003-02
    scenarios:
      - ATS-MBR-STR-003-02
    gap: null
    provenance: documented
    source:
      - >-
        services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#organizational
        units in the database › merge › moves the children under the survivor, marks the unit merged and
        lists what it left
  - rule: BR-CAP-MBR-STR-003-03
    scenarios:
      - ATS-MBR-STR-003-03
    gap: null
    provenance: documented
    source:
      - >-
        services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#organizational
        units in the database › merge › moves the children under the survivor, marks the unit merged and
        lists what it left
  - rule: BR-CAP-MBR-STR-003-04
    scenarios:
      - ATS-MBR-STR-003-04
      - ATS-MBR-STR-003-08
    gap: null
    provenance: documented
    source:
      - >-
        services-membership:tests/e2e/s13-unit-merge.e2e.spec.ts#a unit merge moves its members: Savannah
        into Atlanta › merges Savannah, counting one affiliation moved and one ended on the survivor
      - 'services-membership:docs/migrations/unit-merge/README.md#The behaviour'
      - >-
        services-membership:modules/structure/tests/integration/services/tree/unit-merge.integration.spec.ts#the
        tree edits affiliations bind › delete and deactivate › refuses to delete a unit a closed
        affiliation names, 409 unit_has_affiliations with the count
      - >-
        services-membership:tests/e2e/s13-unit-merge.e2e.spec.ts#refuses to delete Savannah while
        affiliations name it (unit_has_affiliations)
  - rule: BR-CAP-MBR-STR-003-05
    scenarios:
      - ATS-MBR-STR-003-05
    gap: null
    provenance: documented
    source:
      - >-
        services-membership:modules/structure/tests/integration/services/tree/unit-merge.integration.spec.ts#the
        tree edits affiliations bind › a merge an affiliation cannot follow › is refused 409
        affiliations_not_movable, naming the membership and unit_minimum
  - rule: BR-CAP-MBR-STR-003-06
    scenarios:
      - ATS-MBR-STR-003-06
    gap: null
    provenance: documented
    source:
      - >-
        services-membership:modules/memberships/tests/integration/services/identity-unit-merge.integration.spec.ts#a
        unit merge moves the identity of identity-bound memberships › the merge of Macon into Atlanta ›
        makes Atlanta the identity of Kim’s membership, at the next version
  - rule: BR-CAP-MBR-STR-003-09
    scenarios:
      - ATS-MBR-STR-003-07
    gap: null
    provenance: documented
    source:
      - >-
        services-membership:tests/acceptance/structure/MBR-ACC-0018.acceptance.ts#MBR-ACC-0018 Savannah
        Chapter is merged into Atlanta
narrative_sources:
  - section: Coverage
    provenance: documented
    source:
      - CAP-MBR-STR-003
      - FND-MBR-STR-056
  - section: Interactions With Related Capabilities
    provenance: proposed
    source:
      - ATS-MBR-STR-003-06
      - ATS-MBR-STR-003-08
      - ATS-MBR-STR-003-09
---

# Combine units and continue their memberships: Capability Test Specification

## Coverage

The coverage map distinguishes specified examples from missing proof. A covered category means an expected case is specified; executable bindings and their run results remain separate evidence. Each required rule has a proof link or an explicit coverage finding in the structured rule ledger.

| Required Rule | Scenario or Finding |
|---|---|
| `BR-CAP-MBR-STR-003-01` | `ATS-MBR-STR-003-01` |
| `BR-CAP-MBR-STR-003-02` | `ATS-MBR-STR-003-02` |
| `BR-CAP-MBR-STR-003-03` | `ATS-MBR-STR-003-03` |
| `BR-CAP-MBR-STR-003-04` | `ATS-MBR-STR-003-04`, `ATS-MBR-STR-003-08` |
| `BR-CAP-MBR-STR-003-05` | `ATS-MBR-STR-003-05` |
| `BR-CAP-MBR-STR-003-06` | `ATS-MBR-STR-003-06` |
| `BR-CAP-MBR-STR-003-09` | `ATS-MBR-STR-003-07` |

## Interactions With Related Capabilities

Merge history prevents source removal. Merge a source whose member affiliation transfers to the survivor, then attempt source deletion.

Merge leaves local dues and settlement work on the source. Prepare source dues and financial settings, merge the source, inspect the returned follow-up list and reread the source facets.
