Repository navigation
fix(qqbot): add cause-specific setup guidance - #119780
Conversation
c3ed6ab to
557ed9b
Compare
|
Codex review: needs maintainer review before merge. Reviewed August 6, 2026, 10:40 AM ET / 14:40 UTC. ClawSweeper reviewWhat this changesAdds account-aware, cause-specific QQBot setup guidance for missing credentials, token/API authentication failures, and network failures. Merge readinessThe PR remains necessary: current main still emits the terse QQBot failures, while the exact head repairs the linked issue without an actionable regression finding. Priority: P2 Review scores
Verification
How this fits togetherThe QQBot plugin resolves account credentials, starts the gateway, and sends outbound messages through token and HTTP clients. These boundaries return operator-visible failures that determine the next setup or recovery step. flowchart LR
A[QQBot account configuration] --> B[Gateway or outbound message]
B --> C{Credential or request failure}
C --> D[QQBot guidance]
D --> E[Operator recovery action]
B --> F[QQ Open Platform request]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +40, Tests +253. Total +293 across 10 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep the plugin-local guidance helper and land this focused repair after normal exact-head merge handling. Do we have a high-confidence way to reproduce the issue? Yes, by source: current main reaches generic configuration errors at gateway and outbound boundaries, and tagged media can dispatch before the credential check; the exact head moves that check ahead of dispatch. Is this the best way to solve the issue? Yes. QQBot owns account resolution and vendor-specific failure text, and a shared plugin-local helper keeps gateway, outbound, token, and API guidance consistent without adding a core or configuration surface. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f5add8197fa9. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
|
@clawsweeper re-review The requested inspectable real-behavior proof is now in the PR body for exact head Public GitHub Actions run: https://github.com/metaforismo/openclaw/actions/runs/31060488441 The job checks out that exact PR head, invokes the production QQBot All upstream exact-head CI checks are also green. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
b22d518 to
9fd8dfe
Compare
|
@clawsweeper re-review Current exact head: The tagged-media P1 is fixed: proactive-content and missing-credential validation now run before Every hosted exact-head workflow is green. The public production-boundary proof exercises default/named text plus tagged image/file cases on this exact head: https://github.com/metaforismo/openclaw/actions/runs/31109645916 Please review the current one-commit, zero-behind head. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review The PR body now explicitly resolves the stored-data classification question for exact head Although The body now also includes the cause-classification contract, exact proof guarantees, and a merge-readiness checklist. Exact-head CI/security and linked-artifact proof remain sufficient, the PR is mergeable and zero behind, and there are no open inline threads or actionable findings. Please reassess patch quality and remove the false persistent-data-model concern if confirmed. |
|
Maintainer handoff for @Alix-007: this QQBot repair is zero-behind, mergeable, fully green, proof-sufficient, and has no open review threads or actionable findings. The current head fixes the tagged-media preflight gap and keeps guidance account-aware and cause-specific. The PR body now explicitly confirms that the touched token path does not alter persistence, serialized state, credential storage, cache format, or upgrade semantics. I completed a fresh exact-head diff audit of gateway setup, text/media preflight ordering, token failures, HTTP 401 versus non-auth classification, network guidance, bounded error detail, and release behavior and found no additional actionable issue. |
|
@clawsweeper re-review Current head: This refresh adds only the current- The PR body now binds the public QQBot proof and prior green CI to the patch-identical implementation head. Fresh hosted workflows have not yet been scheduled. Please review the current merge-refreshed head and patch identity. |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
@clawsweeper re-review Final refreshed head: The implementation diff still has stable patch ID |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review Current exact head: The remaining expired-token gap is fixed at the QQBot owner boundary. Tencent returns an expired or missing access token as HTTP 500 with business code Focused Blacksmith Testbox proof passed 14/14 tests, including HTTP 500 / |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Exact-head production-boundary proof is now public for The isolated run fetched and asserted the exact PR head, then passed 8/8 focused tests. Structured HTTP 500/business code 11244 cleared the token cache once and retried the typing notification once (two attempts total). Default and named tagged-media missing-credential paths made zero token or QQ network calls. No real QQ request or secret output occurred. The Testbox wrapper completed with exit code 0 and stopped its one-shot box. Exact-head hosted checks are green (50 successful; none pending or failed). The existing exact-head ClawSweeper review is in progress; its publication and Rank-up moves remain the final review gate. |
|
@clawsweeper re-review Exact head remains |
|
🦞👀 Command router queued. I will update this comment with the next step. |
* origin/main: refactor(test): compress repetitive fixtures in mega-tests, batch 2 (openclaw#120124) refactor(ui): adopt shared chat-host fixture across chat suites (openclaw#120120) fix(ci): provision native Android resources for frozen current-contract targets (openclaw#120081) fix: preserve agent delivery identity (openclaw#120108) fix(qqbot): add cause-specific setup guidance (openclaw#119780) fix(venice): replay Gemini tool signatures by turn occurrence (openclaw#119783) fix(gateway): yield before TTS status diagnostics (openclaw#119788) fix: gateway restart fails and leaves the macOS LaunchAgent unloaded when the gateway drains active work (openclaw#116875) fix(clickclack): show native agent progress while replying (openclaw#116683) fix: unhandled rejection crashes process when raw stream write fails (openclaw#119400) fix: prevent duplicate outbound delivery during concurrent recovery (openclaw#119966) # Conflicts: # src/agents/embedded-agent-runner/run.incomplete-turn.test.ts
* fix(qqbot): add cause-specific setup guidance * fix(qqbot): recognize expired-token business errors * fix(qqbot): retry structured token failures --------- Co-authored-by: Patrick Erichsen <[email protected]>
What Problem This Solves
QQBot exposes several configuration and request failures with terse, low-context messages. Operators are told that credentials, token retrieval, or a network request failed, but not which supported configuration path to use or what kind of recovery is appropriate.
Implementation
This PR centralizes QQBot-owned, cause-specific guidance and applies it at the real boundaries:
channels.qqbot.*and the supportedQQBOT_APP_ID/QQBOT_CLIENT_SECRETfallbacks;channels.qqbot.accounts.<id>.*and deliberately omit default-only environment advice;Tagged-Media Review Fix
The earlier review found that
<qqimg>and<qqfile>branches dispatched before the missing-credential preflight. That could bypass the new actionable error and attempt token/network work first.The exact current head moves proactive-content and credential validation before tagged-media dispatch. Regression coverage includes:
<qqimg>;operationsaccount +<qqfile>;Safety, State, and Compatibility
extensions/qqbot/src/engine/api/token.tschanges only operator-facing error classification/guidance around the existing token request boundary;In particular, despite the touched token filename, there is no persistent data-model change: no stored field is added, removed, renamed, or reinterpreted.
Current Head
179f5fa8ce17e13bfcd3b81a37cf7473705453d6;6c572f85bc91fdb33ad8d9bc60a2526b1f1fdcc9;mainrefresh merges;The final exact head includes the shared business-code auth classifier and applies it consistently to both setup guidance and typing-notification token retry.
Evidence
Exact current head
6c572f85bc91fdb33ad8d9bc60a2526b1f1fdcc9has green hosted checks (50 successful, no pending or failed checks) and passed the combined production-boundary proof at https://github.com/openclaw/openclaw/actions/runs/31143022081. The proof fetched and asserted the exact PR head, then passed 8/8 focused tests: structured HTTP 500/business code 11244 cleared the token cache once and retried the typing notification once (two attempts total); default and named tagged-media missing-credential paths made zero token or QQ network calls; no real QQ request or secret output occurred. The Testbox wrapper completed with exitCode 0 and stopped its one-shot box.The final repaired head
d01f327a5e79a3d940d813e9e90535afe6a5f7c3passed 14/14 focused QQBot tests in Blacksmith Testbox, including HTTP 500 with business code11244through the shared guidance and token-retry classifier. The current merge-refreshed head is patch-identical; exact-head hosted workflows are now running.Public Production-Boundary Proof for the Patch-Identical Implementation
Run and public terminal log:
https://github.com/metaforismo/openclaw/actions/runs/31109645916
The isolated proof verifies reviewed implementation head
9fd8dfead8928ebe2712cf510548b7cf6a600169. The current branch adds only the current-mainmerge and preserves the same stable patch ID. The proof invokes the production QQBotsendTextboundary for four cases:<qqimg>;<qqfile>.For every case it verifies:
The redacted verdict is printed in the public log and uploaded as an artifact. The reviewer independently classified this proof as sufficient linked-artifact evidence.
Cause Classification Contract
channels.qqbot.*plus supported default env varschannels.qqbot.accounts.<id>.*, no default env varsMerge Readiness
Exact-head hosted checks are green; exact-head ClawSweeper publication and ordinary maintainer merge handling remain.
Test Plan
Fixes #65868.
AI Assistance
AI assistance was used to inspect the unresolved issue and prior closed approaches, identify account/cause-classification pitfalls, implement the focused repair, address the tagged-media bypass found in review, add regressions, and produce inspectable implementation-head proof. The final diff and error-safety boundaries were reviewed before publication.