Skip to content

CAP-MBR-STR-016Interpret membership status and continuity by date

Markdown

CAP-MBR-STR-016

Interpret membership status and continuity by date

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

KindCapabilityProduct areaMembershipModuleOrganizational Structure, Membership Configuration and TermsRevision1

Read atservices-membership 5994c270react-console baf6dae3

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Outcomes
Status can be interpreted consistently on a requested date.Cache and sweep decisions identify changes without owning membership persistence.
Surfaces
jobapi
Intent sources
services-membership:README.md#The term engine (D-45, decided 2026-10-17: the engine imports nothing of Membership and is extracted later)

Controls

27 controls apply, from the corpus control catalogue.

TC-AVL-004 TC-AZ-001 TC-AZ-002 TC-AZ-003 TC-AZ-004 TC-AZ-006 TC-CHG-001 TC-CHG-002 TC-CHG-003 TC-CHG-004 TC-IAM-001 TC-IAM-002 TC-IAM-004 TC-IAM-005 TC-IAM-006 TC-LOG-004 TC-MON-001 TC-MON-002 TC-MON-004 TC-PI-001 TC-PI-002 TC-PI-004 TC-SEC-001 TC-SEC-004 TC-TEN-001 TC-TEN-002 TC-TEN-003

Permissions

KeyChecked atScope
membership.application.accessapitenant

Business Rules

12 rules, 10 to be proved before approval. A rule's product intent is derived from its origin: 0 confirmed by a product decision, the rest inheriting this capability's proposed.

IdRuleKindEnforced atProvenance
01must prove
Proposed
Status precedence is suspension, covering active status with or without benefits, grace, lapse, future, pending and no status.
no proof recorded yet
calculationservicetest
services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the precedence of §2 › puts suspended over grace
02must prove
Proposed
Committed, superseded and terminated terms count for their effective dates; pending and cancelled terms do not, and cancelled terms do not start grace.
no proof recorded yet
calculationservicetest
services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the effective states of §1 › never lets a pending term cover a date
03must prove
Proposed
Grace follows the latest ended effective term, uses its type override or program allowance and includes its final day before lapse.
no proof recorded yet
calculationservicetest
services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the rows of §2 › is in grace on the last day of grace (D = E + grace_days)
04must prove
Proposed
A covering term without classification benefits produces active status without benefits.
no proof recorded yet
calculationservicetest
services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the rows of §2 › is active without benefits when the covering term’s classification confers none
05must prove
Proposed
Effective periods within the continuity allowance form episodes, and continuous membership refers to the latest episode begun by the requested date even after it ends.
no proof recorded yet
calculationserviceobserved
06must prove
Proposed
An absent original join date takes the earliest effective start, while a join date already supplied is retained.
no proof recorded yet
calculationservicedocumented
07must prove
Proposed
Normal sweeps select starting, expiry and grace-ending boundaries, while a missed or absent prior sweep calls for full recomputation.
no proof recorded yet
calculationservicetest
services-membership:modules/terms/tests/unit/sweep.spec.ts#the sweep’s catch-up rule › catches up after a missed night
08must prove
Proposed
Sweep detections identify expiry after a term ends and lapse after grace ends, with no detections during suspension or a covering effective term.
no proof recorded yet
calculationservicetest
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
09
Proposed
The cache decision returns only differences in computed cache values and leaves persistence and entitlement enforcement to its caller.
invariantserviceobserved
10
Proposed
Status and continuity inputs reject negative or fractional day allowances.
validationservicetest
services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the effective states of §1 › refuses a negative number of grace days
11must prove
Proposed
Engine column declarations constrain term date order, five term states and eight cached holding statuses.
no proof recorded yet
invariantdatabasetest
services-membership:modules/terms/tests/unit/columns.spec.ts#term columns (§3.2) › order the dates: an end, when there is one, on or after the start
12must prove
Proposed
Unbuilt Commerce-participant and billing-run engine hooks fail with errors naming their intended delivery phase.
no proof recorded yet
policyservicetest
services-membership:modules/terms/tests/unit/define-term-engine.spec.ts#defineTermEngine › refuses the Commerce participant, naming P3

Scenarios

IdGivenWhenThenProvenance
01Sam’s effective term ends in September with sixty grace days.Status is evaluated on the following October day and at the start of December.The earlier date returns grace and the later date returns lapse.test
services-membership:tests/e2e/s04-lapse-and-rejoin.e2e.spec.ts#scenario 4: lapse, drop and rejoin through a staff term › answers grace the day after the term ended and lapsed once the 60 days are over

Edge Cases

IdGivenWhenThenProvenance
02The holding is in grace and its purchased renewal is still pending.The holding’s status is evaluated.The pending period does not displace grace with active status.test
services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the precedence of §2 › keeps a member in grace who has bought a pending renewal

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.