Case ledger 002 · weekly post
We run a fleet of coding agents that build and review software, and the whole thing rests on a verifier: a pipeline that checks the agents' work in three steps and delivers a verdict. This week we found the one drawer the verifier never checked: its own memory. The cache of past verdicts accepted new entries with no proof they were ever judged, and replayed them as trusted. The docstring confessed.
Three pieces of vocabulary, defined once, then used straight:
The verifier. A pipeline with three steps. A solver does the work. A judge grades the evidence. A gate delivers the verdict: CONFIRMED, REFUTED, or ABSTAINED (the gate's way of saying "I don't know"). The system is organized around not trusting: the judge doesn't trust the solver, the gate doesn't trust the judge.
The verdict cache. A notebook of past decisions. Judging costs money and time, so when a claim the pipeline has seen before comes back, it looks it up. On a hit it replays the stored verdict instead of re-running the judge and the gate. This notebook is the fleet's durable memory of what has already been decided.
The write path. The moment something gets written into the notebook. Every notebook needs a rule about who gets to write in it, and a way to check the rule. Provenance is the check: a marker proving who wrote an entry and when, so a later reader can tell a real judgment from a forgery.
The rule for our notebook was: only the live judge-and-gate pipeline may write entries. The problem is that the rule was a sentence in a code comment, not a check in the code.
The write function inspects what you hand it with real care. Is the key the right shape? Is the panel the right type? Is the verdict one of the three legal words? Hand it the wrong shape and it throws you out loudly. But it never asks the one question that matters: was this verdict actually produced by a live judge and gate? And there is no field on the entry that could answer it. Six fields (key, panel, verdict, stored_at, hits, judge_version, measured), and none of them says which run produced it.
So a well-typed forgery, a CONFIRMED for a claim no judge ever saw, is stored silently and replays as a trusted hit. On replay the code skips the judge, the gate, and the evidence caps, and announces the verdict with full ceremony. The code says so itself, in a comment on the replay path:
# Replay path: the judge and the gate never run.
The mechanism: the write path validates shape but never origin; the replay path trusts whatever the cache holds.
The docstring on the write function reads, in full:
"""Only the live judge+gate path in verify_claim calls this —
forced-ABSTAIN verdicts, transport failures, and cardinality
mismatches never reach it (placement, not a flag)."""
Read that parenthetical twice. It admits the mechanism outright: the rule holds because of where the code sits, not because anything enforces it. Placement, not a flag. Prose, not enforcement.
Picture a bouncer who checks IDs with a magnifying glass: correct font, correct size, the hologram in exactly the right place. But he never checks whether the ID is yours. A perfect forgery walks in every time. Our write path is that bouncer: loud about shape (3 isinstance checks, measured), silent about source (0 origin checks, measured). And the forgery, once inside, is honored for a full hour, 3,600 seconds (measured, the cache's default TTL), with the judge never re-running.
This is not a vulnerability an attacker can exploit from the outside. Writing to the cache requires running code inside the process, and the cache is opt-in. The strongest objection to this finding says it plainly: in a single-process system with one caller, placement is the validation, and a provenance check would be theater.
The objection is half right, and the half it gets right matters, so we keep it. What it misses is erosion. Tests get written. Demos get built. Refactors move callers. A sentence in a docstring does not survive contact with a busy codebase; a check in the code does. Then add the economics: the cache is designed to be used aggressively, every avoided judge call accrues budget the pipeline spends on deeper verification elsewhere, so the write path is exactly where the load concentrates. Then add the compounding: one bad write doesn't cost one bad decision, it costs every lookup for the full hour. The book this finding came from has a line for it: "Memory is not neutral. If incorrect information is stored as truth, future reasoning compounds the error."
So the finding survives the objection in downgraded form: not an exploitable hole, an unenforced invariant on a load-bearing write path. That is precisely the class of defect our system exists to close.
The machine that found this is a research sensor with a standing rule: if the mechanism's presupposed code doesn't exist in the repo, the transfer is refuted, no matter how exciting the paper. It used that rule all week. One example: a proposal to share KV caches across review judges died on code search, zero hits, no shared inference engine, no judge fan-out, refuted as stated. This one survived the rule: the gap was verified against the live code, twice, with an executable test pinning it.
The machine that judges the judges had a drawer it never checked, and the machine that refutes transfers found it.
The fix has a defined shape and a defined test: a write-time provenance binding, some non-forgeable marker from the live pipeline run, checked in the write function. The acceptance bar is already written: the same six tests that reproduce the gap today must fail once the binding exists, a fabricated entry refused at the door. Status as of this morning: verified on current main, still open, queued for the work loop.
Scientist appendix
agentgate's verdict cache (E-0049, verify/verdict_cache.py) performs
write-path trust escalation in miniature: store() validates the types of
(key, panel, verdict) but performs zero provenance checks that the pair was
decided by a live judge+gate run; CacheEntry carries no run binding; on
CacheHit the pipeline replays the stored verdict with the judge and the
gate skipped. A well-typed fabricated CONFIRMED stores silently and replays as trusted.
Class: unenforced invariant on a load-bearing write path (design gap), not an
exploitable vulnerability.
verify/verdict_cache.py @ main
d3dcf86b): the write path has isinstance checks but no
name in it refers to provenance, run identity, a pipeline marker, or a binding;
CacheEntry's pinned field list is exactly
[key, panel, verdict, stored_at, hits, judge_version]; the single-writer
invariant appears only in the store() docstring ("placement, not a
flag"); the lookup path gates only on TTL expiry and environment fingerprint. Two
behavioral tests on a faithful extraction of the trust boundary: a fabricated
CONFIRMED replays as trusted; a malformed verdict is refused loudly while
fabrication is silent.1767cf2c
(measured via the GitHub API, 2026-10-11):
_store_locked contains zero references to provenance and raises
CacheStoreRefused on type mismatches; CacheEntry has six
fields, none binding the entry to a producing run; store()'s docstring
still carries "(placement, not a flag)"; the default TTL is 3600.0 seconds;
pipeline.py's replay path carries the comment "the judge and the gate
never run."Evidence levels. Code facts: established (read from the repo at two SHAs). Test outcomes: measured (three local runs). The transfer itself: an adaptation (the chapter's untrusted-input attacker generalized to invariant erosion by any off-path writer). The book's claims: established from chapter text.
f2ceb693 via the GitHub API: replay path skips judge+gate
(pipeline.py), store() validates types only, no run
binding anywhere. Test re-run 6/6 green. Promotion-eligible (bars 1+2+3: executable
test; owner agentgate / deep candidate; lane slot available). Left in TRIAGE;
promotion is a work-loop decision, not taken by the sensor.1767cf2c (fields, checks, and docstring all unchanged in the relevant
respects). Test re-run 6/6 green, 0.11s.store() refuses a well-typed fabricated
entry, because a write-time provenance binding exists and is checked.CacheEntry carries a non-forgeable marker of the producing pipeline
run, verified on the write path.verify/verdict_cache.py @ 1767cf2c, store() and its docstring, the "(placement, not a flag)" admission at L759._store_locked, type checks raising CacheStoreRefused, zero provenance references.CacheEntry, six fields, none binding the entry to a producing run.verify/pipeline.py replay path, "the judge and the gate never run."f2ceb693, the verification point of 2026-10-08.