fix(slack): handle bot alert Block Kit text - #52219
Conversation
999c28f to
a7ed068
Compare
|
Closing: this PR was opened against the receiver side by mistake. The intended sender-side fix is now in AGMO-Inc/sdm-infra#356. |
|
Reopening after producer-side validation: Slack/Grafana webhook now emits top-level text, but external Slack app events still stop at raw bot_message logs and do not reach gateway inbound handling unless receiver accepts bot messages in explicitly configured free-response alert channels.\n\nVerification rerun locally:\n- python -m pytest tests/gateway/test_slack_mention.py: 66 passed\n- python -m pytest tests/gateway/test_slack*.py: 335 passed\n- python -m compileall -q plugins/platforms/slack/adapter.py tests/gateway/test_slack_mention.py: passed |
|
Thanks for tracing the receiver-side Slack alert path. The live inbound premise is still present on current main: Problems
Suggested changes
Automated hermes-sweeper review. |
|
Closing as superseded by #69316 (merged): block extraction landed; the bundled free_response_channels behavior change is out of this bug-class scope — feel free to re-file it standalone. Thanks for digging into this — the consolidated fix stands on the cluster's collective analysis, and your work is credited in #69316's summary. |
Summary
free_response_channelsas an explicit opt-in for external Slack bot/app messages so alert channels can trigger the agent without requiring a mention.section,header,fields,context,input, andactionsblocks when top-leveltextis empty.Why
Slack alert apps can emit
bot_messageevents with empty top-leveltextwhile the human-visible payload is only present inblocksorattachments[].blocks. Those events were received by the Slack gateway but could be dropped before becoming inbound Hermes messages.Tests
python -m pytest tests/gateway/test_slack_mention.py— 66 passed, 2 warningspython -m pytest tests/gateway/test_slack*.py— 335 passed, 51 warnings (existing async mock/socket watchdog warnings)python -m compileall -q plugins/platforms/slack/adapter.py tests/gateway/test_slack_mention.pygit diff --check