| 334 | use crate::vocab::NodeType; |
| 335 | |
| 336 | fn tree_fixture() -> CanonicalNode { |
| 337 | serde_json::from_value(serde_json::json!({ |
| 338 | "@context": CONTEXT_URL, "@type": "Intent", "@id": "urn:atomic:intent:tree", |
| 339 | "humanKey": "TEST-1", "title": "A complete tree", "status": "in_progress", |
| 340 | "kind": "review", "priority": "high", "view": "dev", "createdAt": "2026-10-25T00:00:00Z", |
| 341 | "why": "Readable output\nKeep the evidence", |
| 342 | "hasAcceptanceCriterion": [{ |
| 343 | "@type": "AcceptanceCriterion", "@id": "urn:atomic:ac:tree-1", "text": "Tree renders", |
| 344 | "acStatus": "met", "verifiedBy": "test-tree", "evidence": "cargo test passed" |
| 345 | }], |
| 346 | "hasTask": [{ |
| 347 | "@type": "Task", "@id": "urn:atomic:task:tree-1", "text": "Render the tree", |
| 348 | "taskStatus": "done", "satisfies": "urn:atomic:ac:tree-1", "touchesFile": ["src/main.rs", "test/tree.rs"] |
| 349 | }], |
| 350 | "hasScopeIn": [{"@type": "ScopeItem", "@id": "urn:atomic:scope:tree-in", "text": "Terminal rendering", "files": ["src/main.rs"]}], |
| 351 | "hasScopeOut": [{"@type": "ScopeItem", "@id": "urn:atomic:scope:tree-out", "text": "JSON schema"}], |
| 352 | "hasConstraint": [{"@type": "Constraint", "@id": "urn:atomic:constraint:tree-1", "text": "Keep signatures intact"}], |
| 353 | "dependsOn": [ |
| 354 | {"edge": "reviews", "to": "urn:atomic:intent:work"}, |
| 355 | {"edge": "blockedBy", "to": "urn:atomic:intent:blocker"}, |
| 356 | {"edge": "declaresImplementation", "to": "urn:atomic:change:example", "declarationEvidence": "Explicit author claim"} |
| 357 | ] |
| 358 | })).unwrap() |
| 359 | } |
| 360 | |
| 361 | #[test] |
| 362 | fn intent_is_one_complete_tree_including_metadata_reviews_and_provenance() { |