From 1fc347066141c790e71cac2a1f4df376009c6420 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 1 Nov 2026 20:23:47 +0100 Subject: [PATCH] persona tests: read the retold line's content, not its JSON-escaped text Co-Authored-By: Claude Opus 5.5 --- crates/mind-body/src/persona/tests.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/mind-body/src/persona/tests.rs b/crates/mind-body/src/persona/tests.rs index ff8e6c0..65543b9 100644 --- a/crates/mind-body/src/persona/tests.rs +++ b/crates/mind-body/src/persona/tests.rs @@ -2555,7 +2555,8 @@ fn a_second_refusal_before_the_retell_is_written_keeps_the_first_batch_to_be_tol let (outcome, acked) = carry_children(&rig, vec![child]); let Outcome::Served { failure, .. } = outcome else { panic!("served") }; assert_eq!(failure, None); - let retold = writes.borrow().last().cloned().expect("a retell was written"); + let last: serde_json::Value = serde_json::from_str(writes.borrow().last().expect("a retell was written")).unwrap(); + let retold = last["message"]["content"].as_str().unwrap().to_string(); assert!(retold.contains(r#"text="three""#) && retold.contains(r#"text="four""#) && retold.contains(r#"text="five""#), "one line carries all three: {retold}"); assert_eq!(rig.sent_texts(), ["for three, four and five"]); assert_eq!(acked, [5], "acked once, after the merged batch was answered: {acked:?}");