Skip to content

fix(feishu): require explicit bot mention for @all - #61865

Open
futuhkdata-source wants to merge 1 commit into
NousResearch:mainfrom
futuhkdata-source:fix/feishu-at-all-explicit-mention
Open

fix(feishu): require explicit bot mention for @all#61865
futuhkdata-source wants to merge 1 commit into
NousResearch:mainfrom
futuhkdata-source:fix/feishu-at-all-explicit-mention

Conversation

@futuhkdata-source

@futuhkdata-source futuhkdata-source commented Jul 10, 2026

Copy link
Copy Markdown

Summary

  • stop treating Feishu/Lark @_all as an explicit bot mention in mention-gated groups
  • preserve explicit bot mention admission by open_id/user_id/name
  • keep intentional no-mention groups as configuration exceptions (sandbox + multiprofit remain require_mention=false outside this PR)
  • update/add regression tests for @ALL mention gating

Tests

  • python -m pytest tests/gateway/test_feishu_bot_admission.py tests/gateway/test_feishu.py::TestGroupMentionAtAll -q

Local runtime note

  • production config currently has global require_mention=true with only the intentional sandbox/multiprofit no-mention exceptions
  • local verification script confirms @_all is not considered a self mention while explicit @bot still is

@alt-glitch alt-glitch added type/bug Something isn't working comp/plugins Plugin system and bundled plugins platform/feishu Feishu / Lark adapter P3 Low — cosmetic, nice to have duplicate This issue or pull request already exists labels Jul 10, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Duplicate of #59347 — both drop the @_all -> return True branch from Feishu _mentions_self() so Feishu/Lark @everyone no longer counts as an explicit bot mention (same mechanism). #59347 (earlier, 2026-07-06) is canonical: it is clean/focused and targets the current adapter path plugins/platforms/feishu/adapter.py.

Note: this PR edits gateway/platforms/feishu.py, which no longer exists on main — the Feishu adapter was relocated to plugins/platforms/feishu/adapter.py. The branch is also a whole-branch push bundling many unrelated changes (cron scheduler, terminal tool, process registry, gateway runtime footer, CLI, AGENTS.md), which is why it shows as CONFLICTING. Related: #60910, #33775 (config-toggle approaches), and issue #33723.

@futuhkdata-source
futuhkdata-source force-pushed the fix/feishu-at-all-explicit-mention branch from d3cabb0 to 8f53c3b Compare July 10, 2026 05:03
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the focused regression coverage. The premise is confirmed on current main: plugins/platforms/feishu/adapter.py:4334-4335 treats every raw @_all token as a self-mention, and _admit() uses that result for the required-mention group gate at plugins/platforms/feishu/adapter.py:4274-4275. Removing that early return preserves explicit ID/name mention matching and the normalized is_self check at plugins/platforms/feishu/adapter.py:4336-4345,4370-4371.

Problems

  • website/docs/user-guide/messaging/feishu.md:238 currently says @all satisfies the explicit-mention gate. That statement becomes incorrect with this change.

Suggested changes

  • Update that group-policy sentence to require an explicit bot mention, while preserving the documented mention-free configuration exceptions at lines 240-246 and 527-529.

The three-file patch applies cleanly to current main (git apply --check), so this is otherwise mechanically straightforward to salvage.

Automated hermes-sweeper review.

@teknium1 teknium1 added sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 11, 2026
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 duplicate This issue or pull request already exists 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-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants