Skip to content

fix(qqbot): add missing is_reconnect param to QQAdapter.connect() - #58607

Closed
Makat0 wants to merge 1 commit into
NousResearch:mainfrom
Makat0:fix/qqbot-connect-is-reconnect
Closed

fix(qqbot): add missing is_reconnect param to QQAdapter.connect()#58607
Makat0 wants to merge 1 commit into
NousResearch:mainfrom
Makat0:fix/qqbot-connect-is-reconnect

Conversation

@Makat0

@Makat0 Makat0 commented Jul 5, 2026

Copy link
Copy Markdown

Summary

  • QQAdapter.connect() was missing the is_reconnect keyword-only parameter that gateway/run.py passes on reconnection attempts
  • This caused a TypeError on every reconnect, preventing the QQ bot from recovering after a dropped WebSocket
  • All other platform adapters already accept this parameter — this aligns QQAdapter with the BasePlatformAdapter.connect() interface

Test plan

  • Verify QQ bot connects normally on first launch
  • Simulate a WebSocket disconnect and confirm reconnection succeeds without TypeError

🤖 Generated with Claude Code

The gateway's reconnection loop passes `is_reconnect=True` to
`adapter.connect()`, but `QQAdapter.connect()` did not accept
keyword arguments — causing a TypeError on every reconnect attempt
and preventing the QQ bot from recovering after a dropped WebSocket.

Add the `is_reconnect` keyword-only parameter with a default of
`False` to match the `BasePlatformAdapter.connect()` signature that
all other platform adapters already implement.

Co-Authored-By: Claude <noreply@anthropic.com>
@alt-glitch alt-glitch added type/bug Something isn't working comp/gateway Gateway runner, session dispatch, delivery platform/qqbot QQ Bot adapter P2 Medium — degraded but workaround exists sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages duplicate This issue or pull request already exists labels Jul 5, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Duplicate of #52966 — identical one-line fix adding the keyword-only is_reconnect: bool = False parameter to QQAdapter.connect() to match the BasePlatformAdapter.connect() contract (added in 43b8ba4). #52966 is the earliest still-open canonical fix for #52914; the earlier #52922 was closed unmerged. Saturated cluster of identical QQBot reconnect fixes — maintainer should pick one.

@Makat0

Makat0 commented Jul 5, 2026

Copy link
Copy Markdown
Author

Duplicate of 86a0c55 — the GROUP_MESSAGE_CREATE smart trigger support is already part of that commit. This 1-line fix is superseded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery duplicate This issue or pull request already exists P2 Medium — degraded but workaround exists platform/qqbot QQ Bot adapter sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants