Repository navigation
refactor(qqbot): adopt core typing keepalive loop with budget accounting intact - #104438
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 11, 2026, 8:40 AM ET / 12:40 UTC. Summary PR surface: Source -1, Tests +61, Other 0. Total +60 across 4 files. Reproducibility: not applicable. This PR addresses internal duplication rather than a reproducible current-main bug, and focused tests define the intended budget and scheduling invariants. Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review findings
Review detailsBest possible solution: Keep the QQ scheduling refactor behind the narrowest approved bundled or injected runtime seam; promote the loop publicly only with explicit SDK-owner sponsorship, lifecycle documentation, direct contract coverage, completed exact-head validation, and redacted live QQ proof. Do we have a high-confidence way to reproduce the issue? Not applicable; this PR addresses internal duplication rather than a reproducible current-main bug, and focused tests define the intended budget and scheduling invariants. Is this the best way to solve the issue? No, not at the proposed boundary: sharing the scheduler is maintainable, but public SDK promotion is broader than necessary for mechanical adoption and lacks owner-approved contract proof. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0ca6880f3d92. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source -1, Tests +61, Other 0. Total +60 across 4 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (4 earlier review cycles)
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4b29da5976
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -31,6 +31,9 @@ export { | |||
| createChannelReplyPipeline as createChannelMessageReplyPipeline, | |||
| resolveChannelSourceReplyDeliveryMode as resolveChannelMessageSourceReplyDeliveryMode, | |||
| } from "../channels/message/index.js"; | |||
| // Bare interval/stop orchestration for channels that own their typing renewal | |||
| // policy (e.g. per-message reply budgets) instead of the createTypingCallbacks lifecycle. | |||
| export { createTypingKeepaliveLoop } from "../channels/typing-lifecycle.js"; | |||
There was a problem hiding this comment.
Update the SDK surface budget for this export
This adds a new public function export to openclaw/plugin-sdk/channel-outbound (a public SDK subpath listed in scripts/lib/plugin-sdk-entrypoints.json). The workflow sanity job runs pnpm plugin-sdk:surface:check (.github/workflows/workflow-sanity.yml:215-216), and that check compares public export/function counts against the checked-in defaults in scripts/plugin-sdk-surface-report.mjs; this diff increases both counts but does not update the budget/contract artifacts, so the SDK surface check will fail when this commit is validated. Please either keep the helper out of the public SDK or update the SDK surface budget intentionally with this new export.
Useful? React with 👍 / 👎.
2aeb190 to
8b23767
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8b237678d8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } from "../channels/message/index.js"; | ||
| // Bare interval/stop orchestration for channels that own their typing renewal | ||
| // policy (e.g. per-message reply budgets) instead of the createTypingCallbacks lifecycle. | ||
| export { createTypingKeepaliveLoop } from "../channels/typing-lifecycle.js"; |
There was a problem hiding this comment.
Regenerate the SDK API baseline for this export
This adds a public openclaw/plugin-sdk/channel-outbound export, but only the surface-budget script was updated. The workflow sanity job also runs pnpm plugin-sdk:api:check (.github/workflows/workflow-sanity.yml:212-216), and that check hashes every public SDK export from the TypeScript module surface (src/plugin-sdk/api-baseline.ts:452-464) against docs/.generated/plugin-sdk-api-baseline.sha256; because this commit does not update that hash, the API baseline check will still report drift. Please run pnpm plugin-sdk:api:gen and commit the updated hash, or keep the helper out of the public SDK.
Useful? React with 👍 / 👎.
|
Merged via squash.
|
…ing intact (openclaw#104438) * refactor(channels): adopt core typing keepalive loop * chore(plugin-sdk): pin surface budget for typing keepalive re-export
Related: #104318
What Problem This Solves
qqbot ran its own setInterval typing-keepalive class instead of the core keepalive loop — risky on QQ specifically, because typing renewals spend the same ≤5-replies-per-msg_id budget as real sends and must reserve capacity for the final reply.
Why This Change Was Made
TypingKeepAlivenow delegates interval/stop/in-flight-suppression orchestration to corecreateTypingKeepaliveLoop(exposed via the samechannel-outboundSDK seam discord already uses), while all budget accounting stays channel-side and unchanged: 3 attempt-counted renewals including token-refresh retries, final-reply reserve, permanent stop latch, 5s cadence.createTypingCallbackswas deliberately not used — its automatic initial fire would spend the budget slot that fetches the reply refIdx. imessage needed no change (already on the core controller via its reply pipeline). Two intentional deltas, both test-pinned: stalled RPC ticks are suppressed instead of overlapping (strictly budget-safer), and the timer is unref'd.User Impact
No behavior change beyond the budget-safer stalled-tick suppression.
Evidence
tbx_01kx8dnzq3cg4ket6jnebvhcw5(Actions 29150408619): qqbot 740 + imessage 692 tests green, fullpnpm check:changedgreen.