fix(tools): add Slack channel ID parsing to send_message target resolution - #11101
Closed
HelmholtzW wants to merge 2 commits into
Closed
fix(tools): add Slack channel ID parsing to send_message target resolution#11101HelmholtzW wants to merge 2 commits into
HelmholtzW wants to merge 2 commits into
Conversation
…ution Slack channel IDs (C=channel, D=DM, G=group, B=bot, U/F/V/W=user/app) were not handled by _parse_target_ref. This caused send_message calls targeting slack:<ID> to fall through to the home channel instead of sending to the specified channel. The fix adds a Slack-specific regex handler that: - Recognizes uppercase-prefixed Slack IDs (C, D, G, B, F, U, V, W) - Supports optional thread timestamp after colon (e.g. C0ANYSL2GBE:1776351448.347679) - Returns (channel_id, thread_ts, True) for proper routing Includes 10 new unit tests covering: - All valid Slack ID prefixes (C, D, G, B, U, F, V, W) - Thread timestamp extraction - Platform specificity (Slack IDs ignored on non-Slack platforms) - Negative cases (lowercase, invalid prefixes, malformed threads) Platforms tested: Linux (Python 3.11), all 19 parse_target tests pass.
…nts, add whitespace handling Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Collaborator
This was referenced Apr 26, 2026
Closed
Contributor
|
Thanks for the focused Slack target-resolution coverage. This is an automated hermes-sweeper review; current
The related duplicate note from @alt-glitch is consistent with the implementation now on main. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
Added Slack channel ID parsing to
_parse_target_ref()intools/send_message_tool.py.Why
_parse_target_refhad handlers for Telegram, Discord, Feishu, WeChat, and Matrix — but not Slack. Whensend_messagewas called with a Slack channel ID target (e.g.slack:C0ANYSL2GBE), the ID was not recognized as explicit, causing the message to fall through to the home channel instead of being sent to the specified channel.Slack channel IDs start with uppercase letters indicating their type:
They may also include a thread timestamp after a colon (e.g.
C0ANYSL2GBE:1776351448.347679).Changes
tools/send_message_tool.py^([BCDFGUVW][A-Z0-9]+)(?::(\d+\.\d+))?$to_parse_target_ref(channel_id, thread_ts, True)for recognized Slack IDstests/tools/test_send_message_tool.pyTestParseTargetRefSlackclass with 10 new tests:How to Test
source venv/bin/activate pytest tests/tools/test_send_message_tool.py::TestParseTargetRefSlack -vAll 19 parse_target tests pass:
Platforms Tested