fix(gateway): load nested platform config + bridge Discord allow_from - #35329
Merged
Conversation
The plugin apply_yaml_config_fn dispatch loop only ran when a top-level platform block (e.g. `discord:`) existed. Configs that defined a platform only under `platforms.<name>` or `gateway.platforms.<name>` skipped the hook, so `platforms.discord.extra.allow_from` never reached DISCORD_ALLOWED_USERS. Fall back to those nested blocks when the top-level one is absent. Also map byquenox@gmail.com -> Que0x for the salvaged commits.
Contributor
🔎 Lint report:
|
This was referenced May 30, 2026
5 tasks
3 tasks
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
Gateway config defined under documented-but-unwired paths now actually takes effect: nested
gateway.platforms.<name>blocks load, and Discordallow_fromreaches the env var the adapter enforces auth from. Combines two que0x (@Que0x) fixes that both touchedgateway/config.pyand would have conflicted if merged separately.Changes
gateway/config.py: generalize the existinggateway.streamingnested-fallback pattern to platforms — mergegateway.platforms.<name>into the platform map (top-levelplatforms:keeps precedence). (fix(gateway): load nested gateway.platforms config #34565)plugins/platforms/discord/adapter.py+gateway/config.py: bridgediscord.allow_fromandplatforms.discord.extra.allow_fromtoDISCORD_ALLOWED_USERS, env-overrides-first. (Fix Discord allow_from config bridge for gateway auth #34557)gateway/config.py: follow-up — run pluginapply_yaml_config_fnhooks even when a platform is configured only under a nested block (no top-leveldiscord:), so theplatforms.discord.extra.allow_frompath actually fires.scripts/release.py: mapbyquenox@gmail.com->Que0x.Root cause
load_gateway_config()only merged top-levelplatforms:, and the adapter-hook dispatch loop only ran for top-level blocks. Both left documented config paths silently inert.Validation
gateway.platforms.telegram.*discord.allow_from->DISCORD_ALLOWED_USERSplatforms.discord.extra.allow_from-> envplatforms:vsgateway.platforms:tests/gateway/test_config.py+ discord auth/control suites: 107 passedSalvages #34557 and #34565 (both @Que0x), contributor commits preserved.
Infographic