fix(slack): suppress no-reply sentinel sends#30646
Closed
shawnpetros wants to merge 1 commit into
Closed
Conversation
19 tasks
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 does this PR do?
Treats an exact
NO_REPLYresponse from the Slack adapter as intentional silence instead of user-visible message text.Slack channels and threads are shared human surfaces, so a gateway-backed agent may intentionally decide that a message should not receive a visible response. This adds a small final-send guard so the Slack adapter suppresses the explicit sentinel before
chat_postMessage, while still allowing ordinary messages that merely contain the textNO_REPLY.Reference PRs/context from this repo:
Related Issue
Fixes #30644
Type of Change
Changes Made
gateway/platforms/slack.py_is_no_reply_sentinel()for exact trimmedNO_REPLYdetection.chat_postMessageis called.SendResultwith suppression metadata so callers do not treat the turn as a send failure.tests/gateway/test_slack_no_reply_sentinel.pyNO_REPLYdoes not callchat_postMessage.NO_REPLYstill post normally.How to Test
python -m pytest tests/gateway/test_slack_no_reply_sentinel.py -q -o 'addopts='python -m pytest tests/gateway/test_slack.py tests/gateway/test_slack_approval_buttons.py tests/gateway/test_slack_no_reply_sentinel.py -q -o 'addopts='python -m pytest tests/gateway -q -o 'addopts='Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AFor New Skills
N/A
Screenshots / Logs
Targeted regression:
Relevant Slack gateway tests:
Broader gateway sweep was also run. It reached
5599 passed, 74 skipped; 6 Telegram tests failed on existingParseModerepr expectations ('MarkdownV2'vsMARKDOWN_V2) and are unrelated to this Slack-only change.