---
id: ATS-PFM-ELG-005
scope: CAP-PFM-ELG-005
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-005-01
    title: Restrict lifecycle administration
    level: api
    proves:
      - BR-CAP-PFM-ELG-005-01
    preconditions: 'A writer, binder and retire-authorized administrator are available.'
    steps: 'Attempt deprecation, archive, restoration, deletion and reference transfer.'
    expected: Only the retirement-authorized caller succeeds.
    negative: true
    data_needs: No fixtures beyond the described setup.
    bound_to:
      - >-
        services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#refuses
        the deprecation to a writer without the retire permission, 403
      - TST-PFM-ELG-411
      - >-
        services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#refuses
        a writer without the retire permission, 403
      - >-
        react-console:acceptance/eligibility/playwright/journeys/governance/ELIG-ACC-0154.spec.ts#ELIG-ACC-0154
      - TST-PFM-ELG-186
    provenance: test
    source: >-
      services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#refuses
      the deprecation to a writer without the retire permission, 403
    category: permission
    action_evidence:
      provenance: test
      source: >-
        services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#refuses
        the deprecation to a writer without the retire permission, 403
    assertion_evidence:
      provenance: test
      source: >-
        services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#refuses
        the deprecation to a writer without the retire permission, 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-005-02
    title: Preserve existing deprecated uses
    level: api
    proves:
      - BR-CAP-PFM-ELG-005-02
      - INV-DOM-PFM-ELG-001-06
    preconditions: A price already uses the rule.
    steps: 'Deprecate with a replacement, evaluate, attempt a new use, restore and bind again.'
    expected: Existing evaluation continues and a new use is blocked until restoration.
    negative: false
    data_needs: No fixtures beyond the described setup.
    bound_to:
      - >-
        services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#deprecates
        the rule, naming its replacement
      - TST-PFM-ELG-411
      - >-
        services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#refuses
        a new binding of the deprecated rule, 409
      - >-
        react-console:acceptance/eligibility/playwright/journeys/governance/ELIG-ACC-0140.spec.ts#ELIG-ACC-0140
      - TST-PFM-ELG-172
      - >-
        react-console:acceptance/eligibility/playwright/journeys/governance/ELIG-ACC-0141.spec.ts#ELIG-ACC-0141
      - TST-PFM-ELG-173
    provenance: test
    source: >-
      services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#deprecates
      the rule, naming its replacement
    category: transition
    action_evidence:
      provenance: test
      source: >-
        services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#deprecates
        the rule, naming its replacement
    assertion_evidence:
      provenance: test
      source: >-
        services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#deprecates
        the rule, naming its replacement
    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-005-03
    title: Wait for dependencies before archive
    level: api
    proves:
      - BR-CAP-PFM-ELG-005-03
      - INV-DOM-PFM-ELG-001-07
    preconditions: 'Following, published-reference and draft-reference dependencies exist.'
    steps: Attempt archive as each dependency is removed.
    expected: Remaining dependencies are counted in refusals; archive succeeds after the last is removed.
    negative: true
    data_needs: No fixtures beyond the described setup.
    bound_to:
      - >-
        services-platform:modules/eligibility/tests/integration/services/persistence/definitions.integration.spec.js#refuses
        while an active binding follows it, counting the binding, and leaves it active
      - TST-PFM-ELG-450
      - >-
        services-platform:modules/eligibility/tests/integration/services/persistence/definitions.integration.spec.js#refuses
        while another definition’s published version references it, counting the reference
      - >-
        services-platform:modules/eligibility/tests/integration/services/persistence/definitions.integration.spec.js#refuses
        while the current draft of another definition references it, counting the reference
      - >-
        services-platform:modules/eligibility/tests/integration/services/persistence/definitions.integration.spec.js#archives
        it once every definition that referenced it is archived, whatever its dependency rows still
        say (DEF-ELIG-0275)
      - >-
        react-console:acceptance/eligibility/playwright/journeys/governance/ELIG-ACC-0142.spec.ts#ELIG-ACC-0142
      - TST-PFM-ELG-174
    provenance: test
    source: >-
      services-platform:modules/eligibility/tests/integration/services/persistence/definitions.integration.spec.js#refuses
      while an active binding follows it, counting the binding, and leaves it active
    category: validation
    action_evidence:
      provenance: test
      source: >-
        services-platform:modules/eligibility/tests/integration/services/persistence/definitions.integration.spec.js#refuses
        while an active binding follows it, counting the binding, and leaves it active
    assertion_evidence:
      provenance: test
      source: >-
        services-platform:modules/eligibility/tests/integration/services/persistence/definitions.integration.spec.js#refuses
        while an active binding follows it, counting the binding, and leaves it active
    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-005-04
    title: Restore before reactivation
    level: unit
    proves:
      - BR-CAP-PFM-ELG-005-04
      - INV-DOM-PFM-ELG-001-06
    preconditions: An archived rule has a suspended binding.
    steps: Create and reactivate uses before and after restoration.
    expected: 'Archive blocks activation, restoration permits it and suspension remains possible.'
    negative: true
    data_needs: No fixtures beyond the described setup.
    bound_to:
      - >-
        services-platform:modules/eligibility/tests/unit/lifecycle.spec.js#refuses a new binding of
        an archived definition
      - TST-PFM-ELG-481
      - >-
        services-platform:modules/eligibility/tests/unit/lifecycle.spec.js#refuses making a binding
        of an archived definition active again
      - >-
        services-platform:modules/eligibility/tests/unit/lifecycle.spec.js#accepts suspending a
        binding of an archived definition
      - >-
        services-platform:modules/eligibility/tests/integration/services/persistence/definitions.integration.spec.js#restores
        an archived definition to active
      - TST-PFM-ELG-450
    provenance: test
    source: >-
      services-platform:modules/eligibility/tests/unit/lifecycle.spec.js#refuses a new binding of an
      archived definition
    category: transition
    action_evidence:
      provenance: test
      source: >-
        services-platform:modules/eligibility/tests/unit/lifecycle.spec.js#refuses a new binding of
        an archived definition
    assertion_evidence:
      provenance: test
      source: >-
        services-platform:modules/eligibility/tests/unit/lifecycle.spec.js#refuses a new binding of
        an archived definition
    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-005-05
    title: Move followers while preserving pins
    level: api
    proves:
      - BR-CAP-PFM-ELG-005-05
    preconditions: A deprecated rule has following and pinned bindings and references.
    steps: Transfer dependencies to its replacement.
    expected: >-
      The follower moves with audit and the referencing rule gets a replacement release and note;
      pins remain listed in place.
    negative: false
    data_needs: No fixtures beyond the described setup.
    bound_to:
      - >-
        services-platform:modules/eligibility/tests/integration/services/governance/lifecycle.integration.spec.js#reports
        the following binding as moved
      - TST-PFM-ELG-433
      - >-
        services-platform:modules/eligibility/tests/integration/services/governance/lifecycle.integration.spec.js#points
        the moved binding at the replacement
      - >-
        services-platform:modules/eligibility/tests/integration/services/governance/lifecycle.integration.spec.js#publishes
        the follower’s new version naming the replacement, with the migration’s change note
      - >-
        services-platform:modules/eligibility/tests/integration/services/governance/lifecycle.integration.spec.js#lists
        the pinned binding for a person to move, and leaves it on the deprecated definition
      - >-
        react-console:acceptance/eligibility/playwright/journeys/governance/ELIG-ACC-0143.spec.ts#ELIG-ACC-0143
      - TST-PFM-ELG-175
    provenance: test
    source: >-
      services-platform:modules/eligibility/tests/integration/services/governance/lifecycle.integration.spec.js#reports
      the following binding as moved
    category: interaction
    action_evidence:
      provenance: test
      source: >-
        services-platform:modules/eligibility/tests/integration/services/governance/lifecycle.integration.spec.js#reports
        the following binding as moved
    assertion_evidence:
      provenance: test
      source: >-
        services-platform:modules/eligibility/tests/integration/services/governance/lifecycle.integration.spec.js#reports
        the following binding as moved
    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-005-06
    title: Validate replacement standing
    level: api
    proves:
      - BR-CAP-PFM-ELG-005-06
    preconditions: 'Candidate replacements are unpublished, archived or the original rule itself.'
    steps: Attempt transfer to each.
    expected: All fail without moving dependencies.
    negative: true
    data_needs: No fixtures beyond the described setup.
    bound_to:
      - >-
        services-platform:modules/eligibility/tests/integration/services/governance/lifecycle.integration.spec.js#refuses
        a replacement that was never published
      - TST-PFM-ELG-433
      - >-
        services-platform:modules/eligibility/tests/integration/services/governance/lifecycle.integration.spec.js#refuses
        a definition as its own replacement
      - >-
        services-platform:modules/eligibility/tests/integration/services/governance/lifecycle.integration.spec.js#refuses
        an archived replacement, and moves nothing
      - >-
        react-console:acceptance/eligibility/playwright/journeys/governance/ELIG-ACC-0144.spec.ts#ELIG-ACC-0144
      - TST-PFM-ELG-176
    provenance: test
    source: >-
      services-platform:modules/eligibility/tests/integration/services/governance/lifecycle.integration.spec.js#refuses
      a replacement that was never published
    category: validation
    action_evidence:
      provenance: test
      source: >-
        services-platform:modules/eligibility/tests/integration/services/governance/lifecycle.integration.spec.js#refuses
        a replacement that was never published
    assertion_evidence:
      provenance: test
      source: >-
        services-platform:modules/eligibility/tests/integration/services/governance/lifecycle.integration.spec.js#refuses
        a replacement that was never 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-005-07
    title: Delete only unused unpublished work
    level: api
    proves:
      - BR-CAP-PFM-ELG-005-07
    preconditions: 'Unpublished, published and bound rules exist.'
    steps: Request deletion for each.
    expected: >-
      The unused unpublished rule and dependencies are removed with audit; other requests identify
      their refusal.
    negative: false
    data_needs: No fixtures beyond the described setup.
    bound_to:
      - >-
        services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#deletes
        it, answering its id, the same as key, and deleted: true
      - TST-PFM-ELG-411
      - >-
        services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#refuses
        a published definition, 409, naming the archive instead
      - >-
        services-platform:modules/eligibility/tests/integration/services/governance/lifecycle.integration.spec.js#deletes
        the draft’s dependency rows, which it had
      - TST-PFM-ELG-433
      - >-
        services-platform:modules/eligibility/tests/integration/services/governance/lifecycle.integration.spec.js#refuses
        a definition a binding uses, naming the binding, and leaves it as it was
    provenance: test
    source: >-
      services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#deletes
      it, answering its id, the same as key, and deleted: true
    category: transition
    action_evidence:
      provenance: test
      source: >-
        services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#deletes
        it, answering its id, the same as key, and deleted: true
    assertion_evidence:
      provenance: test
      source: >-
        services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#deletes
        it, answering its id, the same as key, and deleted: true
    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-005-08
    title: Check lifecycle versions
    level: api
    proves:
      - BR-CAP-PFM-ELG-005-08
    preconditions: Two administrators act on the same rule.
    steps: Send an obsolete-version request and a request without a version.
    expected: The stale request fails and the unversioned request proceeds.
    negative: true
    data_needs: No fixtures beyond the described setup.
    bound_to:
      - >-
        services-platform:modules/eligibility/tests/integration/services/persistence/definitions.integration.spec.js#refuses
        a lifecycle move at a version that is no longer current
      - TST-PFM-ELG-450
      - >-
        react-console:acceptance/eligibility/playwright/journeys/governance/ELIG-ACC-0150.spec.ts#ELIG-ACC-0150
      - TST-PFM-ELG-182
    provenance: test
    source: >-
      services-platform:modules/eligibility/tests/integration/services/persistence/definitions.integration.spec.js#refuses
      a lifecycle move at a version that is no longer current
    category: concurrency
    action_evidence:
      provenance: test
      source: >-
        services-platform:modules/eligibility/tests/integration/services/persistence/definitions.integration.spec.js#refuses
        a lifecycle move at a version that is no longer current
    assertion_evidence:
      provenance: test
      source: >-
        services-platform:modules/eligibility/tests/integration/services/persistence/definitions.integration.spec.js#refuses
        a lifecycle move at a version that is no longer current
    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-005-09
    title: Use dependency counts to decide archive readiness
    category: interaction
    level: api
    proves:
      - BR-CAP-PFM-ELG-002-08
      - BR-CAP-PFM-ELG-005-03
    exercises:
      - CAP-PFM-ELG-005
      - CAP-PFM-ELG-002
    preconditions: A rule has a following use and a live draft reference.
    steps: >-
      Read its overview and usage, attempt archive, remove the use and reference, then repeat the
      reads and archive.
    expected: The refusal counts agree with discovery; removing both dependencies permits archive.
    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/model/explorer.integration.spec.js#is
      the number the archive refusal names;
      services-platform:modules/eligibility/tests/integration/services/persistence/definitions.integration.spec.js#refuses
      while an active binding follows it, counting the binding, and leaves it active
    action_evidence:
      provenance: proposed
      source: >-
        services-platform:modules/eligibility/tests/integration/services/model/explorer.integration.spec.js#is
        the number the archive refusal names;
        services-platform:modules/eligibility/tests/integration/services/persistence/definitions.integration.spec.js#refuses
        while an active binding follows it, counting the binding, and leaves it active
    assertion_evidence:
      provenance: proposed
      source: >-
        services-platform:modules/eligibility/tests/integration/services/model/explorer.integration.spec.js#is
        the number the archive refusal names;
        services-platform:modules/eligibility/tests/integration/services/persistence/definitions.integration.spec.js#refuses
        while an active binding follows it, counting the binding, and leaves it active
    binding_scope: This sequence is proposed and has no executable proof binding.
  - id: ATS-PFM-ELG-005-10
    title: Move a following reference through replacement
    category: interaction
    level: api
    proves:
      - BR-CAP-PFM-ELG-004-03
      - BR-CAP-PFM-ELG-005-05
    exercises:
      - CAP-PFM-ELG-005
      - CAP-PFM-ELG-004
    preconditions: An obsolete rule is referenced by another released rule and a replacement is ready.
    steps: >-
      Transfer its following references, inspect the referencing rule history and attempt archive of
      the old rule.
    expected: >-
      The referencing rule gains a release using the replacement; any retained pins still prevent
      archive.
    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.integration.spec.js#publishes
      the next draft as version 2 and supersedes version 1;
      services-platform:modules/eligibility/tests/integration/services/governance/lifecycle.integration.spec.js#lists
      the pinned binding for a person to move, and leaves it on the deprecated definition
    action_evidence:
      provenance: proposed
      source: >-
        services-platform:modules/eligibility/tests/integration/services/governance/publish.integration.spec.js#publishes
        the next draft as version 2 and supersedes version 1;
        services-platform:modules/eligibility/tests/integration/services/governance/lifecycle.integration.spec.js#lists
        the pinned binding for a person to move, and leaves it on the deprecated definition
    assertion_evidence:
      provenance: proposed
      source: >-
        services-platform:modules/eligibility/tests/integration/services/governance/publish.integration.spec.js#publishes
        the next draft as version 2 and supersedes version 1;
        services-platform:modules/eligibility/tests/integration/services/governance/lifecycle.integration.spec.js#lists
        the pinned binding for a person to move, and leaves it on the deprecated definition
    binding_scope: This sequence is proposed and has no executable proof binding.
  - id: ATS-PFM-ELG-005-11
    title: Keep pins while moving following uses
    category: interaction
    level: api
    proves:
      - BR-CAP-PFM-ELG-005-05
      - BR-CAP-PFM-ELG-007-04
    exercises:
      - CAP-PFM-ELG-005
      - CAP-PFM-ELG-007
    preconditions: An obsolete rule has one following use and one pinned use; its replacement fits both purposes.
    steps: 'Move uses to the replacement, inspect both connections and evaluate them.'
    expected: >-
      The follower changes rule without a duplicate consumer use; the pin retains its earlier rule
      and 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/governance/lifecycle.integration.spec.js#lists
      the pinned binding for a person to move, and leaves it on the deprecated definition;
      services-platform:modules/eligibility/tests/integration/services/persistence/bindings.integration.spec.js#refuses
      a pin of the definition’s draft
    action_evidence:
      provenance: proposed
      source: >-
        services-platform:modules/eligibility/tests/integration/services/governance/lifecycle.integration.spec.js#lists
        the pinned binding for a person to move, and leaves it on the deprecated definition;
        services-platform:modules/eligibility/tests/integration/services/persistence/bindings.integration.spec.js#refuses
        a pin of the definition’s draft
    assertion_evidence:
      provenance: proposed
      source: >-
        services-platform:modules/eligibility/tests/integration/services/governance/lifecycle.integration.spec.js#lists
        the pinned binding for a person to move, and leaves it on the deprecated definition;
        services-platform:modules/eligibility/tests/integration/services/persistence/bindings.integration.spec.js#refuses
        a pin of the definition’s draft
    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 (deprecate, archive, restore, delete,
    migrate_references), lifecycle.ts, services/governance/lifecycle.ts,
    services/persistence/definitions.ts (deleteDefinition, liveUsageOf), versions.ts
    (retireVersion), db/eligibility-migration-reviews.table.ts (the delete refusal);
    docs/debt/eligibility-migrate-references-in-request.md; rule-level source and test references
  - >-
    react-console: components/configuration/resources/eligibility-rules.tsx (Archive, Restore);
    acceptance/eligibility/journeys/governance/ELIG-ACC-0140 to 0144, 0150, 0154.
