Repository navigation
fix(qqbot): keep channel API calls on the active account [AI] - #118575
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 4, 2026, 6:06 AM ET / 10:06 UTC. ClawSweeper reviewWhat this changesThis PR creates QQBot’s authenticated channel API tool per agent run so token acquisition and group policy use the active inbound QQBot account. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 5 items remain Keep open: current main still binds QQBot channel API authority to the first configured account, and this PR is the active focused repair. The patch is correct, but merge needs gateway-to-tool behavior proof or an explicit maintainer acceptance of the documented adapter-level evidence. Priority: P1 Review scores
Verification
How this fits togetherQQBot inbound messages provide trusted channel and account identity to the agent runtime, which constructs plugin tools for that run. The channel API tool then obtains a QQ token and applies account-scoped group policy before requesting QQ Open Platform. flowchart LR
A[Inbound QQBot message] --> B[Agent run context]
B --> C[QQBot tool factory]
C --> D{Active account usable?}
D -->|Yes| E[Account-bound API tool]
D -->|No| F[Tool unavailable]
E --> G[Token and group policy]
G --> H[QQ Open Platform request]
Decision needed
Why: The implementation follows the per-run tool-factory contract, but the submitted proof bypasses the inbound gateway context propagation that selects the account. Before merge
Agent review detailsSecurityNone. PR surfaceSource +12, Tests +168. Total +180 across 2 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Land the per-run account-authority repair after a redacted ephemeral gateway or approved two-account QQBot run proves account-B selection plus missing and disabled-account denial at the agent-to-request boundary. Do we have a high-confidence way to reproduce the issue? Yes. Current main deterministically captures accountIds[0] at registration while agent tool context carries the inbound QQBot account into per-run factories. Is this the best way to solve the issue? Yes. Resolving the account in the existing QQBot per-run tool factory is the narrow owner-boundary repair; changing token issuance or core runtime would be too late or too broad. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a7cca37838ac. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
|
ClawSweeper proof for current head Behavior proved: a QQBot turn for a named account binds that account to both token acquisition and the authenticated channel API request. An active account without credentials fails closed before token acquisition or network access. Environment: clean local PR checkout on Node 24-compatible tooling. The harness invokes the real QQBot Command/artifact:
Evidence:
Compatibility/operator note: no config, protocol, onboarding, or command surface changes. Only request-time account authority changes; default-account and foreign-channel behavior remain available. Live gaps: no approved two-account QQBot tenant or private QQ credentials were available. Direct AWS access was unavailable, Testbox was not installed, and an isolated local-container install exhausted the host disk before the proof phase; those scratch leases and work roots were removed. This evidence therefore proves the production adapter boundary, not a live QQ Open Platform round trip. |
|
ClawSweeper proof for current head Behavior proved: a QQBot turn for a named account binds that account to both token acquisition and the authenticated channel API request. An active account without credentials fails closed before token acquisition or network access. Environment: clean local PR checkout on Node 24-compatible tooling. The harness invokes the real QQBot Command/artifact:
Evidence:
Compatibility/operator note: no config, protocol, onboarding, or command surface changes. Only request-time account authority changes; default-account and foreign-channel behavior remain available. Live gaps: no approved two-account QQBot tenant or private QQ credentials were available. Direct AWS access was unavailable, Testbox was not installed, and an isolated local-container install exhausted the host disk before the proof phase; those scratch leases and work roots were removed. This evidence therefore proves the production adapter boundary, not a live QQ Open Platform round trip. |
Verification before mergeCurrent head: Source and CI status:
Current behavior evidence invokes the real QQBot tool-registration, account-resolution, and channel API execution path while replacing only token issuance and outbound fetch. Five focused scenarios prove named-account authorization, zero token/network calls for missing and disabled accounts, configured-default behavior, and foreign-channel account isolation. Remaining proof blocker: no approved two-account QQBot tenant or private QQ credentials are available. The requested live proof needs a harmless API call from a turn routed through account B with redacted evidence that account B supplies both token and policy, plus a disabled-account run showing no tool and no QQ API request. A maintainer can provide that artifact or explicitly accept the documented live-environment gap. |
ClawSweeper reviewReviewed August 3, 2026, 11:05 AM UTC. What this changesQQBot’s authenticated channel API tool is created per agent run so credentials and account policy follow the active inbound QQBot account, while missing or disabled active accounts receive no tool. PR surface: Source +12, Tests +168. Total +180 across 2 files. Merge readinessResult: needs proof before merge. Overall: 🦪 silver shellfish Reviewed head: Review scores
VerificationStatus: mock_only How this fits togetherQQBot ingress supplies a channel and account identity to the agent runtime, which constructs plugin tools before making authenticated QQ Open Platform requests. The affected boundary determines which configured bot credentials and policy authorize those requests. flowchart LR
A[Inbound QQBot turn] --> B[Trusted agent context]
B --> C{Active QQBot account valid?}
C -->|Yes| D[Account-bound API tool]
C -->|No| E[Tool unavailable]
D --> F[Account policy check]
F --> G[QQ Open Platform request]
Decision needed
Before merge
Review detailsBest possible solution: Land the per-run account-authority repair after an ephemeral mock-gateway or live two-account run proves valid-account routing plus missing and disabled-account denial, while retaining the secure fail-closed behavior. Do we have a high-confidence way to reproduce the issue? Yes. Current main deterministically captures the first configured QQBot account before any per-run context exists, giving a high-confidence source reproduction for a turn received on another named account; no test was executed during this read-only review. Is this the best way to solve the issue? Yes. Resolving credentials and policy in the existing per-run plugin-tool factory is the narrowest owner-boundary repair; changing token issuance would be too late, and putting QQBot-specific authority policy in core would be the wrong layer. AGENTS.md: found_applied Codex review notes: model internal, reasoning high; reviewed against 0dbf9b6. Label detailsLabel justifications:
Evidence reviewedPR surface:
|
* origin/main: (208 commits) fix(telegram): route reactions to their originating forum topics test(gateway): isolate scheduled service timers (#119218) test(qa): cover Canvas agent and node controls (#119047) fix(cli): avoid repeated migration scans during local agent turns (#119051) fix(gateway): keep agents list on prepared model facts (#119208) fix(telegram): retry update offset persistence fix(ci): accept profiled partial Kova gates (#119121) fix(qqbot): keep channel API calls on the active account [AI] (#118575) fix(agents): recover from invalid compaction summaries (#119137) fix(gateway): expose OAuth-backed tools to CLI agents (#119166) fix(plugins): preserve metadata reloads during models status (#119183) fix(test): bound direct gateway server runs (#119184) test(tui): prove command surfaces through PTY (#119165) fix(testbox): restore claims across path aliases (#119170) fix(message): preserve sends with incidental Telegram locations fix(perf): give each concurrency sample a full deadline (#119164) fix(testbox): remove changed-gate sync residue (#119163) fix(telegram): preserve later chunks after rejected sends fix(tui): block terminal controls in system messages (#118998) fix(auto-reply): suppress false no-reply fallback during continuations (#119154) ...
* origin/main: (23 commits) chore(tui): add Gateway boundary PTY coverage (#119191) fix(telegram): route reactions to their originating forum topics test(gateway): isolate scheduled service timers (#119218) test(qa): cover Canvas agent and node controls (#119047) fix(cli): avoid repeated migration scans during local agent turns (#119051) fix(gateway): keep agents list on prepared model facts (#119208) fix(telegram): retry update offset persistence fix(ci): accept profiled partial Kova gates (#119121) fix(qqbot): keep channel API calls on the active account [AI] (#118575) fix(agents): recover from invalid compaction summaries (#119137) fix(gateway): expose OAuth-backed tools to CLI agents (#119166) fix(plugins): preserve metadata reloads during models status (#119183) fix(test): bound direct gateway server runs (#119184) test(tui): prove command surfaces through PTY (#119165) fix(testbox): restore claims across path aliases (#119170) fix(message): preserve sends with incidental Telegram locations fix(perf): give each concurrency sample a full deadline (#119164) fix(testbox): remove changed-gate sync residue (#119163) fix(telegram): preserve later chunks after rejected sends fix(tui): block terminal controls in system messages (#118998) ...
…time * origin/main: (177 commits) fix(telegram): route reactions to their originating forum topics test(gateway): isolate scheduled service timers (#119218) test(qa): cover Canvas agent and node controls (#119047) fix(cli): avoid repeated migration scans during local agent turns (#119051) fix(gateway): keep agents list on prepared model facts (#119208) fix(telegram): retry update offset persistence fix(ci): accept profiled partial Kova gates (#119121) fix(qqbot): keep channel API calls on the active account [AI] (#118575) fix(agents): recover from invalid compaction summaries (#119137) fix(gateway): expose OAuth-backed tools to CLI agents (#119166) fix(plugins): preserve metadata reloads during models status (#119183) fix(test): bound direct gateway server runs (#119184) test(tui): prove command surfaces through PTY (#119165) fix(testbox): restore claims across path aliases (#119170) fix(message): preserve sends with incidental Telegram locations fix(perf): give each concurrency sample a full deadline (#119164) fix(testbox): remove changed-gate sync residue (#119163) fix(telegram): preserve later chunks after rejected sends fix(tui): block terminal controls in system messages (#118998) fix(auto-reply): suppress false no-reply fallback during continuations (#119154) ...
…aw#118575) * fix(qqbot): bind channel API tool to active account * fix(qqbot): scope active account binding to QQ turns * fix(qqbot): reject disabled channel API accounts
* origin/main: (23 commits) chore(tui): add Gateway boundary PTY coverage (openclaw#119191) fix(telegram): route reactions to their originating forum topics test(gateway): isolate scheduled service timers (openclaw#119218) test(qa): cover Canvas agent and node controls (openclaw#119047) fix(cli): avoid repeated migration scans during local agent turns (openclaw#119051) fix(gateway): keep agents list on prepared model facts (openclaw#119208) fix(telegram): retry update offset persistence fix(ci): accept profiled partial Kova gates (openclaw#119121) fix(qqbot): keep channel API calls on the active account [AI] (openclaw#118575) fix(agents): recover from invalid compaction summaries (openclaw#119137) fix(gateway): expose OAuth-backed tools to CLI agents (openclaw#119166) fix(plugins): preserve metadata reloads during models status (openclaw#119183) fix(test): bound direct gateway server runs (openclaw#119184) test(tui): prove command surfaces through PTY (openclaw#119165) fix(testbox): restore claims across path aliases (openclaw#119170) fix(message): preserve sends with incidental Telegram locations fix(perf): give each concurrency sample a full deadline (openclaw#119164) fix(testbox): remove changed-gate sync residue (openclaw#119163) fix(telegram): preserve later chunks after rejected sends fix(tui): block terminal controls in system messages (openclaw#118998) ...
What Problem This Solves
Corrects an issue where QQBot users running multiple accounts could have channel API calls use a different configured account than the inbound conversation.
Why This Change Was Made
The channel API tool is now created for each agent run and binds both credential lookup and account-scoped policy to the trusted active account context. Calls without an active account continue to use the configured default account.
User Impact
QQBot channel API reads and writes now stay within the account that received the conversation. An active account without usable credentials gets no channel API tool instead of falling through to another account.
Evidence
node scripts/run-vitest.mjs extensions/qqbot/src/bridge/tools/channel.test.ts extensions/qqbot/src/engine/tools/channel-api.test.ts— 21 tests passed.git diff --check— passed.AI-assisted change.