Skip to content

fix(qqbot): add is_reconnect param to QQAdapter.connect() - #56997

Closed
lys1335 wants to merge 1 commit into
NousResearch:mainfrom
lys1335:fix-qqbot-isreconnect
Closed

fix(qqbot): add is_reconnect param to QQAdapter.connect()#56997
lys1335 wants to merge 1 commit into
NousResearch:mainfrom
lys1335:fix-qqbot-isreconnect

Conversation

@lys1335

@lys1335 lys1335 commented Jul 2, 2026

Copy link
Copy Markdown

The BasePlatformAdapter.connect() contract requires all platform adapters to accept the is_reconnect keyword argument. QQAdapter was missing this, causing a TypeError on gateway reconnect attempts.

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

What does this PR do?

Related Issue

Fixes #

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

How to Test

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform:

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

For New Skills

  • This skill is broadly useful to most users (if bundled) — see Contributing Guide
  • SKILL.md follows the standard format (frontmatter, trigger conditions, steps, pitfalls)
  • No external dependencies that aren't already available (prefer stdlib, curl, existing Hermes tools)
  • I've tested the skill end-to-end: hermes --toolsets skills -q "Use the X skill to do Y"

Screenshots / Logs

The BasePlatformAdapter.connect() contract requires all platform
adapters to accept the is_reconnect keyword argument. QQAdapter
was missing this, causing a TypeError on gateway reconnect attempts.

Fixes: QQAdapter.connect() got an unexpected keyword argument 'is_reconnect'
@rodriguez46p-ui

Copy link
Copy Markdown

Hermes Agent review: no blockers found

I reviewed the one-line QQ adapter contract fix. The change brings QQAdapter.connect() into alignment with BasePlatformAdapter.connect(self, *, is_reconnect: bool = False) and with the gateway reconnect caller that invokes adapter.connect(is_reconnect=True).

Local verification from a detached worktree at head 2ea53cb8c7a8180853ce3ef442bb353e2720c945:

  • python -m pytest -q tests/gateway/test_qqbot.py165 passed, 4 warnings in 9.18s (warnings are existing async mock/resource warnings in QQ tests)
  • python -m ruff check gateway/platforms/qqbot/adapter.py tests/gateway/test_qqbot.pyAll checks passed!
  • python -m compileall -q gateway/platforms/qqbot/adapter.py → passed
  • git diff --check origin/main...HEAD → passed
  • Ad-hoc contract probe confirmed QQAdapter.connect has keyword-only is_reconnect: bool = False and await adapter.connect(is_reconnect=True) no longer raises TypeError (with empty credentials it returns the expected qq_missing_credentials failure path).

Non-blocking suggestion: consider adding a tiny regression test in tests/gateway/test_qqbot.py that asserts the signature accepts is_reconnect, matching the existing relay adapter regression style. For this PR's current scope, I did not find a blocker.


Reviewed by Hermes Agent.

@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 duplicate This issue or pull request already exists labels Jul 2, 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 param to QQAdapter.connect() (the earliest still-open canonical fix for #52914; the prior anchor #52922 is closed/unmerged). This is part of a saturated cluster of one-line resubmissions (#53540/#54029/#54037/#56970). Related to issue #52914.

@lys1335 lys1335 closed this by deleting the head repository Jul 13, 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 type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants