fix(feishu): avoid threading regular replies - #20562
Open
LeonSGP43 wants to merge 1 commit into
Open
Conversation
6 tasks
This was referenced May 20, 2026
11 tasks
teknium1
reviewed
Jul 12, 2026
teknium1
left a comment
Contributor
There was a problem hiding this comment.
Thanks for isolating a real Feishu routing problem.
Problems
- Current
mainstill has the problematic fallback atplugins/platforms/feishu/adapter.py:3252, but this PR changes the pre-plugin-migration pathgateway/platforms/feishu.py:2763. A salvage must move the change to the active adapter. - The proposed unconditional deletion also removes behavior introduced by merged PR #19711 (
a79b0ec46157efc91537e634a3dcc44a76f6dc7e) for Feishu Topic Mode payloads. The PR covers ordinary replies and explicitthread_id, but does not cover the compatibility shape that originally neededroot_id.
Suggested changes
- Resolve inbound routing in the active adapter by preferring explicit
thread_id, keeping ordinary quote replies flat, and retainingroot_idonly for a verified topic-specific fallback. - Add regressions for ordinary DM/group replies, explicit topic replies, and the retained fallback case.
Automated hermes-sweeper review.
| text = f"{hint}\n\n{text}" if text else hint | ||
|
|
||
| thread_id = getattr(message, "thread_id", None) or getattr(message, "root_id", None) or None | ||
| thread_id = getattr(message, "thread_id", None) or None |
Contributor
There was a problem hiding this comment.
This removes the fallback for every payload, but merged PR #19711 (a79b0ec46157efc91537e634a3dcc44a76f6dc7e) added it specifically for Feishu Topic Mode. Please distinguish ordinary quote replies from the verified topic-only compatibility shape and add coverage for both.
1 task
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
root_idas a fallbackthread_idfor inbound messagesroot_idavailable as reply context viareply_to_message_idFixes #20548
Verification
scripts/run_tests.sh tests/gateway/test_feishu.py -k 'ProcessInboundMessage or reply_to_text or thread_metadata'\n-scripts/run_tests.sh tests/gateway/test_feishu.py\n-python -m py_compile gateway/platforms/feishu.py\n-git diff --check