From 4e0df42e85a0e9f3e123395d58e727b9d8558cbd Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Fri, 27 Nov 2026 20:08:18 +0100 Subject: [PATCH] Persona wake: the poll pins her own room from her stewardships Co-Authored-By: Claude Opus 5.5 --- crates/mind-body/src/heartbeat/tests.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/crates/mind-body/src/heartbeat/tests.rs b/crates/mind-body/src/heartbeat/tests.rs index e243815..af08819 100644 --- a/crates/mind-body/src/heartbeat/tests.rs +++ b/crates/mind-body/src/heartbeat/tests.rs @@ -721,3 +721,15 @@ fn matrixs_addressing_facts_wake_her_off_the_beat_only_on_a_message_from_the_ros rig.say(BOB, with(1, "@stranger:chat", Some(Basis::Direct), Form::Message)); assert_eq!(rig.poll(), Outcome::Polled { launched: vec![Slug("bob".into())] }, "a member's direct message wakes her: no sender gate"); } + +/// The fact the live poll lacked: a member's unaddressed line in a room named for a repo she stewards wakes her, and the same line +/// in a room named for nothing of hers does not. +#[test] +fn a_member_line_in_a_room_named_for_her_repo_wakes_her_off_the_beat() { + let rig = quiet_rig(); + steward(&rig, BOB, "GameCult/Swarm", &["Zed"]); + rig.say(BOB, ChatDelivery { room_alias: "#elsewhere:chat".into(), ..delivery(1, "@member:chat", "what a day", &[]) }); + assert_eq!(rig.poll(), Outcome::Polled { launched: vec![] }, "a public room that is not hers wakes her only by address"); + rig.say(BOB, delivery(2, "@member:chat", "what a day", &[])); + assert_eq!(rig.poll(), Outcome::Polled { launched: vec![Slug("bob".into())] }, "#swarm is named for her repo"); +}