LRLoops RadarSubmit loop

Engineering loops

The 100% test coverage loop

A goal-based coding-agent workflow that identifies uncovered behavior, adds meaningful tests, and stops when the full suite passes at 100% coverage.

Source recipe

Copyable Markdown

# The 100% test coverage loop

## Purpose

A goal-based coding-agent workflow that identifies uncovered behavior, adds meaningful tests, and stops when the full suite passes at 100% coverage.

## Prompt

```text
Add tests until we have 100% test coverage.
```

## When To Use

Use this when 100% coverage is an explicit project requirement and the repository has a trustworthy coverage command, clear exclusions, and a test suite that can be run repeatedly.

## Workflow

- Run the complete test suite with coverage and save the baseline report.
- Prioritize uncovered branches and behavior by risk instead of file order.
- Add tests that assert meaningful outcomes, failure paths, and boundary conditions.
- Repeat until the full suite passes and the configured coverage report reaches 100%.

## Verifier

The full test suite passes at 100% coverage.

Use the project's coverage report as the source of truth.

## Notes

A concrete coverage target gives the agent a measurable stopping condition and makes skipped code visible. Risk-first ordering keeps the work focused on behavior that matters.

Coverage measures which code ran, not whether the assertions are good. Review test quality, avoid tests that only execute lines, and keep justified generated-code or platform exclusions explicit.

## Source

- Source: Forward Future Loop Library
- Author: Matthew Berman
- Published: 2026-06-13
- Modified: 2026-06-17
- URL: https://signals.forwardfuture.ai/loop-library/loops/100-percent-test-coverage-loop/