---
id: ATS-PFM-ELG-010
scope: CAP-PFM-ELG-010
product_area: platform
module: eligibility
revision: 3
status: proposed
approved_by: null
approved_at: null
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
scenarios:
  - id: ATS-PFM-ELG-010-01
    title: Use display-only answer caching
    level: api
    proves:
      - BR-CAP-PFM-ELG-010-01
      - INV-DOM-PFM-ELG-003-06
    preconditions: One expression has display and authorization uses.
    steps: Repeat both evaluations around a source-record change.
    expected: Display can repeat the prior answer and authorization reads freshly.
    negative: false
    data_needs: No fixtures beyond the described setup.
    bound_to:
      - >-
        services-platform:modules/eligibility/tests/e2e/eligibility-evaluate.e2e.spec.js#answers the
        second display evaluation from the cache, without the change
      - TST-PFM-ELG-412
      - >-
        services-platform:modules/eligibility/tests/e2e/eligibility-evaluate.e2e.spec.js#never
        answers an authorization evaluation from the cache
      - >-
        services-platform:modules/eligibility/tests/unit/evaluate-for-caller.spec.js#never holds a
        dry run
      - TST-PFM-ELG-477
      - >-
        react-console:acceptance/eligibility/playwright/journeys/evaluation/ELIG-ACC-0291.spec.ts#ELIG-ACC-0291
      - TST-PFM-ELG-147
    provenance: test
    source: >-
      services-platform:modules/eligibility/tests/e2e/eligibility-evaluate.e2e.spec.js#answers the
      second display evaluation from the cache, without the change
    category: boundary
    action_evidence:
      provenance: test
      source: >-
        services-platform:modules/eligibility/tests/e2e/eligibility-evaluate.e2e.spec.js#answers the
        second display evaluation from the cache, without the change
    assertion_evidence:
      provenance: test
      source: >-
        services-platform:modules/eligibility/tests/e2e/eligibility-evaluate.e2e.spec.js#answers the
        second display evaluation from the cache, without the change
    binding_scope: >-
      The cited tests contribute their reachable assertions; the binding does not establish
      execution or every step of this scenario.
    binding_limitations:
      - FND-PFM-ELG-074
  - id: ATS-PFM-ELG-010-02
    title: Invalidate answers on release
    level: api
    proves:
      - BR-CAP-PFM-ELG-010-02
    preconditions: A display answer is already cached.
    steps: Republish and evaluate again.
    expected: The next result obtains current data.
    negative: false
    data_needs: No fixtures beyond the described setup.
    bound_to:
      - >-
        services-platform:modules/eligibility/tests/e2e/eligibility-evaluate.e2e.spec.js#publishes
        the definition again
      - TST-PFM-ELG-412
      - >-
        services-platform:modules/eligibility/tests/e2e/eligibility-evaluate.e2e.spec.js#answers
        from the data again once the publish has flushed the definition’s decisions
      - >-
        react-console:acceptance/eligibility/playwright/journeys/invalidation/ELIG-ACC-0480.spec.ts#ELIG-ACC-0480
      - TST-PFM-ELG-193
    provenance: test
    source: >-
      services-platform:modules/eligibility/tests/e2e/eligibility-evaluate.e2e.spec.js#publishes the
      definition again
    category: invariant
    action_evidence:
      provenance: test
      source: >-
        services-platform:modules/eligibility/tests/e2e/eligibility-evaluate.e2e.spec.js#publishes
        the definition again
    assertion_evidence:
      provenance: test
      source: >-
        services-platform:modules/eligibility/tests/e2e/eligibility-evaluate.e2e.spec.js#publishes
        the definition again
    binding_scope: >-
      The cited tests contribute their reachable assertions; the binding does not establish
      execution or every step of this scenario.
    binding_limitations:
      - FND-PFM-ELG-074
  - id: ATS-PFM-ELG-010-03
    title: Queue affected role subjects
    level: api
    proves:
      - BR-CAP-PFM-ELG-010-03
    preconditions: A bound role has holders and a simulation identifies gains.
    steps: Publish with the completed simulation.
    expected: Holder and gain rechecks are queued and counted in the response.
    negative: false
    data_needs: No fixtures beyond the described setup.
    bound_to:
      - >-
        services-platform:modules/eligibility/tests/integration/services/population/population-run.integration.spec.js#queues
        a reconcile for every subject the simulation found newly eligible when the version is
        published
      - TST-PFM-ELG-464
      - >-
        react-console:acceptance/eligibility/playwright/journeys/invalidation/ELIG-ACC-0485.spec.ts#ELIG-ACC-0485
      - TST-PFM-ELG-198
      - >-
        react-console:acceptance/eligibility/playwright/journeys/governance/ELIG-ACC-0147.spec.ts#ELIG-ACC-0147
      - TST-PFM-ELG-179
    provenance: test
    source: >-
      services-platform:modules/eligibility/tests/integration/services/population/population-run.integration.spec.js#queues
      a reconcile for every subject the simulation found newly eligible when the version is
      published
    category: interaction
    action_evidence:
      provenance: test
      source: >-
        services-platform:modules/eligibility/tests/integration/services/population/population-run.integration.spec.js#queues
        a reconcile for every subject the simulation found newly eligible when the version is
        published
    assertion_evidence:
      provenance: test
      source: >-
        services-platform:modules/eligibility/tests/integration/services/population/population-run.integration.spec.js#queues
        a reconcile for every subject the simulation found newly eligible when the version is
        published
    binding_scope: >-
      The cited tests contribute their reachable assertions; the binding does not establish
      execution or every step of this scenario.
    binding_limitations:
      - FND-PFM-ELG-074
  - id: ATS-PFM-ELG-010-04
    title: Respect declared change refresh
    level: api
    proves:
      - BR-CAP-PFM-ELG-010-04
    preconditions: Cached subjects use event-enabled and time-only conditions.
    steps: Send contact changes through the receiver for both configurations.
    expected: >-
      Event-enabled work invalidates and queues with an event result; time-only work acknowledges
      without changes.
    negative: false
    data_needs: No fixtures beyond the described setup.
    bound_to:
      - >-
        services-platform:modules/eligibility/tests/integration/services/population/population-run.integration.spec.js#deletes
        the contact’s cached display decision when the change arrives through the deployed entry, as
        CRM sends it
      - TST-PFM-ELG-464
      - >-
        services-platform:modules/eligibility/tests/integration/services/population/population-run.integration.spec.js#queues
        a reconcile of that contact, and answers the remote-handler contract, one result by event_id
      - >-
        services-platform:modules/eligibility/tests/integration/services/population/population-run.integration.spec.js#does
        nothing for a change a ttl-only type reads: nothing dropped, nothing queued
    provenance: test
    source: >-
      services-platform:modules/eligibility/tests/integration/services/population/population-run.integration.spec.js#deletes
      the contact’s cached display decision when the change arrives through the deployed entry, as
      CRM sends it
    category: rule
    action_evidence:
      provenance: test
      source: >-
        services-platform:modules/eligibility/tests/integration/services/population/population-run.integration.spec.js#deletes
        the contact’s cached display decision when the change arrives through the deployed entry, as
        CRM sends it
    assertion_evidence:
      provenance: test
      source: >-
        services-platform:modules/eligibility/tests/integration/services/population/population-run.integration.spec.js#deletes
        the contact’s cached display decision when the change arrives through the deployed entry, as
        CRM sends it
    binding_scope: >-
      The cited tests contribute their reachable assertions; the binding does not establish
      execution or every step of this scenario.
    binding_limitations:
      - FND-PFM-ELG-074
  - id: ATS-PFM-ELG-010-05
    title: Bound system recheck requests
    level: api
    proves:
      - BR-CAP-PFM-ELG-010-05
    preconditions: System staff and console callers are available.
    steps: 'Request 101 subjects, repeated subjects and already-pending subjects, then call from console.'
    expected: >-
      Excess and console requests fail; repeated subjects queue once and pending subjects return
      their waiting request.
    negative: true
    data_needs: No fixtures beyond the described setup.
    bound_to:
      - >-
        services-platform:modules/security/tests/integration/services/dispatch/derived-assignment-reconciles.integration.spec.js#is
        a system route asking for the staff-only platform.eligibility.reconcile
      - TST-PFM-ELG-511
      - >-
        services-platform:modules/security/tests/integration/services/dispatch/derived-assignment-reconciles.integration.spec.js#refuses
        more than 100 subjects
      - >-
        services-platform:modules/security/tests/integration/services/dispatch/derived-assignment-reconciles.integration.spec.js#takes
        each subject once, in the order first given
    provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/dispatch/derived-assignment-reconciles.integration.spec.js#is
      a system route asking for the staff-only platform.eligibility.reconcile
    category: permission
    action_evidence:
      provenance: test
      source: >-
        services-platform:modules/security/tests/integration/services/dispatch/derived-assignment-reconciles.integration.spec.js#is
        a system route asking for the staff-only platform.eligibility.reconcile
    assertion_evidence:
      provenance: test
      source: >-
        services-platform:modules/security/tests/integration/services/dispatch/derived-assignment-reconciles.integration.spec.js#is
        a system route asking for the staff-only platform.eligibility.reconcile
    binding_scope: >-
      The cited tests contribute their reachable assertions; the binding does not establish
      execution or every step of this scenario.
    binding_limitations:
      - FND-PFM-ELG-074
  - id: ATS-PFM-ELG-010-06
    title: Keep portal wording fresh and suspension immediate
    level: browser
    proves:
      - BR-CAP-PFM-ELG-010-07
    preconditions: A display answer is cached for an active use.
    steps: 'Edit its portal message, suspend the use and resume the unchanged plan before cache expiry.'
    expected: >-
      The edit is reflected in a new answer, suspension refuses immediately and resumption may reuse
      the unchanged cached answer.
    negative: true
    data_needs: Existing evidence fixtures provide the described setup.
    bound_to:
      - >-
        react-console:acceptance/eligibility/playwright/journeys/invalidation/ELIG-ACC-0481.spec.ts#ELIG-ACC-0481
      - TST-PFM-ELG-194
    provenance: test
    source: >-
      react-console:acceptance/eligibility/playwright/journeys/invalidation/ELIG-ACC-0481.spec.ts#ELIG-ACC-0481
    category: rule
    action_evidence:
      provenance: test
      source: >-
        react-console:acceptance/eligibility/playwright/journeys/invalidation/ELIG-ACC-0481.spec.ts#ELIG-ACC-0481
    assertion_evidence:
      provenance: test
      source: >-
        react-console:acceptance/eligibility/playwright/journeys/invalidation/ELIG-ACC-0481.spec.ts#ELIG-ACC-0481
    binding_scope: >-
      The cited tests contribute their reachable assertions; the binding does not establish
      execution or every step of this scenario.
    binding_limitations:
      - FND-PFM-ELG-074
  - id: ATS-PFM-ELG-010-07
    title: Refresh an answer after publication
    category: interaction
    level: api
    proves:
      - BR-CAP-PFM-ELG-004-07
      - BR-CAP-PFM-ELG-010-02
    exercises:
      - CAP-PFM-ELG-010
      - CAP-PFM-ELG-004
    preconditions: A following use has a cached eligible display answer.
    steps: Publish a draft that changes the subject to ineligible and evaluate the same use again.
    expected: >-
      The next answer names the new expression and reports ineligible instead of the earlier cached
      answer.
    negative: false
    data_needs: Run-owned records and a controlled clock where timing changes the result.
    bound_to: []
    provenance: proposed
    source: >-
      services-platform:modules/eligibility/tests/integration/services/governance/publish-followers.integration.spec.js#finds
      every rule that inlines C at any depth, and none that pins a version of C;
      services-platform:modules/eligibility/tests/e2e/eligibility-evaluate.e2e.spec.js#answers from
      the data again once the publish has flushed the definition’s decisions
    action_evidence:
      provenance: proposed
      source: >-
        services-platform:modules/eligibility/tests/integration/services/governance/publish-followers.integration.spec.js#finds
        every rule that inlines C at any depth, and none that pins a version of C;
        services-platform:modules/eligibility/tests/e2e/eligibility-evaluate.e2e.spec.js#answers
        from the data again once the publish has flushed the definition’s decisions
    assertion_evidence:
      provenance: proposed
      source: >-
        services-platform:modules/eligibility/tests/integration/services/governance/publish-followers.integration.spec.js#finds
        every rule that inlines C at any depth, and none that pins a version of C;
        services-platform:modules/eligibility/tests/e2e/eligibility-evaluate.e2e.spec.js#answers
        from the data again once the publish has flushed the definition’s decisions
    binding_scope: This sequence is proposed and has no executable proof binding.
  - id: ATS-PFM-ELG-010-08
    title: Keep display caching separate from authority
    category: interaction
    level: api
    proves:
      - BR-CAP-PFM-ELG-008-01
      - BR-CAP-PFM-ELG-010-01
    exercises:
      - CAP-PFM-ELG-010
      - CAP-PFM-ELG-008
    preconditions: A display answer is cached before its subject changes.
    steps: >-
      Evaluate display and authorization requests before the cache expires, then repeat after
      expiry.
    expected: >-
      Authorization reads the changed data immediately and display refreshes at expiry; cache hits
      add no decision.
    negative: false
    data_needs: Run-owned records and a controlled clock where timing changes the result.
    bound_to: []
    provenance: proposed
    source: >-
      services-platform:modules/eligibility/tests/unit/compile-and-evaluate.spec.js#makes an
      indeterminate state ineligible under closed;
      services-platform:modules/eligibility/tests/e2e/eligibility-evaluate.e2e.spec.js#never answers
      an authorization evaluation from the cache
    action_evidence:
      provenance: proposed
      source: >-
        services-platform:modules/eligibility/tests/unit/compile-and-evaluate.spec.js#makes an
        indeterminate state ineligible under closed;
        services-platform:modules/eligibility/tests/e2e/eligibility-evaluate.e2e.spec.js#never
        answers an authorization evaluation from the cache
    assertion_evidence:
      provenance: proposed
      source: >-
        services-platform:modules/eligibility/tests/unit/compile-and-evaluate.spec.js#makes an
        indeterminate state ineligible under closed;
        services-platform:modules/eligibility/tests/e2e/eligibility-evaluate.e2e.spec.js#never
        answers an authorization evaluation from the cache
    binding_scope: This sequence is proposed and has no executable proof binding.
  - id: ATS-PFM-ELG-010-09
    title: Queue simulation gains with release refresh
    category: interaction
    level: api
    proves:
      - BR-CAP-PFM-ELG-010-03
      - BR-CAP-PFM-ELG-011-07
    exercises:
      - CAP-PFM-ELG-010
      - CAP-PFM-ELG-011
    preconditions: A simulation identifies newly eligible subjects and a derived role already has holders.
    steps: >-
      Publish with the matching simulation and inspect queued role rechecks and the following use
      answer.
    expected: >-
      Existing holders and bounded gains are queued and the following use observes the new
      expression.
    negative: false
    data_needs: Run-owned records and a controlled clock where timing changes the result.
    bound_to: []
    provenance: proposed
    source: >-
      services-platform:modules/eligibility/tests/integration/services/population/population-run.integration.spec.js#queues
      a reconcile for every subject the simulation found newly eligible when the version is
      published;
      services-platform:modules/eligibility/tests/integration/services/population/population-run.integration.spec.js#refuses
      a publish naming a simulation of another version of the draft
    action_evidence:
      provenance: proposed
      source: >-
        services-platform:modules/eligibility/tests/integration/services/population/population-run.integration.spec.js#queues
        a reconcile for every subject the simulation found newly eligible when the version is
        published;
        services-platform:modules/eligibility/tests/integration/services/population/population-run.integration.spec.js#refuses
        a publish naming a simulation of another version of the draft
    assertion_evidence:
      provenance: proposed
      source: >-
        services-platform:modules/eligibility/tests/integration/services/population/population-run.integration.spec.js#queues
        a reconcile for every subject the simulation found newly eligible when the version is
        published;
        services-platform:modules/eligibility/tests/integration/services/population/population-run.integration.spec.js#refuses
        a publish naming a simulation of another version of the draft
    binding_scope: This sequence is proposed and has no executable proof binding.
  - id: ATS-PFM-ELG-010-10
    title: Observe aging role rechecks
    category: interaction
    level: api
    proves:
      - BR-CAP-PFM-ELG-010-03
      - BR-CAP-PFM-ELG-012-03
    exercises:
      - CAP-PFM-ELG-010
      - CAP-PFM-ELG-012
    preconditions: Publication has enqueued role rechecks.
    steps: Keep one request pending beyond the alarm threshold and inspect queue-age metrics.
    expected: The queue-age series used by the alarm reflects the overdue request.
    negative: false
    data_needs: Run-owned records and a controlled clock where timing changes the result.
    bound_to: []
    provenance: proposed
    source: >-
      services-platform:modules/eligibility/tests/integration/services/population/population-run.integration.spec.js#queues
      a reconcile for every subject the simulation found newly eligible when the version is
      published; services-platform:modules/eligibility/tests/unit/alarm-inputs.spec.ts#reads the
      population run’s failure under the service its task function records it as (DEF-ELIG-0675)
    action_evidence:
      provenance: proposed
      source: >-
        services-platform:modules/eligibility/tests/integration/services/population/population-run.integration.spec.js#queues
        a reconcile for every subject the simulation found newly eligible when the version is
        published; services-platform:modules/eligibility/tests/unit/alarm-inputs.spec.ts#reads the
        population run’s failure under the service its task function records it as (DEF-ELIG-0675)
    assertion_evidence:
      provenance: proposed
      source: >-
        services-platform:modules/eligibility/tests/integration/services/population/population-run.integration.spec.js#queues
        a reconcile for every subject the simulation found newly eligible when the version is
        published; services-platform:modules/eligibility/tests/unit/alarm-inputs.spec.ts#reads the
        population run’s failure under the service its task function records it as (DEF-ELIG-0675)
    binding_scope: This sequence is proposed and has no executable proof binding.
