pub fn claim_evidence(report: &Value) -> ValueExpand description
The evidence verdict of every claim, as the site renders it beside the declared status:
the evidence section of product.json.
A projection of the evidence show report, never a second opinion about it. A claim is
supported when it declares guaranteed and the report has no finding against it. The
state is the report’s own word, hyphenated the way the design vocabulary spells it, with
one deliberate weakening: proven is published as inputs-unchanged. This dataset is
committed, and committing it is itself a change after any recorded run, so a verdict it
carries can never be proof of the tree it is read from.
available is false when the ledger holds nothing or the index could not read the
whole matrix: the verdicts are then about nothing, and a page says unknown.
use majordomus_cli::site::claim_evidence;
let report = serde_json::json!({
"subject": {"complete": true},
"ledger": {"path": "l.json", "present": true, "executions": 2, "newest": "2026-09-01"},
"claims": [
{"id": "a", "status": "guaranteed", "state": "proven"},
{"id": "b", "status": "guaranteed", "state": "not_run"},
{"id": "c", "status": "advisory", "state": "no_test"}
],
"findings": [{"claim": "b"}]
});
let e = claim_evidence(&report);
assert_eq!(e["available"], true);
assert_eq!(e["declared"], 2);
assert_eq!(e["supported"], 1);
assert_eq!(e["claims"]["a"]["state"], "inputs-unchanged", "never published as proven");
assert_eq!(e["claims"]["b"]["supported"], false);
assert_eq!(e["claims"]["c"]["supported"], false, "only a guarantee is judged");