Skip to content

fix(qqbot): accept gateway reconnect flag - #61356

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

fix(qqbot): accept gateway reconnect flag#61356
yangguo wants to merge 1 commit into
NousResearch:mainfrom
yangguo:fix/qqbot-connect-is-reconnect

Conversation

@yangguo

@yangguo yangguo commented Jul 9, 2026

Copy link
Copy Markdown

Summary

  • Update QQBot adapter connect signature to accept the gateway reconnect flag.
  • Cover the gateway contract by invoking QQBot connect with is_reconnect=True in the existing redirect-guard test.

Why

GatewayRunner._connect_adapter_with_timeout() now forwards is_reconnect to all platform adapters so reconnects can preserve server-side queues. QQBot overrode connect() with the old no-kwarg signature, causing configured QQBot gateways to fail with QQAdapter.connect() got an unexpected keyword argument is_reconnect on startup/reconnect.

Tests

  • scripts/run_tests.sh tests/gateway/test_qqbot.py -q
  • scripts/run_tests.sh tests/gateway/test_platform_reconnect.py tests/gateway/relay/test_relay_adapter.py -q
  • .venv/bin/python -m ruff check gateway/platforms/qqbot/adapter.py tests/gateway/test_qqbot.py

@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 P2 Medium — degraded but workaround exists duplicate This issue or pull request already exists labels Jul 9, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Duplicate of #52966 -- identical one-line signature fix (async def connect(self, *, is_reconnect: bool = False)) for the QQBot reconnect regression (issue #52914). The original anchor #52922 is closed/unmerged, so #52966 is the earliest still-open canonical fix; this is a saturated cluster (#54029/#59353 also open, all tracking #52966). Maintainer to pick one.

@yangguo

yangguo commented Jul 9, 2026

Copy link
Copy Markdown
Author

Closing as a duplicate of #59353, which has the same minimal QQBot reconnect-kwarg fix with a clearer dedicated regression test. I added live reproduction details and local validation results there: #59353 (comment)

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