---
id: ATS-MBR-STR-001
scope: CAP-MBR-STR-001
product_area: membership
module: structure
revision: 1
status: proposed
approved_by: null
approved_at: null
source_sha:
  services-membership: 5994c270e8a37a30f848e99ba5b5ee6b87c08893
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
scenarios:
  - id: ATS-MBR-STR-001-01
    title: Readable kind identity survives replacement
    level: api
    proves:
      - BR-CAP-MBR-STR-001-01
    preconditions: >-
      An isolated Membership-licensed workspace contains the relevant records, with caller permissions
      selected for the case.
    steps: 'Save one kind with an explicit reference and another by name, then replace the first kind.'
    expected: The explicit and derived references remain the saved identities.
    negative: false
    data_needs: The FAA example records or equivalent records prepared within the isolated workspace.
    bound_to:
      - >-
        services-membership:tests/acceptance/structure/MBR-ACC-0001.acceptance.ts#MBR-ACC-0001 staff define,
        rename, retire and delete kinds of unit
    provenance: test
    source: >-
      services-membership:tests/acceptance/structure/MBR-ACC-0001.acceptance.ts#MBR-ACC-0001 staff define,
      rename, retire and delete kinds of unit
  - id: ATS-MBR-STR-001-02
    title: Non-root kinds need a parent choice
    level: api
    proves:
      - BR-CAP-MBR-STR-001-02
    preconditions: >-
      An isolated Membership-licensed workspace contains the relevant records, with caller permissions
      selected for the case.
    steps: Attempt a non-root kind with an empty parent selection.
    expected: Validation rejects the request and the catalogue has no added kind.
    negative: true
    data_needs: The FAA example records or equivalent records prepared within the isolated workspace.
    bound_to: []
    provenance: proposed
    source: 'services-membership:modules/structure/services/persistence/organizational-unit-types.ts:parentIdsOf'
  - id: ATS-MBR-STR-001-03
    title: Parent references are known or self-referential
    level: api
    proves:
      - BR-CAP-MBR-STR-001-03
    preconditions: >-
      An isolated Membership-licensed workspace contains the relevant records, with caller permissions
      selected for the case.
    steps: Compare creation with an unknown parent kind and creation allowing its own kind.
    expected: The unknown choice fails and the self-referential choice saves.
    negative: true
    data_needs: The FAA example records or equivalent records prepared within the isolated workspace.
    bound_to: []
    provenance: proposed
    source: >-
      services-membership:modules/structure/services/persistence/organizational-unit-types.ts:requireKnownTypes
  - id: ATS-MBR-STR-001-04
    title: Duplicate kind creation preserves the first record
    level: api
    proves:
      - BR-CAP-MBR-STR-001-04
    preconditions: >-
      An isolated Membership-licensed workspace contains the relevant records, with caller permissions
      selected for the case.
    steps: Submit two creates using the same kind reference.
    expected: The second response reports a conflict and retains the first record.
    negative: true
    data_needs: The FAA example records or equivalent records prepared within the isolated workspace.
    bound_to: []
    provenance: proposed
    source: >-
      services-membership:modules/structure/services/persistence/organizational-unit-types.ts:createOrganizationalUnitType
  - id: ATS-MBR-STR-001-05
    title: Existing placements protect category choices
    level: api
    proves:
      - BR-CAP-MBR-STR-001-05
    preconditions: >-
      An isolated Membership-licensed workspace contains the relevant records, with caller permissions
      selected for the case.
    steps: Remove zone parentage while the chapter category still has units under zones.
    expected: The response identifies the in-use placement choice and saves no replacement.
    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-0003.acceptance.ts#MBR-ACC-0003 a tree rule
        chapters rely on cannot be withdrawn until they move
    provenance: test
    source: >-
      services-membership:tests/acceptance/structure/MBR-ACC-0003.acceptance.ts#MBR-ACC-0003 a tree rule
      chapters rely on cannot be withdrawn until they move
  - id: ATS-MBR-STR-001-06
    title: Version checks precede a complete replacement
    level: api
    proves:
      - BR-CAP-MBR-STR-001-06
    preconditions: >-
      An isolated Membership-licensed workspace contains the relevant records, with caller permissions
      selected for the case.
    steps: 'Submit a stale kind replacement, then a current replacement without plural name or display order.'
    expected: The stale write fails; the accepted replacement clears the plural and restores zero ordering.
    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-0001.acceptance.ts#MBR-ACC-0001 staff define,
        rename, retire and delete kinds of unit
    provenance: test
    source: >-
      services-membership:tests/acceptance/structure/MBR-ACC-0001.acceptance.ts#MBR-ACC-0001 staff define,
      rename, retire and delete kinds of unit
  - id: ATS-MBR-STR-001-07
    title: Kind retirement blocks placement until reactivation
    level: api
    proves:
      - BR-CAP-MBR-STR-001-07
    preconditions: >-
      An isolated Membership-licensed workspace contains the relevant records, with caller permissions
      selected for the case.
    steps: >-
      Deactivate sections, attempt section creation and relocation, then reactivate the kind through
      replacement.
    expected: Retirement preserves existing sections and blocks placement work until reactivation.
    negative: false
    data_needs: The FAA example records or equivalent records prepared within the isolated workspace.
    bound_to:
      - >-
        services-membership:tests/acceptance/structure/MBR-ACC-0004.acceptance.ts#MBR-ACC-0004 retiring the
        Section kind freezes every section in place
    provenance: test
    source: >-
      services-membership:tests/acceptance/structure/MBR-ACC-0004.acceptance.ts#MBR-ACC-0004 retiring the
      Section kind freezes every section in place
  - id: ATS-MBR-STR-001-08
    title: Unit and program references prevent kind removal
    level: api
    proves:
      - BR-CAP-MBR-STR-001-08
    preconditions: >-
      An isolated Membership-licensed workspace contains the relevant records, with caller permissions
      selected for the case.
    steps: Attempt removal of a unit-used kind and a program-selected kind.
    expected: Both conflict responses leave the referenced kinds available.
    negative: true
    data_needs: The FAA example records or equivalent records prepared within the isolated workspace.
    bound_to:
      - >-
        services-membership:tests/e2e/structure-api.e2e.spec.ts#the structure API, end to end in process ›
        refuses to delete a unit type in use, 409 unit_type_in_use
      - >-
        services-membership:tests/e2e/database-refusals.e2e.spec.ts#mistakes only the database catches,
        through the API › DEF-MBR-0084: a structure delete a program’s reference blocks › refuses deleting a
        unit type a program lists 409 unit_type_in_use, and keeps it
      - >-
        services-membership:tests/acceptance/structure/MBR-ACC-0037.acceptance.ts#MBR-ACC-0037 what other
        parts of Membership name in the structure
    provenance: test
    source: >-
      services-membership:tests/e2e/structure-api.e2e.spec.ts#the structure API, end to end in process ›
      refuses to delete a unit type in use, 409 unit_type_in_use
