fix(discord): honor auto_thread_free_response in routing - #86351
fix(discord): honor auto_thread_free_response in routing#86351bertholomus wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Related: #33110 addresses the same free-response auto-threading cluster, but uses a different default behavior and bundles thread-label changes. This patch restores the existing explicit |
fix(discord): honor auto_thread_free_response in routing No blocking issues found. A few minor observations:
|
|
I compared this with my duplicate PR #89473. Your implementation has the stronger focused coverage and uses the existing _apply_yaml_config path, so I’ll close mine as a duplicate. Useful additions from my testing: documentation for auto_thread_free_response; |
|
This regression reproduced again on current main after the local commit was reset during update. The current adapter also scopes Discord gate values per profile under multiplex, so the durable implementation now additionally: (1) adds DISCORD_AUTO_THREAD_FREE_RESPONSE to _GATE_ENV_KEYS, (2) resolves it through _gate_raw("auto_thread_free_response", "DISCORD_AUTO_THREAD_FREE_RESPONSE"), (3) seeds PlatformConfig.extra in _apply_yaml_config while respecting _profile_scoped_config_load(), and (4) covers multiplex gate isolation. Current focused verification: 45 tests across test_discord_free_response.py and test_discord_gate_isolation.py. I cannot update this PR branch because the active OAuth token lacks workflow scope and the current base modifies .github/workflows/ci.yaml; the existing PR remains the upstream durability gate. |
|
Tested the same mechanism locally on current main (2-person server, free-response + auto-thread) — confirms the need. Supporting this PR over #103990: the config.yaml key with env bridge plus tests is the right shape per repo conventions. Happy to help rebase if needed — current main has moved (routing now around adapter.py ~5997). |
Summary
discord.auto_thread_free_responseopt-in in the current plugin Discord adapterPlatformConfig.extrawhile preserving legacy env compatibilityno_thread_channelsas the hard overrideReproduction
With
free_response_channelscontaining the parent,auto_thread: true, andauto_thread_free_response: true, currentmainstill executes:That unconditional
or is_free_channelmakes the public opt-in ineffective and routes replies into the parent channel.Verification
python -m pytest tests/gateway/test_discord_free_response.py -q -o addopts=→ 23 passed_apply_yaml_configprobe confirmsauto_thread_free_responseis seeded and legacy env is bridgedgit diff --checkRelated work
Several older PRs address similar behavior using alternate config names or pre-plugin paths. This patch targets the current
plugins/platforms/discord/adapter.pyimplementation and the already-present public keyauto_thread_free_response.