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:1076–1083  ·  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

1074/// the `CanonicalNode`), so it is read straight off the bridge inputs.
1075/// `None` when the intent was never granted done or predates the pin.
1076fn load_intent_done_pin(repo: &Repository, bare_id: &str) -> Option<String> {
1077 let inputs = bridge::read_intent(repo, bare_id).ok()?;
1078 inputs
1079 .frontmatter
1080 .get("doneSubstanceHash")
1081 .and_then(|v| v.as_str())
1082 .map(str::to_string)
1083}
1084
1085/// Best-effort compact provenance for a change: session, agent label, turn
1086/// 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