evidence:
  - 'services-membership:tests/acceptance/structure/MBR-ACC-0001.acceptance.ts'
  - 'services-membership:tests/acceptance/structure/MBR-ACC-0003.acceptance.ts'
  - 'services-membership:tests/acceptance/structure/MBR-ACC-0004.acceptance.ts'
  - 'services-membership:tests/acceptance/structure/MBR-ACC-0037.acceptance.ts'
  - 'services-membership:tests/e2e/database-refusals.e2e.spec.ts'
  - 'services-membership:tests/e2e/structure-api.e2e.spec.ts'
---

# Define unit kinds and their permitted places: Acceptance Test Set

## Coverage

| Rule | Proof Scenario or Open Finding |
|---|---|
| `BR-CAP-MBR-STR-001-01` | `ATS-MBR-STR-001-01` |
| `BR-CAP-MBR-STR-001-02` | `ATS-MBR-STR-001-02` |
| `BR-CAP-MBR-STR-001-03` | `ATS-MBR-STR-001-03` |
| `BR-CAP-MBR-STR-001-04` | `ATS-MBR-STR-001-04` |
| `BR-CAP-MBR-STR-001-05` | `ATS-MBR-STR-001-05` |
| `BR-CAP-MBR-STR-001-06` | `ATS-MBR-STR-001-06` |
| `BR-CAP-MBR-STR-001-07` | `ATS-MBR-STR-001-07` |
| `BR-CAP-MBR-STR-001-08` | `ATS-MBR-STR-001-08` |
| `BR-CAP-MBR-STR-001-09` | no scenario: `FND-MBR-STR-036` |
| `BR-CAP-MBR-STR-001-10` | no scenario: `FND-MBR-STR-036` |
