---
id: TST-ACC-CLS-048
title: Close-history erasure participant
kind: integration
product_area: accounting
module: close
revision: 1
status: draft
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
repository: services-accounting
files:
  - >-
    modules/maintenance/tests/integration/services/participants/fiscal-close-participant.integration.spec.js
implements:
  - ATS-ACC-CLS-016-02
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 3
isolation: >-
  The suite owns test-identifier workspaces and fixture records, removed by its
  teardown.
binding_policy: >-
  Each binding identifies the assertions this suite executes; combined scenarios
  may require other bound suites. Existence is not a recorded execution result.
evidence:
  - >-
    services-accounting:modules/maintenance/tests/integration/services/participants/fiscal-close-participant.integration.spec.js
  - provenance: test
    source: >-
      services-accounting:modules/maintenance/tests/integration/services/participants/fiscal-close-participant.integration.spec.js
    assertion_titles:
      - purging a tenant’s fiscal close records
      - >-
        starts with a snapshot, a close job, two runs and the units’ periods in
        both tenants (premise)
      - >-
        is refused by the database when the configuration is purged before
        fiscal close, whose runs name its periods
      - >-
        removes the snapshot first, then the close job, then the runs, one row a
        batch, and answers done
      - empties fiscal close’s tables of the tenant
      - reports every table at zero once it is done
      - >-
        lets the configuration’s purge remove the periods the runs named, to
        done
      - leaves the other tenant’s rows exactly as they were
real_dependencies: >-
  The production purge callbacks and database dependencies are real locally.
  Fixtures create histories in two workspaces; Platform’s external lifecycle
  dispatch is not exercised.
product_intent: proposed
implementation_evidence: observed
---
# Close-history erasure participant

## Verification Boundary

The suite checks its declared service or persistence boundary against local PostgreSQL. Bindings identify the assertions it contributes to a capability case; they do not establish every assertion in a combined case.

## What This Suite Proves

The callback suite checks refusing calendar removal before referenced close history is purged, bounded dependency order and preservation of another workspace.

## What It Does Not Prove

This register records assertion scope without claiming a passing run or complete coverage of every rule and scenario variant.

## Real Dependencies and Test Doubles

The production purge callbacks and database dependencies are real locally. Fixtures create histories in two workspaces; Platform’s external lifecycle dispatch is not exercised.

## Must Not Be Doubled

Keep production queries, writes, mappings, application-role privileges and database constraints real wherever they are the subject of an assertion. Recording financial ports establish invocation behavior; actual recognition and reversal require the suite using the real posting service.
