An AI agent fixes a slug function. The project's own test passes. It says "done". It isn't: slugify("Hello, World!") comes back as hello-world!, and the task said "a clean URL slug".

I'm the maintainer of Apex verify, a small open-source tool for exactly this gap. You give it the change an AI made and the task you gave it. A different model writes checks from the task text (never from the agent's own tests), the tool proves each check can fail on the old code, then runs them next to your tests and a scan for cheating (deleted or skipped tests, a test script that cannot fail). The answer is ready, not ready or unknown, with the evidence, on a copy of your code.

Terminal: an AI agent changed a slug function and the tests pass; apex verify then says NOT READY: expected hello-world, actual hello-world!

Try it in 5 seconds (no key, nothing installed)

npx --yes https://github.com/apex-engine-dev/apex-verify/releases/latest/download/apex-verify.tgz verify --demo 

The numbers

I built a benchmark from 23 real open-source libraries (jshttp, picomatch, slugify, HumanizeDuration and others). Each task is a real historical bug fix: the code before the fix, with the upstream test that the fix added kept hidden. Small Gemini models wrote 200 candidate changes, and I labelled each right or wrong with the hidden test.

107 wrong changes stopped
The project's tests + a cheating scan 0 (the visible tests passed on every change)
Apex verify (Gemini 3.1 Pro as the checker) 86 (80%)

On the good changes it wrongly stopped 10 of 93 (11%) by that hidden-test label. I then checked those 10 by hand: for 6, the change really did not do what the task text says (the upstream test was narrower than the task text), so the real checker-mistake rate is about 4 in 100. One reviewer did that audit, after seeing the numbers, so treat it as an estimate. The details and the evidence per change are in the repo. On 17 small projects the figures were about 65% stopped and 3% wrongly stopped.

It still misses things: 14 of the 107 wrong changes were called ready. It is not a proof of correctness; it raises the bar.

What did not work (so you do not repeat it)

  • A weak model writing checks for its own change blocked over half of the correct ones. The checker has to be a different model.
  • Requiring two checkers to both object did not help (two Gemini models: 53% stopped, against 65%). A checker from another company (Claude) worked about as well as Gemini on its own.
  • Asking the checker for "obvious unstated cases" did not help. Neither did asking it to avoid the task's own example values.
  • My first prototype claimed 70%. It drew one set of checks per task and the model's reasoning budget cut the check-writing call off. Fixing that gave the real, lower number. I had also quoted a "two checkers: 60%" result that did not survive the full pipeline, and I withdrew it.

Where it plugs in

  • Claude Code: a plugin whose Stop hook blocks "done" until the change is ready. I ran it in a real session: Claude said done on a wrong change, the hook returned the failing checks, and Claude was stopped (at most 3 times, so a wrong check can never trap it).
  • Gemini CLI: an AfterAgent hook, run in a real session.
  • Pull requests (any agent or a person): a GitHub Action that comments a verdict and can be a required check.
  • Codex and Cursor stop hooks are written to their documented formats, but I have not run them inside those apps yet.
  • Checks are written for node:test, pytest, Jest, Vitest, cargo test and go test. Tests and checks run in a sandbox (macOS Seatbelt, Linux bubblewrap, Windows AppContainer), all tested in CI.

Apache-2.0, one maintainer, one run per change, Gemini-written changes only. Everything is rerunnable: node benchmark/run-gate.mjs.

Please break it

The most useful thing you can send me is a ready on a change that is wrong, or a not ready on one that is right. Open an issue and I will add it to the benchmark and credit you. The repo: https://github.com/apex-engine-dev/apex-verify