Her own room addresses her: a human's line there is to her

Re-test R1: Meta's line in #nibu and #void reached the Projector as
overheard, 8 of 8, with wake cause `human`. Under the humans_pace ruling a
human's line in a Mind's own room always wakes her, so read_room marks it to
her, as a direct message is: the arrival, the bridge and the speaking cues all
read `to_her`, so all follow. One rule in read_room, the path select-only, the
harness, the simulator and the live turn share; the simulator passes the
plan's `own_rooms`. A Mind's line there, or a human's in a room not hers, is
unchanged.

Verification: a_humans_line_in_her_own_room_is_to_her (#nibu).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-11-20 21:05:20 +01:00
commit f5c8bc5c63
2 changed files with 26 additions and 2 deletions

View file

@ -252,8 +252,9 @@ fn read_room(chat: &dyn MouthReader, request: &Request, own: &Addressee) -> (Roo
display: delivery.sender_display.clone(),
text: delivery.text.clone(),
at_ms: delivery.at_unix_ms,
// The heartbeat's rule, the one that woke her: never a second opinion here.
to_her: is_for(own, delivery),
// The heartbeat's rule, the one that woke her: never a second opinion here. Under humans_pace a human's line in
// her own room always wakes her, so it is to her, as a direct message is (the plan's or unit's `own_rooms`).
to_her: is_for(own, delivery) || (request.own_rooms.contains(&delivery.room_alias) && delivery.sender != request.own_sender && !request.minds.contains(&delivery.sender)),
event: delivery.event_id.clone(),
reply: replied(&delivery.reply_to),
})

View file

@ -945,6 +945,29 @@ fn request(dir: &std::path::Path, renders: Option<usize>, judge_against: Option<
Request { instance: INSTANCE.into(), kind: TurnKind::Chat, state: None, room: Some("#swarm:gamecult.org".into()), seed: 5, renders, judge_against, operators: operators(), minds: minds(), own_sender: OWN.into(), tuning: dir.join(TUNING_FILE), through: Through::Projector, last_heard: vec![], recent: vec![], own_rooms: vec![], last_outcome: None }
}
/// A human's line in her own room is to her (the humans_pace ruling: it always wakes her), with no name and no tag: the arrival
/// names who turned to her, the bridge opens on it and the speaking cues say who is waiting. A Mind's line there is not, and
/// neither is a human's in a room that is not hers.
#[test]
fn a_humans_line_in_her_own_room_is_to_her() {
let dir = tempfile::tempdir().unwrap();
let stored = Stored(state());
let nibu = "#nibu:gamecult.org";
let mouth = |sender: &str, display: &str| ReadOnlyMouth { pending: ChatPending { persona: "eureka".into(), deliveries: vec![delivery(1, nibu, sender, display, "anyone around this evening?", &[])], tail: Some(vec![]), tail_gaps: vec![] }, reads: Cell::new(0) };
let packet = |chat: &ReadOnlyMouth, own_rooms: Vec<String>| {
let organs = Organs { persona: Some(&stored), chat: Some(chat), addressing: None, model: None };
project(&organs, &Request { room: Some(nibu.into()), own_rooms, ..request(dir.path(), None, None) }, now()).unwrap()["packet"].clone()
};
let meta = mouth(OPERATOR, "Meta");
let own = packet(&meta, vec![nibu.into()]);
assert!(own["context"].as_str().unwrap().contains("turned to her"), "{own}");
assert!(own["speaking"].as_str().unwrap().contains("is waiting on her"), "{own}");
for (chat, own_rooms) in [(&meta, vec![]), (&mouth("@libby:gamecult.org", "Libby"), vec![nibu.to_owned()])] {
let other = packet(chat, own_rooms);
assert!(!other["context"].as_str().unwrap().contains("turned to her") && !other["speaking"].as_str().unwrap_or_default().contains("waiting on her"), "{other}");
}
}
#[test]
fn project_in_every_mode_writes_nothing() {
let dir = tempfile::tempdir().unwrap();