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

Function load_intent_done_pin

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

The `doneSubstanceHash` pin an intent recorded when `done` was granted (T5b). Lives in the intent's frontmatter (review state, deliberately not lifted into the `CanonicalNode`), so it is read straight off the bridge inputs. `None` when the intent was never granted done or predates the pin.

(repo: &Repository, bare_id: &str)

Source from the content-addressed store, hash-verified

845/// the `CanonicalNode`), so it is read straight off the bridge inputs.
846/// `None` when the intent was never granted done or predates the pin.
847fn load_intent_done_pin(repo: &Repository, bare_id: &str) -> Option<String> {
848 let inputs = bridge::read_intent(repo, bare_id).ok()?;
849 inputs
850 .frontmatter
851 .get("doneSubstanceHash")
852 .and_then(|v| v.as_str())
853 .map(str::to_string)
854}
855
856/// Best-effort compact provenance for a change: session, agent label, turn
857/// timestamp, and governing plan id. `None` if no provenance graph explains it.

Callers 1

build_reportFunction · 0.85

Calls 3

read_intentFunction · 0.85
getMethod · 0.65
as_strMethod · 0.45

Tested by

no test coverage detected