---
id: TST-MBR-STR-017
title: Sweep selection and expiry detections
kind: unit
product_area: membership
module: structure
revision: 1
status: draft
source_sha:
  services-membership: 5994c270e8a37a30f848e99ba5b5ee6b87c08893
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
repository: services-membership
files:
  - modules/terms/tests/unit/sweep.spec.ts
implements:
  - ATS-MBR-STR-016-07
  - ATS-MBR-STR-016-08
environment: mock
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 1
isolation: Literal inputs and temporary fixtures created by this suite.
evidence:
  - 'services-membership:modules/terms/tests/unit/sweep.spec.ts'
bindings:
  - scenario: ATS-MBR-STR-016-07
    source: >-
      services-membership:modules/terms/tests/unit/sweep.spec.ts#the sweep’s boundaries › looks at the
      terms starting on D
    provenance: test
  - scenario: ATS-MBR-STR-016-07
    source: >-
      services-membership:modules/terms/tests/unit/sweep.spec.ts#the sweep’s boundaries › looks, for each
      grace configured, at the terms whose grace ended on D - 1
    provenance: test
  - scenario: ATS-MBR-STR-016-07
    source: >-
      services-membership:modules/terms/tests/unit/sweep.spec.ts#the sweep’s catch-up rule › catches up
      after a missed night
    provenance: test
  - scenario: ATS-MBR-STR-016-07
    source: >-
      services-membership:modules/terms/tests/unit/sweep.spec.ts#the sweep’s catch-up rule › catches up
      for a tenant never swept
    provenance: test
  - scenario: ATS-MBR-STR-016-08
    source: >-
      services-membership:modules/terms/tests/unit/sweep.spec.ts#the sweep’s detections › detects the
      expiry the day after the end, effective that day
    provenance: test
  - scenario: ATS-MBR-STR-016-08
    source: >-
      services-membership:modules/terms/tests/unit/sweep.spec.ts#the sweep’s detections › detects no
      lapse on the last day of grace
    provenance: test
  - scenario: ATS-MBR-STR-016-08
    source: >-
      services-membership:modules/terms/tests/unit/sweep.spec.ts#the sweep’s detections › detects the
      lapse the day after grace ends, effective that day, with the expiry
    provenance: test
  - scenario: ATS-MBR-STR-016-08
    source: >-
      services-membership:modules/terms/tests/unit/sweep.spec.ts#the sweep’s detections › detects nothing
      for a suspended holding
    provenance: test
invocation: 'npm run test:unit'
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/terms/tests/unit/sweep.spec.ts'
---

# Sweep selection and expiry detections

## Verification Boundary

This suite evaluates local implementation decisions or declarations with controlled inputs. Sweep selection and expiry detections 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

The tested calculation, declaration or source inspection runs locally with explicit fixtures. No deployed service participates.

## Must Not Be Doubled

The calculation, declaration or workflow decision under examination stays real; replacing it would remove the suite’s verification purpose.
