Every change in the desired view's effective history loads from the change store.
(repo: &Repository, view_name: &str)
| 52 | /// Every change in the desired view's effective history loads from the |
| 53 | /// change store. |
| 54 | fn change_coverage_class(repo: &Repository, view_name: &str) -> CensusClass { |
| 55 | let name = "census/changes"; |
| 56 | match repo.effective_history(Some(view_name)) { |
| 57 | Ok(entries) => { |
| 58 | let total = entries.len(); |
| 59 | let mut missing: Vec<String> = Vec::new(); |
| 60 | for entry in &entries { |
| 61 | if repo.load_change(&entry.hash).is_err() { |
| 62 | missing.push(entry.hash.to_base32()); |
| 63 | } |
| 64 | } |
| 65 | if missing.is_empty() { |
| 66 | CensusClass { |
| 67 | name, |
| 68 | clean: true, |
| 69 | detail: format!("{total} recorded change(s) all load"), |
| 70 | } |
| 71 | } else { |
| 72 | CensusClass { |
| 73 | name, |
| 74 | clean: false, |
| 75 | detail: format!( |
| 76 | "{}/{} recorded change(s) FAIL to load: {}", |
| 77 | missing.len(), |
| 78 | total, |
| 79 | missing.join(", ") |
| 80 | ), |
| 81 | } |
| 82 | } |
| 83 | } |
| 84 | Err(error) => CensusClass { |
| 85 | name, |
| 86 | clean: false, |
| 87 | detail: format!("cannot enumerate the view history: {error}"), |
| 88 | }, |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | /// Every stored binding loads and passes its cryptographic verification |
| 93 | /// (payload validity + signature). |
nothing calls this directly
no test coverage detected