Evidence and Notebooks
The layout of a run directory, every field of result.json, what --verify checks, how runs are filed in the repository, and how to reproduce one.
A run directory
result.json the record
notebook.md rendered from result.json; quotes its sha256
notebook.ipynb the same, as a Jupyter notebook
SHA256SUMS "<sha256> <relative path>" for every other file
runs/<check-id>/ per check: the logs; Lean: accept.log, export.lean, export.log;
Rocq: one Bind_<decl>.v and its log per statement;
computations: run.log, record.json (the program's JSON output)
runs/<control-id>/ per control: the mutated file or binding file, and its log
result.json
| Field | Content |
|---|---|
schema, investigation, name, title |
identifiers |
run_id |
UTC timestamp and a random suffix, e.g. 20261113T161233Z-9c5ae090 |
started, finished |
UTC times |
contract |
path, sha256, version, status of the contract used |
environment |
image_id, mathenv_build_info_sha256, lean_command, rocq_command, lean_version, rocq_version, core_lean_command, core_lean_version, python, sympy, source_commit, source_tracked_files_modified, source_tracked_changes (status lines and which, if any, differ in content), checked_files_vs_commit (per file: sha256 now, sha256 at the commit, identical) |
evidence_kind, tutorial |
from the contract |
pinned_toolchain |
true when run in the image with the expected versions |
systems_run |
e.g. ["lean", "python", "rocq"] |
checks[] |
per check: id, kind, system, status, what was observed, log hashes; kernel checks list each declaration with source sha256, statement sha256, binding_accepted, axioms, binding_axioms, structural_type, type_fingerprint, accepted, reasons; computations include the program’s JSON record; archives list files verified and any problems |
controls[] |
per control: id, kind, why, the change and its line (mutations), exit code, first error line, observed, status |
approvals |
correspondence id, number of valid approvals, the valid records |
status, status_text |
the status and its fixed sentence |
Older runs (before the consolidation) lack evidence_kind, tutorial and the
core-Lean fields; readers treat a missing evidence_kind as kernel.
What --verify checks
SHA256SUMSexists.- Every file it lists exists and has that sha256.
- No other file is present (apart from
SHA256SUMSitself). notebook.mdandnotebook.ipynbeach quote the sha256 ofresult.json.- The contract at
result.json’scontract.pathin the repository still has the recorded sha256. If not: “the claim contract has changed since this run”, which is the expected answer for superseded runs.
It prints evidence intact and exits 0, or lists the problems and exits 1.
Where runs are filed
| Directory | Holds |
|---|---|
experiments/investigations/<dir>/kernel-runs/ |
runs from before the consolidation, and the imported historical records (Haraux’s lives in math-inv-02/kernel-runs/) |
experiments/investigations/<dir>/runner-runs/ |
reader runs since the consolidation |
A run produced elsewhere is filed by copying the whole directory unchanged,
running --verify on the copy, and committing it. Log files are ignored by the
repository’s .gitignore and are added deliberately (git add -f) for
verified evidence only. Filed runs are never edited, renamed inside, or
regenerated; a superseded run stays beside its successor.
The Grasshopper audit’s own logs are filed with the evidence record in the private repository. They contain the artifact’s elaborated statements, so they are not reproduced in the reader pages. The record’s hashes and names are public.
Reproducing a run
- Check out the run’s
source_commit. - Build the image from that commit (Chapter 29) and compare
mathenv_build_info_sha256, or use the same image identifier if you have it. - Run the same command (Chapter 30).
- Compare: status, every check’s and control’s outcome, declaration fingerprints and axioms, and the computation records. Times, run identifiers and absolute paths in logs will differ; nothing else should.
The tutorial’s Lean fingerprints matched between a rehearsal outside the image
and the pinned run inside it (six_dvd_cube_sub: 1b1854ad…). No run in the
book has been independently reproduced.
Further Reading
For deeper study; not sources for the chapter’s claims.
- Ralph C. Merkle. “A Certified Digital Signature.” In Advances in Cryptology — CRYPTO ‘89, Lecture Notes in Computer Science 435 (Springer, 1990), 218–238. DOI. Why read it: The foundational hash-tree construction behind tamper-evident logs, related to but not the same as a flat manifest of file hashes.
- Ben Laurie, Adam Langley, Emilia Kasper. “Certificate Transparency.” RFC 6962, 2013. DOI. Why read it: A real-world append-only public log built on a Merkle hash tree, with inclusion and consistency proofs; RFC 9162 (2021) is the current version.
Next in Part IV: Chapter 34, adding an investigation.