Short answer: Shedrack Aji's Mandata project published a conformance
corpus for MMF - the Mandate Format that describes what an agent is
allowed to spend. 92 vectors, sha256-pinned, opinionated. Instead of
claiming we conform, we ran the corpus against our actual production
spend gate - the code that guards real x402 payments, warts and all.
35 vectors pass as-is. 7 expose real bugs we are now fixing in a
separate epic - plus four more bug classes our own probes found while
we were at it. 33 describe a model we deliberately do not implement.
15 test dimensions our system simply does not have. We wrote the
classification rules before we ran the suite, committed the raw
per-vector JSON, and sent the divergence table back to the spec's
author for review. His rulings moved one of our classifications,
opened a v0.5 spec proposal, and turned the run into the third
implementation of MMF - the first, in his words, "written against
the spec rather than alongside it." This post is the methodology
and the receipts.

One gate, four scoreboards. There is no "92/92" to claim.
This is part of the Arc campaign series. Previous episode: your
users' complaints are now an agent's training data - feedback
infrastructure live (EPIC-230). This article
is EPIC-255: conformance as an audit, not a badge.
Why run somebody else's test suite at all?
Because a spec you didn't write is the only test that can surprise you.
For a junior: a "mandate" is the rulebook an AI agent carries when it
spends money - how much per transaction, how much per day, who it may
pay, how fast it may act. Mandata's MMF - Shedrack
Aji's
open-source spec and Python reference
gate, published alongside a
peer preprint - is one
concrete proposal for that rulebook, with a twist we like: a
published conformance corpus - 92 JSON vectors where each says
"given this mandate and this request, the gate must answer allow or
deny, and here is why."
Our own gate grew differently: a velocity window, per-tx and daily
caps, suspended wallets, a deny ledger. It works - but every test it
had ever faced was written by us. A corpus written by somebody who
never saw our code is a different kind of mirror.
The rule we set before running anything, agreed with Shedrack:
We test the implementation we actually have, not the implementation
we wish we had.
No production edits to make vectors pass. No emulating MMF semantics in
the harness. Where our model lacks the construct a vector exercises,
the vector gets classified - not faked.
Two more ground rules came from Shedrack before the first run: pin the
corpus to a tagged release (v0.4.24), not main - so every delta is
attributable to a fixed corpus version - and track the findings in a
shared issue on the Mandata repo, where the comparison note would
naturally start. Both became load-bearing decisions.
The machinery: scalar projection, not translation
MMF speaks max_amount, total_budget, velocity_limit,
prior_txns, tx.at. Our gate speaks perTxUsd, dailyUsd,
maxTxPerHour, seeded ledger entries, fake timers. The adapter
projects MMF fields onto our knobs - and every projection carries an
equivalence grade that is part of the result:
-
Exact - same semantics (
max_amount→perTxUsdin cents) - Partial - mechanism exists, semantics differ (MMF velocity window is 86 400 s; ours is 3 600 s)
-
None - no counterpart (claim handshake,
tx_iddedup, expiry)
Verdicts land in one of six statuses: PASS, DIVERGENCE-BUG (our
code violates its own contract), DIVERGENCE-MODEL (intentional
design difference), NOT_MAPPABLE (dimension doesn't exist),
GATE_EXCEPTION (enforcement threw - denied, no record),
HARNESS_ERROR (our adapter broke, not the gate).
Every vector runs the real request pipeline - wallet resolution,
registry lookup, enforcer, ledger - through actual Hono contexts on
fresh stores. 43 vitest cases regenerate results/*.json, which we
commit as the reference. Determinism is a requirement, not a hope: two
runs must produce byte-identical output.

The corpus drives production code. The harness only observes and
classifies - it never reimplements the spec it is measuring.
The scoreboard - four numbers, not one

Different tracks measure different contracts. Merging them would hide
the interesting parts.
| Track | n | PASS | BUG | MODEL | NOT_MAPPABLE | GATE_EX |
|---|---|---|---|---|---|---|
| spend-decision | 36 | 20 | 5 | 3 | 7 | 1 |
| delegation | 18 | 4 | 0 | 13 | 1 | 0 |
| lifecycle | 29 | 2 | 2 | 17 | 7 | 1 |
| crypto/evidence | 9 | 9* | 0 | 0 | 0 | 0 |
* the honest asterisk: those 9 PASS mean our test-side §5.6/§7
canonicalizer and Ed25519 signer reproduce Mandata's pinned bytes
exactly - good news for interop. Our production auth is EIP-191 wallet
signatures; MMF's credential model and evidence hash chain do not exist
on our side. We record that as equivalence None, not as conformance.
Seven bugs the corpus caught (and one it inspired)
This is the part most conformance posts skip. Ours didn't.
-
Unsafe amounts create live reservations -
0, negative, string-typed and-0amounts all reserve successfully. Nothing validates amount sanity before the ledger write. (V04, V17, V29, V33 - 4 of the 5 spend BUGs.)

One row of the committed JSON - V04, a $0 spend that reserves
successfully.
-
Malformed input reaches the gate and passes - a
payeecontaining a lone UTF-16 surrogate parses fine, and the spend is allowed. The spec requires rejecting malformed input before evaluation - and the spec author confirmed that "we don't have a validation stage" is not an exemption, it is exactly the gap the vector exists to catch. V36 was reclassified MODEL → BUG after his review - this is why the audit went to the author before the article. -
Velocity evasion via void - our rate counter counts live
reserved|settledentries;releaseddrops out. An authorize→void→authorize loop walks straight through the tx-per-hour limit. MMF counts issued authorizations - the safer semantics. (L05, L09.) -
Check-then-insert race - a synchronized probe parked 8 parallel
begin()s between the cap check and the insert: all 8 reserved, $160 against a $100 cap. Then we ran it naive - 32 concurrent calls on the in-memory backend: $320. The comment inenvelope.tsclaiming synchronous backends can't interleave between awaits is empirically false. -
Corrupted ledger = open gate + data loss - a malformed
ledger.jsonparses to "empty", caps see zero usage, the spend is allowed… and the next insert silently overwrites the file. Fail-open and history destruction in one path. - Denied with no trace - registry-failure and unregistered-wallet denies return errors but write no ledger entry, emit no alert. Invisible denials are un-auditable denials.
-
Retries double-charge caps - all seven call sites that reach the
gate use static or random
refIds; none are dedup keys. A retried request is a second spend, by design of nobody.

Three of the bug classes, drawn. The fourth lives in a comment that
turned out to be false.
All seven are filed into EPIC-234 (hardening) with priority order -
the corpus found them, the corpus doesn't fix them.
The model differences we stand behind
33 vectors diverge because our gate deliberately isn't MMF-shaped:
-
No stored decisions. MMF emits
REPLAY/TX_CONFLICTbecause it remembers verdicts. We re-reserve - a repeattxis a new reservation. That is the single biggest divergence class and the most instructive one: it turns a spec question (should replay be idempotent?) into a product question (should a retried debit be free?). -
No claim/dispatch slot. MMF interposes
CLAIMEDbetween reserve and settle; we settle directly from reserved. Eight lifecycle vectors are un-runnable for lack of the state - reported asNOT_MAPPABLE, not skipped. -
Delegate clamps, not rejects. Delegate spend clamps to the owner
cap where MMF expects
invalid. Open question for Shedrack: is the verdict load-bearing, or is enforcing the effective bound enough? -
Coarser revocation.
mandate.revokedmaps to wallet-levelsuspended- Partial. We suspend the wallet, not one mandate.
What the run did to the spec
The divergence table didn't just describe Mandata - it changed it.
We sent Shedrack eight spec questions alongside the delta
findings before this
post went anywhere: where a classification could legitimately move,
his ruling was the tiebreaker. Most held. One moved - V36, already
counted among the bugs above, went from a model difference we stood
behind to a hole we now own.
The delegation question - our 13 MODEL-class divergences, where we
clamp delegate spend to the owner's cap instead of rejecting - he
turned into a spec proposal: ashedrack/mandata#33, a v0.5 draft for
optional clamp
semantics with 21
fresh vectors (K01–K16, KD01–KD05) exercising authorize-by-effective-cap,
replay conflict, and claim binding. Both sides reviewed the draft; the
shape froze at a91b7f4 with three of our asks in it - effective_cap
mandatory on clamped decisions, an explicit line that a check id on an
allowed decision names the adjusting bound (not a denial), and a §7
sentence marking the "same amount, new tx_id, after a cap change" gap
as deliberately deferred pending a tighten op - the honest bookmark the
future tighten proposal hangs on. Running
those 21 through our TypeScript harness is the next epic; the corpus
that audited us is getting vectors we co-designed.
While this post sat in draft, Shedrack merged his own zero-dependency
TypeScript port - gate,
lifecycle, credentials, evidence, all 92 vectors byte-identical to the
Python reference. MMF now has three implementations. Ours is the only
one not written by the spec's author - the part that matters, because a
same-author port cannot surface spec ambiguities the author already
knows the intended answer to. His framing for the writeup, better than
anything we drafted: the first implementation written against the spec
rather than alongside it.
One honest caveat he asked us to name, and we will: the replay and
conflict paths - REPLAY, TX_CONFLICT, the stored-decision machinery -
are the part of the corpus he most wanted a second implementation to
exercise, and they are exactly where our model reports NOT_MAPPABLE.
An independent gate still hasn't exercised them. His ts/ port's
idempotent tx_id dedup is now the working reference for the
decision-store work our run flagged as missing - which is what honest
NOT_MAPPABLE is for: naming the gap, not hiding it in the tail.

The divergence table goes to the spec author before the post goes to
the feed. Divergences are rows to discuss, not scores to hide.
What the audit itself was worth
Beyond the corpus we probed our own invariants - tagged
source:"own-invariant" so they never inflate MMF numbers:
- Race matrix: the check-then-insert window reproduces on every backend, not just Postgres-shaped ones.
- Evidence matrix (7 deny branches × 6 fields): emit-branches always leave durable denied entries + typed alerts; exception branches leave nothing.
-
Caller table: all 7 entry points audited for idempotency - and a
dead path found:
spendAsDelegateexists, fully implemented, wired to nothing.
A conformance run doubles as a code review when you let it.
Reproduce it
git clone -b mmf-255 git@github.com:spreadzp/agentbadge.git
cd agentbadge && bun install
bunx vitest run tests/conformance/mmf/ # 43 tests
sha256sum -c tests/conformance/mmf/vectors/CORPUS.md # corpus integrity
Corpus pinned at tag v0.4.24 (commit 9aba772), results committed as
tests/conformance/mmf/results/*.json, mapping rationale in
MAPPING.md, bug triage in EPIC-234-CANDIDATES.md. The suite needs
no network, no credentials, no database.
Independently verified
The committed reference didn't just survive our own re-runs. Four
independent models - SWE-2 Max, Nemotron 3.5 Lightning High, GPT-6
Luna, and Claude Haiku 5.5 - each cloned mmf-255 fresh, installed,
and ran the suite with no access to our working tree. All four
reported clean: 43/43 tests green, results/*.json regenerating
byte-identically, corpus sha256 5/5 intact. Convergent findings from
that review reclassified two vectors (NOT_MAPPABLE → MODEL) via a
test-only fix in faa882dc - the production gate the vectors measure
was not touched. One disclosed shortcut, in the spirit of this post:
the planned cloud-agent verification run was quota-blocked, so the
four-model quorum above is what stands.
The point
Anyone can say "we conform." A conformance audit says: here is the
spec, here is our gate, here are the seven places we break our own
contract, here are the 33 places we disagree on purpose, and here is
the machine-readable evidence you can regenerate in one command. The
findings live in the open on the Mandata repo - delta
findings, spec
questions and rulings,
the v0.5 proposal they
spawned - and the
co-authored comparison note grows out of that thread, because a
divergence list two parties signed is worth more than a badge one
party granted itself.
If your agents move money, your gate has a spec - whether you wrote it
down or not. Somebody else's corpus will find it for you.
Next in the series: EPIC-234 - fixing what the audit found. Then the
v0.5-clamp run: 21 vectors that exist because this audit disagreed
honestly.
Canonical post lives at https://agentbadge.xyz/blog/arc-c56-mmf-conformance-audit
Top comments (0)