related_coverage:
  - capability: CAP-PFM-ELG-002
    scenario: ATS-PFM-ELG-005-09
  - capability: CAP-PFM-ELG-004
    scenario: ATS-PFM-ELG-005-10
  - capability: CAP-PFM-ELG-007
    scenario: ATS-PFM-ELG-005-11
coverage:
  rule: 'gap: FND-PFM-ELG-057'
  transition: 'gap: FND-PFM-ELG-057'
  validation: covered
  permission: 'gap: FND-PFM-ELG-057'
  edge: 'gap: FND-PFM-ELG-057'
  failure: 'gap: FND-PFM-ELG-057'
  boundary: 'gap: FND-PFM-ELG-057'
  concurrency: covered
  invariant: 'gap: FND-PFM-ELG-057'
  interaction: covered
invariant_gaps:
  - invariant: INV-DOM-PFM-ELG-001-03
    finding: FND-PFM-ELG-057
    source: 'services-platform:modules/eligibility/lifecycle.ts:VERSION_TRANSITIONS'
  - invariant: INV-DOM-PFM-ELG-001-08
    finding: FND-PFM-ELG-057
    source: >-
      services-platform:modules/eligibility/db/eligibility-definitions.table.ts:eligibility_definitions_replaced_by_check
transition_coverage:
  - model: STATE-PFM-ELG-001
    from: active
    to: deprecated
    trigger: deprecateEligibilityDefinition
    source: >-
      services-platform:modules/eligibility/services/governance/lifecycle.ts:deprecateDefinitionByKey
    scenario: ATS-PFM-ELG-005-02
  - model: STATE-PFM-ELG-001
    from: active
    to: archived
    trigger: archiveEligibilityDefinition
    source: 'services-platform:modules/eligibility/services/governance/lifecycle.ts:archiveDefinitionByKey'
    scenario: ATS-PFM-ELG-005-03
  - model: STATE-PFM-ELG-001
    from: deprecated
    to: archived
    trigger: archiveEligibilityDefinition
    source: 'services-platform:modules/eligibility/lifecycle.ts:DEFINITION_TRANSITIONS'
    scenario: ATS-PFM-ELG-005-03
  - model: STATE-PFM-ELG-001
    from: deprecated
    to: active
    trigger: restoreEligibilityDefinition
    source: 'services-platform:modules/eligibility/services/governance/lifecycle.ts:restoreDefinitionByKey'
    scenario: ATS-PFM-ELG-005-02
  - model: STATE-PFM-ELG-001
    from: archived
    to: active
    trigger: restoreEligibilityDefinition
    source: 'services-platform:modules/eligibility/lifecycle.ts:DEFINITION_TRANSITIONS'
    scenario: ATS-PFM-ELG-005-04
  - model: STATE-PFM-ELG-001
    from: active
    to: deleted
    trigger: deleteEligibilityDefinition
    source: 'services-platform:modules/eligibility/services/governance/lifecycle.ts:deleteDefinitionByKey'
    scenario: ATS-PFM-ELG-005-07
  - model: STATE-PFM-ELG-002
    from: draft
    to: draft
    trigger: >-
      saveEligibilityDefinitionDraft, createEligibilityDefinition when expression is supplied,
      duplicateEligibilityDefinition
    source: 'services-platform:modules/eligibility/services/model/authoring.ts:saveDefinitionDraft'
    scenario: ATS-PFM-ELG-001-05
  - model: STATE-PFM-ELG-002
    from: draft
    to: published
    trigger: publishEligibilityDefinition
    source: 'services-platform:modules/eligibility/services/governance/publish.ts:publishDefinition'
    scenario: ATS-PFM-ELG-004-03
  - model: STATE-PFM-ELG-002
    from: published
    to: superseded
    trigger: Later overlapping publication or rollback
    source: 'services-platform:docs/eligibility.md#2. The lifecycle rules'
    scenario: ATS-PFM-ELG-004-03
  - model: STATE-PFM-ELG-002
    from: published
    to: retired
    trigger: retireVersion through persistence only
    finding: FND-PFM-ELG-057
    source: 'services-platform:modules/eligibility/services/persistence/versions.ts:retireVersion'
  - model: STATE-PFM-ELG-002
    from: superseded
    to: retired
    trigger: retireVersion through persistence only
    finding: FND-PFM-ELG-057
    source: 'services-platform:modules/eligibility/lifecycle.ts:VERSION_TRANSITIONS'
