The interaction cases test how a shared holding, period, chapter connection or recorded change affects related work. Each case names its related capabilities and workflows in frontmatter. A composite case remains proposed until executable assertions establish every part of its expected outcome.
Coverage
Rulegap: FND-MBR-MEM-085
Transitiongap: FND-MBR-MEM-085
Validationcovered
Permissioncovered
Edgegap: FND-MBR-MEM-085
Failuregap: FND-MBR-MEM-085
Boundarycovered
Concurrencycovered
Invariantgap: FND-MBR-MEM-085
Interactioncovered
Test Scenarios
14 scenarios proving CAP-MBR-MEM-003; 7 bound to an existing test.
01Reject stale changes and closure of a cancelled termconcurrencyapinegativeproposed
A term has been read by two staff callers, and another term has already been cancelled.
Steps
[
{
"do": "Correct using the first caller, retry a correction at the older version, and attempt to terminate the cancelled term.",
"expect": "The stale write identifies the current version; the cancelled term cannot be terminated.",
"provenance": "proposed",
"source": "services-membership:modules/memberships/services/operations/staff-operations.ts:lockTerm, correctTerm, terminateTerm"
}
]
Expected
The stale write identifies the current version; the cancelled term cannot be terminated.
Data
Principal term records, applicable status reasons and the dependent records required by this scenario.
A dated term has a recorded history and an identifiable moment before its amendment.
Steps
[
{
"do": "Amend the start with a reason, inspect versions, and read using knowledge before and after the write.",
"expect": "History retains the original start and actor; the earlier-known and later-known reads return their respective starts.",
"provenance": "test",
"source": [
"services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#keeps the old truth of a correction in the versions, recorded with the actor",
"services-membership:modules/memberships/tests/integration/db/membership-functions.integration.spec.ts#answers the corrected start with a known_at after the correction",
"services-membership:modules/memberships/tests/integration/db/membership-functions.integration.spec.ts#keeps answering what was known before the correction with a known_at before it"
]
}
]
Expected
History retains the original start and actor; the earlier-known and later-known reads return their respective starts.
Data
Principal term records, applicable status reasons and the dependent records required by this scenario.
A term holds chapter affiliations and an alternative package permits fewer chapters.
Steps
[
{
"do": "Move the term’s start later, then attempt to select the more restrictive package.",
"expect": "Affiliations starting before the amended start move forward; the excessive chapter count prevents the package change.",
"provenance": "test",
"source": [
"services-membership:modules/memberships/tests/integration/services/affiliations.integration.spec.ts#moves a term’s affiliations with a corrected start",
"services-membership:tests/acceptance/memberships/MBR-ACC-0198.acceptance.ts#MBR-ACC-0198: A member's chapters stay inside her term when it is shortened or ended, a package that allows fewer chapters cannot replace hers, and her chapter's officer sees her only while her chain reaches the chapter"
]
}
]
Expected
Affiliations starting before the amended start move forward; the excessive chapter count prevents the package change.
Data
Principal term records, applicable status reasons and the dependent records required by this scenario.
One term is effective and another has already expired.
Steps
[
{
"do": "Terminate the effective term from a chosen date and record the expired member’s drop later.",
"expect": "The effective period contracts to the preceding day; the expired period retains its end and records the later drop date.",
"provenance": "test",
"source": [
"services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#terminates a term from the effective date, with the reason, and the status follows",
"services-membership:tests/e2e/s04-lapse-and-rejoin.e2e.spec.ts#drops the expired term with its reason and leaves its dates as they were"
]
}
]
Expected
The effective period contracts to the preceding day; the expired period retains its end and records the later drop date.
Data
Principal term records, applicable status reasons and the dependent records required by this scenario.
[
{
"do": "Close it before its start, inspect standing, and add replacement coverage for the same dates.",
"expect": "The original period is cancelled; standing falls back and replacement coverage is accepted.",
"provenance": "test",
"source": [
"services-membership:modules/events/tests/integration/business-events.integration.spec.ts#states membership.term.cancelled, not terminated, for a term that had not started",
"services-membership:tests/acceptance/memberships/MBR-ACC-0164.acceptance.ts#MBR-ACC-0164: A prepaid future term is cancelled before it starts, the membership falls back to none, the dates become free again, and a cancelled term cannot be closed twice"
]
}
]
Expected
The original period is cancelled; standing falls back and replacement coverage is accepted.
Data
Principal term records, applicable status reasons and the dependent records required by this scenario.
[
{
"do": "Terminate the term and inspect both its last day and the chapter row.",
"expect": "The term has the shortened end; the affiliation end is either empty or equal to that end, with coverage limited by the term.",
"provenance": "test",
"source": [
"services-membership:tests/acceptance/memberships/MBR-ACC-0198.acceptance.ts#MBR-ACC-0198: A member's chapters stay inside her term when it is shortened or ended, a package that allows fewer chapters cannot replace hers, and her chapter's officer sees her only while her chain reaches the chapter"
]
}
]
Expected
The term has the shortened end; the affiliation end is either empty or equal to that end, with coverage limited by the term.
Data
Principal term records, applicable status reasons and the dependent records required by this scenario.
[
{
"do": "Shorten, extend, terminate and cancel source periods, inspecting the corresponding granted periods.",
"expect": "A mirror shortens, remains at its shortened end after extension, or closes with the source as appropriate.",
"provenance": "test",
"source": [
"services-membership:tests/acceptance/memberships/MBR-ACC-0182.acceptance.ts#MBR-ACC-0182: Granted terms follow their source down but never up: shortened with a correction, terminated or cancelled with it, while the granted membership is not suspended with the primary"
]
}
]
Expected
A mirror shortens, remains at its shortened end after extension, or closes with the source as appropriate.
Data
Principal term records, applicable status reasons and the dependent records required by this scenario.
An organizational holding and a granting holding have dependent periods.
Steps
[
{
"do": "Shorten each source period, then read its linked periods.",
"expect": "Dependent periods retain their source links and reflect the permitted contracted coverage.",
"provenance": "proposed",
"source": [
"services-membership:tests/acceptance/memberships/MBR-ACC-0182.acceptance.ts#MBR-ACC-0182: Granted terms follow their source down but never up: shortened with a correction, terminated or cancelled with it, while the granted membership is not suspended with the primary",
"services-membership:modules/memberships/tests/integration/services/organization-children.integration.spec.ts#re-mirrors the children when the parent’s end is corrected: a child never outlasts the parent"
]
}
]
Expected
Dependent periods retain their source links and reflect the permitted contracted coverage.
Data
An isolated workspace with the specified membership, package, chapter and partner-port fixtures.
Source
services-membership:tests/acceptance/memberships/MBR-ACC-0182.acceptance.ts#MBR-ACC-0182: Granted terms follow their source down but never up: shortened with a correction, terminated or cancelled with it, while the granted membership is not suspended with the primary,services-membership:modules/memberships/tests/integration/services/organization-children.integration.spec.ts#re-mirrors the children when the parent’s end is corrected: a child never outlasts the parent
09Keep chapters valid after a period correctioninteractionapiproposed
[
{
"do": "Move the first day later, then attempt a package change that permits only one chapter.",
"expect": "The saved connections start inside the amended period; the invalid package change leaves the saved correction intact.",
"provenance": "proposed",
"source": [
"services-membership:modules/memberships/tests/integration/services/affiliations.integration.spec.ts#moves a term’s affiliations with a corrected start",
"services-membership:modules/memberships/tests/unit/unit-rules.spec.ts#refuses fewer affiliations of a type than its minimum from the day the operation takes effect"
]
}
]
Expected
The saved connections start inside the amended period; the invalid package change leaves the saved correction intact.
Data
An isolated workspace with the specified membership, package, chapter and partner-port fixtures.
[
{
"do": "Correct the term, then execute the planned action.",
"expect": "The action is stale and creates no renewal order for the corrected version.",
"provenance": "proposed",
"source": [
"services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#terminates a term from the effective date, with the reason, and the status follows",
"services-membership:modules/billing/tests/integration/billing-runs.integration.spec.ts#refuses as stale an action whose term changed after planning"
]
}
]
Expected
The action is stale and creates no renewal order for the corrected version.
Data
An isolated workspace with the specified membership, package, chapter and partner-port fixtures.
Publication is enabled and a started period has an expiry item.
Steps
[
{
"do": "Terminate the period and inspect its last day and attention outcome after commit.",
"expect": "The period is closed and its existing item is resolved as terminated.",
"provenance": "proposed",
"source": [
"services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#terminates a term from the effective date, with the reason, and the status follows",
"services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves the item renewed in the staff renewal’s transaction"
]
}
]
Expected
The period is closed and its existing item is resolved as terminated.
Data
An isolated workspace with the specified membership, package, chapter and partner-port fixtures.
[
{
"do": "Correct its start, then read the same date with recording instants before and after the correction.",
"expect": "The earlier-known answer retains the first start; the later-known answer reflects the correction.",
"provenance": "proposed",
"source": [
"services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#keeps the old truth of a correction in the versions, recorded with the actor",
"services-membership:modules/history/tests/integration/membership-as-of.integration.spec.ts#answers the term as it was known before the correction, with a known_at before it"
]
}
]
Expected
The earlier-known answer retains the first start; the later-known answer reflects the correction.
Data
An isolated workspace with the specified membership, package, chapter and partner-port fixtures.
[
{
"do": "Terminate it from a selected day and inspect the committed termination event; repeat the operation in a transaction that rolls back.",
"expect": "The committed event identifies the shortened last day; the rolled-back attempt publishes no event.",
"provenance": "proposed",
"source": [
"services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#terminates a term from the effective date, with the reason, and the status follows",
"services-membership:modules/events/tests/integration/business-events.integration.spec.ts#states one membership.term.terminated for a staff termination, with the person’s contact_id and the last day of rights"
]
}
]
Expected
The committed event identifies the shortened last day; the rolled-back attempt publishes no event.
Data
An isolated workspace with the specified membership, package, chapter and partner-port fixtures.
A current term and a future term have known versions; staff and a read-only colleague share their identifiers.
Steps
[
{
"do": "Correct the current term as staff and the colleague; attempt future-term closure as the colleague before closing it as staff.",
"expect": "The colleague’s requests are refused; the saved correction retains its version and dates, and only staff closes the future term.",
"provenance": "test",
"source": "services-membership:tests/acceptance/memberships/MBR-ACC-0172.acceptance.ts"
}
]
Expected
The colleague’s requests are refused; the saved correction retains its version and dates, and only staff closes the future term.
Data
Suite-owned workspaces, annual membership fixtures, signed staff and restricted contexts.