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

Function load_intent_node

atomic-cli/src/commands/triage/project.rs:1064–1070  ·  view source on GitHub ↗

Load a reached intent's [`CanonicalNode`], preferring a fresh attestation and falling back to a live lift — the same resolution `intent validate` uses. Returns a string error (best-effort; a load failure becomes a finding, not a hard error).

(repo: &Repository, bare_id: &str)

Source from the content-addressed store, hash-verified

1062/// Returns a string error (best-effort; a load failure becomes a finding, not a
1063/// hard error).
1064fn load_intent_node(repo: &Repository, bare_id: &str) -> Result<CanonicalNode, String> {
1065 let inputs = bridge::read_intent(repo, bare_id).map_err(|e| e.to_string())?;
1066 match bridge::load_attestation(repo, bare_id, &inputs).map_err(|e| e.to_string())? {
1067 bridge::Attestation::Fresh(node) => Ok(*node),
1068 _ => bridge::lift(&inputs).map_err(|e| e.to_string()),
1069 }
1070}
1071
1072/// The `doneSubstanceHash` pin an intent recorded when `done` was granted (T5b).
1073/// Lives in the intent's frontmatter (review state, deliberately not lifted into

Callers 1

build_reportFunction · 0.85

Calls 3

read_intentFunction · 0.85
load_attestationFunction · 0.50
liftFunction · 0.50

Tested by

no test coverage detected