From 36d1954e5936c15a33001fd41bf18495860ececd Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Sun, 8 Nov 2026 21:54:24 -0700 Subject: [PATCH] docs(proofs): the harness-to-law table format The gate reads every proof note for a machine-readable table pairing a harness with its bookspec law, but the format was undocumented. State it: the first cell is the harness name in backticks, the second a bare integer, extra columns allowed; name the three failures it drives (a kernel function with no row, one harness with two different laws, a law sharing no `BS-` id with the function's `SOURCE:` line). Co-Authored-By: DeepSeek V4.1 Flash --- docs/proofs/README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/proofs/README.md b/docs/proofs/README.md index 031f5bda..c3c83c0a 100644 --- a/docs/proofs/README.md +++ b/docs/proofs/README.md @@ -29,6 +29,25 @@ instead: - A unit's note lands in the same commit as its harnesses, so the proof and its description are never apart in history. +## The harness-to-law table (machine-readable) + +The traceability gate +(`crates/ledger-core/tests/bookspec/traceability.rs`) reads every note here +for a table pairing each Kani harness with the bookspec law it proves: + +| Harness | Law | +|---|---| +| `round_step_is_multiple` | 40 | + +The first cell must be the harness name in backticks and the second a bare +integer (the number in bookspec's `spec/laws.md`); extra columns are allowed +after them (bounds, time, verification). The gate fails: + +- a kernel `pub fn` whose harnesses have no such row ("lacks a law"); +- a harness listed twice with different law numbers; +- a law whose Rules column shares no `BS-` id with the function's own + `SOURCE:` line, when the function has one. + `just prove` finds the harnesses by scanning `crates/ledger-core/src/proofs/` (`mod.rs` plus every `.rs`), not one file; `just prove-list` prints each harness, its module path, and whether it runs in `prove` or