Skip to content

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

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

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

Conversation

@iborazzi

Copy link
Copy Markdown
Contributor

Problem

Commit 43b8ba4 added an is_reconnect: bool = False keyword argument
to BasePlatformAdapter.connect() and updated gateway/run.py to pass
is_reconnect=True on reconnect attempts. However, QQAdapter.connect()
was not updated to accept this parameter, causing a TypeError on every
reconnect and triggering an infinite retry loop.

Fix

Add the is_reconnect: bool = False keyword-only parameter to
QQAdapter.connect() in gateway/platforms/qqbot/adapter.py (line 281)
to match the base class signature.

Changes

  • gateway/platforms/qqbot/adapter.py: updated connect(self)
    connect(self, *, is_reconnect: bool = False)

Testing

Verified no other platform adapters were missing this parameter.

Fixes #52914

@iborazzi
iborazzi requested a review from a team June 26, 2026 06:50
@iborazzi
iborazzi force-pushed the fix/qqbot-connect-is-reconnect-param branch from d056391 to f203169 Compare June 26, 2026 06:55
@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 labels Jun 26, 2026
@Uesrmnae

Copy link
Copy Markdown

Thanks for submitting this fix! The core change (connect(self, *, is_reconnect: bool = False)) is exactly right.

However, this diff has encoding corruption that would block merge:

  • A UTF-8 BOM (U+FEFF) was prepended to the file (line 1)
  • ALL em-dashes (U+2014) throughout the file were corrupted to mojibake
  • Several arrows (U+2192) were also corrupted
  • A Chinese text string got garbled ([语音识别失败] became garbage)

These appear to be editor encoding issues. PR #52966 has the same functional fix without any encoding problems and includes a test. If you'd like to salvage this PR, the file needs to be re-edited with proper UTF-8 handling.

Just flagging this for maintainers!

@iborazzi
iborazzi force-pushed the fix/qqbot-connect-is-reconnect-param branch from f203169 to 1f2d82b Compare June 29, 2026 05:29
@iborazzi

Copy link
Copy Markdown
Contributor Author

Re-saved adapter.py with BOM-free UTF-8 encoding — the diff was previously corrupted due to a PowerShell encoding issue. Force-pushed; diff should now be clean.

Sorry for the delay — just saw the encoding feedback today and pushed the fix right away.

@OutThisLife

Copy link
Copy Markdown
Collaborator

Closing — net-negative in current form. The 63/63 churn is almost entirely UTF-8 mojibake: every is now â€" and every is â†' across the file. The only real change is the one line connect(self, *, is_reconnect: bool = False). Merging this would corrupt the source.

The underlying fix is welcome — please resubmit just the is_reconnect signature change (and its call sites) committed with UTF-8 intact, no incidental re-encoding of the rest of the file.

This was referenced Jul 3, 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 P2 Medium — degraded but workaround exists platform/qqbot QQ Bot adapter 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

4 participants