Skip to content

CAP-MBR-MEM-019Report on membership now and month by month

Markdown

CAP-MBR-MEM-019

Report on membership now and month by month

Markdown
  • DocumentDraft
  • Product intentConfirmed
  • ImplementationPartially observed

KindCapabilityProduct areaMembershipModuleMemberships, Applications and Membership BillingRevision1

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
Today's membership can be counted and sliced in the query layer.Each month's membership report is reproducible and auditable.The association chooses which member characteristics each month freezes.
Surfaces
consoleapijob
Constraints
A workspace configures at most 25 snapshot characteristics.One run per month per workspace runs at a time.
Intent sources
services-membership:README.md#2026-10-18 — Final acceptanceservices-membership:docs/migrations/history/README.mdservices-membership:docs/migrations/query-registration/README.md

Controls

44 controls apply, from the corpus control catalogue.

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

Permissions

KeyChecked atScope
membership.memberships.queryservicetenant
membership.membership-terms.queryservicetenant
membership.lifecycle-events.queryservicetenant
membership.term-affiliations.queryservicetenant
membership.membership-snapshot-members.queryservicetenant
membership.membership-snapshot-affiliations.queryservicetenant
membership.membership-snapshot-dimensions.queryservicetenant
membership.membership-snapshot-counts.queryservicetenant
membership.configuration.readapitenant
membership.configuration.manageapitenant

Business Rules

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

IdRuleKindEnforced atProvenance
01must prove
Confirmed
The query layer offers memberships (with today's status, current type, episode count, primary unit of each type and every unit with its ancestors), terms, lifecycle events and term affiliations, each behind its own key.
no proof recorded yet
permissionservice, databasetest
services-membership:modules/memberships/tests/integration/db/membership-functions.integration.spec.ts#answers the query layer’s picks from memberships_for_queries: status today, current type, episode count
02must prove
Confirmed
Each workspace has a monthly snapshot of every membership as of the month's end, as known at the month's end in the workspace's time zone, so nothing recorded later appears in it.
no proof recorded yet
calculationservicetest
services-membership:modules/snapshots/tests/integration/snapshot-pipeline.integration.spec.ts#captures nothing recorded after the month’s end: the membership entered in October is not in September
03must prove
Confirmed
Each member row is described by the term covering the month's end, else the latest before it, else the first after it, and each of its affiliations is filed with its unit and every ancestor the unit had at the month's end, nearest first.
no proof recorded yet
calculationservicetest
services-membership:modules/snapshots/tests/integration/membership-snapshot.integration.spec.ts#describes each member row by its term: the covering one, else the latest before, else the first after
04must prove
Confirmed
Each month's counts group the member rows by type, package, status, grace and origin, with how many joined, renewed, lapsed and were reinstated in the month.
no proof recorded yet
calculationservicetest
services-membership:modules/snapshots/tests/integration/membership-snapshot.integration.spec.ts#counts the member rows by type, package, status, grace and origin
05must prove
Confirmed
A month is published only after its checks pass (the counts equal the grouped rows, every type exists, the rows equal an independent count, every affiliation has its member); a failing run publishes nothing and the current version stays current.
no proof recorded yet
validationservicetest
services-membership:modules/snapshots/tests/integration/membership-snapshot.integration.spec.ts#fails the run on the counts check, publishes nothing, and leaves the current version current
06must prove
Confirmed
Rerunning a month as known at the original instant reproduces its rows exactly; rerunning as known later differs only by the memberships corrected meanwhile; each rerun is published as the next version and earlier versions stay readable.
no proof recorded yet
invariantservicetest
services-membership:modules/snapshots/tests/integration/membership-snapshot.integration.spec.ts#writes identical member, affiliation and count rows with the original known_at
07must prove
Confirmed
The workspace chooses, in order, the characteristics each month freezes beside its members: a contact field or a contact custom field (captured) or a membership custom field (reconstructed); a characteristic left out is deactivated, and a change applies from the next run.
no proof recorded yet
policyapi, servicetest
services-membership:tests/e2e/s10-historical-dimension.e2e.spec.ts#configures rank__c as a captured dimension of the tenant’s snapshots
08must prove
Confirmed
A captured characteristic is read from the live contact for the first capture of the latest completed month, carried forward unchanged on every rerun, and not captured for a back-filled older month that has no version.
no proof recorded yet
policyservicetest
services-membership:modules/snapshots/tests/unit/dimension-plan.spec.ts#captures nothing for an older month with no published version: today’s value is not the period end’s
09must prove
Confirmed
The snapshot datasets read only each month's current published version, each behind its own key, and ask for the month when the query runs.
no proof recorded yet
permissionservice, databasetest
services-membership:modules/snapshots/tests/integration/membership-snapshot.integration.spec.ts#reads the current published version alone through the published view, in the tenant
10must prove
Confirmed
A month restated after a restructuring still files units under the tree as it was at the month's end.
no proof recorded yet
calculationservicetest
services-membership:tests/e2e/s09-restructuring.e2e.spec.ts#still files Atlanta under the Eastern Region in a September restated after the move: the period end’s tree
11must prove
Confirmed
An empty or blank value in a captured contact field does not stop the month from publishing.
no proof recorded yet
validationserviceunknown
12must prove
Confirmed
The first months after a migration hold the migrated members, and a month's movements reconcile its opening and closing counts.
no proof recorded yet
calculationserviceunknown
13must prove
Confirmed
A workspace's snapshot rows are removed only while the workspace is being deleted, and in batches.
origin: DEF-MBR-0010 repair (services-membership:docs/migrations/acceptance-repairs/README.md)
no proof recorded yet
invariantservicetest
services-membership:modules/snapshots/tests/integration/membership-snapshot.integration.spec.ts#refuses to purge the tenant while Platform holds it active, before any row is removed (DEF-MBR-0010)

Scenarios

IdGivenWhenThenProvenance
01September is published; Lee's October start is later corrected to 1 September and Jo's rank changes in CRM.September is rerun as known originally, and as known now.The first rerun is identical; the second differs by Lee alone; both keep Jo's rank as captured.test
services-membership:modules/snapshots/tests/integration/membership-snapshot.integration.spec.ts#keeps the captured contact dimension of the version it supersedes, though the contact changed since
02Atlanta was under the Eastern Region at the end of September and moved to the Pacific Zone in October.September is read or restated.Atlanta's members are counted under the Eastern Region for September.test
services-membership:tests/e2e/s09-restructuring.e2e.spec.ts#files Atlanta under the Eastern Region in September’s snapshot, taken before the move

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.