fix(discord): reuse existing auto-thread on create race - #48685
Closed
jeeves-assistant wants to merge 3 commits into
Closed
fix(discord): reuse existing auto-thread on create race#48685jeeves-assistant wants to merge 3 commits into
jeeves-assistant wants to merge 3 commits into
Conversation
Contributor
Author
|
Closing this stale agent-authored PR per the approved cleanup matrix. Evidence: it is currently conflicted/dirty and touches bundled Hermes Discord adapter/release-attribution code. The duplicate-thread bug may still be valid, but resolving this PR would require forbidden core/plugin conflict work in this lane. |
10 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.
Summary
message.create_thread()loses a race to another bot/client.message.threadand starter-message-id lookup paths.mainwith a normal merge commit and add the release attribution mapping for this PR author.Verification
python3 -m py_compile scripts/release.pyPYTHONPATH="$PWD" ~/.hermes/hermes-agent/venv/bin/python -m py_compile plugins/platforms/discord/adapter.py tests/gateway/test_discord_channel_controls.py tests/gateway/test_discord_slash_commands.py scripts/release.pyenv -u DISCORD_ALLOWED_CHANNELS -u DISCORD_REQUIRE_MENTION -u DISCORD_FREE_RESPONSE_CHANNELS -u DISCORD_IGNORED_CHANNELS -u DISCORD_NO_THREAD_CHANNELS PYTHONPATH="$PWD" ~/.hermes/hermes-agent/venv/bin/python -m pytest tests/gateway/test_discord_channel_controls.py tests/gateway/test_discord_slash_commands.py -q -k 'auto_create_thread or auto_thread' -o 'addopts='git diff --checkNotes
This fixes the duplicate-thread class seen when multiple Discord bots share a channel and one creates a thread from the user’s starter message before another adapter handles the same message.
PR #48690 covered the same race and is being closed as the duplicate; this PR remains the artifact of record.