fix(discord): auto-thread free-response channels - #18592
Conversation
|
Pushed follow-up commit |
16dcd43 to
3d8c57c
Compare
|
CI failure fix pushed. Root cause: the PR branch had drifted behind current
Fix:
Local verification:
Pushed commit: |
34a8a43 to
353d8ec
Compare
0396192 to
f868b44
Compare
39788e0 to
4674b9c
Compare
teknium1
left a comment
There was a problem hiding this comment.
Thanks for the Discord coverage and the live verification.
Problems
- The free-response change conflicts with current behavior and stated intent:
plugins/platforms/discord/adapter.py:6223keepsis_free_channelinskip_thread, whilewebsite/docs/user-guide/messaging/discord.md:377documents inline replies for free-response channels. Commitd55754456added that guard specifically to prevent a thread per free-response message. - The semantic-title work is now provided by
0d9ed9214: auto-created-thread provenance is carried byplugins/platforms/discord/adapter.py:5355-5359,6338-6342, andgateway/run.py:13527-13610,19021-19026retitles after the first exchange without overwriting a human rename.
Suggested changes
- Preserve the current free-response inline policy unless maintainers choose a documented design change. Any remaining title issue should be re-scoped to a verified gap in the current semantic-title path.
Automated hermes-sweeper review.
| no_thread_channels_raw = os.getenv("DISCORD_NO_THREAD_CHANNELS", "") | ||
| no_thread_channels = {ch.strip() for ch in no_thread_channels_raw.split(",") if ch.strip()} | ||
| skip_thread = bool(channel_ids & no_thread_channels) or is_free_channel | ||
| skip_thread = bool(channel_ids & no_thread_channels) |
There was a problem hiding this comment.
This reverses the later explicit free-response contract. Current main retains or is_free_channel in the active adapter (plugins/platforms/discord/adapter.py:6223); commit d55754456 and website/docs/user-guide/messaging/discord.md:377 define free-response channels as intentionally inline to avoid creating one thread per message.
|
Closing because current upstream intentionally keeps free-response channels inline, while the still-useful semantic-title behavior has already landed separately. The remaining patch is obsolete and conflicts with documented behavior. |
Summary
discord.free_response_channelsfrom disabling auto-thread creationdiscord.no_thread_channelsas the explicit auto-thread opt-outRuntime verification
Test plan
python -m pytest tests/agent/test_title_generator.py tests/gateway/test_discord_slash_commands.py -q -o 'addopts='— 62 passed