Skip to content

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

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

fix(qqbot): add missing is_reconnect parameter to QQAdapter.connect()#58758
LAN-TINA-WS wants to merge 1 commit into
NousResearch:mainfrom
LAN-TINA-WS:fix/qqbot-connect-is-reconnect

Conversation

@LAN-TINA-WS

Copy link
Copy Markdown

Problem

QQ Bot connection enters an infinite failure loop. Every reconnect attempt crashes:

QQAdapter.connect() got an unexpected keyword argument 'is_reconnect'

Root Cause

The Hermes gateway calls adapter.connect(is_reconnect=True) during reconnection. All platform adapters (Telegram, Discord, Slack, etc.) accept this parameter — but QQAdapter's connect() only accepted self, causing reconnection to fail permanently.

Fix

One line — add is_reconnect: bool = False to QQAdapter.connect() signature. Default value preserves existing behavior for initial connections.

Verification

  • Gateway logs confirm QQ Bot now connects and reconnects successfully
  • Session resume works correctly after server-initiated reconnect (op 7)

@LAN-TINA-WS
LAN-TINA-WS force-pushed the fix/qqbot-connect-is-reconnect branch 2 times, most recently from 0af24e1 to e02ccf8 Compare July 5, 2026 09:32
@alt-glitch alt-glitch added type/bug Something isn't working 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 P2 Medium — degraded but workaround 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 is_reconnect: bool = False parameter to QQAdapter.connect() in gateway/platforms/qqbot/adapter.py, which #52966 (the earliest still-open canonical fix for issue #52914) already implements. The earlier #52922 is closed/unmerged, so #52966 is the canonical open target. Part of a saturated fix cluster (#57105, #58607). Maintainer picks one to merge.

@LAN-TINA-WS
LAN-TINA-WS force-pushed the fix/qqbot-connect-is-reconnect branch from e02ccf8 to 2fea9be Compare July 5, 2026 09:47
Gateway reconnection calls adapter.connect(is_reconnect=True), but
QQAdapter's connect() accepted only self, causing perpetual failure:

  QQAdapter.connect() got an unexpected keyword argument 'is_reconnect'

All other platform adapters accept this parameter. Add it with a
default of False so initial connections are unaffected.

Closes NousResearch#58646
@LAN-TINA-WS
LAN-TINA-WS force-pushed the fix/qqbot-connect-is-reconnect branch from 2fea9be to 1371385 Compare July 5, 2026 09:53
@needles-mybot

Copy link
Copy Markdown

Duplicate: already fixed on main in 4b873dc64 (QQAdapter.connect() missing is_reconnect param). Closing.

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the focused 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 reconnect path forwards that keyword at gateway/run.py:3500 and invokes it with True at gateway/run.py:8011-8013.
  • Commit 276542c729c10ff9d093760897f4c2d1256a79ce added the implementation and the equivalent regression test at tests/gateway/test_qqbot.py:193-206.

The discussion correctly identified this as a duplicate/saturated fix cluster; the current-main fix is the verified resolution.

@teknium1 teknium1 closed this Jul 15, 2026
@teknium1 teknium1 added sweeper:implemented-on-main Sweeper: behavior already present on current main sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels 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:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform 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.

4 participants