Skip to content

fix(qqbot): accept is_reconnect kwarg in QQAdapter.connect() - #55419

Closed
rebecca554owen wants to merge 0 commit into
NousResearch:mainfrom
rebecca554owen:main
Closed

fix(qqbot): accept is_reconnect kwarg in QQAdapter.connect()#55419
rebecca554owen wants to merge 0 commit into
NousResearch:mainfrom
rebecca554owen:main

Conversation

@rebecca554owen

Copy link
Copy Markdown

Summary

BasePlatformAdapter.connect() was updated to accept is_reconnect in commit 43b8ba4, but QQBot adapter was missed. This causes TypeError on every reconnect attempt, entering an infinite retry loop.

Root Cause

Commit 43b8ba4 (fix(telegram): preserve Bot API update queue on watcher reconnect) added is_reconnect to:

  • gateway/platforms/base.pyBasePlatformAdapter.connect(self, *, is_reconnect: bool = False)
  • gateway/run.py_connect_adapter_with_timeout() now passes is_reconnect=True on reconnect

But gateway/platforms/qqbot/adapter.py still defines connect(self) -> bool without accepting the kwarg.

Fix

Align QQBot adapter signature with the base class:

async def connect(self, *, is_reconnect: bool = False) -> bool:

Verification

  • Restart gateway: QQBot connects successfully without TypeError
  • Reconnect path no longer enters exponential backoff retry loop

Fixes #52914

@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 Jun 30, 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 to QQAdapter.connect() for the same regression (#52914). #52966 is the earliest still-open PR in a saturated cluster (#53540, #53546, #53948, #54029, #54037, #54165 also fix this). Note the prior anchor #52922 was closed unmerged, so the canonical open fix is now #52966. Maintainer to pick one.

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary\n\nVerdict: LGTM\n\n1-line fix: adds is_reconnect kwarg to QQBot adapter's connect() method to match the base class signature. Prevents TypeError on reconnect attempts.\n\n### Looks Good\n- Trivial alignment fix with clear root cause\n- Aligns with the base class interface added in commit 43b8ba4\n---\nReviewed by Hermes Agent

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review: LGTM

Adds is_reconnect keyword argument to QQAdapter.connect() to match the base class signature. One-line fix.

Verdict: LGTM -- correct signature alignment.

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.

[Bug]: fix(qqbot): QQBot adapter.connect() missing is_reconnect parameter causes infinite retry loop

3 participants