---
id: TST-PFM-ELG-411
title: Eligibility definitions checks
kind: api-lifecycle
product_area: platform
module: eligibility
revision: 1
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
repository: services-platform
files:
  - modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js
implements:
  - ATS-PFM-ELG-001-02
  - ATS-PFM-ELG-001-03
  - ATS-PFM-ELG-001-04
  - ATS-PFM-ELG-001-11
  - ATS-PFM-ELG-002-01
  - ATS-PFM-ELG-002-02
  - ATS-PFM-ELG-002-04
  - ATS-PFM-ELG-004-01
  - ATS-PFM-ELG-004-11
  - ATS-PFM-ELG-005-01
  - ATS-PFM-ELG-005-02
  - ATS-PFM-ELG-005-07
  - ATS-PFM-ELG-007-01
  - ATS-PFM-ELG-007-05
  - ATS-PFM-ELG-007-10
environment: local
implementation_state: implemented
latest_result: not-run
conformance: not-verified
estimated_minutes: 5
isolation: Prepared local test database with suite-owned fixture keys and cleanup.
evidence:
  - provenance: test
    source: >-
      services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js
    cases:
      - answers 200 with the definition and its draft version 1
      - 'answers the draft’s problem, saved rather than refused'
      - 'refuses the publish while the problem exists, 400, naming it'
      - 'refuses a second definition with the same key, 400'
      - saves the fixed draft with no problems and its summary
      - answers a validation with problems as 200 and not valid
      - 'answers a validation without problems as valid, with the summary'
      - 'publishes version 1, superseding nothing, with its dependency'
      - 'refuses the publish to a writer without the publish permission, 403'
      - creates the binding with the consumer kind’s default fail policy
      - >-
        answers the definition with its published version, no draft and its
        usage
      - lists the definition in the explorer with its usage counts
      - 'answers the usage grouped by consumer kind, with the binding’s consumer'
      - 'refuses a binding whose consumer kind is another application’s, 400'
      - 'refuses a search text longer than a name can be, 400'
      - 'refuses an explorer filter outside the closed list, 400'
      - 'publishes version 2, superseding version 1, and answers the diff'
      - lists the versions newest first
      - answers one version by its number
      - answers the diff from version 1 to version 2 as sentences
      - rolls back by publishing version 1’s rule as version 3
      - 'refuses a version number that is not a number, 400'
      - answers a version the definition does not have as 404
      - 'deprecates the rule, naming its replacement'
      - 'refuses a new binding of the deprecated rule, 409'
      - >-
        refuses the archive while a binding follows it, 409, counting what still
        uses it
      - moves the following binding to the replacement
      - archives the rule once nothing follows it
      - restores the archived rule to active
      - 'refuses the deprecation to a writer without the retire permission, 403'
      - 'deletes it, answering its id, the same as key, and deleted: true'
      - answers 404 for the deleted definition
      - 'refuses a published definition, 409, naming the archive instead'
      - 'refuses a writer without the retire permission, 403'
      - copies the replacement’s published rule as the copy’s draft
      - creates a definition without a draft when no expression is given
      - >-
        refuses a writer without the publish permission the promotion of a
        private definition, 403
      - lets the writer rename it
      - lets an administrator who may publish promote it
      - 'refuses an edit that names the key, which never changes, 400'
      - reads the binding it created
      - lists the definition’s bindings narrowed to one consumer record
      - changes the binding at the version read
      - 'answers the binding’s compiled plan, its hash beside it'
      - 'deletes the binding, answering its id, and finds it no more'
      - 'refuses a list that names neither a definition nor a consumer, 400'
      - >-
        refuses the bindings routes to a caller without the bindings permission,
        403
      - 'refuses a portal caller every definitions route, as a context mismatch'
      - refuses a portal caller the bindings routes
      - 'refuses a caller without platform.eligibility.read, 403'
  - provenance: documented
    source: >-
      services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.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 definitions checks

## Verification Boundary

This suite checks the module through real local service and database code at the entry points used by its test cases.

## 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. Checks beyond the file’s reachable assertions remain unverified, including production configuration.

## Real Dependencies and Test Doubles

The suite uses local integration fixtures. Signing, caches, provider responses or outbound delivery may be supplied by fixtures where the source declares a substitution. The source imports and suite header identify the exact dependencies.

## Must Not Be Doubled

The module behavior under assertion, transaction boundary and database constraint being checked remain real. Fixture setup cannot stand in for the asserted write or refusal.
