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

Function row_for

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

Compute a single row using an explicit verifier keypair (no global store). Reads the row's kind tag from the manifest, exactly as `build_rows` does.

(repo: &Repository, id: &str, kp: Option<&KeyPair>)

Source from the content-addressed store, hash-verified

452 /// Compute a single row using an explicit verifier keypair (no global store).
453 /// Reads the row's kind tag from the manifest, exactly as `build_rows` does.
454 fn row_for(repo: &Repository, id: &str, kp: Option<&KeyPair>) -> Row {
455 let verifier = kp.map(|kp| Verifier {
456 did: did_for_public_key(&kp.public),
457 public_key: kp.public.clone(),
458 });
459 let info = repo
460 .vault_intent_list(None)
461 .unwrap()
462 .into_iter()
463 .find(|i| i.id == id)
464 .unwrap();
465 let kind = repo
466 .vault_manifest()
467 .unwrap()
468 .intents
469 .get(id)
470 .map(|s| s.kind.clone())
471 .unwrap_or_else(|| "feature".to_string());
472 compute_row(repo, &info, kind, verifier.as_ref())
473 }
474
475 /// Create a review intent (kind mirrored into the manifest summary), returning
476 /// its human key.

Callers 7

unattested_row_is_na_naFunction · 0.70
stale_is_stale_and_naFunction · 0.70
other_signer_is_na_not_xFunction · 0.70

Calls 9

did_for_public_keyFunction · 0.85
vault_intent_listMethod · 0.80
vault_manifestMethod · 0.80
as_refMethod · 0.80
compute_rowFunction · 0.70
getMethod · 0.65
cloneMethod · 0.45
unwrapMethod · 0.45
into_iterMethod · 0.45

Tested by 7

unattested_row_is_na_naFunction · 0.56
stale_is_stale_and_naFunction · 0.56
other_signer_is_na_not_xFunction · 0.56