Skip to content

fix(slack): ignore mentions from other bots - #827

Merged
izadoesdev merged 1 commit into
stagingfrom
codex/slack-bot-mentions
Sep 17, 2026
Merged

izadoesdev merged 1 commit into
stagingfrom
codex/slack-bot-mentions

Conversation

@izadoesdev

@izadoesdev izadoesdev commented Sep 17, 2026

Copy link
Copy Markdown
Member

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_mention events carrying bot_id or bot_profile before 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:

  • Full Slack suite: 60 passed, 0 failed.
  • bun run lint passed, including 22 policy tests.
  • bun run check-types passed: 33 tasks.
  • Configured pre-push bun run test passed: 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_mention events that include bot_id or bot_profile are ignored before any reply, readiness check, or agent dispatch.

Written for commit dccfad3. Summary will update on new commits.

Review in cubic

@vercel

vercel Bot commented Sep 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
databuddy-status Ready Ready Preview Sep 17, 2026 10:07am UTC
2 Skipped Deployments
Project Deployment Actions Updated
dashboard Skipped Skipped Sep 17, 2026 10:07am UTC
documentation Skipped Skipped Sep 17, 2026 10:07am UTC

@coderabbitai

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 9601b11f-5834-4375-bc49-82ed156c7f5e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge with no actionable correctness, security, or repository-rule issues identified.

Summary

This PR prevents bot-authored Slack mentions from initiating agent work by returning early when an app_mention contains bot_id or bot_profile.

  • Applies the filter before replies, readiness checks, queueing, or agent dispatch.
  • Adds regression coverage for both bot identity markers and for empty and substantive mentions.

Reviews (1) · Last reviewed commit: "fix(slack): ignore mentions from other b..."

@izadoesdev
izadoesdev merged commit d042172 into staging Sep 17, 2026
15 checks passed
@izadoesdev
izadoesdev deleted the codex/slack-bot-mentions branch September 17, 2026 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant