From c204e1711b2a61d9bd5f2def2cd685ff237da6e9 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 2 Nov 2026 21:23:33 +0100 Subject: [PATCH] Pin that a start's first line is bound by what it renders too Co-Authored-By: Claude Opus 5.5 --- crates/mind-body/src/persona/tests.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crates/mind-body/src/persona/tests.rs b/crates/mind-body/src/persona/tests.rs index 42d5f20..39eb502 100644 --- a/crates/mind-body/src/persona/tests.rs +++ b/crates/mind-body/src/persona/tests.rs @@ -4471,6 +4471,14 @@ fn the_line_bound_counts_quoted_bytes() { assert_eq!(lines.iter().map(|line| messages_in(line)).collect::>(), [1, 1, 1]); } +/// What waits at a start is measured the same way: two messages of 24 rendered KB do not share a first line. +#[test] +fn the_line_bound_counts_quoted_bytes_at_a_start() { + let rig = Rig::new((1..=3).map(|seq| delivery(seq, "swarm", "@op:chat", &"\u{1}".repeat(4000))).collect(), &[says(&[]), says(&[]), says(&[])]); + assert_eq!(failure_of(rig.go()), None); + assert_eq!(told(&rig).iter().map(|line| messages_in(line)).collect::>(), [1, 1, 1]); +} + /// A new room's tail prints with its message, so it counts against the same bound. #[test] fn the_line_bound_counts_the_earlier_lines_a_message_brings() {