---
id: TST-PFM-ELG-462
title: Eligibility versions checks
kind: integration
product_area: platform
module: eligibility
revision: 1
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
repository: services-platform
files:
  - >-
    modules/eligibility/tests/integration/services/persistence/versions.integration.spec.js
implements:
  - ATS-PFM-ELG-001-13
  - ATS-PFM-ELG-004-04
  - ATS-PFM-ELG-004-08
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/integration/services/persistence/versions.integration.spec.js
    cases:
      - versions.queries.integration.spec.js
      - 'replaces the one draft in place, moving its version and its hash'
      - hashes two trees that differ only in key order alike
      - >-
        refuses a save at a draft version that is no longer current, and leaves
        the draft as it was
      - refuses an effective range that ends before it starts
      - refuses a blank summary
      - makes the next version number a new draft after a publish
      - 'publishes the draft, stamping when and by whom'
      - names the published version on the definition
      - supersedes nothing the first time
      - >-
        publishes with a change note of exactly 1000 astral characters, counted
        in code points as the schema and the table count them (DEF-ELIG-0134)
      - refuses a change note of 1001 astral characters naming the limit
      - 'refuses a draft that came with problems, and leaves it a draft'
      - supersedes the version it replaces when the ranges overlap
      - leaves the superseded version superseded in the database
      - refuses a publish when the definition has no draft
      - >-
        keeps the earlier version published for its own range when the new range
        does not overlap it
      - names the newer version on the definition
      - >-
        refuses a publish whose range overlaps a published version other than
        the last one, naming it, and leaves the draft
      - leaves both published versions as they were after the refused overlap
      - creates a new version number rather than editing the old one
      - carries the first version’s expression and its hash
      - supersedes the version that was published
      - copies the source version’s dependencies onto the new version
      - leaves the pending draft a draft
      - refuses to republish a draft
      - refuses a version number the definition does not have
      - retires the version
      - >-
        moves the definition’s published version back to the newest one still
        published
      - refuses to retire a version twice
      - 'refuses to retire a draft, and leaves it a draft'
      - names no published version once the last one is retired
      - stamps the publish instant as an ISO instant on the wire
      - >-
        publishes the version with the range the publish named rather than the
        draft’s
      - >-
        refuses a range the publish names that ends before it starts, and leaves
        the draft
      - >-
        publishes the revision as the next number after the draft, with its
        summary and note
      - supersedes the version last published
      - names the revision on the definition
      - writes the dependencies it was given for the revision
      - leaves the draft as it was
  - provenance: documented
    source: >-
      services-platform:modules/eligibility/tests/integration/services/persistence/versions.integration.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 versions 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 exercises its real module dependencies and declares no test doubles. Its source header and imports identify the database, transaction and service boundaries it uses.

## 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.
