---
id: TST-PFM-LLM-025
title: Database checks for Explain Invocation
kind: integration
product_area: platform
module: llm
revision: 1
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
repository: services-platform
files:
  - modules/llm/tests/integration/services/explain/explain-invocation.integration.spec.js
implements:
  - ATS-PFM-LLM-007-15
  - ATS-PFM-LLM-012-02
  - ATS-PFM-LLM-012-03
  - ATS-PFM-LLM-012-04
  - ATS-PFM-LLM-012-05
  - ATS-PFM-LLM-012-06
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 3
isolation: Prepared local test database with suite-owned records and scoped cleanup.
evidence:
  - provenance: test
    source: 'services-platform:modules/llm/tests/integration/services/explain/explain-invocation.integration.spec.js'
source_boundary:
  provenance: observed
  source: 'services-platform:modules/llm/tests/integration/services/explain/explain-invocation.integration.spec.js'
---

# Database checks for Explain Invocation

## Verification Boundary

The suite checks module persistence or service behavior against prepared PostgreSQL with scoped records.

## What This Suite Proves

Explanation never reserves the retried estimate. Original refusal arithmetic does not change. Missing grant references remain explicit. Current admission check observes later capacity. Failure histories disclose retries and truncation. Healthy or foreign requests do not explain. Combined bindings require every named suite; a component assertion alone does not establish the full experiment.

## What It Does Not Prove

The suite does not establish browser behavior, deployed routing, live model quality or actual recipient inbox delivery.

## Real Dependencies and Test Doubles

PostgreSQL, production explanation assembly, persistence and the ledger’s read-only affordability predicate are real. A controlled clock supplies the present instant.

## Must Not Be Doubled

Retain PostgreSQL constraints, transaction behavior and the production persistence or dispatcher path under test. A scripted provider must not replace accounting or authorization.
