Skip to content

Fix Slack bot_message event handling - #3

Draft
rapythe-cmyk wants to merge 1 commit into
orot-ai:mainfrom
rapythe-cmyk:fix/slack-bot-message-events
Draft

Fix Slack bot_message event handling#3
rapythe-cmyk wants to merge 1 commit into
orot-ai:mainfrom
rapythe-cmyk:fix/slack-bot-message-events

Conversation

@rapythe-cmyk

Copy link
Copy Markdown

Summary

  • Allow Slack message events with subtype=bot_message through the Socket Mode filter.
  • Tighten other-bot detection so it relies on bot_id or bot_message, not user.startswith("U").
  • Add token-free regression tests for event filtering and actor classification.
  • Update install docs so the new helper module is copied with the daemon.

Why

Previously, the Socket Mode listener ignored all messages with a subtype. Slack bot messages commonly arrive as subtype=bot_message, so dialog-channel bot-to-bot discussion mode could drop those events before handle_message() saw them.

The old is_other_bot logic also treated non-target human users with U-prefixed Slack IDs as other bots. The new helper keeps normal human users from being misclassified while still ignoring the daemon’s own bot messages.

Checks

  • python3 -m unittest tests/test_slack_jipsa_event_filter.py
  • python3 -m py_compile templates/scripts/slack-jipsa/daemon.py
  • python3 -m py_compile templates/hooks/append_turn_raw.py templates/lib/notion.py templates/lib/slack_mrkdwn.py templates/lib/md_to_notion.py
  • python3 templates/lib/slack_mrkdwn.py
  • git diff --check

Note: py_compile was run with PYTHONPYCACHEPREFIX=/private/tmp/agent-bootstrap-pycache on this sandboxed macOS environment so bytecode cache writes stayed inside an allowed temp directory.

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