Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed October 2, 2026, 5:55 AM ET / 09:55 UTC (Revision 4). ClawSweeper reviewWhat this changesThe Telegram plugin attempts to clear buttons from an undeletable media callback message before sending replacement text, with transport and callback-router regressions. Merge readiness✅ Ready for maintainer review This remains a useful, focused fix: current main and the latest release retain the faulty fallback. The updated real Telegram evidence resolves the previous proof blocker, and no blocking patch defect was found. Priority: P2 Review scores
Verification
How this fits togetherTelegram button taps enter the callback router, which applies the selected action and updates its originating message. When Telegram cannot edit a media message as text, the message-action owner handles deletion and replacement delivery. flowchart TD
A[Telegram button tap] --> B[Callback router]
B --> C[Edit original message]
C -->|Media text edit rejected| D[Delete original message]
D -->|Deletion rejected| E[Clear original buttons]
D -->|Deleted| F[Send replacement text]
E --> F
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +2, Tests +234. Total +236 across 3 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep callback cleanup in the existing message-action owner, preserving replacement delivery when Telegram also rejects keyboard removal. Do we have a high-confidence way to reproduce the issue? Yes: current main explicitly skips keyboard cleanup when a media text edit and subsequent deletion fail; the supplied Test Server baseline independently reports that outcome. This reviewer did not execute the reproduction. Is this the best way to solve the issue? Yes: reusing the existing keyboard-edit operation is a narrow repair that preserves successful deletion and replacement behavior without introducing another owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against aa31aeefb745. 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) |
Adds a full-router loopback test (real grammY bot, real local HTTP Bot API, real session store) exercising the model-picker callback on a media message whose edit and delete both fail. It asserts the clear-buttons request (editMessageReplyMarkup with an empty keyboard) is sent before the replacement confirmation, proving the fix's runtime behavior end to end rather than only at the transport-payload level. Ref: openclaw#153490
|
I went through the full review and want to be upfront about what I could and couldn't address. The two blocking items both come down to the same ask: live Telegram evidence (via the What I added: What I did not do, and can't do from here: run this against Telegram's actual Test Server. The If someone with access to the QA broker can run the |
# Conflicts: # extensions/telegram/src/bot-handlers.callback-actions.ts
|
Landed as 2ced53d. Thanks @wakqasahmed! |
…n't be deleted (openclaw#159012) Fixes openclaw#153490. When a Telegram callback edit fails with "no text in the message" (a media message) and deleting the original also fails, the original inline keyboard is now cleared before the replacement is sent, so stale buttons no longer stay live. Proof: real Telegram Test Server with TDLib observation and a real tap, with exactly one deleteMessage rejected per fault run. main kept the photo's keyboard while the replacement arrived; this change clears it first. The normal path (delete succeeds) is unchanged. The photo with buttons came from a mock model; a real gpt-5-mini request on this head confirmed the provider path. Regression test fails on main and passes here. Co-authored-by: Ayaan Zaidi <[email protected]>
Closes #153490
What Problem This Solves
A Telegram callback on a media message can leave live buttons on the original photo beside a replacement text reply when both text editing and deletion fail.
User Impact
When deletion fails, OpenClaw now makes a best-effort attempt to clear the original inline keyboard before sending the replacement. Successful deletion and unrelated edit errors keep their existing behavior.
Implementation
Uses the existing callback keyboard-edit owner. The contributor commits are preserved. The merge with current main keeps its shared replacement parameters and migrates the added regression to the existing session-directory test fixture.
No overlap with Pash/Sarah changes.
Evidence
Candidate:
411a3c05f13df416f0e47e64fd84778517680986.answerCallbackQuery → editMessageText → deleteMessage → sendMessage, missingeditMessageReplyMarkup. It passes with the candidate: the empty keyboard edit precedes replacement delivery.transport-payload.test.ts10 passed;model-callback.loopback.integration.test.ts2 passed, 15.44 seconds including the repository runner. Hosted CI timing is reported by CI, not estimated here.deleteMessagewith a Bot API 400 and forwards every other call unchanged.d7fd9a7dea11b529738562d6ae472788e5085620. Photo47652536320retains its Select mini keyboard after a completed tap and rejected deletion; replacement47653584896arrives. No post-tap keyboard edit or deletion appears through the 125-second recording.47647293440is observed with a Select mini button, then a completed tap, thenedit-metawithhasReplyMarkup: false, followed by replacement text47649390592. Telegram returned 400 for the text edit, the proxy rejected deletion, and Telegram accepted the markup edit and replacement.47648342016is tapped, Telegram accepts deletion, TDLib observes its deletion, and replacement47650439168arrives. No fallback keyboard edit occurs after that tap.gpt-5-minithrough a forward-only OpenAI proxy. Its four-call ceiling was enforced; auxiliary utility/embedding calls consumed the remaining calls before photo delivery. The callback proof above deliberately uses a deterministic mock model, not real-model output.TDLib timeline (real Test Server user)
Times are milliseconds from each recording's start; message IDs belong to the observing user, not the bot's separate message-ID space.
476525363204765253632047653584896476472934404764729344047647293440updateMessageEdited:hasReplyMarkup=false47649390592476483420164764834201647650439168The proxy recorded one rejected
deleteMessageper fault run (upstreamForwarded=false, error 400). Candidate's subsequenteditMessageReplyMarkupandsendMessageboth received Telegram 200 responses. The control'sdeleteMessagereceived 200 and did not use fallback markup cleanup.Thanks to @aniruddhaadak80 for reporting and @wakqasahmed for the fix and regression coverage.
Contributor disclosure: AI-assisted (Claude Code).