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

Function gate_rejects_done_intent_with_open_task

atomic-canonical/src/gate.rs:731–752  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

729
730 #[test]
731 fn gate_rejects_done_intent_with_open_task() {
732 let mut node = attested_base();
733 node.status = "done".to_string();
734 node.has_acceptance_criterion = vec![{
735 let mut a = ac("urn:atomic:ac:gate-1-ac-1");
736 a.ac_status = "met".to_string();
737 a.verified_by = Some("did:atomic:lee".to_string());
738 a.evidence = Some("urn:atomic:change:01J8".to_string());
739 a
740 }];
741 // Task is still open while the intent claims to be done.
742 node.has_task = vec![task(
743 "urn:atomic:task:gate-1-1",
744 &["urn:atomic:ac:gate-1-ac-1"],
745 )];
746
747 let report = validate_intent(&node);
748 assert!(!report.conforms);
749 assert!(report.results.iter().any(|v| v.shape == "IntentShape"
750 && v.path.as_deref() == Some("status")
751 && v.message.contains("every task must be done")));
752 }
753
754 #[test]
755 fn gate_rejects_done_intent_with_unmet_criterion() {

Callers

nothing calls this directly

Calls 2

attested_baseFunction · 0.85
validate_intentFunction · 0.85

Tested by

no test coverage detected