# A guard that cannot fire is worse than none

> Canonical: https://blazephoenix.xyz/learn/a-guard-that-cannot-fire/
> License: CC BY-NC-ND 4.0 (attribution + link) · © 2026 BlazePhoenix
> Updated: 2026-11-16

A passing test was capable of failing only if the same test goes red when the guard is removed. Every guard in the BlazePhoenix repository is therefore paired with a mutant: one exact source line, the replacement that disables it, and the one test that must turn red under that replacement. A green suite proves nothing without that pairing.

## The short answer

You know it was capable of failing only if the same test goes red when the guard is removed. A guard is a claim: this input is refused. A test that passes with the guard in place shows the test and the program agree; it shows the test watches the guard only if it fails on the program with the guard removed. So every guard in the BlazePhoenix repository is paired with a mutant: one exact source line, the replacement that disables it, and the one test that must turn red under that replacement.

## The derivation

Let T be a test, G a guard, and M the program with G removed. T passing on the real program shows T and the program agree. It shows that T watches G only if T fails on M. A suite can be large and green while no test watches a given guard. The mutant is the instrument that tells the two cases apart, which is why the register is measured and not assumed.

## The rule, as the repository states it



## The same pairing, applied to the invariants

The pairing is not only for unit tests. A mutant is also aimed at an invariant function, which must go red under it, so the stateful invariants are watched and not only believed. The whitepaper publishes the map, section 15.3. A sample:

## The denominator

At commit 969bcc6 the curated mutant register in mutants.py holds 1,895 mutants, counted from the list in the script, next to 54 stateful invariants in 18 files. The result of running them is a campaign measurement and is given with its denominator in section 15 of the whitepaper. The count of mutants is not a count of anything found: a mutant is a one-line change to the contracts that a named test must turn red.

## Check it yourself



**Verify it yourself:** In a clean checkout of Blaze-Phoenix-Dex at 969bcc6: awk 'NR>=17 && NR<=19' AGENTS.md; python3 .github/scripts/check_targets.py; python3 .github/scripts/mutants.py (the curated mutation guard, Appendix C); sed -n 580,590p docs/assurance/ASSURANCE.md. Whitepaper 2.4: sections 2.7 and 15.3.

Related: https://blazephoenix.xyz/learn/the-mutation-guard/ · https://blazephoenix.xyz/learn/wired-is-not-demonstrated/ · https://blazephoenix.xyz/learn/fix-the-invariant-not-the-instance/
