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

Function test_strip_unhashed

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

Source from the content-addressed store, hash-verified

539
540#[test]
541fn test_strip_unhashed() {
542 let mut change = make_empty_change();
543 let data = UnhashedTurnData::new(
544 "s1",
545 1,
546 "jsonl",
547 vec![CondensedEntry::user("secret prompt")],
548 &[],
549 )
550 .with_reasoning(TurnReasoning {
551 intent: "secret intent".into(),
552 outcome: "secret outcome".into(),
553 learnings: Learnings::default(),
554 friction: vec![],
555 open_items: vec![],
556 });
557
558 attach_unhashed(&mut change, &data).unwrap();
559 assert!(has_unhashed(&change));
560 assert!(!is_redacted(&change));
561
562 // Strip
563 let stripped = strip_unhashed(&mut change);
564 assert!(stripped);
565 assert!(is_redacted(&change));
566
567 // Verify the stub
568 let extracted = extract_unhashed(&change).unwrap();
569 assert_eq!(extracted.session_id, "s1");
570 assert_eq!(extracted.turn_number, 1);
571 assert!(extracted.is_redacted());
572 assert!(extracted.condensed_transcript.is_empty());
573 assert!(extracted.reasoning.is_none());
574 assert!(extracted.prompts.is_empty());
575}
576
577#[test]
578fn test_strip_no_data_returns_false() {

Callers

nothing calls this directly

Calls 6

make_empty_changeFunction · 0.85
attach_unhashedFunction · 0.85
strip_unhashedFunction · 0.85
extract_unhashedFunction · 0.85
with_reasoningMethod · 0.80
unwrapMethod · 0.45

Tested by

no test coverage detected