---
id: TST-MBR-MEM-029
title: Nightly membership standing refresh
kind: integration
product_area: membership
module: memberships
revision: 1
status: draft
source_sha:
  services-membership: 5994c270e8a37a30f848e99ba5b5ee6b87c08893
repository: services-membership
files:
  - >-
    modules/memberships/tests/integration/services/status-sweep.integration.spec.ts
implements:
  - ATS-MBR-MEM-005-03
  - ATS-MBR-MEM-005-04
  - ATS-MBR-MEM-005-05
  - ATS-MBR-MEM-005-06
  - ATS-MBR-MEM-005-07
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 3
isolation: >-
  A suite-owned workspace and test identifiers; suites that use shared seed data
  require the source’s serial execution and cleanup policy.
verification_notes: >-
  Bindings describe the assertions reviewed at the pinned commit; the suite is
  not executed by this documentation job.
coverage_gap: null
evidence:
  - >-
    services-membership:modules/memberships/tests/integration/services/status-sweep.integration.spec.ts
assertion_anchors:
  - scenario: ATS-MBR-MEM-005-03
    source: >-
      services-membership:modules/memberships/tests/integration/services/status-sweep.integration.spec.ts#answers
      the right status on each side of the expiry before any sweep runs (the
      resolver needs none)
  - scenario: ATS-MBR-MEM-005-04
    source: >-
      services-membership:modules/memberships/tests/integration/services/status-sweep.integration.spec.ts#examines
      only the memberships with a term at a boundary
  - scenario: ATS-MBR-MEM-005-04
    source: >-
      services-membership:modules/memberships/tests/integration/services/status-sweep.integration.spec.ts#moves
      the cache to grace at the expiry boundary and records expired_detected
  - scenario: ATS-MBR-MEM-005-05
    source: >-
      services-membership:modules/memberships/tests/integration/services/status-sweep.integration.spec.ts#records
      lapsed_detected effective the day after grace ended, even when found late
  - scenario: ATS-MBR-MEM-005-05
    source: >-
      services-membership:modules/memberships/tests/integration/services/status-sweep.integration.spec.ts#moves
      the cache to grace at the expiry boundary and records expired_detected
  - scenario: ATS-MBR-MEM-005-05
    source: >-
      services-membership:modules/memberships/tests/integration/services/status-sweep.integration.spec.ts#records
      nothing twice when the same night is swept again
  - scenario: ATS-MBR-MEM-005-06
    source: >-
      services-membership:modules/memberships/tests/integration/services/status-sweep.integration.spec.ts#catches
      up after a missed night, recomputing every membership
  - scenario: ATS-MBR-MEM-005-07
    source: >-
      services-membership:modules/memberships/tests/integration/services/status-sweep.integration.spec.ts#records
      nothing twice when the same night is swept again
---

# Nightly membership standing refresh

## Verification Boundary

Membership writes, dated reads, affiliations, standing and officer scope run against the prepared database.

## What This Suite Proves

The structured bindings identify the capability and feature cases whose reviewed assertions this suite executes. Source anchors preserve the evidence for each binding.

## What It Does Not Prove

A local pass does not qualify deployed scheduling, browser administration or successful production partner calls. Registration records existing code and leaves execution and conformance unverified.

## Real Dependencies and Test Doubles

The database constraints and workspace-scoped persistence exercised by this suite remain real; manual clocks, supplied callers and neighbor fixtures define the local boundary.

## Must Not Be Doubled

Keep the prepared database, workspace boundary, exercised owner constraints and the business operation under test real. A partner double cannot substitute for the Membership write this suite claims to exercise.
