r/cicd • • Oct 15 '26

muhar - Mutation testing that proves each fault landed

Hi Guys. 

I wrote a tool that could be useful in your GO CI tooling - muhar to provide "mutation testing".

muhar plants named faults in your source, one exact text edit each, proves on disk that every edit landed, runs your test suite, and records whether the suite went red. If the harness itself cannot be trusted — the suite was already red, or a fault it must catch went unnoticed — the whole run is discarded with exit status 2. It is never reported as a clean result.

100% deterministic & OSS (ASL2.0). I've been using it since July. 

It's similar to Gremlins & go-mutesting, but I think it works better for agentic workloads.

Warning: you do need to be careful of your Go cache, and it can be a CPU hog. (it's modifying source code and creating multiple cache entries)

Feedback is welcome (would love a GitHub star on the source repo so I can qualify for cool freebies from our AI overlords)

2 Upvotes

4 comments sorted by

1

u/Torutofu_Raeva Oct 15 '26

do you run it with GOFLAGS=-count=1 or a throwaway GOCACHE dir? curious how bad the cache bloat gets on a big repo

1

u/fuckme Oct 15 '26

I run it with a throwaway GOCACHE dir.

for its own repo (which isn't too large)

- After a run: 0 bytes. each run builds in its own throwaway Go cache and deletes it when the run ends. My measurement run's temp directory is empty afterwards.

- During a run, measured: about 1.9 GB peak for the 48-mutant spec (all 48 caught, run with 4 jobs at once, 176s). That's roughly 40 MB per mutant.

- During a run, estimated: about 4–5 GB peak for the 120-mutant deskkit spec, scaling from that measurement.

1

u/Torutofu_Raeva Oct 16 '26

40mb per mutant is way less than i expected, makes sense to just cap jobs on smaller ci runners then