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

Function test_record_files_populated

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

Source from the content-addressed store, hash-verified

691
692 #[test]
693 fn test_record_files_populated() {
694 let graph = sherpa_graph();
695 let tmp = tempfile::tempdir().unwrap();
696 let record = to_agent_trace_record(&graph, tmp.path());
697
698 assert_eq!(record.files.len(), 1);
699 assert_eq!(record.files[0].path, "src/index.ts");
700 assert_eq!(record.files[0].conversations.len(), 1);
701
702 let conv = &record.files[0].conversations[0];
703 assert!(conv.url.contains("tiny-star-8412"));
704 assert_eq!(conv.contributor.contributor_type, "ai");
705 assert_eq!(conv.ranges[0].start_line, 1);
706 assert_eq!(conv.ranges[0].end_line, 12);
707
708 // todo related ref
709 assert!(conv.related.iter().any(|r| r.ref_type == "todo"));
710 }
711
712 #[test]
713 fn test_append_and_read_back() {

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