Skip to main content

Module receipt

Module receipt 

Source
Expand description

What the run can show for itself.

A finished run leaves a diff and a transcript. Neither says this was checked, against this contract, and it held — so the reviewer of a large change is back to reading everything, which is the job delegating the work was supposed to remove. The transcript is not a substitute: it is long, it is the agent’s own account, and nothing in it distinguishes a check that passed from a check that was never run.

A Receipt is the short answer. One JSON object per run: what was asked, which model answered, what the acceptance contract was, what the verdict was, and whether the contract survived the run. Small enough to attach to a pull request, and structured enough to fail a build on.

What the digest is for. Receipt::digest is a hash of the receipt’s own content. It tells you two receipts are identical, and it catches a file that was edited by hand or truncated in transit. It is not a signature: anyone who can rewrite the receipt can recompute it. If you need the trail itself to be tamper-evident, chain it — harness_hooks::audit::HashChainSink already does that, and Receipt::audit_request is where you put the id that points at it.

Structs§

Receipt
The one-page account of a run.
ReceiptBuilder
Assembles a Receipt from a finished run plus the things the loop does not know: the clock, the model’s name, and the audit id.

Constants§

SCHEMA
Current Receipt::schema.