2026-11-26 15:40 UTC

Apex Verify adds task-derived model checks for AI-written code

state: seedheat: mediumuncertainty: mediumrelevance: highcoding-agents code-verification testingapex-engine-dev

What is this?

Apex Verify is an Apache-2.0-licensed, Node-based tool from the single-maintainer GitHub project apex-engine-dev, introduced in a Show HN post on 23 November 2026. It checks code changes by having a separately configured model write task-based tests, confirming those checks fail on the old code, then running them against the change alongside the project’s tests and a scan for test tampering. It returns ready, not ready, or unknown, and can run as a CLI, Claude Code or Gemini CLI hook, MCP tool, or GitHub Action. The repository reports benchmarks, but these are developer-run and no independent validation or adoption evidence is supplied.

Why it matters

As coding agents produce more changes, a key bottleneck is establishing whether they fulfilled the request—not merely whether existing tests pass. Apex Verify’s notable idea is to use a separate model to turn the task into checks, then test whether those checks distinguish the old code from the new. If reliable, that could add a portable verification layer to agent workflows and CI, making it easier to catch plausible-but-wrong changes. The reported results are promising but preliminary; the tool explicitly misses errors and can falsely reject good changes, so its verdict is evidence, not proof.

Current assessment

New: the project presents an available open-source verification tool with CLI, hook, MCP, and GitHub Action integrations. Its method generates checks from the task rather than the agent’s tests, discards checks that do not fail on old code, runs checks on the change, compares project tests before and after, and scans for possible test tampering. For supported languages it generates checks for Node, Python, Rust, and Go test frameworks; other stacks still get existing-test and tampering checks. The maintainer reports results from 200 AI-written changes based on real historical fixes across 23 open-source libraries: about 80 of 100 wrong changes were stopped, while 14 of 107 wrong changes were still called ready. The repository says 11 of 100 good changes were stopped by the benchmark’s hidden-test label, but a post-hoc manual audit found four were checker mistakes and six arguably failed the stated task; the audit was by one reviewer, so the lower false-alarm estimate is uncertain. These are author-reported results, using Gemini-generated changes and one run per case, with a lopsided dataset; no independent replication, adoption figures, or external benchmark are supplied. The project says checks run in sandboxes where the platform allows, sends the task and relevant source (up to about 24 KB) to the chosen model provider, and claims no telemetry. It does not claim to prove correctness or replace review and CI. Codex and Cursor hook configurations are documented but not tested inside those applications. The evidence supports tracking as a practical experiment in agent verification, not treating its benchmark or readiness verdicts as established assurance.

Measured heat

now 0 pts/hpeak 2 pts/hcomments 0/hpeers p10momentum: steady2 platformsage 75h
points/hour across evidence · reading as of 2026-11-27 02:23:58.509736+11:00 · deterministic, not a model opinion

How the heat travelled

11-23 12:24 (minted)⭐ origin echo-reconstructedThe project says a different model writes checks from the task, verifies that they fail on the old code, and runs them against the change; i
apex-engine-dev on github (echo) · attributed from hn.story.50610493 · published time unknown
—
11-23 11:55first on hacker news · published · lag ?Show HN: Apex verify – an independent model writes the checks your AI skipped
amitspitzer
—
11-23 11:55amplified on hacker news 👑hn.story.50610493
amitspitzer
peak 1 · 1 comments · 103% of case engagement
11-23 12:22our radar first saw it · lag ?discovery anchor: hn.story.50610493—
pace: p32 vs 2088 stories at the 72h mark (now 75h old) — ahead of a100-inference-hillclimb (2.0x), behind agentfx-agent-animation-tool (0.7x)

Evidence (2) — ⭐ canonical anchor

sourceobjectauthorscorecomments
🟧 hnShow HN: Apex verify – an independent model writes the checks your AI skipped
Retrieved article excerpt

Open article · Retrieved 2026-11-23T12:23:43.374933+00:00

