---
id: ATS-MBR-MEM-004
scope: CAP-MBR-MEM-004
product_area: membership
module: memberships
revision: 2
status: proposed
approved_by: null
approved_at: null
source_sha:
  services-membership: 5994c270e8a37a30f848e99ba5b5ee6b87c08893
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
scenarios:
  - id: ATS-MBR-MEM-004-01
    title: Reject invalid or repeated suspension transitions
    level: api
    proves:
      - BR-CAP-MBR-MEM-004-01
    preconditions: >-
      A principal membership has a current version, and the workspace contains
      both suspension and termination reasons.
    steps:
      - do: >-
          Submit a wrong-kind reason and a stale version; repeat a valid
          suspension, then attempt restoration after it has already been
          restored.
        expect: 'Invalid reasons, stale versions and repeated transitions are refused.'
        provenance: test
        source:
          - >-
            services-membership:tests/acceptance/memberships/MBR-ACC-0174.acceptance.ts#MBR-ACC-0174:
            A membership is suspended over its terms and restored to whatever
            the terms give, once each way, with no detections while suspended
            and the history showing the suspension
    expected: 'Invalid reasons, stale versions and repeated transitions are refused.'
    negative: true
    data_needs: >-
      Principal memberships, both kinds of reason and callers with suspension
      authority.
    bound_to:
      - TST-MBR-MEM-193
    provenance: test
    source: >-
      services-membership:tests/acceptance/memberships/MBR-ACC-0174.acceptance.ts#MBR-ACC-0174:
      A membership is suspended over its terms and restored to whatever the
      terms give, once each way, with no detections while suspended and the
      history showing the suspension
    category: validation
    binding_evidence:
      - suite: TST-MBR-MEM-193
        source: >-
          services-membership:tests/acceptance/memberships/MBR-ACC-0174.acceptance.ts#MBR-ACC-0174:
          A membership is suspended over its terms and restored to whatever the
          terms give, once each way, with no detections while suspended and the
          history showing the suspension
  - id: ATS-MBR-MEM-004-02
    title: Override dated standing while suspension remains set
    level: api
    proves:
      - BR-CAP-MBR-MEM-004-02
      - BR-CAP-MBR-MEM-004-03
      - INV-DOM-MBR-MEM-001-09
    preconditions: A membership spans multiple periods and another has expired into grace.
    steps:
      - do: >-
          Suspend, inspect dated standing, run a sweep while suspended, and
          restore using a reason.
        expect: >-
          Suspension overrides dated reads and suppresses detections;
          restoration returns the term-derived standing.
        provenance: test
        source:
          - >-
            services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#suspends
            over every term and restores to the status the terms give
          - >-
            services-membership:tests/acceptance/memberships/MBR-ACC-0174.acceptance.ts#MBR-ACC-0174:
            A membership is suspended over its terms and restored to whatever
            the terms give, once each way, with no detections while suspended
            and the history showing the suspension
    expected: >-
      Suspension overrides dated reads and suppresses detections; restoration
      returns the term-derived standing.
    negative: false
    data_needs: >-
      Dated principal memberships and a sweep fixture spanning the expiry
      boundary.
    bound_to:
      - TST-MBR-MEM-028
      - TST-MBR-MEM-193
    provenance: test
    source: >-
      services-membership:tests/acceptance/memberships/MBR-ACC-0174.acceptance.ts#MBR-ACC-0174:
      A membership is suspended over its terms and restored to whatever the
      terms give, once each way, with no detections while suspended and the
      history showing the suspension
    category: rule
    binding_evidence:
      - suite: TST-MBR-MEM-028
        source: >-
          services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#suspends
          over every term and restores to the status the terms give
      - suite: TST-MBR-MEM-193
        source: >-
          services-membership:tests/acceptance/memberships/MBR-ACC-0174.acceptance.ts#MBR-ACC-0174:
          A membership is suspended over its terms and restored to whatever the
          terms give, once each way, with no detections while suspended and the
          history showing the suspension
  - id: ATS-MBR-MEM-004-03
    title: Carry suspension and restoration to dependent memberships
    level: api
    proves:
      - BR-CAP-MBR-MEM-004-04
    preconditions: An organization’s membership has linked flow-down children.
    steps:
      - do: >-
          Suspend the corporate parent, restore it, and inspect every linked
          child and lifecycle log.
        expect: >-
          Each child follows both changes and has its own corresponding
          lifecycle events.
        provenance: proposed
        source: >-
          services-membership:modules/memberships/services/operations/staff-operations.ts:suspendChildren
    expected: >-
      Each child follows both changes and has its own corresponding lifecycle
      events.
    negative: false
    data_needs: An organizational principal membership with linked children.
    bound_to: []
    provenance: proposed
    source: >-
      services-membership:modules/memberships/services/operations/staff-operations.ts:suspendChildren
    category: interaction
  - id: ATS-MBR-MEM-004-04
    title: Refuse direct intervention on a dependent membership
    level: api
    proves:
      - BR-CAP-MBR-MEM-004-05
    preconditions: A flow-down membership belongs to a principal parent.
    steps:
      - do: Attempt to suspend the dependent membership directly.
        expect: The request is rejected and identifies its source parent.
        provenance: proposed
        source: >-
          services-membership:modules/memberships/services/operations/staff-operations.ts:refuseChild
    expected: The request is rejected and identifies its source parent.
    negative: true
    data_needs: A parent and a linked child membership.
    bound_to: []
    provenance: proposed
    source: >-
      services-membership:modules/memberships/services/operations/staff-operations.ts:refuseChild
    category: permission
  - id: ATS-MBR-MEM-004-05
    title: Propagate suspension to organizational children
    category: interaction
    level: api
    proves:
      - BR-CAP-MBR-MEM-004-04
      - BR-CAP-MBR-MEM-006-04
    interacts_with:
      - CAP-MBR-MEM-006
    workflows: []
    relies_on:
      - ATS-MBR-MEM-004-03
      - ATS-MBR-MEM-006-04
    preconditions: An organization has qualifying people with derived holdings.
    steps:
      - do: >-
          Suspend the organization, inspect each child, then restore and inspect
          again.
        expect: >-
          Each linked child follows the parent suspension and restoration while
          retaining its term dates.
        provenance: proposed
        source: &ref_0
          - >-
            services-membership:modules/memberships/services/operations/staff-operations.ts:suspendChildren
          - >-
            services-membership:modules/memberships/tests/integration/services/organization-children.integration.spec.ts#flows
            down to the contacts holding a flow-down role, mirroring the
            parent’s dates with the flow-down type
    expected: >-
      Each linked child follows the parent suspension and restoration while
      retaining its term dates.
    negative: false
    data_needs: >-
      An isolated workspace with the specified membership, package, chapter and
      partner-port fixtures.
    bound_to: []
    provenance: proposed
    source: *ref_0
  - id: ATS-MBR-MEM-004-06
    title: Keep staff suspension after payment restoration
    category: interaction
    level: api
    proves:
      - BR-CAP-MBR-MEM-004-02
      - BR-CAP-MBR-MEM-004-03
      - BR-CAP-MBR-MEM-010-09
    interacts_with:
      - CAP-MBR-MEM-010
    workflows:
      - WF-MBR-MEM-015
    relies_on:
      - ATS-MBR-MEM-004-02
      - ATS-MBR-MEM-010-08
    preconditions: Staff have suspended a purchased membership with a reason.
    steps:
      - do: >-
          Apply a Commerce suspension enforcement, then restore that
          enforcement.
        expect: >-
          The enforcement is restored while the staff suspension and its reason
          remain.
        provenance: proposed
        source: &ref_1
          - >-
            services-membership:tests/acceptance/memberships/MBR-ACC-0174.acceptance.ts#MBR-ACC-0174:
            A membership is suspended over its terms and restored to whatever
            the terms give, once each way, with no detections while suspended
            and the history showing the suspension
          - >-
            services-membership:modules/commerce-participant/tests/integration/participant.integration.spec.ts#suspends
            on a reversed payment, idempotently, and restores on resolution
    expected: >-
      The enforcement is restored while the staff suspension and its reason
      remain.
    negative: false
    data_needs: >-
      An isolated workspace with the specified membership, package, chapter and
      partner-port fixtures.
    bound_to: []
    provenance: proposed
    source: *ref_1
  - id: ATS-MBR-MEM-004-07
    title: State suspension and restoration alongside their writes
    category: interaction
    level: api
    proves:
      - BR-CAP-MBR-MEM-004-02
      - BR-CAP-MBR-MEM-004-03
      - BR-CAP-MBR-MEM-020-01
    interacts_with:
      - CAP-MBR-MEM-020
    workflows:
      - WF-MBR-MEM-005
    relies_on:
      - ATS-MBR-MEM-004-02
      - ATS-MBR-MEM-020-01
    preconditions: A principal holding is unsuspended.
    steps:
      - do: >-
          Suspend and restore it and inspect committed events; separately roll
          back a suspension.
        expect: >-
          The committed changes have their corresponding events; the rolled-back
          suspension has none.
        provenance: proposed
        source: &ref_2
          - >-
            services-membership:tests/acceptance/memberships/MBR-ACC-0174.acceptance.ts#MBR-ACC-0174:
            A membership is suspended over its terms and restored to whatever
            the terms give, once each way, with no detections while suspended
            and the history showing the suspension
          - >-
            services-membership:modules/events/tests/integration/business-events.integration.spec.ts#states
            membership.term.committed and the term’s affiliation for a staff
            creation, naming the person, the program and the term
    expected: >-
      The committed changes have their corresponding events; the rolled-back
      suspension has none.
    negative: false
    data_needs: >-
      An isolated workspace with the specified membership, package, chapter and
      partner-port fixtures.
    bound_to: []
    provenance: proposed
    source: *ref_2
  - id: ATS-MBR-MEM-004-08
    title: Require suspension authority for both directions
    category: permission
    level: api
    proves:
      - BR-CAP-MBR-MEM-004-01
    permissions:
      - membership.memberships.suspend
    preconditions: A principal holding derives grace from its recorded period.
    steps:
      - do: >-
          Try suspension and restoration as the read-only colleague and as staff
          with current versions.
        expect: >-
          The colleague is refused both operations; staff suspension returns
          suspended and staff restoration returns grace.
        provenance: test
        source: >-
          services-membership:tests/acceptance/memberships/MBR-ACC-0172.acceptance.ts
    expected: >-
      The colleague is refused both operations; staff suspension returns
      suspended and staff restoration returns grace.
    negative: true
    data_needs: >-
      Suite-owned workspaces, annual membership fixtures, signed staff and
      restricted contexts.
    bound_to:
      - TST-MBR-MEM-191
    binding_evidence:
      - suite: TST-MBR-MEM-191
        source: >-
          services-membership:tests/acceptance/memberships/MBR-ACC-0172.acceptance.ts
    provenance: test
    source: >-
      services-membership:tests/acceptance/memberships/MBR-ACC-0172.acceptance.ts
evidence:
  - >-
    services-membership at 5994c270e8a37a30f848e99ba5b5ee6b87c08893: reviewed
    suspension and restoration operations, child traversal, the suspension
    acceptance suite, organization-child integration assertions and
    published-event assertions.
  - >-
    rhythm-v2-docs:specs/membership/memberships/design/: domain objects, state
    models and workflows reviewed for coverage.
coverage:
  rule: covered
  transition: 'gap: FND-MBR-MEM-086'
  validation: covered
  permission: covered
  edge: 'gap: FND-MBR-MEM-086'
  failure: 'gap: FND-MBR-MEM-086'
  boundary: 'gap: FND-MBR-MEM-086'
  concurrency: 'gap: FND-MBR-MEM-086'
  invariant: 'gap: FND-MBR-MEM-086'
  interaction: covered
coverage_notes:
  transition: >-
    The scenarios do not enumerate every applicable object transition; the
    finding preserves the remaining transition matrix.
  permission: >-
    The signed API acceptance case asserts allowed staff work and
    missing-permission refusals for every named key.
  invariant: >-
    Existing invariant examples do not cover every applicable domain-object
    constraint.
  interaction: >-
    Every related capability and each cross-capability workflow has an explicit
    composite scenario. Unbound composites remain proposed.
---

# Withhold membership through suspension and restore its standing: Capability Test Specification

## Coverage

| Rule | Scenario or Finding |
|---|---|
| `BR-CAP-MBR-MEM-004-01` | `ATS-MBR-MEM-004-01`, `ATS-MBR-MEM-004-08` |
| `BR-CAP-MBR-MEM-004-02` | `ATS-MBR-MEM-004-02`, `ATS-MBR-MEM-004-06`, `ATS-MBR-MEM-004-07` |
| `BR-CAP-MBR-MEM-004-03` | `ATS-MBR-MEM-004-02`, `ATS-MBR-MEM-004-06`, `ATS-MBR-MEM-004-07` |
| `BR-CAP-MBR-MEM-004-04` | `ATS-MBR-MEM-004-03`, `ATS-MBR-MEM-004-05` |
| `BR-CAP-MBR-MEM-004-05` | `ATS-MBR-MEM-004-04` |

## Interactions With Related Capabilities

The interaction cases test how a shared holding, period, chapter connection or recorded change affects related work. Each case names its related capabilities and workflows in frontmatter. A composite case remains proposed until executable assertions establish every part of its expected outcome.
