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

Function test_record_files_populated

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

Source from the content-addressed store, hash-verified

672
673 #[test]
674 fn test_record_files_populated() {
675 let graph = sherpa_graph();
676 let tmp = tempfile::tempdir().unwrap();
677 let record = to_agent_trace_record(&graph, tmp.path());
678
679 assert_eq!(record.files.len(), 1);
680 assert_eq!(record.files[0].path, "src/index.ts");
681 assert_eq!(record.files[0].conversations.len(), 1);
682
683 let conv = &record.files[0].conversations[0];
684 assert!(conv.url.contains("tiny-star-8412"));
685 assert_eq!(conv.contributor.contributor_type, "ai");
686 assert_eq!(conv.ranges[0].start_line, 1);
687 assert_eq!(conv.ranges[0].end_line, 12);
688
689 // todo related ref
690 assert!(conv.related.iter().any(|r| r.ref_type == "todo"));
691 }
692
693 #[test]
694 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