Try the demo

Blog

Breaking our own verifier, 1 614 times

We made small breaking changes to the code that checks approvals, one at a time. Our tests missed 511 of them. What we did about it.

The verifier decides whether an agent may act. If it accepts one thing it should not, little else we built matters. Tests passed. That does not say whether a test would notice if the code were wrong.

Mutation testing

So we changed the code on purpose, one small edit at a time: reverse a comparison, drop a condition, delete a refusal. After each edit, at least one test must fail. If none does, nothing is guarding that line.

Count
Changes made1 614
Noticed by the tests, first run1 103
Missed511

Closing the gap

Most of the missing tests became vectors: cases written as data, with an input and the expected answer. Eight SDKs run the same vectors, so a case that caught a hole in Python now protects Go, Rust and PHP too. There are 453 for services and 122 for agents.

Some missed changes pointed at redundant code, which we deleted. The rest change no behaviour, and each is listed with its reason.

Two were real defects:

  • a document dated in the future was accepted;
  • a vouch signed with a revoked key still counted.

Both are fixed.

A second opinion in code

The reference verifier has a twin that shares no code with it. Both must give the same answer on every vector, so a misreading of the specification has to happen twice to survive.

What this does not cover

The mutations cover the Python reference's verifier and agent, not the other SDKs' own code. Hardware attestation is tested with simulated certificates. Identity providers are tested in sandboxes or simulators. No independent auditor has looked at any of it yet. The trust page keeps the list.

Next postMake your app ready for agents