What is a surviving mutant?
A surviving mutant is a deliberate mistake in the code that every test missed: the tests all passed with the mistake in place. RedMachine marks that line SURVIVED, prints the line and the broken version that passed, and fails the run. It means no test noticed that change.
The opposite verdict is KILLED, which means a test failed when the line was broken. In the output, a survivor looks like this:
SURVIVED cart/pricing.py:6 [+ to -] every test passed with this line broken
line: cost = cost + 15
broken as: cost = cost - 15
A survivor is not always a missing test. A break that changes nothing a test can see also survives, and a person can waive such a line and write down why. In Rust, Swift and Go, a line that this machine's test build never builds also survives, with a reason line. See how to read a RedMachine receipt.