Skip to content

ATS-MBR-STR-016Interpret membership status and continuity by date: Capability Test Specification

Markdown

ATS-MBR-STR-016

Interpret membership status and continuity by date: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaMembershipModuleOrganizational Structure, Membership Configuration and TermsRevision2

Read atservices-membership 5994c270react-console baf6dae3

Coverage

  • Rule covered
  • Transition covered
  • Validation gap: FND-MBR-STR-069
  • Permission covered
  • Edge gap: FND-MBR-STR-069
  • Failure covered
  • Boundary covered
  • Concurrency gap: FND-MBR-STR-069
  • Invariant covered
  • Interaction covered

Test Scenarios

12 scenarios proving CAP-MBR-STR-016; 10 bound to an existing test.

01 Competing status conditions use precedenceruleunittest
Proves
BR-CAP-MBR-STR-016-01
Preconditions
Explicit inputs or a recording fixture represent the cases exercised below.
Steps
Evaluate suspension during grace, a covering renewal, grace before a future term and future alongside pending.
Expected
Each result selects the applicable higher-priority standing.
Data
Literal term, state or declaration fixtures for the described cases.
Bound to
services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the precedence of §2 › puts suspended over grace
services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the precedence of §2 › puts active over grace: a renewal that started covers the date though the previous term ended
services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the precedence of §2 › puts grace over future: a lapsed term ended recently and the next starts later
services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the precedence of §2 › puts future over pending
services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the precedence of §2 › puts pending over none: a cancelled term and a pending one
services-membership:modules/terms/tests/unit/define-term-engine.spec.ts#defineTermEngine › derives the status with the holding’s grace days from the hook
Source
services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the precedence of §2 › puts suspended over grace
02 Only effective states contribute coverageruleunittest
Proves
BR-CAP-MBR-STR-016-02
Preconditions
Explicit inputs or a recording fixture represent the cases exercised below.
Steps
Evaluate pending, cancelled and terminated periods over their dates.
Expected
Pending and cancelled periods supply no effective coverage; terminated periods retain their covered days.
Data
Literal term, state or declaration fixtures for the described cases.
Bound to
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/terms/tests/unit/status.spec.ts#holding status: the effective states of §1 › never lets a cancelled term cover a date
services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the effective states of §1 › never measures grace from a cancelled term
services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the effective states of §1 › answers a terminated term for the days it covered
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
03 Grace boundaries use the deciding classificationboundaryunittest
Proves
BR-CAP-MBR-STR-016-03 AS-JNY-MBR-STR-005-01
Preconditions
Explicit inputs or a recording fixture represent the cases exercised below.
Steps
Evaluate the last grace day, its successor and a type-specific override.
Expected
The boundary returns grace, its successor returns lapse and the override supplies the allowance.
Data
Literal term, state or declaration fixtures for the described cases.
Bound to
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)
services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the rows of §2 › is lapsed the day after grace ends
services-membership:modules/terms/tests/unit/holding-cache.spec.ts#the holding cache › names no current term in grace, measured with the grace of the term that ended
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
Source
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)
04 Covering periods can omit benefitsruleunittest
Proves
BR-CAP-MBR-STR-016-04
Preconditions
Explicit inputs or a recording fixture represent the cases exercised below.
Steps
Evaluate a holding with an effective no-benefit classification.
Expected
The result is active without benefits.
Data
Literal term, state or declaration fixtures for the described cases.
Bound to
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
services-membership:modules/terms/tests/unit/holding-cache.spec.ts#the holding cache › caches active without benefits for a covering term whose classification confers none
Source
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
05 Continuity breaks beyond the allowed gapboundaryunittest
Proves
BR-CAP-MBR-STR-016-05 AS-JNY-MBR-STR-005-03
Preconditions
Explicit inputs or a recording fixture represent the cases exercised below.
Steps
Compare effective periods separated by the allowance and by one additional day.
Expected
The allowed gap stays within an episode and the larger gap begins a new episode.
Data
Literal term, state or declaration fixtures for the described cases.
Bound to
services-membership:modules/terms/tests/unit/status.spec.ts#continuity episodes: §8 › keeps the run when the gap equals the allowance (starts_on = ends_on + gap + 1)
services-membership:modules/terms/tests/unit/status.spec.ts#continuity episodes: §8 › breaks the run when the gap is one day more than the allowance
services-membership:modules/terms/tests/unit/status.spec.ts#continuity episodes: §8 › gives continuous_since as the start of the run the date falls in
services-membership:tests/e2e/s04-lapse-and-rejoin.e2e.spec.ts#scenario 4: lapse, drop and rejoin through a staff term › answers two continuity episodes
Source
services-membership:modules/terms/tests/unit/status.spec.ts#continuity episodes: §8 › keeps the run when the gap equals the allowance (starts_on = ends_on + gap + 1)
06 Join-date selection ignores ineffective periodsruleunittest
Proves
BR-CAP-MBR-STR-016-06
Preconditions
Explicit inputs or a recording fixture represent the cases exercised below.
Steps
Calculate the first join decision with pending, cancelled and effective terms, then add a later effective term.
Expected
The earliest effective start remains the computed join date.
Data
Literal term, state or declaration fixtures for the described cases.
Bound to
services-membership:modules/terms/tests/unit/holding-cache.spec.ts#the holding cache › takes the join date from the first effective term, a pending or cancelled one never
services-membership:tests/e2e/s04-lapse-and-rejoin.e2e.spec.ts#scenario 4: lapse, drop and rejoin through a staff term › keeps the original join date and restarts continuity at the rejoin (a gap of 437 days is more than 60)
Source
services-membership:modules/terms/tests/unit/holding-cache.spec.ts#the holding cache › takes the join date from the first effective term, a pending or cancelled one never
07 Sweep planning detects missing prior workfailureunittest
Proves
BR-CAP-MBR-STR-016-07
Preconditions
Explicit inputs or a recording fixture represent the cases exercised below.
Steps
Compare a previous-day sweep, a missed night and no previous sweep.
Expected
Normal work selects boundaries and the other cases request full recomputation.
Data
Literal term, state or declaration fixtures for the described cases.
Bound to
services-membership:modules/terms/tests/unit/sweep.spec.ts#the sweep’s boundaries › looks at the terms starting on D
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
services-membership:modules/terms/tests/unit/sweep.spec.ts#the sweep’s catch-up rule › catches up after a missed night
services-membership:modules/terms/tests/unit/sweep.spec.ts#the sweep’s catch-up rule › catches up for a tenant never swept
Source
services-membership:modules/terms/tests/unit/sweep.spec.ts#the sweep’s boundaries › looks at the terms starting on D
08 Sweep detections distinguish boundaries and suppressiontransitionunittest
Proves
BR-CAP-MBR-STR-016-08
Preconditions
Explicit inputs or a recording fixture represent the cases exercised below.
Steps
Evaluate expiry, the last grace day, the first lapsed day and suspension.
Expected
Expiry is detectable after ending, lapse begins after grace, and suspension suppresses detections.
Data
Literal term, state or declaration fixtures for the described cases.
Bound to
services-membership:modules/terms/tests/unit/sweep.spec.ts#the sweep’s detections › detects the expiry the day after the end, effective that day
services-membership:modules/terms/tests/unit/sweep.spec.ts#the sweep’s detections › detects no lapse on the last day of grace
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
services-membership:modules/terms/tests/unit/sweep.spec.ts#the sweep’s detections › detects nothing for a suspended holding
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
09 Column declarations constrain dates and vocabularyinvariantunitnegativetest
Proves
BR-CAP-MBR-STR-016-11
Preconditions
Explicit inputs or a recording fixture represent the cases exercised below.
Steps
Inspect generated term and holding columns and their check expressions.
Expected
The declarations restrict date order, term states and cached status values.
Data
Literal term, state or declaration fixtures for the described cases.
Bound to
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
services-membership:modules/terms/tests/unit/columns.spec.ts#term columns (§3.2) › close the state to the five states of 04-lifecycle §1
services-membership:modules/terms/tests/unit/columns.spec.ts#holding columns (§3.1) › close the status cache to the eight statuses of 04-lifecycle §2
Source
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
10 Undelivered engine hooks fail explicitlyfailureapinegativetest
Proves
BR-CAP-MBR-STR-016-12
Preconditions
An isolated workspace contains the records and current versions needed for the case.
Steps
Call the engine’s purchase-participant and billing entry points with a valid domain definition.
Expected
Both calls fail with the intended delivery phase in the error.
Data
Separate fixture records for the accepted and refused operations.
Bound to
Source
services-membership:modules/terms/tests/unit/define-term-engine.spec.ts#refuses the billing runs, naming P3,services-membership:modules/terms/tests/unit/define-term-engine.spec.ts#refuses the Commerce participant, naming P3,services-membership:modules/terms/tests/unit/define-term-engine.spec.ts#defineTermEngine › refuses the Commerce participant, naming P3
11 Changing benefits changes current interpretationinteractionapiproposed
Proves
BR-CAP-MBR-STR-011-02 BR-CAP-MBR-STR-016-04
Preconditions
An isolated workspace contains the records and current versions needed for the case.
Steps
Evaluate a covering term with benefits, disable benefits on its type and evaluate again from live settings.
Expected
The same period becomes active without benefits without changing its dates.
Data
Separate fixture records for the accepted and refused operations.
Source
services-membership:modules/configuration/db/membership-types.table.ts:membershipTypes,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
12 Workspace authority gates this capabilitypermissionapinegativeproposed
Proves
BR-CAP-MBR-STR-019-04
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.
Data
Separate fixture records for the accepted and refused operations.
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

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.