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

Function test_record_todos_with_executions

atomic-agent/src/export.rs:644–660  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

642
643 #[test]
644 fn test_record_todos_with_executions() {
645 let graph = sherpa_graph();
646 let tmp = tempfile::tempdir().unwrap();
647 let record = to_agent_trace_record(&graph, tmp.path());
648
649 let todos = &record.metadata["dev.atomic"]["todos"];
650 assert!(todos.is_array());
651 let todos_arr = todos.as_array().unwrap();
652 assert_eq!(todos_arr.len(), 1);
653 assert_eq!(todos_arr[0]["todo_id"], "t2");
654
655 // Execution should be nested under the matching todo
656 let execs = &todos_arr[0]["executions"];
657 assert!(execs.is_array());
658 assert_eq!(execs[0]["command"], "npm install");
659 assert_eq!(execs[0]["exit_code"], 0);
660 }
661
662 #[test]
663 fn test_record_verification_populated() {

Callers

nothing calls this directly

Calls 4

sherpa_graphFunction · 0.85
to_agent_trace_recordFunction · 0.85
unwrapMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected