MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / compute_row

Function compute_row

atomic-cli/src/commands/intent/list.rs:210–228  ·  view source on GitHub ↗

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>,
)

Source from the content-addressed store, hash-verified

208/// degrades that row's attested/verifies to `–` rather than aborting the whole
209/// list.
210fn 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
230impl Command for IntentList {
231 fn run(&self) -> CliResult<()> {

Callers 2

runMethod · 0.70
row_forFunction · 0.70

Calls 5

read_intentFunction · 0.85
load_attestationFunction · 0.70
classifyFunction · 0.70
compute_verifiesFunction · 0.70
cloneMethod · 0.45

Tested by

no test coverage detected