---
id: TST-PFM-ELG-472
title: Eligibility compile and evaluate checks
kind: unit
product_area: platform
module: eligibility
revision: 1
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
repository: services-platform
files:
  - modules/eligibility/tests/unit/compile-and-evaluate.spec.js
implements:
  - ATS-PFM-ELG-008-01
  - ATS-PFM-ELG-009-01
environment: mock
implementation_state: implemented
latest_result: not-run
conformance: not-verified
estimated_minutes: 1
isolation: One process with suite-local inputs.
evidence:
  - provenance: test
    source: >-
      services-platform:modules/eligibility/tests/unit/compile-and-evaluate.spec.js
    cases:
      - >-
        puts every sql condition about contacts into one predicate request over
        the contacts dataset
      - >-
        folds a sql boolean condition as is_true over its answer and keeps what
        it compared for the trace
      - >-
        keeps an aggregate condition’s comparison in the fold tree, since the
        answer is a number
      - >-
        groups function conditions into one provider step per function with its
        batch size and timeout
      - >-
        leaves a fact node in the tree and asks nothing of SQL or a provider for
        it
      - >-
        lists the derived paths the evaluator resolves and keys member
        conditions by the related path
      - >-
        refuses a sql condition over a dataset whose records are not its
        subjects
      - refuses a reference the published lookup does not have
      - >-
        substitutes a parameter by the binding’s value, or by its declared
        default
      - >-
        gives a plan without a related block or derived path a SQL function tree
        of its leaves
      - says why a plan with a related block has no SQL function part
      - >-
        fills the operator, the value, an arg and the negated value of an as-of
        shift
      - chooses the template of the case an arg names
      - >-
        is the same for the same inputs whatever order the parameters were
        written in
      - changes with each of its five inputs
      - is the hash the compiled plan carries
      - keys a slot’s fact by the node’s key
      - >-
        keys each member’s fact as <key>#<member id>, reading a member path from
        the resolved map
      - >-
        restores a sql condition’s comparison on its trace node and drops the
        true it compared
      - passes a decided state through as its outcome
      - makes an indeterminate state ineligible under closed
      - >-
        makes an indeterminate state eligible with review under
        open_with_review, in either spelling
      - gives an indeterminate state no outcome under defer
      - records every transactional and authorization decision
      - records every indeterminate display decision
      - >-
        records the first display decision of a tenant and then one in every
        rate
      - counts each tenant’s display decisions apart
      - >-
        reads the rate from its setting, and 20 for a setting that is not a
        whole number from 1
      - reads a years shift as months over the as-of day
      - reads a days shift as days over the as-of day
      - finds no shift for values no calendar shift explains
  - provenance: documented
    source: >-
      services-platform:modules/eligibility/tests/unit/compile-and-evaluate.spec.js:suite
      header
    note: >-
      The source header describes the verification boundary and declared
      substitutions.
proof_limit: >-
  Only the named scenario checkpoints have a verified source binding; execution
  has not been attempted.
---

# Eligibility compile and evaluate checks

## Verification Boundary

This suite checks isolated decisions and validation using the imported inputs. It cannot establish a complete service or browser lifecycle.

## What This Suite Proves

The mapped scenarios identify the capability and feature checkpoints this file exercises. The source test titles preserve the assertion-level evidence.

## What It Does Not Prove

Registration supplies no execution result or conformance decision. Passing isolated checks does not establish deployed dependencies or cross-application delivery.

## Real Dependencies and Test Doubles

The suite runs isolated checks; its imported fixtures and injected collaborators define the substitutions. The source imports and suite header identify the exact dependencies.

## Must Not Be Doubled

The decision or validator being asserted remains real; returning the expected answer from a substitute defeats the check.
