---
id: TST-PFM-LLM-068
title: Pure checks for Run Tool Loop
kind: unit
product_area: platform
module: llm
revision: 1
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
repository: services-platform
files:
  - modules/llm/tests/unit/runtime/run-tool-loop.spec.ts
implements:
  - ATS-PFM-LLM-002-01
  - ATS-PFM-LLM-002-02
  - ATS-PFM-LLM-002-03
  - ATS-PFM-LLM-002-04
  - ATS-PFM-LLM-002-08
environment: mock
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 1
isolation: 'Literal inputs and process-local doubles, restored by the suite.'
evidence:
  - provenance: test
    source: 'services-platform:modules/llm/tests/unit/runtime/run-tool-loop.spec.ts'
source_boundary:
  provenance: observed
  source: 'services-platform:modules/llm/tests/unit/runtime/run-tool-loop.spec.ts'
---

# Pure checks for Run Tool Loop

## Verification Boundary

The suite checks deterministic module behavior and declared configuration using local inputs.

## What This Suite Proves

Turn budget ends an unfinished conversation. Oversized tool batches run no handlers. Credit guard uses strict excess. No remaining time means no provider request. Rejected answers can be repaired. Combined bindings require every named suite; a component assertion alone does not establish the full experiment.

## What It Does Not Prove

These checks do not establish database transactions, deployed permissions, provider availability or a complete user journey.

## Real Dependencies and Test Doubles

The production tool loop is real. Case-specific model replies, handlers, answer judge, pricing and wait functions are doubles; the loop’s budget checks remain real.

## Must Not Be Doubled

Retain the function, configuration or boundary guard under test and its assertions; replacing them removes the evidence.
