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:663–679  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

661
662 #[test]
663 fn test_record_todos_with_executions() {
664 let graph = sherpa_graph();
665 let tmp = tempfile::tempdir().unwrap();
666 let record = to_agent_trace_record(&graph, tmp.path());
667
668 let todos = &record.metadata["dev.atomic"]["todos"];
669 assert!(todos.is_array());
670 let todos_arr = todos.as_array().unwrap();
671 assert_eq!(todos_arr.len(), 1);
672 assert_eq!(todos_arr[0]["todo_id"], "t2");
673
674 // Execution should be nested under the matching todo
675 let execs = &todos_arr[0]["executions"];
676 assert!(execs.is_array());
677 assert_eq!(execs[0]["command"], "npm install");
678 assert_eq!(execs[0]["exit_code"], 0);
679 }
680
681 #[test]
682 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