---
id: ATS-MBR-STR-017
scope: CAP-MBR-STR-017
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-017-01
    title: Reasons reject an unsupported action category
    level: api
    proves:
      - BR-CAP-MBR-STR-017-01
    preconditions: >-
      An isolated Membership-licensed workspace contains the relevant records, with caller permissions
      selected for the case.
    steps: Attempt to create a reason categorized as expiry.
    expected: Validation reports the unsupported use and saves no reason.
    negative: true
    data_needs: The FAA example records or equivalent records prepared within the isolated workspace.
    bound_to: []
    provenance: proposed
    source: >-
      services-membership:modules/configuration/services/configuration/configuration-records.ts:statusReasonContent
    category: validation
  - id: ATS-MBR-STR-017-02
    title: Actions reject inactive or mismatched reasons
    level: api
    proves:
      - BR-CAP-MBR-STR-017-02
    preconditions: >-
      An isolated Membership-licensed workspace contains the relevant records, with caller permissions
      selected for the case.
    steps: Attempt termination using a suspension-only reason and an inactive reason.
    expected: Both requests identify why the selected reason is unsuitable.
    negative: true
    data_needs: The FAA example records or equivalent records prepared within the isolated workspace.
    bound_to: []
    provenance: proposed
    source: >-
      services-membership:modules/configuration/services/persistence/membership-status-reasons.ts:requireStatusReason
    category: validation
  - id: ATS-MBR-STR-017-03
    title: Reason browsing ignores priority and allows duplicate names
    category: rule
    level: api
    proves:
      - BR-CAP-MBR-STR-017-04
    preconditions: An isolated workspace contains the records and current versions needed for the case.
    steps: >-
      Create two differently identified reasons sharing a name and with opposing priority values, then
      list them.
    expected: Both reasons remain present and reference ordering decides their position.
    negative: false
    data_needs: Separate fixture records for the accepted and refused operations.
    bound_to: []
    provenance: proposed
    source:
      - >-
        services-membership:modules/configuration/services/persistence/configuration-store.ts:configurationStore
  - id: ATS-MBR-STR-017-04
    title: Reason browsing selects the requested action use
    category: rule
    level: api
    proves:
      - BR-CAP-MBR-STR-017-06
    preconditions: An isolated workspace contains the records and current versions needed for the case.
    steps: 'Create a termination reason and a suspension reason, then request each use separately.'
    expected: Each answer contains only the reason of the selected use.
    negative: false
    data_needs: Separate fixture records for the accepted and refused operations.
    bound_to: []
    provenance: proposed
    source:
      - >-
        services-membership:modules/configuration/aws/api/configuration.routes.ts:configurationModuleRoutes
  - id: ATS-MBR-STR-017-05
    title: Rejected action reasons preserve standing inputs
    category: interaction
    level: api
    proves:
      - BR-CAP-MBR-STR-016-02
      - BR-CAP-MBR-STR-017-02
    preconditions: An isolated workspace contains the records and current versions needed for the case.
    steps: >-
      Attempt termination with a suspension-only reason and with an inactive termination reason, then
      evaluate the original period.
    expected: Both actions fail and the unchanged effective term continues to produce its original standing.
    negative: false
    data_needs: Separate fixture records for the accepted and refused operations.
    bound_to: []
    provenance: proposed
    source:
      - >-
        services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the effective states
        of §1 › never lets a pending term cover a date
      - >-
        services-membership:modules/configuration/services/persistence/membership-status-reasons.ts:requireStatusReason
    exercises:
      - CAP-MBR-STR-017
      - CAP-MBR-STR-016
  - id: ATS-MBR-STR-017-06
    title: Workspace authority gates this capability
    category: permission
    level: api
    proves:
      - BR-CAP-MBR-STR-019-02
    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-017
      - CAP-MBR-STR-019
evidence:
  - >-
    services-membership: Examined test evidence includes the sources the rules cite; no existing test
    binds a scenario.
  - >-
    services-membership:modules/configuration/services/configuration/configuration-records.ts:statusReasonContent
  - >-
    services-membership:modules/configuration/services/persistence/membership-status-reasons.ts:requireStatusReason
  - 'react-console:acceptance/membership/inventory/business-rules.json#RUL-MBR-CFG-022'
  - >-
    services-membership:modules/configuration/services/persistence/configuration-store.ts:configurationStore
  - >-
    services-membership:modules/configuration/services/configuration/configuration-records.ts:statusReasonResource
  - 'services-membership:modules/configuration/aws/api/configuration.routes.ts:configurationModuleRoutes'
  - >-
    services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the effective states of
    §1 › never lets a pending term cover a date
  - membership.configuration.read
  - membership.configuration.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: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: 'gap: FND-MBR-STR-070'
  validation: covered
  permission: covered
  edge: 'gap: FND-MBR-STR-070'
  failure: 'gap: FND-MBR-STR-070'
  boundary: 'gap: FND-MBR-STR-070'
  concurrency: 'gap: FND-MBR-STR-070'
  invariant: 'gap: FND-MBR-STR-070'
  interaction: covered
