fix(qqbot): accept is_reconnect kwarg in connect() to match base class - #60831
Closed
Mayrixon wants to merge 1 commit into
Closed
fix(qqbot): accept is_reconnect kwarg in connect() to match base class#60831Mayrixon wants to merge 1 commit into
Mayrixon wants to merge 1 commit into
Conversation
Commit 43b8ba4 (fix NousResearch#46621) added is_reconnect to BasePlatformAdapter.connect() and the gateway runner now passes it to every adapter. QQAdapter overrode connect() with the old narrow signature async def connect(self) -> bool:, causing: QQAdapter.connect() got an unexpected keyword argument 'is_reconnect' on every cold-boot and reconnect attempt. Accept the kwarg (keyword-only, default False) to match the base class contract. The adapter does not maintain a server-side update queue so the flag is ignored.
Collaborator
Duplicate of #52966 (earliest still-open fix for the same one-line |
Contributor
|
Thanks for the focused QQBot contract fix. This automated hermes-sweeper review found that the exact behavior is already on current
Closing as implemented on main. |
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
Commit
43b8ba4181(fix #46621, 2026-06-25) added anis_reconnectkeyword argument toBasePlatformAdapter.connect(), andGatewayRunner._connect_adapter_with_timeoutnow passes it to every adapter. However,QQAdapteroverridesconnect()with the old narrow signature:This causes every cold-boot and reconnect attempt to fail with:
The QQ bot is stuck in an infinite reconnect loop (88+ attempts logged in one session).
Fix
Accept the
is_reconnectkeyword-only argument with defaultFalseto match the base class contract:The QQ adapter does not maintain a server-side update queue, so the flag is ignored — same pattern as webhook, signal, whatsapp_cloud, and other adapters that were correctly updated in the original commit.
Testing
TypeErrorfor qqbotis_reconnectis accepted and ignored