Skip to content

feat(feishu): reply_in_thread from config.yaml (no .env) - #64332

Open
seamusmore wants to merge 1 commit into
NousResearch:mainfrom
seamusmore:feat/reply-in-thread-config
Open

feat(feishu): reply_in_thread from config.yaml (no .env)#64332
seamusmore wants to merge 1 commit into
NousResearch:mainfrom
seamusmore:feat/reply-in-thread-config

Conversation

@seamusmore

Copy link
Copy Markdown
Contributor

Summary

Adds reply_in_thread as a config.yaml platform setting for Feishu.

Changes (4 hunks, +6/-1 in plugins/platforms/feishu/adapter.py)

  1. FeishuAdapterSettings: add reply_in_thread: bool = True
  2. _load_settings: read from extra.get("reply_in_thread", True) (bridged from YAML by gateway/config.py:1196)
  3. _apply_settings: store as self._reply_in_thread
  4. Send logic: reply_in_thread = self._reply_in_thread and bool((metadata or {}).get("thread_id"))

Config

platforms:
  feishu:
    reply_in_thread: false

Background

Previous attempt (PR #39600) used FEISHU_REPLY_IN_THREAD env var — closed per policy (behavioral config → config.yaml, not .env). This re-scopes to config.yaml only.

Type

  • ✨ New feature

@alt-glitch alt-glitch added type/feature New feature or request comp/plugins Plugin system and bundled plugins platform/feishu Feishu / Lark adapter sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages P3 Low — cosmetic, nice to have labels Jul 14, 2026
@seamusmore seamusmore closed this Jul 14, 2026
@seamusmore seamusmore reopened this Jul 14, 2026

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 false path. The existing threaded-send test only asserts the default True behavior at tests/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 no reply_in_thread entry.

Suggested changes

  • Add a test constructing PlatformConfig(extra={"reply_in_thread": False}) and assert the captured reply request body sets reply_in_thread to False.
  • Add the exact platforms.feishu.reply_in_thread: false example and behavior to the Feishu guide.

Automated hermes-sweeper review.

Comment thread plugins/platforms/feishu/adapter.py Outdated
@@ -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(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@teknium1 teknium1 added the sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform label Jul 16, 2026
- 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
@seamusmore
seamusmore force-pushed the feat/reply-in-thread-config branch from 34e53be to 50be192 Compare July 16, 2026 06:19

@seamusmore seamusmore left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fine

@GottZ

GottZ commented Aug 3, 2026

Copy link
Copy Markdown

This was generated by AI during triage.

Summary

84 PRs address or reference this Feishu-heavy complex: they span mention admission, topic/reply anchors, invalid receive_id_type=thread_id routing, media and delayed-delivery anchors, quote-versus-topic session identity, and adjacent Telegram threading or upgrade diagnostics. The diffs show several distinct lanes rather than one interchangeable fix, with earlier mention and progress-routing work already salvaged or merged while current topic-media, quote-routing, and configuration proposals remain competing.

Related pull requests

Duplicates

Mention-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 consolidation

Keep #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 reply_in_thread clearly distinguishes top-level topic creation from preserving an existing topic. Do not collapse the recorded best fixes into generic duplicates: keep #33582, #35663, #54497, #55766, and #75940 on their issue-specific salvage paths, treat closed #44259 as the historical best fix superseded by broader #36233, and close only true superseded twins while consolidating current topic-media work on the fail-closed, anchor-propagating direction demonstrated by updated #76677/#64343/#61383.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have platform/feishu Feishu / Lark adapter sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants