From b9bb470e0721db88c711ba7d8f1fa0e6fb41392b Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 1 Dec 2026 15:11:21 +0100 Subject: [PATCH] persona tests: the raised cap stays inside the tuning's range; the hand count reads without int_plus_one Co-Authored-By: Claude Sonnet 5.5 --- crates/mind-body/src/persona/drain_tests.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/mind-body/src/persona/drain_tests.rs b/crates/mind-body/src/persona/drain_tests.rs index a93d813..ca96d5e 100644 --- a/crates/mind-body/src/persona/drain_tests.rs +++ b/crates/mind-body/src/persona/drain_tests.rs @@ -892,7 +892,7 @@ fn t_h5_a_start_held_after_a_completed_wake_counts_in_the_run() { spend_the_day(&rig); let cap = |usd: f64| std::fs::write(rig.dir.path().join("persona-tuning.toml"), format!("[agent]\nday_usd = {usd:?}\n")).unwrap(); assert!(matches!(rig.run(Tally::default()), Outcome::Held { .. })); - cap(1000.0); + cap(50.0); rig.agent.answers.borrow_mut().push_back(says(&room(1), "I am here.")); assert_eq!(rig.run(Tally::default()), Outcome::Drained { wakes: 1, acked_through: Some(1) }, "the raised cap wakes her"); cap(3.0); @@ -975,7 +975,7 @@ fn t_h4_a_backlog_over_the_budget_shows_the_newest_lines_and_says_how_many_it_le let input = agent_first_input(&rig); // The count by hand: newest first, each line and its newline, until the next would pass the budget. let (mut used, mut kept) = (0, 0_u64); - while kept < 300 && used + rendered_len(300 - kept, text_len(300 - kept)) + 1 <= HELD_LINES_BUDGET { + while kept < 300 && used + rendered_len(300 - kept, text_len(300 - kept)) < HELD_LINES_BUDGET { used += rendered_len(300 - kept, text_len(300 - kept)) + 1; kept += 1; }