Progress
My tests said every planted bug was caught. They were lying.
I build Enki Labs mostly alone, with AI agents doing a lot of the typing. What worries me most: the person who wrote the code also wrote the tests. So the tests only check what I already thought of. So I built enki-harness. It builds the tests for me, adds the cases I'd skip, and gives no score until its own checks pass. Free, MIT, standard-library Python, runs on your machine. 👉 https://github.com/stephen487/enki-harness Twice while building it, my own instruments lied to me. Lie 1: a perfect score for the wrong reason To prove each safety guard matters, I break it and run the tests. Every broken guard (a "mutant") should turn the suite red. One that stays green is a guard nothing tests. First pass: every mutant died. Perfect. It wasn't. The tool I used to break the guards had saved the file in the wrong text encoding and mangled its tick and cross characters. Every mutant failed because the file was garbage, not because the guard was missing. I only saw it because I read the rows. Each mutant failed 4, 5 or 6 tests. Done properly, the real counts were 1 or 2. The total said "all killed". The rows said "something's off". So the harness puts the score last, and flags any 0% or 100% rate as "check the instrument". A check that never fires and one that always fires look the same in a total. Lie 2: a clean run that never happened The first add-on, hb judge, tests an AI model as the filter. The same text can pass once and get flagged the next time, so it sends every case several times and reports a flag rate. The first time I pointed it at a local model, the first call timed out while the model loaded. Two real runs were voided. Voided, not passed. In the harness an error is never a pass, and there are controls: one case that must pass, one that must flag. If they misbehave, there is no score. A timeout quietly counted as "not flagged" would have looked like a clean result. The fix: one uncounted warm-up call, with a test. The rules • Controls that must fail: dumb stand-ins. If they pass, the harness is broken. • Twins: for every case it must catch, a near-identical innocent one it must not flag. • Rules off: each rule switched off alone and in pairs, to find dead rules. • Falsifier first: write down what would prove you wrong before it runs. • Rows before the score. • Cost before spend: hb judge says how many calls it will make and asks first. Try it Your filter is a Python module with RULES and classify(text, enabled_rules). Then: python -m hb serve python -m hb run examples\insult_task.json It opens on a filter with four planted bugs. Press run and watch it find them. No account, no telemetry. Setup steps are in the README: https://github.com/stephen487/enki-harness What's the worst time your own tests told you everything was fine?
- Reactions
- 0
- Comments
- 0
- Shares
- 0