A minimal, fully attested Memory that conforms — the base for mutation.
()
| 621 | |
| 622 | /// A minimal, fully attested Memory that conforms — the base for mutation. |
| 623 | fn attested_memory() -> MemoryNode { |
| 624 | let kp = KeyPair::generate(); |
| 625 | let id = Identity::new("lee", &kp); |
| 626 | let node = MemoryNode { |
| 627 | context: CONTEXT_URL.to_string(), |
| 628 | type_: NodeType::Memory.as_str().to_string(), |
| 629 | id: "urn:atomic:memory:gate-1".to_string(), |
| 630 | memory_kind: "constraint".to_string(), |
| 631 | text: "a durable constraint".to_string(), |
| 632 | about: vec!["urn:atomic:module:storage".to_string()], |
| 633 | derived_from: Vec::new(), |
| 634 | status: "active".to_string(), |
| 635 | supersedes: None, |
| 636 | previous_revision: None, |
| 637 | content_hash: None, |
| 638 | attributed_to: None, |
| 639 | created_at: "2026-05-02T09:14:00Z".to_string(), |
| 640 | proof: None, |
| 641 | }; |
| 642 | proof::attest_memory(node, &id, &kp) |
| 643 | } |
| 644 | |
| 645 | #[test] |
| 646 | fn memory_gate_rejects_unknown_kind() { |