hermes - ✅(Solved) Fix fix(gateway): WeCom and QQBot mark missing-credential errors as non-retryable [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#19890Fetched 2026-05-05 06:04:33
View on GitHub
Comments
0
Participants
1
Timeline
6
Reactions
0
Participants
Timeline (top)
labeled ×5cross-referenced ×1

Error Message

WeComAdapter.connect() and QQAdapter.connect() call _set_fatal_error() with retryable=True when WECOM_BOT_ID/WECOM_SECRET or QQ_APP_ID/QQ_CLIENT_SECRET are not set. gateway/run.py queues adapters with retryable fatal errors for background reconnection every 30 seconds. A missing credential is a configuration error that will never resolve on its own — retrying every 30s is wasteful and masks the real problem in the gateway status output.

Fix Action

Fix

One-line change in each adapter: retryable=Trueretryable=False. Symmetric across both platform credential checks.

PR fix notes

PR #19891: fix(gateway): mark WeCom and QQBot missing-credential errors as non-retryable

Description (problem / solution / changelog)

What does this PR do?

WeComAdapter.connect() and QQAdapter.connect() call _set_fatal_error() with retryable=True when WECOM_BOT_ID/WECOM_SECRET or QQ_APP_ID/QQ_CLIENT_SECRET are not configured. gateway/run.py queues adapters with fatal_error_retryable=True for background reconnection every 30 seconds. A missing credential is a configuration error that will never resolve on its own — the reconnect watcher spins indefinitely while the gateway status shows "retrying" instead of "fatal", obscuring the real problem.

gateway/platforms/sms.py (merged today in #19745) and gateway/platforms/weixin.py already mark the same class of config error as retryable=False. This PR brings WeCom and QQBot into parity.

Root cause: wecom.py line 205 and qqbot/adapter.py line 237 pass retryable=True to _set_fatal_error() for credential-missing checks.

Fix: flip retryable=False on both credential checks. One-line change per adapter, symmetric across both platform branches. No behavior change when credentials are present.

Related Issue

Fixes #19890

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests
  • ♻️ Refactor
  • 🎯 New skill

Changes Made

  • gateway/platforms/wecom.py: retryable=Trueretryable=False for wecom_missing_credentials (+1/-1)
  • gateway/platforms/qqbot/adapter.py: retryable=Trueretryable=False for qq_missing_credentials (+1/-1)
  • tests/gateway/test_wecom.py: add assert adapter.fatal_error_retryable is False to existing missing-credentials test
  • tests/gateway/test_qqbot.py: add TestQQConnect.test_missing_credentials_is_non_retryable

How to Test

python3.11 -m pytest tests/gateway/test_wecom.py::TestWeComConnect::test_connect_records_missing_credentials tests/gateway/test_qqbot.py::TestQQConnect::test_missing_credentials_is_non_retryable -v

Checklist

Code

  • Contributing Guide okundu
  • Conventional Commits
  • Duplicate PR yok
  • Sadece bu fix
  • pytest çalıştırıldı
  • Test eklendi
  • Platform: macOS

Documentation & Housekeeping

  • Docs güncellendi — N/A
  • cli-config.yaml.example — N/A
  • CONTRIBUTING.md/AGENTS.md — N/A
  • Cross-platform impact — N/A
  • Tool descriptions — N/A

Changed files

  • gateway/platforms/qqbot/adapter.py (modified, +1/-1)
  • gateway/platforms/wecom.py (modified, +1/-1)
  • tests/gateway/test_qqbot.py (modified, +22/-0)
  • tests/gateway/test_wecom.py (modified, +1/-0)
RAW_BUFFERClick to expand / collapse

Bug Description

WeComAdapter.connect() and QQAdapter.connect() call _set_fatal_error() with retryable=True when WECOM_BOT_ID/WECOM_SECRET or QQ_APP_ID/QQ_CLIENT_SECRET are not set. gateway/run.py queues adapters with retryable fatal errors for background reconnection every 30 seconds. A missing credential is a configuration error that will never resolve on its own — retrying every 30s is wasteful and masks the real problem in the gateway status output.

Affected code

  • gateway/platforms/wecom.py_set_fatal_error("wecom_missing_credentials", ..., retryable=True) (line ~205)
  • gateway/platforms/qqbot/adapter.py_set_fatal_error("qq_missing_credentials", ..., retryable=True) (line ~237)

Expected behavior

Missing credentials are configuration errors. They should be marked retryable=False so gateway/run.py sets platform state to "fatal" and stops queuing reconnection attempts.

Precedent

  • gateway/platforms/sms.pysms_missing_phone_number / sms_missing_webhook_urlretryable=False (merged in #19745 today)
  • gateway/platforms/weixin.pyweixin_missing_token / weixin_missing_accountretryable=False

Fix

One-line change in each adapter: retryable=Trueretryable=False. Symmetric across both platform credential checks.

extent analysis

TL;DR

Update the _set_fatal_error() calls in wecom.py and qqbot/adapter.py to set retryable=False for missing credential errors.

Guidance

  • Review the affected code in gateway/platforms/wecom.py (line ~205) and gateway/platforms/qqbot/adapter.py (line ~237) to confirm the retryable=True setting.
  • Change retryable=True to retryable=False in both locations to correctly mark missing credential errors as non-retryable.
  • Verify that gateway/run.py no longer queues reconnection attempts for platforms with missing credentials.
  • Check the gateway status output to ensure that missing credential errors are now properly reported as fatal errors.

Example

# Before
_set_fatal_error("wecom_missing_credentials", ..., retryable=True)

# After
_set_fatal_error("wecom_missing_credentials", ..., retryable=False)

Notes

This fix assumes that the desired behavior is to treat missing credentials as fatal, non-retryable errors, consistent with the precedent set in gateway/platforms/sms.py and gateway/platforms/weixin.py.

Recommendation

Apply the workaround by updating the _set_fatal_error() calls to set retryable=False, as this correctly addresses the issue and aligns with the expected behavior.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Missing credentials are configuration errors. They should be marked retryable=False so gateway/run.py sets platform state to "fatal" and stops queuing reconnection attempts.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING