pub fn stale_rows(
known: &BTreeMap<(String, String, usize), String>,
found: &BTreeMap<(String, String, usize), String>,
unparsed_pages: &[String],
refused_at_zero: &BTreeSet<String>,
) -> Vec<(String, String, usize)>Expand description
The ledger rows a run’s OWN results say have genuinely closed — narrower than “not in
found”: a row whose scenario never ran far enough to be checked at all (its page did not
parse, or the scenario itself refused at statement 0, before any axis was ever compared) is not
evidence the divergence closed, only that THIS run could not see it. Left alone until a run
that actually reaches it says otherwise, rather than deleting a real, still-true cause out from
under whoever needs it back the moment the page parses or the scenario runs again.
unparsed_pages names each page (by the id its OWN scenarios are prefixed with, <id>::…)
whose source did not parse at all; refused_at_zero names each scenario (<page id>::<test>)
refused at statement 0. A scenario refused at a LATER statement is not exempted at all — every
statement before that refusal DID run, so a row at an earlier statement is checked normally.
Shared by every tier’s lock (over that tier’s own ledger_map) so the SAME rule protects all
of them: an unparsed page or an early refusal can mark no lock’s rows stale.