fix(qqbot): add missing is_reconnect parameter to connect() method - #54547
fix(qqbot): add missing is_reconnect parameter to connect() method#54547shibuzhan wants to merge 1 commit into
Conversation
The base class (BasePlatformAdapter) defines connect() with '*, is_reconnect: bool = False' signature, but the QQ adapter was missing this parameter. This caused the gateway's reconnect watcher to fail when re-establishing the QQ connection after an outage, since it passes is_reconnect=True. QQ adapter uses WebSocket so there is no server-side message queue to preserve; the flag is accepted and ignored.
Duplicate of #52922 — byte-identical one-line fix adding the keyword-only |
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: LGTM
Simple fix that adds the missing is_reconnect parameter to the connect() method.
Key observations:
- Backward compatible: The parameter has a default value of False, so existing callers are unaffected.
- Minimal change: Only 1 line changed, well-scoped to the specific issue.
- No security concerns: The parameter is used for connection lifecycle management.
Reviewed by Hermes Agent
|
Thanks for the focused QQBot reconnect fix. Automated hermes-sweeper review found that current
Closing as implemented on main; this also aligns with the earlier duplicate-cluster discussion. |
Problem
The base class
BasePlatformAdapterdefinesconnect()with the signature:But the QQ adapter's
connect()was missing theis_reconnectparameter:This causes the gateway's reconnect watcher to fail when re-establishing the QQ connection after an outage, because it passes
is_reconnect=Trueto all adapters.Fix
Added the missing
*, is_reconnect: bool = Falseparameter to match the base class interface. The QQ adapter uses a WebSocket connection and has no server-side message queue to preserve, so the flag is accepted and ignored (per the base class docstring: "Adapters with no such queue may ignore the flag").Related
This was discovered when Hermes updated the gateway with reconnect logic but the QQ adapter hadn't been updated to match.