---
id: ATS-PFM-ELG-003
scope: CAP-PFM-ELG-003
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-003-01
    title: Keep trials out of history
    level: api
    proves:
      - BR-CAP-PFM-ELG-003-01
    preconditions: A rule has a released version and draft.
    steps: Test both against a contact and inspect decision history.
    expected: Both results include full explanations without adding retained decisions.
    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
        version’s decision with the trace, never recorded
      - TST-PFM-ELG-412
      - >-
        services-platform:modules/eligibility/tests/integration/services/evaluate/hosted-evaluate.integration.spec.js#answers
        the draft’s decision with the full trace and the administrator’s explanation, never recorded
      - TST-PFM-ELG-430
    provenance: test
    source: >-
      services-platform:modules/eligibility/tests/e2e/eligibility-evaluate.e2e.spec.js#answers the
      version’s decision with the trace, never recorded
    category: invariant
    action_evidence:
      provenance: test
      source: >-
        services-platform:modules/eligibility/tests/e2e/eligibility-evaluate.e2e.spec.js#answers the
        version’s decision with the trace, never recorded
    assertion_evidence:
      provenance: test
      source: >-
        services-platform:modules/eligibility/tests/e2e/eligibility-evaluate.e2e.spec.js#answers the
        version’s decision with the trace, never recorded
    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-003-02
    title: Check subject visibility for trials
    level: api
    proves:
      - BR-CAP-PFM-ELG-003-02
    preconditions: A custom role reads rules but cannot read contacts.
    steps: Test a contact and separately evaluate a binding.
    expected: The subject trial is denied while binding evaluation returns an answer.
    negative: true
    data_needs: No fixtures beyond the described setup.
    bound_to:
      - >-
        services-platform:modules/eligibility/tests/e2e/eligibility-evaluate.e2e.spec.js#refuses a
        caller who may not open the primary subject’s record, 403
      - TST-PFM-ELG-412
      - >-
        react-console:acceptance/eligibility/playwright/journeys/evaluation/ELIG-ACC-0296.spec.ts#ELIG-ACC-0296
      - TST-PFM-ELG-152
    provenance: test
    source: >-
      services-platform:modules/eligibility/tests/e2e/eligibility-evaluate.e2e.spec.js#refuses a
      caller who may not open the primary subject’s record, 403
    category: permission
    action_evidence:
      provenance: test
      source: >-
        services-platform:modules/eligibility/tests/e2e/eligibility-evaluate.e2e.spec.js#refuses a
        caller who may not open the primary subject’s record, 403
    assertion_evidence:
      provenance: test
      source: >-
        services-platform:modules/eligibility/tests/e2e/eligibility-evaluate.e2e.spec.js#refuses a
        caller who may not open the primary subject’s record, 403
    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-003-03
    title: Refuse unavailable trial expressions
    level: api
    proves:
      - BR-CAP-PFM-ELG-003-03
    preconditions: One rule has no draft and another has an invalid draft.
    steps: Test both without selecting a version.
    expected: The first request fails and the second returns draft problems instead of evaluation.
    negative: true
    data_needs: No fixtures beyond the described setup.
    bound_to:
      - >-
        react-console:acceptance/eligibility/playwright/journeys/evaluation/ELIG-ACC-0294.spec.ts#ELIG-ACC-0294
      - TST-PFM-ELG-150
    provenance: test
    source: >-
      react-console:acceptance/eligibility/playwright/journeys/evaluation/ELIG-ACC-0294.spec.ts#ELIG-ACC-0294
    category: validation
    action_evidence:
      provenance: test
      source: >-
        react-console:acceptance/eligibility/playwright/journeys/evaluation/ELIG-ACC-0294.spec.ts#ELIG-ACC-0294
    assertion_evidence:
      provenance: test
      source: >-
        react-console:acceptance/eligibility/playwright/journeys/evaluation/ELIG-ACC-0294.spec.ts#ELIG-ACC-0294
    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-003-04
    title: Require supported existing subjects
    level: api
    proves:
      - BR-CAP-PFM-ELG-003-04
    preconditions: A contact rule is present.
    steps: Test an absent contact and an unsupported subject kind.
    expected: The absent record returns not found and the unsupported kind is rejected.
    negative: true
    data_needs: No fixtures beyond the described setup.
    bound_to:
      - >-
        services-platform:modules/eligibility/tests/integration/services/evaluate/hosted-evaluate.integration.spec.js#refuses
        a contact the tenant does not have, RecordNotFound
      - TST-PFM-ELG-430
      - >-
        react-console:acceptance/eligibility/playwright/journeys/evaluation/ELIG-ACC-0295.spec.ts#ELIG-ACC-0295
      - TST-PFM-ELG-151
    provenance: test
    source: >-
      services-platform:modules/eligibility/tests/integration/services/evaluate/hosted-evaluate.integration.spec.js#refuses
      a contact the tenant does not have, RecordNotFound
    category: boundary
    action_evidence:
      provenance: test
      source: >-
        services-platform:modules/eligibility/tests/integration/services/evaluate/hosted-evaluate.integration.spec.js#refuses
        a contact the tenant does not have, RecordNotFound
    assertion_evidence:
      provenance: test
      source: >-
        services-platform:modules/eligibility/tests/integration/services/evaluate/hosted-evaluate.integration.spec.js#refuses
        a contact the tenant does not have, RecordNotFound
    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-003-05
    title: Inspect condition results in the console
    level: browser
    proves:
      - BR-CAP-PFM-ELG-003-06
    preconditions: Three contacts include a subject without a birth date.
    steps: Run their draft evaluations from the tester.
    expected: >-
      Condition rows show the observed values and Met, Not met or Unknown; the missing birth date
      fails the age condition.
    negative: false
    data_needs: No fixtures beyond the described setup.
    bound_to:
      - >-
        react-console:acceptance/eligibility/playwright/journeys/definitions/ELIG-ACC-0080.spec.ts#ELIG-ACC-0080
      - TST-PFM-ELG-125
    provenance: test
    source: >-
      react-console:acceptance/eligibility/playwright/journeys/definitions/ELIG-ACC-0080.spec.ts#ELIG-ACC-0080
    category: rule
    action_evidence:
      provenance: test
      source: >-
        react-console:acceptance/eligibility/playwright/journeys/definitions/ELIG-ACC-0080.spec.ts#ELIG-ACC-0080
    assertion_evidence:
      provenance: test
      source: >-
        react-console:acceptance/eligibility/playwright/journeys/definitions/ELIG-ACC-0080.spec.ts#ELIG-ACC-0080
    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-003-06
    title: Repair work before trying it
    category: interaction
    level: api
    proves:
      - BR-CAP-PFM-ELG-001-04
      - BR-CAP-PFM-ELG-003-03
    exercises:
      - CAP-PFM-ELG-003
      - CAP-PFM-ELG-001
    preconditions: A draft has one invalid reference and a readable subject exists.
    steps: 'Save the invalid draft, attempt a trial, repair the reference and run the trial again.'
    expected: >-
      The first trial exposes draft problems; the repaired trial supplies a condition explanation
      without decision history.
    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/e2e/eligibility-definitions.e2e.spec.js#answers
      the draft’s problem, saved rather than refused;
      react-console:acceptance/eligibility/playwright/journeys/evaluation/ELIG-ACC-0294.spec.ts#ELIG-ACC-0294
    action_evidence:
      provenance: proposed
      source: >-
        services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#answers
        the draft’s problem, saved rather than refused;
        react-console:acceptance/eligibility/playwright/journeys/evaluation/ELIG-ACC-0294.spec.ts#ELIG-ACC-0294
    assertion_evidence:
      provenance: proposed
      source: >-
        services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#answers
        the draft’s problem, saved rather than refused;
        react-console:acceptance/eligibility/playwright/journeys/evaluation/ELIG-ACC-0294.spec.ts#ELIG-ACC-0294
    binding_scope: This sequence is proposed and has no executable proof binding.
  - id: ATS-PFM-ELG-003-07
    title: Compare trial and consumer answers
    category: interaction
    level: api
    proves:
      - BR-CAP-PFM-ELG-003-01
      - BR-CAP-PFM-ELG-008-01
    exercises:
      - CAP-PFM-ELG-003
      - CAP-PFM-ELG-008
    preconditions: One valid expression and subject are available to a reader and a consumer.
    steps: Try the expression and evaluate a binding to that expression with the same subject and day.
    expected: >-
      The condition states agree; only the bound request is eligible for recording and uncertainty
      policy.
    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/e2e/eligibility-evaluate.e2e.spec.js#answers the
      version’s decision with the trace, never recorded;
      services-platform:modules/eligibility/tests/unit/compile-and-evaluate.spec.js#makes an
      indeterminate state ineligible under closed
    action_evidence:
      provenance: proposed
      source: >-
        services-platform:modules/eligibility/tests/e2e/eligibility-evaluate.e2e.spec.js#answers the
        version’s decision with the trace, never recorded;
        services-platform:modules/eligibility/tests/unit/compile-and-evaluate.spec.js#makes an
        indeterminate state ineligible under closed
    assertion_evidence:
      provenance: proposed
      source: >-
        services-platform:modules/eligibility/tests/e2e/eligibility-evaluate.e2e.spec.js#answers the
        version’s decision with the trace, never recorded;
        services-platform:modules/eligibility/tests/unit/compile-and-evaluate.spec.js#makes an
        indeterminate state ineligible under closed
    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 and
    plans/PLAT-M11-plan.md; docs/proposals/eligibility/17-decision-register.md;
    aws/platform.service.ts (ELIGIBILITY_PERMISSIONS);
    modules/eligibility/aws/api/definitions.routes.ts (testEligibilityDefinition),
    services/evaluate/test-definition.ts, hosted-evaluate.ts, explain-sentences.ts; rule-level
    source and test references
  - >-
    react-console: components/eligibility/test/**, lib/eligibility-test/test-cases.ts;
    acceptance/eligibility/journeys/evaluation/ELIG-ACC-0294 to 0296 and definitions/ELIG-ACC-0080.
related_coverage:
  - capability: CAP-PFM-ELG-001
    scenario: ATS-PFM-ELG-003-06
  - capability: CAP-PFM-ELG-008
    scenario: ATS-PFM-ELG-003-07
coverage:
  rule: covered
  transition: 'gap: FND-PFM-ELG-055'
  validation: covered
  permission: 'gap: FND-PFM-ELG-055'
  edge: 'gap: FND-PFM-ELG-055'
  failure: 'gap: FND-PFM-ELG-055'
  boundary: covered
  concurrency: 'gap: FND-PFM-ELG-055'
  invariant: 'gap: FND-PFM-ELG-055'
  interaction: covered
invariant_gaps:
  - invariant: INV-DOM-PFM-ELG-001-03
    finding: FND-PFM-ELG-055
    source: 'services-platform:modules/eligibility/lifecycle.ts:VERSION_TRANSITIONS'
  - invariant: INV-DOM-PFM-ELG-001-08
    finding: FND-PFM-ELG-055
    source: >-
      services-platform:modules/eligibility/db/eligibility-definitions.table.ts:eligibility_definitions_replaced_by_check
transition_coverage: []
permission_coverage:
  - key: platform.eligibility.read
    finding: FND-PFM-ELG-055
    reason: A capability-level authority scenario does not prove every operation protected by this key.
  - key: crm.contacts.read
    finding: FND-PFM-ELG-055
    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: >-
    Saved browser examples, subject-name-only projection and trial failures during data access need
    detailed scenarios. Concurrent trial and publication consistency is not specified by the current
    trial cases.
---

# Try a rule against real records: 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-003-01` | `ATS-PFM-ELG-003-01`, `ATS-PFM-ELG-003-07` |
| `BR-CAP-PFM-ELG-003-02` | `ATS-PFM-ELG-003-02` |
| `BR-CAP-PFM-ELG-003-03` | `ATS-PFM-ELG-003-03`, `ATS-PFM-ELG-003-06` |
| `BR-CAP-PFM-ELG-003-04` | `ATS-PFM-ELG-003-04` |
| `BR-CAP-PFM-ELG-003-06` | `ATS-PFM-ELG-003-05` |

## Interactions With Related Capabilities

Repair work before trying it. Save the invalid draft, attempt a trial, repair the reference and run the trial again.

Compare trial and consumer answers. Try the expression and evaluate a binding to that expression with the same subject and day.
