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

Function test_unhashed_serde_roundtrip

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

Source from the content-addressed store, hash-verified

489
490#[test]
491fn test_unhashed_serde_roundtrip() {
492 let entries = vec![
493 CondensedEntry::user("prompt"),
494 CondensedEntry::assistant("response"),
495 ];
496 let data = UnhashedTurnData::new("sess-1", 5, "jsonl", entries, &["f.rs".into()])
497 .with_reasoning(TurnReasoning {
498 intent: "fix".into(),
499 outcome: "fixed".into(),
500 learnings: Learnings {
501 repo: vec!["pattern".into()],
502 code: vec![CodeLearning::new("f.rs", Some(1), "finding")],
503 workflow: vec![],
504 },
505 friction: vec!["issue".into()],
506 open_items: vec![],
507 });
508
509 let json = serde_json::to_string_pretty(&data).unwrap();
510 let parsed: UnhashedTurnData = serde_json::from_str(&json).unwrap();
511 assert_eq!(data, parsed);
512}
513
514// Attach / Extract / Strip
515

Callers

nothing calls this directly

Calls 2

with_reasoningMethod · 0.80
unwrapMethod · 0.45

Tested by

no test coverage detected