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:1099–1106  ·  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

1097/// the `CanonicalNode`), so it is read straight off the bridge inputs.
1098/// `None` when the intent was never granted done or predates the pin.
1099fn load_intent_done_pin(repo: &Repository, bare_id: &str) -> Option<String> {
1100 let inputs = bridge::read_intent(repo, bare_id).ok()?;
1101 inputs
1102 .frontmatter
1103 .get("doneSubstanceHash")
1104 .and_then(|v| v.as_str())
1105 .map(str::to_string)
1106}
1107
1108/// Best-effort compact provenance for a change: session, agent label, turn
1109/// 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