Skip to content

ATS-PFM-ELG-009Retain the eligibility decisions that matter: Capability Test Specification

Markdown

ATS-PFM-ELG-009

Retain the eligibility decisions that matter: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaPlatformModuleEligibility, Responsibilities and AttentionRevision3

Read atservices-platform ad3f6a65react-console baf6dae3

Coverage

  • Rule covered
  • Transition covered
  • Validation covered
  • Permission gap: FND-PFM-ELG-061
  • Edge gap: FND-PFM-ELG-061
  • Failure gap: FND-PFM-ELG-061
  • Boundary covered
  • Concurrency gap: FND-PFM-ELG-061
  • Invariant gap: FND-PFM-ELG-061
  • Interaction covered

Test Scenarios

11 scenarios proving CAP-PFM-ELG-009; 7 bound to an existing test.

01 Select consequential historyruleunittest
Proves
BR-CAP-PFM-ELG-009-01
Preconditions
Display and transactional bindings exist in a workspace.
Steps
Evaluate 21 display questions including uncertainty, one transaction and one dry run.
Expected
Transactional and uncertain answers are retained, ordinary displays are sampled and the dry run is omitted.
Data
No fixtures beyond the described setup.
Bound to
services-platform:modules/eligibility/tests/unit/compile-and-evaluate.spec.js#records every transactional and authorization decision
services-platform:modules/eligibility/tests/unit/compile-and-evaluate.spec.js#records the first display decision of a tenant and then one in every rate
Source
services-platform:modules/eligibility/tests/unit/compile-and-evaluate.spec.js#records every transactional and authorization decision
02 Prevent historical mutationinvariantapinegativetest
Proves
BR-CAP-PFM-ELG-009-02 INV-DOM-PFM-ELG-003-01
Preconditions
A decision is retained.
Steps
Attempt application update and deletion.
Expected
Both fail and preserve the record.
Data
No fixtures beyond the described setup.
Bound to
services-platform:modules/eligibility/tests/integration/db/eligibility-decisions.table.integration.spec.js#grants the application role SELECT and INSERT and nothing else, and no other role anything
Source
services-platform:modules/eligibility/tests/integration/db/eligibility-decisions.table.integration.spec.js#grants the application role SELECT and INSERT and nothing else, and no other role anything
03 Maintain the retention windowtransitionapitest
Proves
BR-CAP-PFM-ELG-009-03
Preconditions
Monthly partitions span October of the earlier year through December of the current year.
Steps
Run maintenance early in the current December.
Expected
The older October drops, November remains and two future months are prepared.
Data
No fixtures beyond the described setup.
Bound to
services-platform:modules/eligibility/tests/integration/db/eligibility-decisions.table.integration.spec.js#is in the partition registry by its date column, two months ahead and thirteen retained
Source
services-platform:modules/eligibility/tests/integration/db/eligibility-decisions.table.integration.spec.js#is in the partition registry by its date column, two months ahead and thirteen retained
04 Validate decision-list requestsvalidationapinegativetest
Proves
BR-CAP-PFM-ELG-009-05
Preconditions
A member has many retained decisions.
Steps
Omit subject and rule, request 101 entries, name an absent use and query a rule with no results.
Expected
Invalid filters and size fail, the absent binding returns not found and the empty rule returns an empty page.
Data
No fixtures beyond the described setup.
Bound to
services-platform:modules/eligibility/tests/e2e/eligibility-evaluate.e2e.spec.js#refuses a list that names neither a subject nor a definition, 400
services-platform:modules/eligibility/tests/e2e/eligibility-governance-repairs.e2e.spec.js#answers 404 for an unknown binding with a definition_key, not an empty page
services-platform:modules/eligibility/tests/e2e/eligibility-governance-repairs.e2e.spec.js#still answers an empty page for a definition with no decisions (negative control)
Source
services-platform:modules/eligibility/tests/e2e/eligibility-evaluate.e2e.spec.js#refuses a list that names neither a subject nor a definition, 400
05 Conceal other-workspace historyboundaryapinegativetest
Proves
BR-CAP-PFM-ELG-009-06 INV-DOM-PFM-ELG-003-03
Preconditions
A separate chapter owns a decision.
Steps
Open it from the current workspace.
Expected
The lookup returns not found.
Data
No fixtures beyond the described setup.
Bound to
services-platform:modules/eligibility/tests/integration/db/eligibility-decisions.table.integration.spec.js#answers another tenant’s decision to a statement that names no tenant, which is why every read of the service names one
Source
services-platform:modules/eligibility/tests/e2e/eligibility-evaluate.e2e.spec.js#answers 404 for a decision the tenant does not have
06 Restrict workspace decision purgepermissionapitest
Proves
BR-CAP-PFM-ELG-009-08
Preconditions
One workspace is deleting and another remains live.
Steps
Purge both using the restricted function.
Expected
The deleting workspace loses decisions first, while the live workspace is rejected with its history intact.
Data
No fixtures beyond the described setup.
Bound to
Source
services-platform:modules/eligibility/tests/integration/services/maintenance/tenant-participant.integration.spec.js#removes the decisions first, through the definer function, one batch a call
07 Place decision identities in their evaluation monthinvariantapitest
Proves
BR-CAP-PFM-ELG-009-04 INV-DOM-PFM-ELG-003-02
Preconditions
A decision is evaluated on each side of a calendar-month boundary.
Steps
Create the decision identity and persist both decisions.
Expected
Identities use their evaluation instants and each decision reaches its corresponding month partition.
Data
Existing evidence fixtures provide the described setup.
Bound to
services-platform:modules/eligibility/tests/integration/services/persistence/decisions.integration.spec.js#answers the decision with a UUIDv7 minted at the evaluation’s instant
Source
services-platform:modules/eligibility/tests/integration/services/persistence/decisions.integration.spec.js#answers the decision with a UUIDv7 minted at the evaluation’s instant
08 Find retained history from a ruleinteractionapiproposed
Proves
BR-CAP-PFM-ELG-002-01 BR-CAP-PFM-ELG-009-06
Preconditions
A rule has retained bound decisions and read authority is available.
Steps
Open the rule, request its newest decision page and inspect one decision; repeat in another workspace.
Expected
The rule reader sees the matching decision details locally and receives no history through the other workspace.
Data
Run-owned records and a controlled clock where timing changes the result.
Source
services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#refuses a caller without platform.eligibility.read, 403; services-platform:modules/eligibility/tests/e2e/eligibility-evaluate.e2e.spec.js#answers 404 for a decision the tenant does not have
09 Record a consequential uncertain answerinteractionapiproposed
Proves
BR-CAP-PFM-ELG-008-02 BR-CAP-PFM-ELG-009-07
Preconditions
A bound authorization request has a missing workspace subject.
Steps
Evaluate under closed policy and inspect the returned decision and history before completing the caller operation.
Expected
The returned decision can be read immediately with its uncertain state, denial outcome and subject reason.
Data
Run-owned records and a controlled clock where timing changes the result.
Source
services-platform:modules/eligibility/tests/integration/services/evaluate/hosted-evaluate.integration.spec.js#answers a contact no row of the tenant has indeterminate, subject_not_found, ineligible under the closed policy; services-platform:modules/eligibility/tests/integration/services/evaluate/hosted-evaluate.integration.spec.js#records a display decision after answering it, at a sample rate of one
10 Observe a failed history writeinteractionapinegativeproposed
Proves
BR-CAP-PFM-ELG-009-07 BR-CAP-PFM-ELG-012-05
Preconditions
A bound authorization evaluation can be forced to fail its decision insertion.
Steps
Inject the insertion failure, evaluate and inspect diagnostic output and history.
Expected
The authorization request does not report a successful retained decision; diagnostics omit subject facts.
Data
Run-owned records and a controlled clock where timing changes the result.
Source
services-platform:modules/eligibility/tests/integration/services/evaluate/hosted-evaluate.integration.spec.js#records a display decision after answering it, at a sample rate of one; services-platform:modules/eligibility/tests/integration/services/evaluate/hosted-evaluate.integration.spec.js#logs one eligibility.evaluate event per evaluation with the plan and the state
11 Distinguish consequential and sampled insertion failurefailureapinegativeproposed
Proves
BR-CAP-PFM-ELG-009-07 INV-DOM-PFM-ELG-003-04
Preconditions
An authorization request and a sample-eligible display request share a valid use.
Steps
Fail each history insertion separately, evaluate and inspect the caller response, transaction and diagnostic output.
Expected
Authorization does not complete with a retained decision; display can complete before its failed deferred insertion, whose diagnostic contains no fact payload.
Data
Run-owned fixtures, separate caller contexts and a controlled clock where required.
Source
services-platform:modules/eligibility/services/evaluate/decision-recording.ts:recordDecisions

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.