permission_coverage:
  - key: platform.eligibility.retire
    finding: FND-PFM-ELG-057
    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: >-
    Archive and bind races, failed reference republication, self-replacement constraints and all
    restoration paths need explicit cases. Withdrawal of a numbered release has no public operation.
---

# Replace obsolete rules without losing their uses: 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-005-01` | `ATS-PFM-ELG-005-01` |
| `BR-CAP-PFM-ELG-005-02` | `ATS-PFM-ELG-005-02` |
| `BR-CAP-PFM-ELG-005-03` | `ATS-PFM-ELG-005-03`, `ATS-PFM-ELG-005-09` |
| `BR-CAP-PFM-ELG-005-04` | `ATS-PFM-ELG-005-04` |
| `BR-CAP-PFM-ELG-005-05` | `ATS-PFM-ELG-005-05`, `ATS-PFM-ELG-005-10`, `ATS-PFM-ELG-005-11` |
| `BR-CAP-PFM-ELG-005-06` | `ATS-PFM-ELG-005-06` |
| `BR-CAP-PFM-ELG-005-07` | `ATS-PFM-ELG-005-07` |
| `BR-CAP-PFM-ELG-005-08` | `ATS-PFM-ELG-005-08` |

## Interactions With Related Capabilities

Use dependency counts to decide archive readiness. Read its overview and usage, attempt archive, remove the use and reference, then repeat the reads and archive.

Move a following reference through replacement. Transfer its following references, inspect the referencing rule history and attempt archive of the old rule.

Keep pins while moving following uses. Move uses to the replacement, inspect both connections and evaluate them.
