()
| 692 | |
| 693 | #[test] |
| 694 | fn test_append_and_read_back() { |
| 695 | let graph = sherpa_graph(); |
| 696 | let tmp = tempfile::tempdir().unwrap(); |
| 697 | let record = to_agent_trace_record(&graph, tmp.path()); |
| 698 | |
| 699 | append_agent_trace(&record, tmp.path()); |
| 700 | |
| 701 | let path = tmp.path().join(".agent-trace").join("traces.jsonl"); |
| 702 | assert!(path.exists()); |
| 703 | |
| 704 | let contents = std::fs::read_to_string(&path).unwrap(); |
| 705 | let parsed: TraceRecord = serde_json::from_str(contents.trim()).unwrap(); |
| 706 | assert_eq!(parsed.version, "0.1.0"); |
| 707 | assert_eq!( |
| 708 | parsed.metadata["dev.atomic"]["profile"]["schema"], |
| 709 | "sherpa-trace" |
| 710 | ); |
| 711 | } |
| 712 | |
| 713 | #[test] |
| 714 | fn test_append_multiple_records_produces_valid_jsonl() { |
nothing calls this directly
no test coverage detected