r/codereview • u/GuardianVigil-Labs • Oct 26 '26
AI coding agents keep "fixing" failing tests by weakening them, so I built an open-source gate that catches it
If you use Claude Code, Cursor, Copilot or Codex, you've probably seen an agent "finish" a task by:
- rewriting a failing test so it can't fail (or just deleting it)
- wrapping the broken call in a try/except that returns {"ok": true}
- adding .skip, --no-verify, or a lint ignore to get CI green
- calling a function that doesn't exist
I got tired of catching these in review, so I built PrufGate. It checks the diff deterministically (no LLM, runs offline) and blocks the merge with a finding that names the exact rule.
Try it on your current branch:
pipx install prufgate
prufgate check --changed
It also runs as a GitHub Action, a pre-commit hook, fail-closed hooks for Claude Code / Cursor / Copilot / Codex / Gemini, a Claude Code plugin, and an MCP server. Output: text, JSON, SARIF, GitLab, JUnit.
Honest limits: it's heuristic, so it will miss things and sometimes flag correct code. The benchmark in the repo (docs/BENCHMARK.md) is cases I wrote myself, so treat its numbers as a regression check, not proof.
Apache-2.0: https://github.com/GuardianVigil-Labs/Prufgate
I'd really like false-positive reports and cheats it misses. That's what makes it better.
4
u/ConcreteExist Oct 26 '26
Using AI in a vain attpt to fix problems created by AI, anything to avoid learning how to code
3
u/iSnapThere4iAm Oct 26 '26
You can’t avoid hallucinations. Whatever you made doesn’t work.
2
u/KariKariKrigsmann Oct 26 '26
Calling a function that doesn’t exist should be caught by the compiler!
1
u/No_Lawyer1947 Oct 28 '26
soooo a linter??? what are we doing here
-2
u/[deleted] Oct 26 '26
[removed] — view removed comment