aipat.ch· patching the gaps in AI
← Back to all projects
Harness TGT · 08

Test Gate

Test Gate stops Claudes cheating with tests. Before code gets pushed it runs the tests and checks the count hasn't dropped. If Claude has hidden output, quietly skipped a failing test, or deleted tests, the push fails and I get a Telegram alert. There's a UI inside control so I can see what happened.

Harness In progress bash · vitest · git-hooks

About this project

Claude is an inventive creature. If a test fails and it can't work out the fix, it will quite happily delete the test instead. Or it will pipe the output to a file where the failure doesn't show. Or it will comment out the stubborn one and check the rest in. Genuinely funny until it's your codebase.

Test Gate is the rule I put at the door. When a Claude tries to push a change, it runs the tests against the last known-good baseline. If tests that were passing are now failing, the push is blocked. If the total test count has dropped, the push is blocked too. Deleting tests to make the suite happy is not the fix.

When a block fires I get a Telegram alert, and the regression shows up in a UI inside control. Most of the time I open the session where the Claude is working and ask why the numbers dropped. It apologises and fixes whatever it did. It has worked well as a deterrent.

Screenshots

Test Gate resolved-events view inside Control
Web · desktop Test Gate resolved-events view inside Control

Details

RefTGT · 08
ZoneHarness
StatusIn progress
Stackbash · vitest · git-hooks
Source Not published