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:504–517  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

502
503 #[test]
504 fn lifts_inline_ref_from_why_prose() {
505 let body = ":::why\nLocal-only per :ref[the storage constraint]{to=urn:atomic:memory:01J8ZC edge=depends}, not a profile system.\n:::";
506 let node = lift_intent(&fm(), body).unwrap();
507 // The reason keeps the inline mention verbatim…
508 assert!(node
509 .why
510 .as_deref()
511 .unwrap()
512 .contains(":ref[the storage constraint]"));
513 // …and the edge lands on the dependency chain, typed and validated.
514 assert_eq!(node.depends_on.len(), 1);
515 assert_eq!(node.depends_on[0].to, "urn:atomic:memory:01J8ZC");
516 assert_eq!(node.depends_on[0].edge, "depends");
517 }
518
519 #[test]
520 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