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

Function classify_artifact

libatomic/src/daemon/services_agent.rs:1069–1079  ·  view source on GitHub ↗

The fresh/stale classification: the recorded source-content anchor versus the current source hash (the same rule the CLI bridge applies).

(
    node: N,
    recorded: Option<String>,
    current: String,
)

Source from the content-addressed store, hash-verified

1067/// The fresh/stale classification: the recorded source-content anchor
1068/// versus the current source hash (the same rule the CLI bridge applies).
1069fn classify_artifact<N>(
1070 node: N,
1071 recorded: Option<String>,
1072 current: String,
1073) -> LoadedAttestation<N> {
1074 if recorded.as_deref() == Some(current.as_str()) {
1075 LoadedAttestation::Fresh(node)
1076 } else {
1077 LoadedAttestation::Stale(node)
1078 }
1079}
1080
1081/// The `sourceContentHash` anchor off a tracked attestation entry's
1082/// frontmatter.

Callers 2

intent_list_attestationFunction · 0.85
memory_list_attestationFunction · 0.85

Calls 1

as_strMethod · 0.45

Tested by

no test coverage detected