# Apex verify

**Your AI said it's done. Is it really done?**

Catch the AI code changes that pass your tests and are still wrong.

[CI](https://github.com/apex-engine-dev/apex-verify/actions/workflows/ci.yml)
[License: Apache-2.0](https://github.com/apex-engine-dev/apex-verify/blob/main/LICENSE)
[Node 20+](https://camo.githubusercontent.com/df802c49087f013802fe1fc7e111c300339a610880657379e7e208fc6e12f334/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6e6f64652d25453225383925413532302d627269676874677265656e2e737667)
[Stars](https://github.com/apex-engine-dev/apex-verify/stargazers)

[Terminal: an AI agent changed a slug function and the project's tests pass; apex verify then says NOT READY: expected hello-world, actual hello-world!](https://github.com/apex-engine-dev/apex-verify/blob/main/docs/assets/demo.gif)

AI coding agents say "done" when the tests pass. But the tests only check what somebody wrote down. **Apex verify** takes the change an AI made and the task you gave it, has a *different* AI write the missing checks, proves those checks can fail, runs them next to your own tests, and answers `ready`, `not ready` or `unknown`, **with the evidence**. It works on a copy of your code, so your project is never touched.

It checks any change: the working tree an agent just edited, a branch, or a diff from any tool or person. It can also stand in the agent's way (a Claude Code and Gemini CLI hook that blocks "done") and gate pull requests (a GitHub Action).

## Try it in 5 seconds

No key, no project, nothing to install:

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

A pretend agent "fixes" a slug function and says done; its project's own tests pass. Apex verify catches what they missed:

```
apex verify: NOT READY

  - 1 check written from the task fails on the new code
      check: drops punctuation, not just commas
        expected: hello-world
        actual:   hello-world!
      fix: Make the change satisfy the behaviour in the task; the failing check output shows what is expected.

  tests: 2 passed, 0 failed
  checks: 2 passed, 1 failed; written from the task; they fail on the old code
```

## Use it on your own project

You need Node 20+, git, and an API key for the model that writes the checks (use a different, ideally stronger model than your agent's).

```
export GEMINI_API_KEY=...        # or OPENAI_API_KEY with --provider openai --model <id>
cd your-project                  # a git repo where an AI just made a change
npx --yes https://github.com/apex-engine-dev/apex-verify/releases/latest/download/apex-verify.tgz verify "what you asked the AI to do"
```

It downloads a 48 KB file (about 2 seconds), changes nothing in your project, and prints a verdict. Exit code `0` is ready, `1` not ready, `3` unknown. No key? Add `--no-model`: only your tests and the cheating scan run, and the verdict is at most `unknown`.

## Put it where the change happens

**Claude Code**: block "done" until the change is ready.

```
/plugin marketplace add apex-engine-dev/apex-verify
/plugin install apex-verify@apex
```

Run in a real Claude Code session: Claude said done on a wrong change, the Stop hook blocked it with the failing checks, and it kept being stopped (at most 3 times, so a wrong check can never trap it).

**GitHub pull requests** (any agent, Copilot, Cursor cloud, or a person): a verdict comment and a required check.

```
- uses: apex-engine-dev/apex-verify@v1
  with: { api-key: "${{ secrets.GEMINI_API_KEY }}" }
```

**Gemini CLI**: an `AfterAgent` hook (run in a real session). **Any MCP client**: the `verify_change` tool. **Codex CLI and Cursor**: stop hooks written to their documented formats and tested with synthetic input, **not yet run inside those apps**. Copy-paste configs: [docs/INTEGRATIONS.md](https://github.com/apex-engine-dev/apex-verify/blob/main/docs/INTEGRATIONS.md). What is and is not tested, per use case: [docs/USE-CASES.md](https://github.com/apex-engine-dev/apex-verify/blob/main/docs/USE-CASES.md).

## How it decides

1. **Builds the change on a copy** (your working tree, a branch, or a diff file).
2. **Scans for cheating**: tests deleted, skipped, focused with `.only`, a test script that cannot fail, edits to the agent's own configuration. (`--lock-tests` restores the original tests before they run.)
3. **Runs your tests** before and after: a test that passed before and fails now is a regression. A type check counts too if you have one.
4. **A different model writes checks from your task**, never from the agent's own tests. Checks are written for node:test, pytest, Jest, Vitest, Rust (`cargo test`) and Go (`go test`); other stacks still get your tests and the scan.
5. **Proves each check can fail** by running it on the old code first. A check that passes there proves nothing and is thrown away.
6. **Runs the checks on the new code** and answers `ready`, `not ready` (the failing check, expected vs actual, and a hint an agent can act on) or `unknown`. **Never a silent pass.**

Generated checks and your tests run in a sandbox where the platform allows: macOS Seatbelt, Linux bubblewrap, Windows AppContainer (all tested in CI; [limits](https://github.com/apex-engine-dev/apex-verify/blob/main/docs/SANDBOX.md)). Reports can be signed (`--sign-key`), and `--badge-out` writes a README badge.

## Does it work? The honest numbers

**The short version: on 200 AI-written changes to real open-source libraries, your tests plus a cheating scan stopped none of the wrong ones; Apex verify stopped about 80 in 100, and it wrongly stopped about 4 in 100 good changes (11 by the strictest count).** It still misses some, so treat `ready` as strong evidence, not a proof.

How we know: we collected AI-written changes and knew which were wrong, using hidden tests Apex verify never saw. A "wrong" change looks fine and may pass the visible tests but does not do what the task asked.

[Out of 100 wrong AI changes: tests plus a cheating scan stop 8 on small projects and none on real libraries; Apex verify stops 52 to 80](https://github.com/apex-engine-dev/apex-verify/blob/main/docs/assets/results.svg)

|  | Wrong changes stopped | Good changes wrongly stopped |
| --- | --- | --- |
| Your tests + the cheating scan | about **8 in 100** (none on the real libraries below) | not separately measured |
| **Apex verify**, 17 small projects (108 changes) | about **65 in 100** (52 on the 12 public projects you can rerun) | about **3 in 100** |
| **Apex verify**, 23 real open-source libraries (200 changes, each task a real historical bug fix) | about **80 in 100** | **11 in 100** by the hidden-test label; **about 4 in 100 after a hand audit** ([why](https://github.com/apex-engine-dev/apex-verify/blob/main/benchmark/results/real-projects/README.md)) |

- **It still misses a lot**: about a third of wrong changes on the small projects, and 14 of 107 wrong changes on the real libraries were called `ready`. It is not a proof of correctness.
- **The "11 vs 4" is the honest part.** We checked the 10 good-by-label changes it stopped: for 6, the change really did not do what the task text said (the upstream test was narrower than the task). Four were checker mistakes. One reviewer did that audit after seeing the numbers, so treat 4 as an estimate.
- **A checker from another company works about as well** (Claude 55 in 100 vs Gemini 63 on the same changes), and **two checkers that must agree did not help** ([experiments, including what failed](https://github.com/apex-engine-dev/apex-verify/blob/main/docs/EXPERIMENTS.md)).
- Limits: Gemini models wrote every change, one run each, the real-library set is lopsided. Everything is rerunnable: `node benchmark/run-gate.mjs`. **Please try to break it**: a wrong `ready`, or a `not ready` on a good change, is the most useful bug report we can get.

## What it will not do

- **Prove correctness.** It raises the bar; a check can be wrong in both directions.
- **Replace review or CI.** It runs next to them. Run it *in* CI with the Action.
- **Send your code anywhere but the checker you choose**: your task and the relevant source files (about 24 KB at most) go to the model you configure. No telemetry.

## Questions

**Isn't this just CI?** CI runs the tests that exist. The pain is the change nobody wrote a test for, or the test the agent deleted or skipped. Apex verify writes the missing checks, proves they can fail, and flags tampering.

**What does it cost?** One model call per task to write the checks (reused while an agent retries the same task), plus a short second look when a check fails. Seconds and cents. Your tests run locally.

**What if the checker is wrong?** You get `not ready` on a good change or `ready` on a wrong one; the table above shows how often. A suspect check is turned into `unknown` by a second look, the hook never blocks more than 3 times, and `APEX_MODE=warn` never blocks.

**Why a different model?** A model grading its own work shares its blind spots: in our runs a weak model writing checks for its own change blocked over half of the good changes.

## Contribute

If it catches something for you, a ⭐ helps others find it. If it gets something wrong, [open an issue](https://github.com/apex-engine-dev/apex-verify/issues/new/choose): we add your case to the benchmark and credit you.

| You can | Where |
| --- | --- |
| **Cut the remaining checker false alarms on real libraries** (about 4 in 100) | [issue #20](https://github.com/apex-engine-dev/apex-verify/issues/20) |
| **Run the Codex or Cursor hook** inside the real app and tell us what you saw | a pull request or issue |
| **Add a language or test runner** | issues labelled `good first issue` |
| **Be a second maintainer** | [GOVERNANCE.md](https://github.com/apex-engine-dev/apex-verify/blob/main/GOVERNANCE.md) |

There is currently **one maintainer**; expect replies in days, not hours.

**What is in this repository**

- **[`packages/cli`](https://github.com/apex-engine-dev/apex-verify/blob/main/packages/cli)**: `apex verify`, the stop hook, the MCP server, the output formats.
- **[`packages/engine`](https://github.com/apex-engine-dev/apex-verify/blob/main/packages/engine)**: the verification engine (writes and runs the checks, runs your tests, the sandboxes). It contains more than `verify` uses; see [docs/ARCHITECTURE.md](https://github.com/apex-engine-dev/apex-verify/blob/main/docs/ARCHITECTURE.md).
- **[`benchmark/`](https://github.com/apex-engine-dev/apex-verify/blob/main/benchmark)**: labelled AI-written changes, the 12 public projects and 23 real-library tasks, results, and the script that re-measures the gate.
- **`action.yml`, [`integrations/`](https://github.com/apex-engine-dev/apex-verify/blob/main/integrations), [`.claude-plugin/`](https://github.com/apex-engine-dev/apex-verify/blob/main/.claude-plugin), [`docker/`](https://github.com/apex-engine-dev/apex-verify/blob/main/docker)**: the GitHub Action, the Claude Code plugin, the container recipe.
- **[`docs/`](https://github.com/apex-engine-dev/apex-verify/blob/main/docs)**: [integrations](https://github.com/apex-engine-dev/apex-verify/blob/main/docs/INTEGRATIONS.md), [what works and how we know](https://github.com/apex-engine-dev/apex-verify/blob/main/docs/USE-CASES.md), [sandbox](https://github.com/apex-engine-dev/apex-verify/blob/main/docs/SANDBOX.md), [related work](https://github.com/apex-engine-dev/apex-verify/blob/main/docs/RELATED-WORK.md), [experiments including failures](https://github.com/apex-engine-dev/apex-verify/blob/main/docs/EXPERIMENTS.md).

[Contributing](https://github.com/apex-engine-dev/apex-verify/blob/main/CONTRIBUTING.md) · [Roadmap](https://github.com/apex-engine-dev/apex-verify/blob/main/ROADMAP.md) · [Security](https://github.com/apex-engine-dev/apex-verify/blob/main/SECURITY.md) · [Status](https://github.com/apex-engine-dev/apex-verify/blob/main/docs/STATUS.md) · [Changelog](https://github.com/apex-engine-dev/apex-ver
amitspitzer11
🟧 echo.github ⭐The project says a different model writes checks from the task, verifies that they fail on the old code, and runs them against the change; iapex-engine-dev——

Interpretation history

Decision trace