go-crap and gen-contract
Two tools written for Nexus. go-crap is a CRAP-score and mutation-testing CLI used to drive every module to complexity and coverage bars; gen-contract is an annotation-driven API-contract and OpenAPI generator, enforced in CI.
mutation testing · contract validation in CI · Go
Both exist because of a rule I keep relearning: test reality’s acceptance, not our intent. A green suite says the code does what the tests expect. Mutation testing asks whether the tests would notice if it didn’t; contract generation asks whether the services agree on what they promised each other — and fails the build when they don’t.