evidence:
  - >-
    services-platform: docs/eligibility.md; docs/milestones/PLAT-M11-eligibility-rules.md,
    PLAT-M12-eligibility-who-qualifies.md, PLAT-M13-eligibility-roles-and-permissions.md,
    plans/PLAT-M11-plan.md; docs/proposals/eligibility/17-decision-register.md;
    modules/eligibility/services/evaluate/decision-cache.ts, services/invalidation/**
    (decision-cache-keys.ts, handle-change-events.ts, on-definition-published.ts),
    services/compile/plan-cache.ts, aws/api/reconcile.routes.ts,
    aws/logic/eligibility-change-events.lambda.ts;
    modules/security/tests/integration/services/dispatch/derived-assignment-reconciles.integration.spec.js
    (the reconcile queue, named as a dependency);
    docs/debt/eligibility-decision-cache-subject-keys.md; rule-level source and test references
  - >-
    react-console: acceptance/eligibility/journeys/invalidation/*.json and matching browser
    specifications.
related_coverage:
  - capability: CAP-PFM-ELG-004
    scenario: ATS-PFM-ELG-010-07
  - capability: CAP-PFM-ELG-008
    scenario: ATS-PFM-ELG-010-08
  - capability: CAP-PFM-ELG-011
    scenario: ATS-PFM-ELG-010-09
  - capability: CAP-PFM-ELG-012
    scenario: ATS-PFM-ELG-010-10
coverage:
  rule: 'gap: FND-PFM-ELG-062'
  transition: 'gap: FND-PFM-ELG-062'
  validation: 'gap: FND-PFM-ELG-062'
  permission: 'gap: FND-PFM-ELG-062'
  edge: 'gap: FND-PFM-ELG-062'
  failure: 'gap: FND-PFM-ELG-062'
  boundary: covered
  concurrency: 'gap: FND-PFM-ELG-062'
  invariant: 'gap: FND-PFM-ELG-062'
  interaction: covered
invariant_gaps: []
transition_coverage: []
permission_coverage:
  - key: platform.eligibility.reconcile
    finding: FND-PFM-ELG-062
    reason: A capability-level authority scenario does not prove every operation protected by this key.
coverage_notes:
  meaning: >-
    Covered means a detailed scenario exists; it does not mean the scenario ran or every executable
    assertion conforms.
  gaps: >-
    Event declaration version refusal, cross-process cache invalidation and queue insertion failure
    need complete scenarios. Event delivery is not wired across the claimed source boundary.
---

# Refresh decisions and request role rechecks: Capability Test Specification

## Coverage

The scenarios check observable outcomes against the cited contracts. The coverage map retains partial proof and unresolved design boundaries as findings.

| Required Rule | Scenarios |
|---|---|
| `BR-CAP-PFM-ELG-010-01` | `ATS-PFM-ELG-010-01`, `ATS-PFM-ELG-010-08` |
| `BR-CAP-PFM-ELG-010-02` | `ATS-PFM-ELG-010-02`, `ATS-PFM-ELG-010-07` |
| `BR-CAP-PFM-ELG-010-03` | `ATS-PFM-ELG-010-03`, `ATS-PFM-ELG-010-09`, `ATS-PFM-ELG-010-10` |
| `BR-CAP-PFM-ELG-010-04` | `ATS-PFM-ELG-010-04` |
| `BR-CAP-PFM-ELG-010-05` | `ATS-PFM-ELG-010-05` |
| `BR-CAP-PFM-ELG-010-06` | Gap: `FND-PFM-ELG-062` |
| `BR-CAP-PFM-ELG-010-07` | `ATS-PFM-ELG-010-06` |

## Interactions With Related Capabilities

Refresh an answer after publication. Publish a draft that changes the subject to ineligible and evaluate the same use again.

Keep display caching separate from authority. Evaluate display and authorization requests before the cache expires, then repeat after expiry.

Queue simulation gains with release refresh. Publish with the matching simulation and inspect queued role rechecks and the following use answer.

Observe aging role rechecks. Keep one request pending beyond the alarm threshold and inspect queue-age metrics.
