AxiomCode Verify an artefact

14 November 2026 · Lean 4 proof

Agent harness — trace-ledger gatekeeper

The gatekeeper that decides what may be appended to our agent harness's trace ledger must refuse any entry whose stated origin is blank or unregistered for its lane — and a refusal must leave the ledger untouched. Proved in Lean 4 against the strengthened code, including the fail-closed case: an empty or unreadable registry refuses everything.

Proven Lean 4 proof

What was proven

  • A blank origin is refused, by name. An entry whose stated origin (its provenance) is empty or all whitespace is turned away, and the refusal carries the reason.
  • An unregistered origin is refused, by name. An entry whose stated origin is not on the registered list for its lane is turned away with a refusal that names the origin and the lane. Registration for a different lane does not count.
  • Acceptance means a registered origin. Every entry the gatekeeper accepts carries an origin string that is registered for its lane — and therefore non-blank.
  • A refusal leaves the ledger untouched. When the gatekeeper refuses, no append happens: the ledger's state after the refusal is exactly what it was before.
  • An empty or unreadable registry refuses everything. If the registered-origin list is empty — or cannot be loaded at all — every candidate entry is refused. The gate fails closed.

What was not proven

  • Membership is not signing. The proof establishes that an accepted entry's origin string is on the registered list. It does not establish that the named origin actually wrote the entry: there is no signature anywhere in this append path, no key, and no check that would catch a caller simply claiming a registered string.
  • The proof is about a model of the code, not the running code itself. The model mirrors the gatekeeper's decision logic step for step, and the correspondence is documented and reviewed — but it is not itself machine-checked. A proof of the model is not a proof of the running program.
  • Writing and storage sit outside the proof. The 'ledger untouched' result covers refusals, where nothing is written. A failure during the write itself — for example a storage error part-way through an append — could leave a partial record; neither the code nor the proof rules that out.
  • Concurrency sits outside the proof. The gatekeeper takes no lock; two writers appending at the same moment are not covered by these theorems.
  • The module's own path is what is covered. The ledger is a file, and the proof covers appends that go through the gatekeeper. It cannot prevent other code from writing to the file directly: 'appends only through the gatekeeper' is a property of the module's own paths, not a boundary the proof enforces.
  • The hash chain is a separate law, not claimed here. That a later edit to a recorded entry is detected by the chain is a different property, and this proof does not cover it. That property has its own published reports in this register: the chain immutability proof, and the anchored chain proof that answers the chain's own stated boundary. The chain is hash-linked; it is not signed.

How it was verified

Lean 4 formal proof (toolchain v4.22.0), checked by the Lean kernel. The proof compiles with no placeholder steps (no sorry, no admit) and depends on no axioms beyond Lean's core three. The subject of the proof is the gatekeeper's append-path decision logic, modelled step for step from the code as built.

How this report came to be

This law was first proved on 2026-11-14 in a weaker form: an entry needed only a non-blank origin. Comparing the claim against the code showed the weaker form was all the code enforced, so the code was strengthened first — origins must now be registered per lane, fail-closed — and the stronger law was then proved against the strengthened code. Both proofs stand; this report states the current, stronger law.

← All verification reports · How the practice runs