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

Function change_intent_projection

libatomic/src/daemon/services_query.rs:552–573  ·  view source on GitHub ↗
(
    hash: &atomic_core::types::Hash,
    context: atomic_repository::ChangeIntentContext,
)

Source from the content-addressed store, hash-verified

550}
551
552fn change_intent_projection(
553 hash: &atomic_core::types::Hash,
554 context: atomic_repository::ChangeIntentContext,
555) -> ChangeIntentContext {
556 let identity = |value: atomic_repository::ChangeIntentIdentity| ChangeIntentIdentity {
557 id: value.id,
558 uid: value.uid,
559 title: value.title,
560 path: value.path,
561 };
562 ChangeIntentContext {
563 schema_version: 1, change_hash: Some(hash_proto(hash)), plan_id: context.plan_id, status: context.status,
564 plans: context.plans.into_iter().map(|plan| ChangePlanBinding { plan_id: plan.plan_id, source: plan.source,
565 session_id: plan.session_id, provenance_hash: Some(hash_proto(&plan.provenance_hash)), turn_number: plan.turn_number,
566 intent: plan.intent.map(identity) }).collect(),
567 associated_intents: context.associated_intents.into_iter().map(|item| ChangeIntentAssociation {
568 path: item.path, intent: item.intent.map(identity), commitment_node_ids: item.commitment_node_ids,
569 patch_node_ids: item.patch_node_ids, provenance_hashes: item.provenance_hashes.iter().map(hash_proto).collect() }).collect(),
570 warnings: context.warnings, validation_status: "not_checked".into(),
571 context: "Recorded plan_id declarations and change-local edit evidence; identity/title/path lookup uses the current vault. No historical intent snapshot, SHACL validation, signature check or repository-wide 1:1 proof is implied.".into(),
572 }
573}
574
575// ---------------------------------------------------------------------------
576// GetSession — `atomic session show`

Callers 1

get_change_implFunction · 0.85

Calls 4

hash_protoFunction · 0.70
collectMethod · 0.45
into_iterMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected