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