---
id: ATS-MBR-MEM-014
scope: CAP-MBR-MEM-014
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-014-01
    title: Only unrenewed principal terms ending inside the horizon are expiring
    level: api
    proves:
      - BR-CAP-MBR-MEM-014-01
    preconditions: >-
      The well-known FAA workspace fixtures, or a workspace the test builds from
      them.
    steps:
      - do: >-
          Sweep with terms ending inside and outside the horizon, a renewed one,
          and with a wider workspace horizon.
        expect: >-
          Items open only for unrenewed terms inside the horizon; the wider
          horizon reaches further.
        provenance: test
        source:
          - >-
            services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#publishes
            an open item for a membership whose term ends inside the horizon
          - >-
            services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#publishes
            nothing for a term that ends outside the horizon
          - >-
            services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#publishes
            nothing for a term that already has a successor
          - >-
            services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#publishes
            a term the tenant’s wider horizon reaches
    expected: >-
      Items open only for unrenewed terms inside the horizon; the wider horizon
      reaches further.
    negative: false
    data_needs: 'FAA programs, packages, units and members from the integration seed.'
    bound_to:
      - TST-MBR-MEM-025
    provenance: test
    source: >-
      services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#publishes
      an open item for a membership whose term ends inside the horizon
    category: rule
    binding_evidence:
      - suite: TST-MBR-MEM-025
        source: >-
          services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#publishes
          an open item for a membership whose term ends inside the horizon
      - suite: TST-MBR-MEM-025
        source: >-
          services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#publishes
          nothing for a term that ends outside the horizon
      - suite: TST-MBR-MEM-025
        source: >-
          services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#publishes
          nothing for a term that already has a successor
      - suite: TST-MBR-MEM-025
        source: >-
          services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#publishes
          a term the tenant’s wider horizon reaches
  - id: ATS-MBR-MEM-014-02
    title: The horizon is the workspace's own business dates
    level: unit
    proves:
      - BR-CAP-MBR-MEM-014-02
    preconditions: >-
      The well-known FAA workspace fixtures, or a workspace the test builds from
      them.
    steps:
      - do: >-
          Compute the window across a year end and either side of the
          workspace's midnight.
        expect: 'Both ends included, on the workspace''s dates, moving at its midnight.'
        provenance: test
        source:
          - >-
            services-membership:modules/memberships/tests/unit/expiring-memberships.spec.ts#is
            the business date through the date plus the horizon, both inclusive
          - >-
            services-membership:modules/memberships/tests/unit/expiring-memberships.spec.ts#crosses
            a year end
          - >-
            services-membership:modules/memberships/tests/unit/expiring-memberships.spec.ts#starts
            on the tenant’s business date, not the UTC date
          - >-
            services-membership:modules/memberships/tests/unit/expiring-memberships.spec.ts#moves
            to the next day once the tenant’s midnight passes
    expected: 'Both ends included, on the workspace''s dates, moving at its midnight.'
    negative: false
    data_needs: 'FAA programs, packages, units and members from the integration seed.'
    bound_to:
      - TST-MBR-MEM-033
    provenance: test
    source: >-
      services-membership:modules/memberships/tests/unit/expiring-memberships.spec.ts#is
      the business date through the date plus the horizon, both inclusive
    category: boundary
    binding_evidence:
      - suite: TST-MBR-MEM-033
        source: >-
          services-membership:modules/memberships/tests/unit/expiring-memberships.spec.ts#is
          the business date through the date plus the horizon, both inclusive
      - suite: TST-MBR-MEM-033
        source: >-
          services-membership:modules/memberships/tests/unit/expiring-memberships.spec.ts#crosses
          a year end
      - suite: TST-MBR-MEM-033
        source: >-
          services-membership:modules/memberships/tests/unit/expiring-memberships.spec.ts#starts
          on the tenant’s business date, not the UTC date
      - suite: TST-MBR-MEM-033
        source: >-
          services-membership:modules/memberships/tests/unit/expiring-memberships.spec.ts#moves
          to the next day once the tenant’s midnight passes
  - id: ATS-MBR-MEM-014-03
    title: >-
      Each alert is labelled, carries its facts and goes to the renewals
      responsibility
    level: unit
    proves:
      - BR-CAP-MBR-MEM-014-03
    preconditions: >-
      The well-known FAA workspace fixtures, or a workspace the test builds from
      them.
    steps:
      - do: Build the item for a named member and for one CRM names no one for.
        expect: >-
          Keyed by the membership, labelled by name or number, with the declared
          facts, addressed to the default responsibility.
        provenance: test
        source:
          - >-
            services-membership:modules/memberships/tests/unit/expiring-memberships.spec.ts#is
            keyed by the membership and about it, labelled with the member’s
            name
          - >-
            services-membership:modules/memberships/tests/unit/expiring-memberships.spec.ts#carries
            the declared facts
          - >-
            services-membership:modules/memberships/tests/unit/expiring-memberships.spec.ts#is
            labelled by the membership number when CRM names no one
          - >-
            services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#addresses
            the item to membership.renewals, the definition’s default
    expected: >-
      Keyed by the membership, labelled by name or number, with the declared
      facts, addressed to the default responsibility.
    negative: false
    data_needs: 'FAA programs, packages, units and members from the integration seed.'
    bound_to:
      - TST-MBR-MEM-033
      - TST-MBR-MEM-025
    provenance: test
    source: >-
      services-membership:modules/memberships/tests/unit/expiring-memberships.spec.ts#is
      keyed by the membership and about it, labelled with the member’s name
    category: rule
    binding_evidence:
      - suite: TST-MBR-MEM-033
        source: >-
          services-membership:modules/memberships/tests/unit/expiring-memberships.spec.ts#is
          keyed by the membership and about it, labelled with the member’s name
      - suite: TST-MBR-MEM-033
        source: >-
          services-membership:modules/memberships/tests/unit/expiring-memberships.spec.ts#carries
          the declared facts
      - suite: TST-MBR-MEM-033
        source: >-
          services-membership:modules/memberships/tests/unit/expiring-memberships.spec.ts#is
          labelled by the membership number when CRM names no one
      - suite: TST-MBR-MEM-025
        source: >-
          services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#addresses
          the item to membership.renewals, the definition’s default
  - id: ATS-MBR-MEM-014-04
    title: 'Alerts are scoped by the member''s units, then the workspace'
    level: api
    proves:
      - BR-CAP-MBR-MEM-014-04
    preconditions: >-
      The well-known FAA workspace fixtures, or a workspace the test builds from
      them.
    steps:
      - do: Publish items for a chapter member and a member of no unit.
        expect: >-
          The chapter member's item is scoped chapter, zone, region, then
          workspace; the other by the workspace alone.
        provenance: test
        source:
          - >-
            services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#scopes
            the item by the membership’s chapter and its ancestors, most
            specific first, then the tenant
          - >-
            services-membership:modules/memberships/tests/unit/expiring-memberships.spec.ts#is
            scoped by the tenant alone when the membership has no unit
    expected: >-
      The chapter member's item is scoped chapter, zone, region, then workspace;
      the other by the workspace alone.
    negative: false
    data_needs: 'FAA programs, packages, units and members from the integration seed.'
    bound_to:
      - TST-MBR-MEM-025
      - TST-MBR-MEM-033
    provenance: test
    source: >-
      services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#scopes
      the item by the membership’s chapter and its ancestors, most specific
      first, then the tenant
    category: rule
    binding_evidence:
      - suite: TST-MBR-MEM-025
        source: >-
          services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#scopes
          the item by the membership’s chapter and its ancestors, most specific
          first, then the tenant
      - suite: TST-MBR-MEM-033
        source: >-
          services-membership:modules/memberships/tests/unit/expiring-memberships.spec.ts#is
          scoped by the tenant alone when the membership has no unit
  - id: ATS-MBR-MEM-014-05
    title: An alert is due on the last day and expires thirty days later
    level: api
    proves:
      - BR-CAP-MBR-MEM-014-05
    preconditions: >-
      The well-known FAA workspace fixtures, or a workspace the test builds from
      them.
    steps:
      - do: Publish an item and read its instants.
        expect: >-
          Due at the start of the term's last day in the workspace's zone;
          expiring thirty days later.
        provenance: test
        source:
          - >-
            services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#is
            due at the start of the term’s last day and expires thirty days
            after it
    expected: >-
      Due at the start of the term's last day in the workspace's zone; expiring
      thirty days later.
    negative: false
    data_needs: 'FAA programs, packages, units and members from the integration seed.'
    bound_to:
      - TST-MBR-MEM-025
    provenance: test
    source: >-
      services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#is
      due at the start of the term’s last day and expires thirty days after it
    category: boundary
    binding_evidence:
      - suite: TST-MBR-MEM-025
        source: >-
          services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#is
          due at the start of the term’s last day and expires thirty days after
          it
  - id: ATS-MBR-MEM-014-06
    title: The daily sweep refreshes and clears its alerts
    level: api
    proves:
      - BR-CAP-MBR-MEM-014-06
    preconditions: >-
      The well-known FAA workspace fixtures, or a workspace the test builds from
      them.
    steps:
      - do: 'Run two passes, the second after the term leaves the horizon.'
        expect: >-
          The second pass refreshes the same item, then clears it; each pass is
          stamped.
        provenance: test
        source:
          - >-
            services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#refreshes
            the same item’s facts on the next pass rather than opening another
          - >-
            services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves
            the item cleared on the next pass once its term leaves the horizon
          - >-
            services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#stamps
            the pass with what it published
    expected: >-
      The second pass refreshes the same item, then clears it; each pass is
      stamped.
    negative: false
    data_needs: 'FAA programs, packages, units and members from the integration seed.'
    bound_to:
      - TST-MBR-MEM-025
    provenance: test
    source: >-
      services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#refreshes
      the same item’s facts on the next pass rather than opening another
    category: transition
    binding_evidence:
      - suite: TST-MBR-MEM-025
        source: >-
          services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#refreshes
          the same item’s facts on the next pass rather than opening another
      - suite: TST-MBR-MEM-025
        source: >-
          services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves
          the item cleared on the next pass once its term leaves the horizon
      - suite: TST-MBR-MEM-025
        source: >-
          services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#stamps
          the pass with what it published
  - id: ATS-MBR-MEM-014-07
    title: Renewal and termination resolve the alert in their own transactions
    level: api
    proves:
      - BR-CAP-MBR-MEM-014-07
    preconditions: >-
      The well-known FAA workspace fixtures, or a workspace the test builds from
      them.
    steps:
      - do: Renew one expiring member and terminate another.
        expect: >-
          The first item is resolved renewed and the second terminated, in the
          writes' transactions.
        provenance: test
        source:
          - >-
            services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves
            the item renewed in the staff renewal’s transaction
          - >-
            services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves
            the item terminated in the termination’s transaction
    expected: >-
      The first item is resolved renewed and the second terminated, in the
      writes' transactions.
    negative: false
    data_needs: 'FAA programs, packages, units and members from the integration seed.'
    bound_to:
      - TST-MBR-MEM-025
    provenance: test
    source: >-
      services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves
      the item renewed in the staff renewal’s transaction
    category: interaction
    binding_evidence:
      - suite: TST-MBR-MEM-025
        source: >-
          services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves
          the item renewed in the staff renewal’s transaction
      - suite: TST-MBR-MEM-025
        source: >-
          services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves
          the item terminated in the termination’s transaction
  - id: ATS-MBR-MEM-014-08
    title: >-
      A refused alert fails its business write, and nothing is published while
      switched off
    level: api
    proves:
      - BR-CAP-MBR-MEM-014-09
    preconditions: >-
      The well-known FAA workspace fixtures, or a workspace the test builds from
      them.
    steps:
      - do: >-
          Switch publishing off and renew; switch it on with an unregistered
          definition and renew.
        expect: >-
          Off: the renewal succeeds and nothing is published. On and refused:
          the renewal fails with the refusal.
        provenance: proposed
        source: >-
          services-membership:docs/attention.md#3. When items are published and
          resolved
    expected: >-
      Off: the renewal succeeds and nothing is published. On and refused: the
      renewal fails with the refusal.
    negative: true
    data_needs: 'FAA programs, packages, units and members from the integration seed.'
    bound_to: []
    provenance: proposed
    source: >-
      services-membership:docs/attention.md#3. When items are published and
      resolved
    category: failure
  - id: ATS-MBR-MEM-014-09
    title: Resolve expiry attention through staff renewal
    category: interaction
    level: api
    proves:
      - BR-CAP-MBR-MEM-002-02
      - BR-CAP-MBR-MEM-014-07
    interacts_with:
      - CAP-MBR-MEM-002
    workflows:
      - WF-MBR-MEM-002
    relies_on:
      - ATS-MBR-MEM-002-02
      - ATS-MBR-MEM-014-07
    preconditions: Publication is enabled and an expiring member has an open item.
    steps:
      - do: >-
          Add a staff renewal and inspect the term and the attention item in the
          committed result.
        expect: The new term exists and the original item is resolved as renewed.
        provenance: proposed
        source: &ref_0
          - >-
            services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#adds
            a renewal continuing the latest term when no dates are given
          - >-
            services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves
            the item renewed in the staff renewal’s transaction
    expected: The new term exists and the original item is resolved as renewed.
    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-014-10
    title: Resolve expiry attention through staff closure
    category: interaction
    level: api
    proves:
      - BR-CAP-MBR-MEM-003-06
      - BR-CAP-MBR-MEM-014-07
    interacts_with:
      - CAP-MBR-MEM-003
    workflows:
      - WF-MBR-MEM-004
    relies_on:
      - ATS-MBR-MEM-003-04
      - ATS-MBR-MEM-014-07
    preconditions: Publication is enabled and a started period has an expiry item.
    steps:
      - do: >-
          Terminate the period and inspect its last day and attention outcome
          after commit.
        expect: The period is closed and its existing item is resolved as terminated.
        provenance: proposed
        source: &ref_1
          - >-
            services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#terminates
            a term from the effective date, with the reason, and the status
            follows
          - >-
            services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves
            the item renewed in the staff renewal’s transaction
    expected: The period is closed and its existing item is resolved as terminated.
    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-014-11
    title: Keep fan-out and alert resolution in the source save
    category: interaction
    level: api
    proves:
      - BR-CAP-MBR-MEM-006-07
      - BR-CAP-MBR-MEM-014-07
    interacts_with:
      - CAP-MBR-MEM-006
    workflows:
      - WF-MBR-MEM-002
      - WF-MBR-MEM-004
    relies_on:
      - ATS-MBR-MEM-006-07
      - ATS-MBR-MEM-014-07
    preconditions: >-
      Publication is enabled for an expiring organizational membership with
      children.
    steps:
      - do: >-
          Renew the organization and inspect renewed source coverage, derived
          periods and the original alert.
        expect: >-
          The committed source renewal supplies the linked periods and resolves
          the original alert; a refused save leaves the prior state.
        provenance: proposed
        source: &ref_2
          - >-
            services-membership:modules/memberships/tests/integration/services/organization-children.integration.spec.ts#re-mirrors
            the children when the parent’s end is corrected: a child never
            outlasts the parent
          - >-
            services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves
            the item renewed in the staff renewal’s transaction
    expected: >-
      The committed source renewal supplies the linked periods and resolves the
      original alert; a refused save leaves the prior state.
    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-014-12
    title: Scope expiry attention through current chapters
    category: interaction
    level: api
    proves:
      - BR-CAP-MBR-MEM-007-12
      - BR-CAP-MBR-MEM-014-04
    interacts_with:
      - CAP-MBR-MEM-007
    workflows:
      - WF-MBR-MEM-002
    relies_on:
      - ATS-MBR-MEM-007-12
      - ATS-MBR-MEM-014-04
    preconditions: Publication is enabled for a member with two chapters sharing ancestors.
    steps:
      - do: Sweep for approaching expiry and inspect the published item scope.
        expect: >-
          The item reaches the selected chapters and their ancestors before the
          workspace scope.
        provenance: proposed
        source: &ref_3
          - >-
            services-membership:tests/e2e/s05-multiple-chapters.e2e.spec.ts#returns
            Jo in the Atlanta and in the Savannah roster
          - >-
            services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#scopes
            the item by the membership’s chapter and its ancestors, most
            specific first, then the tenant
    expected: >-
      The item reaches the selected chapters and their ancestors before the
      workspace scope.
    negative: false
    data_needs: >-
      An isolated workspace with the specified membership, package, chapter and
      partner-port fixtures.
    bound_to: []
    provenance: proposed
    source: *ref_3
  - id: ATS-MBR-MEM-014-13
    title: Resolve expiry attention at purchase fulfilment
    category: interaction
    level: api
    proves:
      - BR-CAP-MBR-MEM-009-12
      - BR-CAP-MBR-MEM-014-07
    interacts_with:
      - CAP-MBR-MEM-009
    workflows:
      - WF-MBR-MEM-012
    relies_on:
      - ATS-MBR-MEM-009-12
      - ATS-MBR-MEM-014-07
    preconditions: >-
      Publication is enabled and an expiring member has a placed renewal
      purchase.
    steps:
      - do: >-
          Inspect attention before fulfilment, then fulfil the renewal and
          inspect the committed item.
        expect: >-
          The pending purchase has not committed renewal rights; completed
          renewal resolves the existing item.
        provenance: proposed
        source: &ref_4
          - >-
            services-membership:modules/commerce-participant/tests/integration/participant.integration.spec.ts#fulfils:
            committed with its authorization, numbered, its chapter written with
            the dues product, enrolled
          - >-
            services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves
            the item renewed in the staff renewal’s transaction
    expected: >-
      The pending purchase has not committed renewal rights; completed renewal
      resolves the existing item.
    negative: false
    data_needs: >-
      An isolated workspace with the specified membership, package, chapter and
      partner-port fixtures.
    bound_to: []
    provenance: proposed
    source: *ref_4
  - id: ATS-MBR-MEM-014-14
    title: Resolve attention when a purchased term closes
    category: interaction
    level: api
    proves:
      - BR-CAP-MBR-MEM-010-10
      - BR-CAP-MBR-MEM-014-07
    interacts_with:
      - CAP-MBR-MEM-010
    workflows:
      - WF-MBR-MEM-014
    relies_on:
      - ATS-MBR-MEM-010-09
      - ATS-MBR-MEM-014-07
    preconditions: Publication is enabled for an expiring purchased term.
    steps:
      - do: >-
          Cancel the started purchase and inspect the closure and the original
          expiry item.
        expect: >-
          The term and chapter coverage close and the enabled item resolves in
          the closing write.
        provenance: proposed
        source: &ref_5
          - >-
            services-membership:tests/e2e/commerce-cancellation.e2e.spec.ts#terminates
            the term the day before the effective date, ends its chapter, clears
            the fence
          - >-
            services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves
            the item renewed in the staff renewal’s transaction
    expected: >-
      The term and chapter coverage close and the enabled item resolves in the
      closing write.
    negative: false
    data_needs: >-
      An isolated workspace with the specified membership, package, chapter and
      partner-port fixtures.
    bound_to: []
    provenance: proposed
    source: *ref_5
  - id: ATS-MBR-MEM-014-15
    title: Resolve an expiry item through a billing drop
    category: interaction
    level: api
    proves:
      - BR-CAP-MBR-MEM-013-08
      - BR-CAP-MBR-MEM-013-09
      - BR-CAP-MBR-MEM-014-07
    interacts_with:
      - CAP-MBR-MEM-013
    workflows:
      - WF-MBR-MEM-004
    relies_on:
      - ATS-MBR-MEM-013-08
      - ATS-MBR-MEM-014-07
    preconditions: >-
      Publication is enabled for a membership whose planned billing action is a
      drop.
    steps:
      - do: >-
          Execute the drop and read the closed period and the original attention
          item.
        expect: >-
          The period records the billing reason and its item resolves as
          terminated.
        provenance: proposed
        source: &ref_6
          - >-
            services-membership:modules/billing/tests/integration/billing-runs.integration.spec.ts#executes
            on the jobs engine: one order per renewing candidate (Jo’s with both
            dues chapters), a notice and reminder each, one drop per lapsed term
          - >-
            services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves
            the item renewed in the staff renewal’s transaction
    expected: The period records the billing reason and its item resolves as terminated.
    negative: false
    data_needs: >-
      An isolated workspace with the specified membership, package, chapter and
      partner-port fixtures.
    bound_to: []
    provenance: proposed
    source: *ref_6
  - id: ATS-MBR-MEM-014-16
    title: Abort both event and renewal when enabled resolution fails
    category: interaction
    level: api
    proves:
      - BR-CAP-MBR-MEM-014-07
      - BR-CAP-MBR-MEM-020-01
    interacts_with:
      - CAP-MBR-MEM-020
    workflows:
      - WF-MBR-MEM-004
      - WF-MBR-MEM-012
      - WF-MBR-MEM-014
    relies_on:
      - ATS-MBR-MEM-014-07
      - ATS-MBR-MEM-020-01
    preconditions: >-
      An expiring member has an item, and enabled attention resolution rejects
      the renewal.
    steps:
      - do: >-
          Attempt renewal, then inspect saved periods, lifecycle and published
          business events.
        expect: >-
          The refused transaction leaves no renewal period, renewal lifecycle
          entry or commitment event.
        provenance: proposed
        source: &ref_7
          - >-
            services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves
            the item renewed in the staff renewal’s transaction
          - >-
            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 refused transaction leaves no renewal period, renewal lifecycle entry
      or commitment event.
    negative: true
    data_needs: >-
      An isolated workspace with the specified membership, package, chapter and
      partner-port fixtures.
    bound_to: []
    provenance: proposed
    source: *ref_7
