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

Function lift_memory_from_frontmatter_and_body

atomic-canonical/src/memory.rs:283–306  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

281
282 #[test]
283 fn lift_memory_from_frontmatter_and_body() {
284 let body = "Multi-region writes must converge with no single ordering authority.";
285 let node = lift_memory(&fm(), body).unwrap();
286 assert_eq!(node.type_, "Memory");
287 assert_eq!(node.id, "urn:atomic:memory:01J8ZC4R8T");
288 assert_eq!(node.memory_kind, "constraint");
289 assert_eq!(node.status, "active");
290 assert_eq!(
291 node.about,
292 vec![
293 "urn:atomic:module:storage".to_string(),
294 "urn:atomic:module:replication".to_string()
295 ]
296 );
297 assert_eq!(
298 node.derived_from,
299 vec![
300 "urn:atomic:intent:word-5".to_string(),
301 "urn:atomic:change:abc123".to_string(),
302 "urn:atomic:memory:source-1".to_string(),
303 ]
304 );
305 assert!(node.text.contains("no single ordering authority"));
306 }
307
308 #[test]
309 fn lift_memory_prefers_memory_container() {

Callers

nothing calls this directly

Calls 3

lift_memoryFunction · 0.85
fmFunction · 0.70
unwrapMethod · 0.45

Tested by

no test coverage detected