fix(slack): ignore mentions from other bots - #827
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Mentions posted by another Slack bot could start a Databuddy agent run, even though ordinary DM and thread-message routes already ignored bot messages. Ignore
app_mentionevents carryingbot_idorbot_profilebefore replying, resolving channel readiness, or dispatching the agent.The regression tests use another bot's user ID and both documented bot markers. They cover an empty mention and a substantive question, assert that no replies or downstream calls occur, and failed against the previous handler. Existing human-mention tests remain green. Slack documents both fields on AppMentionEvent.
Validation:
bun run lintpassed, including 22 policy tests.bun run check-typespassed: 33 tasks.bun run testpassed: 29 tasks (28 cached, Slack freshly run).Based independently on staging. Adjacent open work: #819 also edits the listener file for queues and stopping, and #822 adds event deduplication; this PR only filters bot-origin mentions and does not depend on either. No migration, scopes, or user setup required.
AI-assisted implementation and tests with Codex.
Summary by cubic
Fixes mentions from other Slack bots being able to start a Databuddy agent run. Now
app_mentionevents that includebot_idorbot_profileare ignored before any reply, readiness check, or agent dispatch.Written for commit dccfad3. Summary will update on new commits.