pub fn report_at(
index: &Index,
ledger: &Ledger,
presented: &Presented,
uncommitted: &[Execution],
) -> EvidenceReportExpand description
The same join, judged at a named revision: the working tree, or the checked-out commit as committed.
The caller supplies what is read for that revision, so this stays one derivation for both:
for Presented::WorkingTree, Ledger::load and no uncommitted executions — the
working ledger is itself the authority there; for a presented commit, ledger_at that
commit and uncommitted against it. Each claim’s state, changed paths and detail come
from freshness() alone. For a presented commit, a clean failing run of the same test
that the checkout holds uncommitted, recorded between the evidence and the presented
commit, then caps the verdict at stale through weakened_by; it never decides one.
use majordomus_cli::evidence::{report_at, Ledger, Presented};
use majordomus_cli::synthetic::SyntheticRepository;
let repo = SyntheticRepository::small().unwrap();
let ledger = Ledger::load(repo.root()).unwrap();
let r = report_at(&repo.index().unwrap(), &ledger, &Presented::WorkingTree, &[]);
assert_eq!(r.presented.revision, "working_tree");
assert!(r.presented.uncommitted.is_empty(), "the working ledger is the authority here");