Repository navigation
fix(channels): surface Discord voice failures and preserve Telegram controls - #125152
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 4:54 AM ET / 08:54 UTC. ClawSweeper reviewWhat this changesThis PR logs degraded Discord voice sends, preserves or visibly degrades Telegram controls during streamed finalization, and corrects the environment-variable count ratchet. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open. The patch is a coherent owner-boundary repair with no blocking code finding, but Telegram streaming policy requires real Telegram proof and exact-head CI is still incomplete. Priority: P1 Review scores
Verification
How this fits togetherDiscord and Telegram plugins turn agent reply payloads into channel-specific sends. The changed paths handle voice fallback observability and streamed Telegram finalization before users and operators see the resulting message. flowchart LR
A[Agent reply payload] --> B[Discord outbound delivery]
A --> C[Telegram streamed finalization]
B --> D[Voice send or text fallback]
C --> E[Control encoding decision]
D --> F[Operator warning or delivered message]
E --> G[Telegram button or readable fallback]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +8, Tests +149, Other +1. Total +158 across 11 files. View PR surface stats
Review metrics
Mantis proof suggestionTelegram Desktop can directly demonstrate both preserved Web App buttons and readable degradation in the final streamed message. A maintainer can ask Mantis to capture proof by posting this exact PR comment: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one shared Telegram dropped-control renderer and the full buffered payload path, then add redacted real Telegram proof and merge only after exact-head checks are green. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main absorbs a Discord voice failure without a warning and its streamed Telegram resolver lacks the direct-chat Web App and dropped-control handling added here. The review did not execute the regression tests because this is read-only triage. Is this the best way to solve the issue? Yes. The patch reuses the existing Telegram target classification and moves the fallback text renderer to the shared button owner, avoiding a parallel streamed-finalization path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 5275eae47703. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
4d84ca3 to
7654ce7
Compare
|
Land-ready proof for exact head Local proof:
Remote proof:
ClawSweeper handling:
Final surface: channel production +66/-58 (net +8); CI/tooling +4/-3 (net +1); tests +158/-9 (net +149); total +228/-70 across 11 files. |
|
Merged via squash.
|
…ontrols (openclaw#125152) * fix(channels): surface degraded Discord and Telegram sends * fix(telegram): preserve legacy slash callbacks * fix(ci): correct env-var count after version define removal
What Problem This Solves
Fixes two channel adapter paths that could silently discard the real outcome of a user-visible action. Discord voice delivery could fall back to text or an already-delivered transcript while losing the original voice error, and Telegram rich streamed replies could finalize without Web App buttons or any readable trace of controls Telegram could not encode.
Why This Change Was Made
Discord now records absorbed non-ambiguous voice failures at the catch boundary, mirroring the existing webhook fallback visibility rule. Telegram derives Web App eligibility from the target chat, shares one dropped-control text renderer between message actions and reply finalization, and carries one canonical buffered payload so the visible fallback cannot diverge from the finalized text.
ClawSweeper identified the optional raw-slash callback cleanup as shipped compatibility risk, so that change was removed. Existing value-only slash callbacks retain their legacy behavior; this PR now changes only Discord failure visibility and Telegram streamed-control preservation/degradation.
The PR also repairs a pre-existing main CI ratchet regression: compile-time version-define removal lowered the distinct
OPENCLAW_*budget even though the supported runtimeOPENCLAW_VERSIONoverride remained. The baseline now matches the actual 502-name surface and the one-time correction is covered alongside the existing owner-approved growth case.User Impact
Operators can diagnose Discord voice degradation even when text still reaches the user. Telegram DM Web App buttons survive streamed finalization, and unsupported or oversized controls appear as readable fallback text instead of disappearing. Existing Telegram slash-looking callback values remain compatible.
Evidence
node scripts/run-vitest.mjs extensions/discord/src/outbound-adapter.test.ts extensions/telegram/src/bot-message-dispatch.draft-finalization.test.ts extensions/telegram/src/bot.create-telegram-bot.test.ts extensions/telegram/src/action-runtime.test.ts extensions/telegram/src/button-types.test.ts— 351 tests passed locally and again on Blacksmith Testbox.node scripts/run-vitest.mjs test/scripts/check-env-var-count.test.ts— 12 tests passed; the real counter reportsOPENCLAW_* count 502/502.oxfmt --checkandgit diff --checkpassed.tbx_01m079h466bhx886bydwjgjg4b: changed extension gates passed, including typecheck, lint, plugin boundaries, dead exports, and import cycles.channel-message-flowswithproviderMode=mock-openaiandchannelDriver=qa-channelpassed 1/1. Verdict:{"total":1,"passed":1,"failed":0,"skipped":0}.tbx_01m07d17jcde9kz6j999kcejk6/ run 32010060843: 351/351 channel tests passed.tbx_01m07dm120rqqqejfqghy4zjsg/ run 32010870166: all selected ratchets, formatting, boundaries, dead exports, production/test/script types, extension/scripts lint, database-first, and import-cycle checks passed.AI-assisted: yes.