()
| 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() { |
nothing calls this directly
no test coverage detected