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

Function change_intent_projection

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

Source from the content-addressed store, hash-verified

553}
554
555fn change_intent_projection(
556 hash: &atomic_core::types::Hash,
557 context: atomic_repository::ChangeIntentContext,
558) -> ChangeIntentContext {
559 let identity = |value: atomic_repository::ChangeIntentIdentity| ChangeIntentIdentity {
560 id: value.id,
561 uid: value.uid,
562 title: value.title,
563 path: value.path,
564 };
565 ChangeIntentContext {
566 schema_version: 1, change_hash: Some(hash_proto(hash)), plan_id: context.plan_id, status: context.status,
567 plans: context.plans.into_iter().map(|plan| ChangePlanBinding { plan_id: plan.plan_id, source: plan.source,
568 session_id: plan.session_id, provenance_hash: Some(hash_proto(&plan.provenance_hash)), turn_number: plan.turn_number,
569 intent: plan.intent.map(identity) }).collect(),
570 associated_intents: context.associated_intents.into_iter().map(|item| ChangeIntentAssociation {
571 path: item.path, intent: item.intent.map(identity), commitment_node_ids: item.commitment_node_ids,
572 patch_node_ids: item.patch_node_ids, provenance_hashes: item.provenance_hashes.iter().map(hash_proto).collect() }).collect(),
573 warnings: context.warnings, validation_status: "not_checked".into(),
574 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(),
575 }
576}
577
578// ---------------------------------------------------------------------------
579// 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