From f6030974c0632d88cf503475144ba09d15137540 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Fri, 20 Nov 2026 22:53:38 +0100 Subject: [PATCH] B2: her own posted lines are never what she was sent; the quote guard and the echo check compare others' words only Co-Authored-By: Claude Opus 5.5 --- crates/mind-body/src/projection/select.rs | 11 +++++++---- crates/mind-body/src/projection/tests.rs | 16 ++++++++++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/crates/mind-body/src/projection/select.rs b/crates/mind-body/src/projection/select.rs index 37405b1..cfe1b04 100644 --- a/crates/mind-body/src/projection/select.rs +++ b/crates/mind-body/src/projection/select.rs @@ -322,8 +322,9 @@ pub(crate) struct Packet { /// The one room she may speak in this turn, and its kind. pub room: Option, pub room_kind: RoomKind, - /// The bodies of the lines she was shown this turn, without speakers or rooms: a chat turn's messages and the earlier - /// lines from others its `heard` shows her (map 16.20.3), a beat's tail lines. What an echo is measured against. + /// The bodies of the lines others wrote that she was shown this turn, without speakers or rooms: a chat turn's messages + /// and the earlier lines from others its `heard` shows her (map 16.20.3), a beat's tail lines. Never a line of her own: + /// her posted words are not what she was sent (B2). What an echo and the quote guard are measured against. pub bodies: Vec, /// The words of each private item this packet shows her as known privately: none of them may be said in this room. pub private: Vec, @@ -1956,9 +1957,11 @@ pub(crate) fn select(inputs: &Inputs, tuning: &Tuning) -> Packet { // the notes. let her = forms(inputs.state); let mut context = Context::new(guards(tuning, her), her); + // Her own posted lines are never what she was sent: the quote guard and the echo check compare against others' words only. + let others = |line: &&RoomLine| line.sender != inputs.people.own_sender; let bodies: Vec = match inputs.kind { - TurnKind::Chat => inputs.room.messages.iter().chain(earlier_shown.iter().copied()).flat_map(|line| shown_words(line, inputs.people.own_sender)).collect(), - TurnKind::Beat => beat_tail(inputs, tuning).iter().flat_map(|line| shown_words(line, inputs.people.own_sender)).collect(), + TurnKind::Chat => inputs.room.messages.iter().chain(earlier_shown.iter().copied()).filter(others).flat_map(|line| shown_words(line, inputs.people.own_sender)).collect(), + TurnKind::Beat => beat_tail(inputs, tuning).iter().filter(others).flat_map(|line| shown_words(line, inputs.people.own_sender)).collect(), TurnKind::FollowUp | TurnKind::Reflection => Vec::new(), }; // What she may reply to (map 16.20.8 (D), K20): the lines of others in the turn's room whose words this packet shows diff --git a/crates/mind-body/src/projection/tests.rs b/crates/mind-body/src/projection/tests.rs index 8a51266..8c16a47 100644 --- a/crates/mind-body/src/projection/tests.rs +++ b/crates/mind-body/src/projection/tests.rs @@ -2629,3 +2629,19 @@ fn k23_her_domain_is_a_section_under_its_own_guard_with_ids_for_the_interpreter_ let quiet = packet_with_domain(&[], &tuning); assert!(!quiet.context.contains("domain lately") && !interpret::speech_prompt(&quiet, "x", "y", &tuning).contains("domain lately"), "{}", quiet.context); } + +/// B2: her own posted lines are never what she was sent. A promise of hers whose words stand in the room as her own line +/// is shown, not withheld; someone else's words in the room still withhold a quote that repeats them (I16.7). +#[test] +fn b2_her_own_lines_never_withhold_her_promise_words() { + let mut room = chat_room(); + room.messages.push(message("#swarm:gamecult.org", OWN, "Eureka", "Meta, I'll send the render tonight, part 0.", 30, false)); + let packet = packet_of(TurnKind::Chat, &promising(1), &room, &History::default(), 1); + assert!(packet.context.contains("her promise: \"I'll send the render tonight, part 0.\"."), "{}", packet.context); + assert!(!packet.bodies.iter().any(|body| body.contains("part 0")), "{:?}", packet.bodies); + // Kiko saying the same words withholds them: others' words stay guarded. + let mut echoed = chat_room(); + echoed.messages.push(message("#swarm:gamecult.org", "@kiko:gamecult.org", "Kiko", "she said she'll send the render tonight, part 0.", 1, false)); + let packet = packet_of(TurnKind::Chat, &promising(1), &echoed, &History::default(), 1); + assert!(packet.context.contains("her promise: (her words, not shown here)."), "{}", packet.context); +}