persona: a line in another waking room that is not to her gives its sender no arrival

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-12-01 16:43:19 +01:00
commit 0e887b362e
2 changed files with 16 additions and 1 deletions

View file

@ -1392,7 +1392,7 @@ fn turned_to_her(inputs: &Inputs) -> Vec<(String, String)> {
out.push((person, if Some(line.room.as_str()) == here { "here".to_owned() } else { format!("in {}", line.room) }));
}
}
for line in inputs.room.elsewhere.iter().filter(|line| line.sender != inputs.people.own_sender).rev() {
for line in inputs.room.elsewhere.iter().filter(|line| line.to_her && line.sender != inputs.people.own_sender).rev() {
let person = inputs.people.person_of(&line.sender);
if !out.iter().any(|(id, _)| *id == person) {
out.push((person, format!("in {}, {}", line.room, coarse_ms(inputs.now, line.at_ms))));

View file

@ -2177,6 +2177,21 @@ fn k21_whoever_turned_to_her_does_so_on_their_own_line() {
assert!(!packet.context.contains("Kiko turned") && !packet.context.contains("Kiko, who turned") && !packet.context.contains("just now:"), "{}", packet.context);
}
/// The same arrival rule in her other waking rooms: a line there that is not to her (it named another Mind) gives its sender
/// no arrival; one that is to her does, "in" that room.
#[test]
fn k21_another_rooms_line_not_to_her_is_no_arrival() {
let room = Room {
messages: vec![message("#swarm:gamecult.org", OPERATOR, "Meta", "Eureka, are you around?", 3, true)],
elsewhere: vec![message("#aetheria:gamecult.org", "@deru:gamecult.org", "Deru", "Kiko, the build?", 2, false), message("#general:gamecult.org", "@ana:gamecult.org", "Ana", "Eureka, one thing", 1, true)],
here: Some("#swarm:gamecult.org".into()),
..Room::default()
};
let packet = packet_of(TurnKind::Chat, &state(), &room, &History::default(), 1);
assert!(!packet.context.contains("in #aetheria:gamecult.org"), "a line for another Mind is no arrival: {}", packet.context);
assert!(packet.context.contains("who turned to her just now, in #general:gamecult.org") && packet.context.matches("who turned to her").count() == 1, "a line to her elsewhere is, and only it: {}", packet.context);
}
/// Map 16.21's negative check: outside the frame's no-furnishing sentence and the notes, the Projector's prompt says
/// nothing of speech or of what is unknown. Also exempt, as about her own idiom and the budget and never the arrival: the
/// voice heading, the frame's idiom sentence and the word budget ("words").