mgmt: #85 anti-spoof greet-leave appears to break the manual operator invite-then-relink flow for >2-member rooms #120

Closed
opened 2026-07-13 17:46:01 +00:00 by robocub · 2 comments
Collaborator

Found while building #111 (see PR #119): greet_when_joined's #85 anti-spoof check leaves ANY joined room that isn't a ≤2-member DM. It runs after every accepted invite — including an operator's invite of the bot into a to-be-bridged room. For a room with >2 joined members, the sequence appears to be: operator invites bot → bot joins → greeting task sees a group room → bot leaves within ~14 s → the operator's follow-up link probe can't join (invite consumed, invite-only room) → the documented manual invite-then-relink flow is broken.

Not user-reported yet (rooms bridged so far were either publicly joinable, ≤2-member at invite time, or went through the probe/#111-intent paths, which skip the greeting task). Needs a live reproduction to confirm, then a fix — likely: skip the #85 leave for operator-accepted invites (the anti-spoof exists to stop self-serve users pulling the bot into group rooms via a forged is_direct; an operator may put the bot anywhere by definition). With #111's auto-resume shipped, the manual flow matters less, but it should still not be silently broken.

Found while building #111 (see PR #119): `greet_when_joined`'s #85 anti-spoof check leaves ANY joined room that isn't a ≤2-member DM. It runs after **every** accepted invite — including an **operator's** invite of the bot into a to-be-bridged room. For a room with >2 joined members, the sequence appears to be: operator invites bot → bot joins → greeting task sees a group room → **bot leaves within ~14 s** → the operator's follow-up `link` probe can't join (invite consumed, invite-only room) → the documented manual invite-then-relink flow is broken. Not user-reported yet (rooms bridged so far were either publicly joinable, ≤2-member at invite time, or went through the probe/#111-intent paths, which skip the greeting task). Needs a live reproduction to confirm, then a fix — likely: skip the #85 leave for operator-accepted invites (the anti-spoof exists to stop *self-serve* users pulling the bot into group rooms via a forged `is_direct`; an operator may put the bot anywhere by definition). With #111's auto-resume shipped, the manual flow matters less, but it should still not be silently broken.
Author
Collaborator

Reproduced live — the theory is confirmed.

New scenario mgmt_operator_room_invite (suite → 28): harness operator creates an invite-only room, two extra members join (3 joined humans), operator invites the bot. Result:

known_fail in 33.2s — the #85 anti-spoof greet-leave evicted the bot from an
operator-invited room (#120): leave_logged=true bot_still_joined=false

The bridge log shows the exact sequence: accepting invite from allowlisted operator → join → invited room is not a DM (spoofed is_direct?) — leaving (#85). The bot is gone within seconds, and since the invite is consumed, a follow-up link probe cannot rejoin an invite-only room — the documented manual invite-then-relink flow is broken for any >2-member room.

Fix (in progress): the #85 leave exists to stop self-serve users pulling the bot into group rooms via a forged is_direct; an operator may place the bot anywhere by definition. Thread the inviter's tier into greet_when_joined: operator-accepted invites skip the leave (and the greeting — it's a group room), everything else unchanged. The scenario flips to Pass with the fix and stays as the regression guard.

**Reproduced live — the theory is confirmed.** New scenario `mgmt_operator_room_invite` (suite → 28): harness operator creates an invite-only room, two extra members join (3 joined humans), operator invites the bot. Result: ``` known_fail in 33.2s — the #85 anti-spoof greet-leave evicted the bot from an operator-invited room (#120): leave_logged=true bot_still_joined=false ``` The bridge log shows the exact sequence: `accepting invite from allowlisted operator` → join → `invited room is not a DM (spoofed is_direct?) — leaving (#85)`. The bot is gone within seconds, and since the invite is consumed, a follow-up `link` probe cannot rejoin an invite-only room — the documented manual invite-then-relink flow is broken for any >2-member room. **Fix (in progress):** the #85 leave exists to stop *self-serve* users pulling the bot into group rooms via a forged `is_direct`; an operator may place the bot anywhere by definition. Thread the inviter's tier into `greet_when_joined`: operator-accepted invites skip the leave (and the greeting — it's a group room), everything else unchanged. The scenario flips to `Pass` with the fix and stays as the regression guard.
Author
Collaborator

Fix merged (PR #121) and shipped in v0.3.0; mgmt_operator_room_invite guards it (suite → 28). Closing.

Fix merged (PR #121) and shipped in v0.3.0; `mgmt_operator_room_invite` guards it (suite → 28). Closing.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dark/nether-voicebridge#120
No description provided.