evidence:
  - >-
    services-membership at 5994c270e8a37a30f848e99ba5b5ee6b87c08893: the
    capability sources and the bound test files.
  - >-
    rhythm-v2-docs:specs/membership/memberships/design/: domain objects, state
    models and workflows reviewed for coverage.
coverage:
  rule: covered
  transition: 'gap: FND-MBR-MEM-096'
  validation: 'gap: FND-MBR-MEM-096'
  permission: 'gap: FND-MBR-MEM-096'
  edge: 'gap: FND-MBR-MEM-096'
  failure: covered
  boundary: covered
  concurrency: 'gap: FND-MBR-MEM-096'
  invariant: 'gap: FND-MBR-MEM-096'
  interaction: covered
coverage_notes:
  transition: >-
    The scenarios do not enumerate every applicable object transition; the
    finding preserves the remaining transition matrix.
  permission: >-
    The finding records named permissions without a complete positive and
    negative proof.
  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.
---

# Alert staff to memberships about to expire: Capability Test Specification

## Coverage

| Rule | Scenario or Finding |
|---|---|
| `BR-CAP-MBR-MEM-014-01` | `ATS-MBR-MEM-014-01` |
| `BR-CAP-MBR-MEM-014-02` | `ATS-MBR-MEM-014-02` |
| `BR-CAP-MBR-MEM-014-03` | `ATS-MBR-MEM-014-03` |
| `BR-CAP-MBR-MEM-014-04` | `ATS-MBR-MEM-014-04`, `ATS-MBR-MEM-014-12` |
| `BR-CAP-MBR-MEM-014-05` | `ATS-MBR-MEM-014-05` |
| `BR-CAP-MBR-MEM-014-06` | `ATS-MBR-MEM-014-06` |
| `BR-CAP-MBR-MEM-014-07` | `ATS-MBR-MEM-014-07`, `ATS-MBR-MEM-014-09`, `ATS-MBR-MEM-014-10`, `ATS-MBR-MEM-014-11`, `ATS-MBR-MEM-014-13`, `ATS-MBR-MEM-014-14`, `ATS-MBR-MEM-014-15`, `ATS-MBR-MEM-014-16` |
| `BR-CAP-MBR-MEM-014-09` | `ATS-MBR-MEM-014-08` |

## 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.
