---
id: TST-MBR-STR-008
title: Merge rollback and affiliation retention
kind: integration
product_area: membership
module: structure
revision: 1
status: draft
source_sha:
  services-membership: 5994c270e8a37a30f848e99ba5b5ee6b87c08893
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
repository: services-membership
files:
  - modules/structure/tests/integration/services/tree/unit-merge.integration.spec.ts
implements:
  - ATS-MBR-STR-003-05
  - ATS-MBR-STR-004-01
  - ATS-MBR-STR-004-02
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 3
isolation: A uniquely named local workspace and its seeded records; the suite owns its fixture data and cleanup.
evidence:
  - 'services-membership:modules/structure/tests/integration/services/tree/unit-merge.integration.spec.ts'
bindings:
  - scenario: ATS-MBR-STR-003-05
    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
    provenance: test
  - scenario: ATS-MBR-STR-003-05
    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 › changes nothing: the units,
      their history and every affiliation, the movable ones included, are as they were
    provenance: test
  - scenario: ATS-MBR-STR-004-01
    source: >-
      services-membership:modules/structure/tests/integration/services/tree/unit-merge.integration.spec.ts#the
      tree edits affiliations bind › delete and deactivate › deactivates it instead
    provenance: test
  - scenario: ATS-MBR-STR-004-02
    source: >-
      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
    provenance: test
invocation: 'npm run test:integration'
coverage_limit: >-
  Bindings identify the concrete cases executed in this file. A compound specification may also depend on
  other registered suites or remain partly proposed; registration is not a passing execution result.
provenance: test
source:
  - 'services-membership:modules/structure/tests/integration/services/tree/unit-merge.integration.spec.ts'
---

# Merge rollback and affiliation retention

## Verification Boundary

This suite invokes the local implementation against the prepared database and checks its persisted results. Merge rollback and affiliation retention defines the scope of its examples.

## What This Suite Proves

The suite executes the concrete examples named by its binding ledger. Those examples contribute to the linked capability or feature scenarios within the boundary of the test assertions.

## What It Does Not Prove

Registration supplies no fresh execution result or deployed conformance verdict. Browser behavior, deployed infrastructure and unasserted variants require separate evidence.

## Real Dependencies and Test Doubles

PostgreSQL, local Membership services and the suite’s persistence path are real. The business clock and caller fixtures are controlled by the harness.

## Must Not Be Doubled

The Membership path under examination, transaction behavior and database constraints stay real. Replacing those boundaries would remove the persisted proof the suite is intended to supply.
