A minimal, fully attested Intent that conforms — the base for mutation.
()
| 362 | |
| 363 | /// A minimal, fully attested Intent that conforms — the base for mutation. |
| 364 | fn attested_base() -> CanonicalNode { |
| 365 | let kp = KeyPair::generate(); |
| 366 | let id = Identity::new("lee", &kp); |
| 367 | let node = CanonicalNode { |
| 368 | context: CONTEXT_URL.to_string(), |
| 369 | type_: NodeType::Intent.as_str().to_string(), |
| 370 | id: "urn:atomic:intent:gate-1".to_string(), |
| 371 | human_key: "GATE-1".to_string(), |
| 372 | title: "Gate base".to_string(), |
| 373 | status: "todo".to_string(), |
| 374 | priority: None, |
| 375 | view: None, |
| 376 | motivated_by: None, |
| 377 | informed_by: Vec::new(), |
| 378 | has_acceptance_criterion: Vec::new(), |
| 379 | has_task: Vec::new(), |
| 380 | has_scope_in: Vec::new(), |
| 381 | has_scope_out: Vec::new(), |
| 382 | has_constraint: Vec::new(), |
| 383 | depends_on: Vec::new(), |
| 384 | why: Some("a reason".to_string()), |
| 385 | content_hash: None, |
| 386 | attributed_to: None, |
| 387 | created_at: "2026-06-25T00:00:00Z".to_string(), |
| 388 | proof: None, |
| 389 | }; |
| 390 | proof::attest(node, &id, &kp) |
| 391 | } |
| 392 | |
| 393 | #[test] |
| 394 | fn gate_requires_scope_out_when_scope_in_present() { |