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

Function checkpoint_source_domain

libatomic/src/daemon/services_provenance.rs:260–278  ·  view source on GitHub ↗
(source: &CheckpointSource)

Source from the content-addressed store, hash-verified

258}
259
260fn checkpoint_source_domain(source: &CheckpointSource) -> ProvenanceCheckpointSource {
261 ProvenanceCheckpointSource {
262 agent_name: source.agent_name.clone(),
263 agent_display_name: source.agent_display_name.clone(),
264 agent_vendor: source.agent_vendor.clone(),
265 change_hashes: source
266 .change_hashes
267 .iter()
268 .filter_map(|hash| hash.value.clone().try_into().ok())
269 .map(Hash::from_bytes)
270 .collect(),
271 previous_provenance: source
272 .previous_provenance
273 .as_ref()
274 .and_then(|hash| hash.value.clone().try_into().ok().map(Hash::from_bytes)),
275 plan_id: source.plan_id.clone(),
276 ledger_turn_number: source.ledger_turn_number,
277 }
278}
279
280/// The wire SessionTurn carries only the identity pair; the domain bind
281/// requires the full stored turn shape. Enrich from the prepared

Callers 1

prepare_checkpoint_implFunction · 0.70

Calls 5

as_refMethod · 0.80
cloneMethod · 0.45
collectMethod · 0.45
iterMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected