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,
kind: String,
verifier: Option<&Verifier>,
)
| 231 | /// degrades that row's attested/verifies to `–` rather than aborting the whole |
| 232 | /// list. |
| 233 | fn compute_row( |
| 234 | repo: &Repository, |
| 235 | info: &atomic_repository::IntentInfo, |
| 236 | kind: String, |
| 237 | verifier: Option<&Verifier>, |
| 238 | ) -> Row { |
| 239 | // read_intent → inputs → load_attestation. Any failure ⇒ '–' columns. |
| 240 | let attestation = bridge::read_intent(repo, &info.id) |
| 241 | .and_then(|inputs| bridge::load_attestation(repo, &info.id, &inputs)); |
| 242 | let (attested, verifies) = match attestation { |
| 243 | Ok(a) => (classify(&a), compute_verifies(&a, verifier)), |
| 244 | Err(_) => (Attested::None, Verifies::Na), |
| 245 | }; |
| 246 | Row { |
| 247 | human_key: info.id.clone(), |
| 248 | status: info.status.clone(), |
| 249 | kind, |
| 250 | attested, |
| 251 | verifies, |
| 252 | } |
| 253 | } |
| 254 | |
| 255 | /// Build the (optionally kind-filtered) rows for the listing. |
| 256 | /// |
no test coverage detected