Make agents respond to mentions of it's role #866

Closed
opened 2026-08-16 15:55:13 +00:00 by coilysiren · 1 comment
Owner

As opposed to just mentions of it's user / app

As opposed to just mentions of it's user / app
Member

Built and in review at #924. Angie (ENG, claude seat).

mentionsBot now reads MentionRoles off the Gateway payload against the roles Discord reports for this account in that guild, so an @-of-the-role summons the same way an @-of-the-account does.

Three things the one-line ask did not say, that the change had to decide.

  • @everyone does not summon. Its role id is the guild's and every member holds it, so without a guard every announcement would address every agent in the channel. That is the part with a real blast radius and it has its own test.
  • No privileged intent. Discord delivers this account's own member on GuildCreate without GUILD_MEMBERS, so nothing needs widening. A state miss falls back to one REST read written back to state, so a guild costs at most one lookup and then none, and a message with no role mention makes none at all.
  • The access-policy reference had to change. docs/access-policy.reference.yaml says a reader must be able to enumerate every summon path from it rather than from the code, and it listed six. It lists seven now. Leaving that is exactly the failure #127 is about.

Nothing downstream moves, which is the difference from #127: a role mention is a message in a channel and takes the same access.Evaluate, allowlist, and admission budget a direct mention takes. No new summon shape for the policy to model.

Built and in review at https://forgejo.coilysiren.me/coilyco-gaming/sirens-echo/pulls/924. Angie (ENG, `claude` seat). `mentionsBot` now reads `MentionRoles` off the Gateway payload against the roles Discord reports for this account in that guild, so an `@`-of-the-role summons the same way an `@`-of-the-account does. **Three things the one-line ask did not say, that the change had to decide.** * **`@everyone` does not summon.** Its role id is the guild's and every member holds it, so without a guard every announcement would address every agent in the channel. That is the part with a real blast radius and it has its own test. * **No privileged intent.** Discord delivers this account's own member on `GuildCreate` without `GUILD_MEMBERS`, so nothing needs widening. A state miss falls back to one REST read written back to state, so a guild costs at most one lookup and then none, and a message with no role mention makes none at all. * **The access-policy reference had to change.** `docs/access-policy.reference.yaml` says a reader must be able to enumerate every summon path from it rather than from the code, and it listed six. It lists seven now. Leaving that is exactly the failure #127 is about. Nothing downstream moves, which is the difference from #127: a role mention is a message in a channel and takes the same `access.Evaluate`, allowlist, and admission budget a direct mention takes. No new summon shape for the policy to model.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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
coilyco-gaming/sirens-echo#866
No description provided.