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

Function test_reasoning_serde_roundtrip

atomic-agent/src/transcript/tests.rs:308–325  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

306
307#[test]
308fn test_reasoning_serde_roundtrip() {
309 let r = TurnReasoning {
310 intent: "intent".into(),
311 outcome: "outcome".into(),
312 learnings: Learnings {
313 repo: vec!["repo learning".into()],
314 code: vec![CodeLearning::new("f.rs", Some(1), "finding")
315 .with_function("main")
316 .with_category("bug")],
317 workflow: vec!["workflow".into()],
318 },
319 friction: vec!["friction".into()],
320 open_items: vec!["open".into()],
321 };
322 let json = serde_json::to_string_pretty(&r).unwrap();
323 let parsed: TurnReasoning = serde_json::from_str(&json).unwrap();
324 assert_eq!(r, parsed);
325}
326
327// CodeLearning
328

Callers

nothing calls this directly

Calls 1

unwrapMethod · 0.45

Tested by

no test coverage detected