Skip to content

CAP-PFM-ELG-009Retain the eligibility decisions that matter

Markdown

CAP-PFM-ELG-009

Retain the eligibility decisions that matter

Markdown
  • DocumentDraft
  • Product intentConfirmed
  • ImplementationObserved

KindCapabilityProduct areaPlatformModuleEligibility, Responsibilities and AttentionRevision1

Read atservices-platform ad3f6a65react-console baf6dae3

The Formal Contract

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

Outcomes
Transactional, authorization and uncertain answers retain their supporting reasons.Retention removes recorded decisions after thirteen months.
Surfaces
consoleapi
Intent sources
services-platform:docs/proposals/eligibility/17-decision-register.md#D-10services-platform:docs/milestones/plans/PLAT-M11-plan.md#2. Scope

Controls

24 controls apply, from the corpus control catalogue.

TC-AZ-001 TC-AZ-002 TC-AZ-003 TC-AZ-004 TC-CRY-001 TC-CRY-002 TC-CRY-003 TC-CRY-004 TC-DAT-001 TC-DAT-002 TC-DAT-003 TC-DAT-004 TC-LOG-002 TC-LOG-003 TC-LOG-005 TC-PI-001 TC-PI-003 TC-PI-005 TC-TEN-001 TC-TEN-002 TC-TEN-003 TC-VEN-001 TC-VEN-002 TC-VEN-003

Permissions

KeyChecked atScope
platform.eligibility.readapitenant

Business Rules

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

IdRuleKindEnforced atProvenance
01must prove
Confirmed
Transactional, authorization and indeterminate decisions are recorded, display decisions retain the first and then every twentieth by default per workspace, and dry runs, unbound tests and requests without a primary subject are excluded.
policyservicetest
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
02must prove
Confirmed
Decision records permit application insertion and reading but no update or deletion, retaining the binding, expression version, plan, subject, evaluation day, state, outcome, up to 50 reasons and a summary trace.
invariantdatabasetest
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
03must prove
Confirmed
Monthly decision storage retains 13 complete months and drops older months without archival.
lifecycledatabasetest
04must prove
Confirmed
Decision identities are generated at evaluation time, preserving chronological ordering and assigning records to that month.
invariantservice, databasetest
services-platform:modules/eligibility/tests/integration/services/persistence/decisions.integration.spec.js#answers the decision with a UUIDv7 minted at the evaluation’s instant
05must prove
Confirmed
Decision lists require a subject or rule, omit traces, sort newest first and return 50 records by default or at most 100, accepting workspace dates or instants and rejecting unknown bindings.
validationapi, servicetest
services-platform:modules/eligibility/tests/e2e/eligibility-evaluate.e2e.spec.js#refuses a list that names neither a subject nor a definition, 400
06must prove
Confirmed
Decision reads explicitly constrain the workspace because the storage has no row policy, and an outside-workspace decision appears absent.
invariantservicetest
07must prove
Confirmed
Transactional and authorization decisions are persisted before returning, while sampled display writes happen afterward and failures are logged.
policyservicetest
08must prove
Confirmed
Workspace deletion purges decisions through a restricted purger function that accepts only a workspace undergoing deletion.
lifecycledatabasetest

Scenarios

IdGivenWhenThenProvenance
01A person has 101 retained answers.Support traverses history and narrows rule, consumer and local date.Every matching record appears once in reverse time order within the local-day window.test

Edge Cases

IdGivenWhenThenProvenance
02Two answers straddle a month boundary in universal time.A chapter searches by local dates.Storage follows the universal-time month and local-day filters still find the relevant answers.test

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.