Skip to content

fix(qqbot): add missing is_reconnect parameter to QQAdapter.connect() - #60161

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

fix(qqbot): add missing is_reconnect parameter to QQAdapter.connect()#60161
chenw0164-beep wants to merge 1 commit into
NousResearch:mainfrom
chenw0164-beep:fix/qqbot-is-reconnect

Conversation

@chenw0164-beep

Copy link
Copy Markdown

Summary

The gateway passes is_reconnect=True when reconnecting platform adapters, but QQAdapter.connect() was missing this parameter in its signature.

Error

✗ qqbot error: QQAdapter.connect() got an unexpected keyword argument 'is_reconnect'

Fix

Added *, is_reconnect: bool = False to QQAdapter.connect() to match the canonical adapter signature expected by gateway/run.py.

Testing

  • Cleared pyc cache
  • Restarted gateway
  • Confirmed: ✓ qqbot connected + Ready, session_id=...

The gateway passes is_reconnect=True when reconnecting adapters,
but QQAdapter.connect() was missing this parameter, causing:
  ✗ qqbot error: QQAdapter.connect() got an unexpected keyword argument 'is_reconnect'

Added *, is_reconnect: bool = False to match the canonical adapter
signature expected by gateway/run.py.
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/gateway Gateway runner, session dispatch, delivery platform/qqbot QQ Bot adapter sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages duplicate This issue or pull request already exists labels Jul 7, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Duplicate of #52966 — byte-identical one-line fix (async def connect(self, *, is_reconnect: bool = False)) for the same QQBot reconnect TypeError (issue #52914). #52966 is the earliest still-open canonical fix (the earlier #52922 is closed/unmerged). Other open siblings with the same fix: #53948, #54977. The fix is still absent on main, so the bug is live.

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the focused QQBot reconnect fix. This is already implemented on current main.

  • Automated hermes-sweeper review verified QQAdapter.connect(self, *, is_reconnect: bool = False) at gateway/platforms/qqbot/adapter.py:281.
  • The gateway still forwards the keyword on reconnect at gateway/run.py:3500 and gateway/run.py:8011-8013.
  • Commit 276542c729c10ff9d093760897f4c2d1256a79ce shipped the same fix plus regression coverage in tests/gateway/test_qqbot.py:193-206.
  • This also confirms the duplicate assessment in the prior discussion.

@teknium1 teknium1 closed this Jul 15, 2026
@teknium1 teknium1 added the sweeper:implemented-on-main Sweeper: behavior already present on current main label Jul 15, 2026
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:implemented-on-main Sweeper: behavior already present on current main 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.

3 participants