Documentation
¶
Overview ¶
Command failset compares two `go test -json` runs by the SET of tests that failed, and refuses to confirm a claim about a mutation that the names do not support.
⛔⛔ A COUNT CANNOT TELL A GATE THAT WORKS FROM A GATE THAT WORKS FOR ANOTHER REASON. On 2026-11-12, in go-fleettools/fleettools#252, a condition was removed from `cmd/aptneed`, the suite went red, and the commit message, the README and a report to the user all said that this proved a particular test discriminating. An independent reviewer re-ran the same mutation: that test PASSED, and two others failed. Red, as claimed — on the opposite tests. The gate held; the published reason for it was inverted, and it had been published three times before anyone re-ran it.
That was the third occurrence of one lesson in eleven days. The first two produced notes saying "compare the labels, not the cardinals". A note is applied when one remembers to apply it, and at the moment of a mutation one is thinking about the mutation. So this is a program.
go test -json ./pkg > before.json # unmutated ...apply the mutation... go test -json ./pkg > after.json failset --before before.json --after after.json --expect TestTheClaimIMake
Exit status: 0 every --expect went newly red, 1 one did not and here is what did, 2 a log could not be read as a complete test run.
⛔⛔ IT READS `-json` AND REFUSES `-v` TEXT, WHICH IS NOT A PREFERENCE. The first version parsed `--- PASS:` / `--- FAIL:` lines, and review measured what that costs: a test's OWN OUTPUT can forge another test's verdict. A passing TestY that prints
--- FAIL: TestX (0.00s)
made the tool report TestX as newly red and exit 0, supporting a claim nothing supported. `go test -v` interleaves test output with the framework's own lines at the same indentation and with no delimiter, so NO parser can tell them apart — it is the format, not the parsing. In `-json` a test's printed text can only ever appear inside an `"Action":"output"` event, while a verdict is an `"Action":"pass"|"fail"|"skip"` event. Forgery stops being possible rather than becoming unlikely.
⛔ THE SAME CHANGE FIXES A SECOND FALSE PASS the review found: text output carries no package, so two packages with a test of the same name collided and `./...` could read a test as green in one and red in the other. Every event here names its Package.