## Definition
**Tautological test detection** is a verification pattern in which a verifier agent reads a test and asks whether that test is capable of failing when the acceptance criterion it claims to cover is violated. A test that asserts what the function returned — rather than what the function should return — is a tautology: it can never fail regardless of the implementation, and therefore proves nothing.
## The Core Check
For each acceptance criterion (AC) in the spec:
1. Locate the test that claims to cover it.
2. Read the test code.
3. Ask: **does this test actually fail when the AC is violated?**
4. If the answer is no — because the assertion compares the function's output to itself, or because the test has no falsifiable assertion — report it as `INSUFFICIENT`.
The author's formulation from Module 7: *"if the test asserts the function returns what the function returned, report it as INSUFFICIENT."*
## Why AI-Generated Code Is Especially Susceptible
AI-generated tests are written to pass the code that already exists, not to guard the contract the spec requires. The test-writer and the builder are often the same agent or prompted similarly — their shared bias produces tests that mirror the implementation rather than the specification. Tautological tests pass the CI suite, give a false green signal, and allow silent regressions.
## Verification Prompt Pattern
A verifier agent running this check should be prompted independently of the builder — see [[Verifier Independence]]. A minimal prompt excerpt:
```
For each AC in the spec:
- Locate the test that claims to cover it.
- Read the test code.
- Confirm: does this test actually fail when the AC is violated?
- If the test is a tautology (e.g., asserts the function returns what
the function returned), report it as INSUFFICIENT.
```
This does not require running the tests — it requires reading the test logic against the spec clause.
## Distinction from [[AI Test Scaffolding]]
[[AI Test Scaffolding]] is about generating the structural boilerplate of a test suite (fixtures, imports, initial cases) from a human-authored prompt. Tautological test detection is a post-generation verification step that checks whether the generated tests are logically capable of falsifying the spec. The two patterns compose: scaffolding produces tests; tautology detection audits them.
## Relation to the TDD Loop
In an AI-assisted TDD loop (Module 7): a test-writer agent produces failing tests from the spec; a builder agent implements until they pass; a critic agent runs tautological test detection to confirm the tests actually exercise the AC. Without the detection step, the loop can converge on a green suite that proves nothing.
## Related
- [[Verifier Independence]]
- [[Builder-Critic Pattern]]
- [[AI Test Scaffolding]]
- [[Spec-Driven Development]]
- [[Executable Acceptance Criterion]]
## Sources
- [[Modern AI Software Engineering - The Orchestrators Playbook]]