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

Function test_human_gate

atomic-agent/src/provenance/accumulator/tests.rs:242–254  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

240
241#[test]
242fn test_human_gate() {
243 let mut acc = ProvenanceAccumulator::new("s1");
244 let _goal = acc.append_goal("Fix bug", 1000);
245 let read = acc.append_tool_call("read", Some("c1"), None, None, None, None, 1001);
246 let gate = acc.append_human_gate("Delete old tokens?", 1002);
247
248 assert_eq!(acc.stats().human_gate_count, 1);
249 assert!(acc
250 .edges()
251 .iter()
252 .any(|e| e.from == read && e.to == gate && e.kind == EdgeKind::BlockedBy));
253 assert_eq!(acc.pending_human_gate.as_deref(), Some(gate.as_str()));
254}
255
256#[test]
257fn test_resolve_human_gate() {

Callers

nothing calls this directly

Calls 3

append_goalMethod · 0.80
append_tool_callMethod · 0.80
append_human_gateMethod · 0.80

Tested by

no test coverage detected