Persona wake: the poll pins her own room from her stewardships

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-11-27 20:08:18 +01:00
commit 4e0df42e85

View file

@ -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");
}