fix(gateway): respect explicit Feishu enabled:false in config.yaml (fixes #47804)#61441
Open
kuangmi-bit wants to merge 1 commit into
Open
fix(gateway): respect explicit Feishu enabled:false in config.yaml (fixes #47804)#61441kuangmi-bit wants to merge 1 commit into
kuangmi-bit wants to merge 1 commit into
Conversation
…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.
99abbae to
a27ce85
Compare
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
_apply_env_overrides()unconditionally setFeishu.enabled = TruewhenFEISHU_APP_IDandFEISHU_APP_SECRETenv vars were present, ignoring explicitenabled: falseinconfig.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.pyL1859, the Feishu path did a blindconfig.platforms[Platform.FEISHU].enabled = Truewith no check for_enabled_explicit, unlike every other platform (Slack/DingTalk/WeCom/etc.) which respects explicitenabled: false.Fix
Add the same
_enabled_explicitcheck that Slack uses at L1596:enabled: falseinconfig.yaml, the env-var auto-enable is skippedenabledunset, env vars still auto-enable as beforeThis matches the established pattern in the codebase.
Verification
enabled: false→ Feishu stays disabledenabledin config → Feishu still auto-enables (no regression)