coverage_notes:
  transition: >-
    No dedicated scenario establishes this category across the capability’s declared operations and
    design obligations.
  edge: >-
    No dedicated scenario establishes this category across the capability’s declared operations and
    design obligations.
  failure: >-
    No dedicated scenario establishes this category across the capability’s declared operations and
    design obligations.
  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.configuration.read
      scenario_ids:
        - ATS-MBR-STR-019-02
      local_scenario_ids:
        - ATS-MBR-STR-017-06
      coverage: partial
      gap: FND-MBR-STR-070
      provenance: unknown
      source: FND-MBR-STR-070
      note: >-
        These cases establish declared authority or representative admission; exhaustive operation and
        caller combinations remain open.
    - key: membership.configuration.manage
      scenario_ids:
        - ATS-MBR-STR-019-02
      local_scenario_ids:
        - ATS-MBR-STR-017-06
      coverage: partial
      gap: FND-MBR-STR-070
      provenance: unknown
      source: FND-MBR-STR-070
      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-017-06
      coverage: partial
      gap: FND-MBR-STR-070
      provenance: unknown
      source: FND-MBR-STR-070
      note: >-
        These cases establish declared authority or representative admission; exhaustive operation and
        caller combinations remain open.
  state_models:
    - id: STATE-MBR-STR-006
      transitions:
        - from: active
          to: inactive
          trigger: Staff save activity false.
          provenance: unknown
          source: FND-MBR-STR-070
          scenario_ids: []
          coverage: gap
          gap: FND-MBR-STR-070
        - from: inactive
          to: active
          trigger: Staff save activity true.
          provenance: unknown
          source: FND-MBR-STR-070
          scenario_ids: []
          coverage: gap
          gap: FND-MBR-STR-070
        - from: active
          to: deleted
          trigger: Staff delete an active record.
          provenance: unknown
          source: FND-MBR-STR-070
          scenario_ids: []
          coverage: gap
          gap: FND-MBR-STR-070
        - from: inactive
          to: deleted
          trigger: Staff delete an inactive record.
          provenance: unknown
          source: FND-MBR-STR-070
          scenario_ids: []
          coverage: gap
          gap: FND-MBR-STR-070
      gap: FND-MBR-STR-070
  related:
    - capability: CAP-MBR-STR-016
      scenario: ATS-MBR-STR-017-05
      provenance: proposed
  invariants:
    - id: INV-DOM-MBR-STR-005-01
      scenario_ids: []
      coverage: gap
      gap: FND-MBR-STR-070
      provenance: unknown
      source: FND-MBR-STR-070
    - id: INV-DOM-MBR-STR-005-02
      scenario_ids: []
      coverage: gap
      gap: FND-MBR-STR-070
      provenance: unknown
      source: FND-MBR-STR-070
    - id: INV-DOM-MBR-STR-005-03
      scenario_ids: []
      coverage: gap
      gap: FND-MBR-STR-070
      provenance: unknown
      source: FND-MBR-STR-070
    - id: INV-DOM-MBR-STR-005-04
      scenario_ids: []
      coverage: gap
      gap: FND-MBR-STR-070
      provenance: unknown
      source: FND-MBR-STR-070
    - id: INV-DOM-MBR-STR-005-05
      scenario_ids: []
      coverage: gap
      gap: FND-MBR-STR-070
      provenance: unknown
      source: FND-MBR-STR-070
    - id: INV-DOM-MBR-STR-005-06
      scenario_ids: []
      coverage: gap
      gap: FND-MBR-STR-070
      provenance: unknown
      source: FND-MBR-STR-070
    - id: INV-DOM-MBR-STR-005-07
      scenario_ids: []
      coverage: gap
      gap: FND-MBR-STR-070
      provenance: unknown
      source: FND-MBR-STR-070
    - id: INV-DOM-MBR-STR-005-08
      scenario_ids: []
      coverage: gap
      gap: FND-MBR-STR-070
      provenance: unknown
      source: FND-MBR-STR-070
    - id: INV-DOM-MBR-STR-005-09
      scenario_ids: []
      coverage: gap
      gap: FND-MBR-STR-070
      provenance: unknown
      source: FND-MBR-STR-070
  workflows:
    - id: WF-MBR-STR-005
      scenarios:
        - ATS-MBR-STR-017-05
      unproved_failure_and_concurrency: FND-MBR-STR-070
      provenance: unknown
      source: FND-MBR-STR-070
  workflow_interactions:
    - workflow: WF-MBR-STR-005
      capability: CAP-MBR-STR-018
      scenario_ids:
        - ATS-MBR-STR-018-14
      coverage: specified
      gap: null
      provenance: documented
      source:
        - ATS-MBR-STR-018-14
      note: Cross-capability examples are cited from their owning specifications.
    - workflow: WF-MBR-STR-005
      capability: CAP-MBR-STR-009
      scenario_ids: []
      coverage: gap
      gap: FND-MBR-STR-070
      provenance: unknown
      source: FND-MBR-STR-070
      note: >-
        The shared workflow names both capabilities, but a concrete interaction oracle is not established
        for this pairing.
    - workflow: WF-MBR-STR-005
      capability: CAP-MBR-STR-010
      scenario_ids: []
      coverage: gap
      gap: FND-MBR-STR-070
      provenance: unknown
      source: FND-MBR-STR-070
      note: >-
        The shared workflow names both capabilities, but a concrete interaction oracle is not established
        for this pairing.
    - workflow: WF-MBR-STR-005
      capability: CAP-MBR-STR-011
      scenario_ids: []
      coverage: gap
      gap: FND-MBR-STR-070
      provenance: unknown
      source: FND-MBR-STR-070
      note: >-
        The shared workflow names both capabilities, but a concrete interaction oracle is not established
        for this pairing.
    - workflow: WF-MBR-STR-005
      capability: CAP-MBR-STR-014
      scenario_ids: []
      coverage: gap
      gap: FND-MBR-STR-070
      provenance: unknown
      source: FND-MBR-STR-070
      note: >-
        The shared workflow names both capabilities, but a concrete interaction oracle is not established
        for this pairing.
rule_coverage:
  - rule: BR-CAP-MBR-STR-017-01
    scenarios:
      - ATS-MBR-STR-017-01
    gap: null
    provenance: documented
    source:
      - >-
        services-membership:modules/configuration/services/configuration/configuration-records.ts:statusReasonContent
  - rule: BR-CAP-MBR-STR-017-02
    scenarios:
      - ATS-MBR-STR-017-02
      - ATS-MBR-STR-017-05
    gap: null
    provenance: documented
    source:
      - >-
        services-membership:modules/configuration/services/persistence/membership-status-reasons.ts:requireStatusReason
      - >-
        services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the effective states
        of §1 › never lets a pending term cover a date
      - >-
        services-membership:modules/configuration/services/persistence/membership-status-reasons.ts:requireStatusReason
  - rule: BR-CAP-MBR-STR-017-04
    scenarios:
      - ATS-MBR-STR-017-03
    gap: null
    provenance: documented
    source:
      - >-
        services-membership:modules/configuration/services/persistence/configuration-store.ts:configurationStore
  - rule: BR-CAP-MBR-STR-017-06
    scenarios:
      - ATS-MBR-STR-017-04
    gap: null
    provenance: documented
    source:
      - >-
        services-membership:modules/configuration/aws/api/configuration.routes.ts:configurationModuleRoutes
narrative_sources:
  - section: Coverage
    provenance: documented
    source:
      - CAP-MBR-STR-017
      - FND-MBR-STR-070
  - section: Interactions With Related Capabilities
    provenance: proposed
    source:
      - ATS-MBR-STR-017-05
---

# Maintain reasons for membership status actions: 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-017-01` | `ATS-MBR-STR-017-01` |
| `BR-CAP-MBR-STR-017-02` | `ATS-MBR-STR-017-02`, `ATS-MBR-STR-017-05` |
| `BR-CAP-MBR-STR-017-04` | `ATS-MBR-STR-017-03` |
| `BR-CAP-MBR-STR-017-06` | `ATS-MBR-STR-017-04` |

## Interactions With Related Capabilities

Rejected action reasons preserve standing inputs. Attempt termination with a suspension-only reason and with an inactive termination reason, then evaluate the original period.
