feat(feishu): reply_in_thread from config.yaml (no .env) - #64332
feat(feishu): reply_in_thread from config.yaml (no .env)#64332seamusmore wants to merge 1 commit into
Conversation
teknium1
left a comment
There was a problem hiding this comment.
Thanks for re-scoping this from the prior environment-variable proposal to config.yaml. The implementation matches the existing gateway bridge: gateway/config.py:1195-1196 already transfers a top-level reply_in_thread value into adapter extras, and current main always enables threaded replies at plugins/platforms/feishu/adapter.py:4616.
Problems
- No regression covers the new
falsepath. The existing threaded-send test only asserts the defaultTruebehavior attests/gateway/test_feishu.py:2108-2146. - The user-facing setting is not documented. The Feishu guide's YAML settings section begins at
website/docs/user-guide/messaging/feishu.md:474, but has noreply_in_threadentry.
Suggested changes
- Add a test constructing
PlatformConfig(extra={"reply_in_thread": False})and assert the captured reply request body setsreply_in_threadtoFalse. - Add the exact
platforms.feishu.reply_in_thread: falseexample and behavior to the Feishu guide.
Automated hermes-sweeper review.
| @@ -1600,6 +1601,9 @@ def _load_settings(extra: Dict[str, Any]) -> FeishuAdapterSettings: | |||
| require_mention=_to_boolean( | |||
| extra.get("require_mention", os.getenv("FEISHU_REQUIRE_MENTION", "true")) | |||
| ), | |||
| reply_in_thread=_to_boolean( | |||
There was a problem hiding this comment.
Please add a regression test for this new false-setting path. Current coverage at tests/gateway/test_feishu.py:2108-2146 only asserts the default threaded reply is True; construct the adapter with PlatformConfig(extra={"reply_in_thread": False}) and assert the captured reply body is false.
- Add test_send_does_not_reply_in_thread_when_setting_is_false asserting
PlatformConfig(extra={'reply_in_thread': False}) produces reply_in_thread=false
in the reply request body
- Document platforms.feishu.reply_in_thread in the Feishu messaging guide
34e53be to
50be192
Compare
Summary84 PRs address or reference this Feishu-heavy complex: they span mention admission, topic/reply anchors, invalid Related pull requests
DuplicatesMention-toggle duplicates cluster around #4591/#5219/#7546/#12411/#15058/#15227/#15525/#16864/#17406 and were superseded by merged #18208; first-stream/topic-progress duplicates converge on merged #23437/#20851. Quote-session duplicates #20562/#23282/#23758/#29467/#30164/#36233/#42259/#44058/#44083/#44259/#44430/#44514 overlap heavily, while invalid-thread/media fixes #33582/#33584/#35663/#37322/#39563/#54497/#55067/#59444/#61383/#61398/#64343/#65520/#75940/#76677 share causes but differ materially on anchor propagation, lookup, retry, or fail-closed behavior. Suggested consolidationKeep #64332 open with a salvage path, consistent with its visible keep-open review: retain the config.yaml-only scope and current false-path test/docs, but reconcile its semantics with #65519 and #60916 so Cross-PR triage: Reviewed 84 pull requests and 22 issues in this complex. Diffs were read for 42 of 84 PRs (rest unavailable); Assessment working set: 545 kB of PR diffs, 240 kB of issue/PR text, 136 kB of discussion (208 comments), 19 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch. |
Summary
Adds
reply_in_threadas a config.yaml platform setting for Feishu.Changes (4 hunks, +6/-1 in
plugins/platforms/feishu/adapter.py)FeishuAdapterSettings: addreply_in_thread: bool = True_load_settings: read fromextra.get("reply_in_thread", True)(bridged from YAML bygateway/config.py:1196)_apply_settings: store asself._reply_in_threadreply_in_thread = self._reply_in_thread and bool((metadata or {}).get("thread_id"))Config
Background
Previous attempt (PR #39600) used
FEISHU_REPLY_IN_THREADenv var — closed per policy (behavioral config → config.yaml, not .env). This re-scopes to config.yaml only.Type