fix(discord): opt threaded free-response channels in - #62814
Conversation
Duplicate of #33110 — same core mechanism (drop |
teknium1
left a comment
There was a problem hiding this comment.
Thanks for the focused routing tests. The current-main premise is real: plugins/platforms/discord/adapter.py:6223 makes every free-response channel skip auto-threading.
Problems
- The proposed replacement changes the established default for every existing free-response channel. Current docs explicitly describe free-response as inline to keep a lightweight chat surface (
website/docs/user-guide/messaging/discord.md:377) and state that free-response bypasses auto-threading (:385). This PR does not update that contract or provide an explicit migration/selection mechanism. - This is not admission-only in operational effect: when auto-thread creation fails, the current thread-first path drops the request after sending an error (
plugins/platforms/discord/adapter.py:6244-6263), whereas free-response channels currently remain inline.
Suggested changes
- Preserve the documented inline default and implement a config-backed opt-in for selected free-response channels if maintainers choose the dual-workflow design; retain
no_thread_channelsas the stronger opt-out. - Include documentation and configuration/precedence tests with the selected API.
This is an automated hermes-sweeper review.
| # | ||
| # Important: free-response controls admission only. It must not also | ||
| # imply no-thread, because mention-free bot channels commonly still want | ||
| # one thread per new top-level topic. Use DISCORD_NO_THREAD_CHANNELS for |
There was a problem hiding this comment.
This unconditionally changes the existing free-response contract, which current docs intentionally describe as inline to keep a lightweight chat surface (website/docs/user-guide/messaging/discord.md:377,385). Please preserve that default unless maintainers select the unconditional behavior; a config-backed opt-in would support threaded intake channels without changing every existing free-response channel.
83405ce to
d64c7c2
Compare
|
Thanks — addressed in the latest push. Changes from the original version:
Local verification:
|
Summary
free_response_channelsdiscord.force_thread_channels/DISCORD_FORCE_THREAD_CHANNELSas an explicit opt-in for mention-free intake channels that should still auto-threaddiscord.no_thread_channels/DISCORD_NO_THREAD_CHANNELSas the stronger inline-reply opt-outTest
env -u DISCORD_ALLOWED_CHANNELS -u DISCORD_REQUIRE_MENTION -u DISCORD_FREE_RESPONSE_CHANNELS -u DISCORD_FORCE_THREAD_CHANNELS -u DISCORD_NO_THREAD_CHANNELS uv run --with pytest --with pytest-asyncio python -m pytest tests/gateway/test_discord_free_response.py tests/gateway/test_discord_channel_controls.py tests/e2e/test_discord_adapter.py -q -o addopts=uv run --with ruff ruff check plugins/platforms/discord/adapter.py tests/gateway/test_discord_free_response.py tests/e2e/test_discord_adapter.py tests/conftest.py tools/environments/local.py