Compute one intent's row. A read/lift/attestation failure for a SINGLE intent degrades that row's attested/verifies to `–` rather than aborting the whole list.
(
repo: &Repository,
info: &atomic_repository::IntentInfo,
verifier: Option<&Verifier>,
)
| 208 | /// degrades that row's attested/verifies to `–` rather than aborting the whole |
| 209 | /// list. |
| 210 | fn compute_row( |
| 211 | repo: &Repository, |
| 212 | info: &atomic_repository::IntentInfo, |
| 213 | verifier: Option<&Verifier>, |
| 214 | ) -> Row { |
| 215 | // read_intent → inputs → load_attestation. Any failure ⇒ '–' columns. |
| 216 | let attestation = bridge::read_intent(repo, &info.id) |
| 217 | .and_then(|inputs| bridge::load_attestation(repo, &info.id, &inputs)); |
| 218 | let (attested, verifies) = match attestation { |
| 219 | Ok(a) => (classify(&a), compute_verifies(&a, verifier)), |
| 220 | Err(_) => (Attested::None, Verifies::Na), |
| 221 | }; |
| 222 | Row { |
| 223 | human_key: info.id.clone(), |
| 224 | status: info.status.clone(), |
| 225 | attested, |
| 226 | verifies, |
| 227 | } |
| 228 | } |
| 229 | |
| 230 | impl Command for IntentList { |
| 231 | fn run(&self) -> CliResult<()> { |
no test coverage detected