Skip to content

fix(gateway): respect explicit Feishu enabled:false in config.yaml (fixes #47804)#61441

Open
kuangmi-bit wants to merge 1 commit into
NousResearch:mainfrom
kuangmi-bit:fix/feishu-env-override-enabled
Open

fix(gateway): respect explicit Feishu enabled:false in config.yaml (fixes #47804)#61441
kuangmi-bit wants to merge 1 commit into
NousResearch:mainfrom
kuangmi-bit:fix/feishu-env-override-enabled

Conversation

@kuangmi-bit

Copy link
Copy Markdown

Summary

_apply_env_overrides() unconditionally set Feishu.enabled = True when FEISHU_APP_ID and FEISHU_APP_SECRET env vars were present, ignoring explicit enabled: false in config.yaml. This broke multi-profile setups where a secondary profile inherits the default profile's env vars but must keep Feishu disabled.

Root Cause

At gateway/config.py L1859, the Feishu path did a blind config.platforms[Platform.FEISHU].enabled = True with no check for _enabled_explicit, unlike every other platform (Slack/DingTalk/WeCom/etc.) which respects explicit enabled: false.

Fix

Add the same _enabled_explicit check that Slack uses at L1596:

  • If the user explicitly set enabled: false in config.yaml, the env-var auto-enable is skipped
  • If the config is absent or has enabled unset, env vars still auto-enable as before

This matches the established pattern in the codebase.

Verification

  • Multi-profile with env-inherited Feishu creds + explicit enabled: false → Feishu stays disabled
  • Single-profile with env vars but no enabled in config → Feishu still auto-enables (no regression)
  • Lint passes

…ixes NousResearch#47804)

_apply_env_overrides() unconditionally set Feishu enabled=True when
FEISHU_APP_ID and FEISHU_APP_SECRET env vars were present, ignoring
explicit 'enabled: false' in config.yaml. This broke multi-profile
setups where a secondary profile inherits env vars from the default
profile but must keep Feishu disabled.

Fix mirrors the Slack platform pattern (L1596): check _enabled_explicit
before force-enabling. _enabled_explicit is set by _merge_platform_map
when 'enabled' appears in a top-level YAML entry or platforms.<name>
map entry.
@alt-glitch alt-glitch added type/bug Something isn't working comp/gateway Gateway runner, session dispatch, delivery platform/feishu Feishu / Lark adapter area/config Config system, migrations, profiles sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages P2 Medium — degraded but workaround exists labels Jul 9, 2026
@kuangmi-bit kuangmi-bit force-pushed the fix/feishu-env-override-enabled branch from 99abbae to a27ce85 Compare July 9, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Config system, migrations, profiles comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists platform/feishu Feishu / Lark adapter 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