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

Function lifts_inline_ref_from_why_prose

atomic-canonical/src/lift.rs:403–416  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

401
402 #[test]
403 fn lifts_inline_ref_from_why_prose() {
404 let body = ":::why\nLocal-only per :ref[the storage constraint]{to=urn:atomic:memory:01J8ZC edge=depends}, not a profile system.\n:::";
405 let node = lift_intent(&fm(), body).unwrap();
406 // The reason keeps the inline mention verbatim…
407 assert!(node
408 .why
409 .as_deref()
410 .unwrap()
411 .contains(":ref[the storage constraint]"));
412 // …and the edge lands on the dependency chain, typed and validated.
413 assert_eq!(node.depends_on.len(), 1);
414 assert_eq!(node.depends_on[0].to, "urn:atomic:memory:01J8ZC");
415 assert_eq!(node.depends_on[0].edge, "depends");
416 }
417
418 #[test]
419 fn inline_ref_with_bad_edge_is_error() {

Callers

nothing calls this directly

Calls 3

lift_intentFunction · 0.85
fmFunction · 0.70
unwrapMethod · 0.45

Tested by

no test coverage detected