fix(qqbot): add is_reconnect param to QQAdapter.connect for gateway reconnect compat - #52966
luxuguang-leo wants to merge 1 commit into
Conversation
…econnect compat
The base adapter's signature was updated to include
, which the reconnect watcher passes as
during reconnection. All other platform adapters were
updated, but QQAdapter was missed, causing:
TypeError: QQAdapter.connect() got an unexpected keyword argument 'is_reconnect'
This leads to an infinite retry loop since every reconnect attempt fails
immediately with the same TypeError.
Fix: add to QQAdapter.connect()'s signature.
QQBot has no server-side update queue, so the flag is accepted only for
interface conformance.
Test: new test_connect_accepts_is_reconnect_param verifies both
adapter.connect() and adapter.connect(is_reconnect=True) succeed without
raising.
|
I independently encountered and fixed this same bug. This PR's approach is correct — it matches the The fix is clean, focused, and includes a test ( One note: PR #52922 has encoding corruption throughout its diff (UTF-8 BOM injection, em-dash U+2014 garbled to mojibake, Chinese text corrupted). That diff would need significant cleanup before it could merge. This PR (#52966) is the clean fix. From an independent reviewer who arrived at the exact same fix. |
|
When will this fix be merged? |
Re-triage correction (follow-up to the earlier "Duplicate of #52922" note above): that label is now stale. #52922 has since been CLOSED (not merged), and a resubmission is not a duplicate of a closed item. This PR (created 2026-06-26) is now the earliest open fix PR for #52914, and the contract gap is still live on Accordingly the |
|
+1 — independently hit the same reconnect loop on a headless QQ Bot setup. Applied the exact same one-line fix locally and the full handshake (token → WebSocket → ready) completes cleanly. Would be great to see this merged. Thanks @luxuguang-leo. |
|
I just ran into this exact bug. QQ Bot is completely bricked out of the box , the gateway starts, shows active, but QQ never connects. First-time users waste hours debugging because systemctl status lies and the real error is buried in a log file. This isn't cosmetic. QQ Bot is one of the most requested gateway platforms for the Asian market, and it is entirely non-functional on current main. The fix is a single keyword parameter one character class of a diff. It's been independently verified by hundreds and thounsands users across the world against the live QQ API. And yet, 11 days later, CI never triggered, zero reviews, stuck at action_required. #52922 closed. #54029, #54037, #56550, and others. all the same fix, all ignored. That's not triage. it's neglect of a platform integration that ships as part of the core product. A one-line fix for a flagship feature, confirmed working by multiple people, sits rotting while everyone files duplicate PRs hoping one gets noticed. Please merge it or mark it salvage so someone can take over. |
|
Thanks for the callout @kingsznhone — you're right, the QQ Bot situation has been dragging too long. @teknium1 @tonydwb could either of you take a look at this one when you get a chance? It's a minimal one-line interface fix ( Also have two related clean-up PRs if you're doing a pass:
Happy to rebase or adjust anything. Thanks! |
|
@teknium1 @tonybwb This is a one-line fix that has been independently verified by multiple users and reviewed as LGTM by the automated reviewer. Every other platform adapter (Telegram, Discord, WeChat, Signal, etc.) already has this signature — QQBot is the only one still broken. The PR has been sitting for 12 days with CI stuck at |
|
This PR is mergeable (no conflicts) and the fix is confirmed working locally. Any chance this could get reviewed and merged? 🙏 |
|
Merged via PR #61767. Your QQ Bot reconnect fix was cherry-picked onto current main, the same contract bug was fixed in WeCom Callback, and repository-wide regression coverage was added. Your authorship is preserved in git history. Thank you. |
Problem
The gateway reconnect watcher calls
adapter.connect(is_reconnect=True)on every platform adapter during reconnection. QQAdapter'sconnect()did not accept theis_reconnectkeyword argument, causing:This leads to an infinite retry loop — every reconnect attempt fails with the same TypeError, the watcher backs off and retries, ad infinitum.
Root Cause
The base adapter's
connect()abstract method was updated to include theis_reconnectparameter (commit43b8ba4181or earlier). All other platform adapters (Telegram, Discord, Feishu, WeChat, Signal, etc.) were updated to match the new signature. QQAdapter was missed.Fix
Add
*, is_reconnect: bool = FalsetoQQAdapter.connect()'s signature. QQBot has no server-side update queue (unlike Telegram's Bot API), so the flag is accepted for interface conformance only — it is not used within the method.Testing
test_connect_accepts_is_reconnect_paramverifies bothadapter.connect()andadapter.connect(is_reconnect=True)complete without raisingTypeError.aiohttp/httpxpackages, none related to this change).References