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 real behavior proof before merge. What this changesThis PR sends model-selection confirmations as rich Telegram content and adds replacement-message recovery. Example: Select mock-openai/gpt-5.6-luna-alt through /models with richMessages enabled.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 3 items remain Keep this PR open: it addresses an unresolved Telegram rendering bug, but the previously reported stale-button defect remains. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherTelegram callback updates enter the authorized callback router, which applies the session model selection and sends confirmation through the Telegram message-action owner. flowchart TD
A[Telegram callback] --> B[Callback router]
B --> C[Model selection handler]
C --> D[Session selection owner]
C --> E[Callback message actions]
E --> F[Telegram rich edit]
E --> G[Replacement delivery and cleanup]
Technical reviewBest possible solution: Absorb rich editing into the existing callback owner using grammY's typed overload, preserve send-before-delete recovery, and clear original buttons when deletion fails. Do we have a high-confidence way to reproduce the issue? The linked report identifies an official affected release, and current main still combines rich delivery with legacy confirmation editing; no target code was executed during this read-only review. Is this the best way to solve the issue? The callback owner is the right repair boundary, but the patch is incomplete on deletion failure and adds raw-edit plumbing that the pinned grammY API already provides. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 30b7adf9d14e. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource +189, Tests +668. Total +857 across 10 files. Added test files: 3. 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. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (38 earlier review cycles; latest 8 shown)
Reviewed October 17, 2026, 10:19 PM ET / October 18, 2026, 02:19 UTC (Revision 39). |
|
Pushed @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Re-triggering CI: check-lint failed due to a GitHub Actions runner shutdown signal (exit 143, "The runner has received a shutdown signal"), unrelated to this PR's diff. Reopening to get a fresh run. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Closing and reopening to retrigger CI: the |
…Action The final rich model-confirmation edit in handleTelegramModelCallback ran outside the file's retryModelAction wrapper -- unlike every other edit call in the handler. A transient failure there (after applySessionModelSelection had already taken effect) fell into the bare `catch (err)` block, which rewrites it into a misleading permanent "Failed to change model" edit and does not enter the router's retry path, even though the selection had already been silently applied. Wraps the call in retryModelAction, matching the established pattern used for every other edit in this file, so the outer catch rethrows via TelegramRetryableCallbackError and the router's retry path takes over. ClawSweeper follow-up finding on openclaw#124222. Adds a regression test in bot.test.ts. Reproducing the actual bug requires failing both the rich edit and its deleteAndReplyCallbackMessage fallback's replacement send (editCallbackMessage otherwise absorbs a lone rich-edit failure via that fallback) -- verified to fail pre-fix for the intended reason and pass post-fix. Co-Authored-By: Claude <[email protected]>
…tchet - bot-handlers.callback-actions.test.ts still used the pre-openclaw#126207 isForum: false param shape; convert all call sites to the current threadSpec: TelegramThreadSpec shape (check-test-types failure). - Add the required // SAFETY comment on the pre-existing InlineKeyboardMarkup cast in bot-handlers.callback-actions.ts, which this branch's first commit introduced as a new uncommented assertion exceeding the file's grandfathered baseline (checks-fast-baseline-ratchets failure).
4c3b62b to
1f49de0
Compare
…t test openclaw#128358 landed on main (after this branch's rebase point) with a new transport-payload.test.ts assertion hardcoding the old delete-then-send order for deleteAndReplyCallbackMessage's business-media-callback path. This branch's own earlier commit (f5758b3) had already reversed that order repo-wide (send-then-delete, to close a silent-failure window where a send failure after delete would leave neither picker nor confirmation) and added its own regression coverage in bot-handlers.callback-actions.test.ts. The rebase merged both changes, leaving one test asserting the pre-fix order. Update the assertion to the current send-then-delete order; no production code changes.
Fixed rebase-collision CI failure at this head
Fix ( Verified:
Known remaining gap: the real-Telegram-Desktop proof attempt still stopped at the provider-picker screen per the prior discussion; the mock-gateway harness proof ( @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Redacted mock-Gateway verdict: rich
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Thanks for the PR. We're closing older pull requests that have gone stale against current This XL PR has had no commits since August 24 and still lacks the required real Telegram behavior proof. Please open a fresh, focused PR against current main if the rich /models confirmation still renders over the picker. |
Closes #123886
What Problem This Solves
Fixes an issue where users with
richMessages: trueon their Telegram account and who complete the/modelspicker would see the final "✅ Model changed to…" confirmation rendered on top of / mixed with the stale rich-text markup from the picker's prior provider/model-list step, instead of a clean confirmation message. The picker's intermediate steps (provider list, model list, pagination) already fully replace the rich body correctly; only the terminal confirmation edit was affected.Why This Change Was Made
The
/modelspicker sends its initial body as a rich message whenrichMessagesis enabled, and every lifecycle edit to that message (provider list, model list, pagination) already routes through the rich funnel increateTelegramCallbackMessageActions. The final selection confirmation was the one exception: it always fell back to the legacy HTMLeditMessageTextpath. Editing a rich-sent message through that legacy text path does not fully replace the prior rich body — Telegram renders the new plain/HTML text mixed with the stale rich markup underneath it.The fix converts the model-confirmation call site to author rich content via hand-built
RichText/InputRichBlock[]whenrichMessagesis enabled, following the existingprogress-draft-preview.tsprecedent for opting aparse_mode: "HTML"edit back onto the rich funnel:TelegramCallbackRichTextOverrideletseditCallbackMessage/editCallbackMessageWithButtonsaccept an optionalrichTextOverride; when supplied, the edit routes throughgetTelegramRichRawApi(bot.api).editMessageText(...)with hand-builtrich_messageblocks instead of the legacy text funnel.buildModelSelectionConfirmation(new file) builds both the HTML and rich-block confirmation bodies from one shared text-building function, so the two representations can't drift apart — only model-id HTML-escaping and the runtime placeholder spelling differ per funnel.richMessagesdisabled or unset) are unaffected; the legacy HTML path is unchanged for that funnel.As a side effect of this fix,
bot-handlers.callback-router.tsgrew past the repo's 700-line oxlintmax-linescap, so the pre-existing ~290-linehandleTelegramModelCallbackfunction was extracted verbatim into a new file,bot-handlers.model-callback.ts, with no logic changes — pure file-split, kept in this PR so CI stays green (AGENTS.md: "Split files around ~700 LOC... never add amax-linessuppression").This PR supersedes closed PR #124173, which introduced rich-block sending but left the confirmation edit on the legacy HTML path — ClawSweeper's own review of that PR classified it as
partial_overlap, i.e. it fixed the picker's rich-block plumbing but not the actual reported bug (the confirmation still overlapped stale rich text). This change closes that exact gap.User Impact
Telegram operators with
richMessages: truenow see a single clean confirmation message when they finish the/modelspicker — no more stale/mixed rich-text markup left behind. Operators withoutrichMessagesenabled see no behavior change.Evidence
node scripts/run-vitest.mjs extensions/telegram/src/bot-handlers.callback-actions.test.ts extensions/telegram/src/bot-handlers.model-callback.ts extensions/telegram/src/model-confirmation-message.test.ts extensions/telegram/src/bot.test.ts(and related callback-router/harness specs) — 151/151 passing, including a new regression test assertingrichTextOverrideroutes through the rich funnel and 3 newbuildModelSelectionConfirmationtests asserting HTML vs rich-block parity/escaping.node scripts/run-vitest.mjs extensions/telegram— 3593/3594 passing; the 1 failure (setup-surface.test.ts > accepts numeric sender ids only) is a pre-existing, unrelated sandbox-locale artifact (zh-locale string vs expected English string), reproducible onmainbefore this change.pnpm tsgo:extensionsclean.node scripts/run-oxlint.mjson all touched/added files — exit 0, confirms themax-linesviolation from the file-split is resolved (bot-handlers.callback-router.tsnow 395 lines, down from 706).pnpm format— no diff.$autoreview(Codexgpt-5.6-sol, high reasoning):autoreview clean: no accepted/actionable findings reported,overall: patch is correct (0.96).Update (commit 6973bab29b9)
Two fixes on top of the original commit:
editCallbackMessage's rich-routing branch previously fell back tobuildTelegramRichMarkdown(text)for any rich-account callback edit that wasn'tparse_mode: "HTML", not just the model-picker confirmation. That silently ran markdown parsing over arbitrary un-authored text from approval receipts (terminalizeApprovalMessage), the plugin SDK'srespond.editMessage, and the model picker's own intermediate pagination/provider-list/model-list/error edits — none of which are markdown-authored, so incidental*/_/backtick/[characters (e.g. in provider/model ids or user-controlled error text) could be reinterpreted as formatting instead of sent literally. Fixed by making rich routing strictly opt-in per call: it now only fires when the caller explicitly suppliesrichTextOverride's hand-built blocks (as the model-picker confirmation does); every other caller — regardless ofrichMessages/parse_mode— stays on the legacy literal-text funnel, exactly as before this PR.buildTelegramRichMarkdownis no longer imported by this file (still used correctly elsewhere: streaming draft previews and the general outbound-delivery pipeline, where callers genuinely author markdown).check-test-types(twobot-handlers.callback-actions.test.tsblocks needed explicitvi.fn<T>()typing plus a null-check helper fornoUncheckedIndexedAccess-safe.mock.calls.at(0)access) andcheck-dependencies/knip (ModelSelectionConfirmationParams/ModelSelectionConfirmationhad no external importer and shouldn't have been exported).Correction to my earlier claiming comment on #123886: I stated "clean typecheck" there; at that point
check-test-typesandcheck-dependencieswere actually failing on CI (fixed now, in this commit). Apologies for the inaccurate evidence claim — flagging it here so the record is accurate.Updated evidence
node scripts/run-vitest.mjs extensions/telegram/src/bot-handlers.callback-actions.test.ts— 7/7 passing, including a rewritten test asserting plain-text edits with norichTextOverridestay on the legacy funnel even whenrichMessagesis enabled (inverts the prior test, which asserted the now-fixed over-broad behavior), and updated fallback/error-path tests that now supply an explicit override to exercise the rich funnel.node scripts/run-vitest.mjs extensions/telegram(full extension suite) — 3593/3594 passing; same single pre-existing unrelatedsetup-surface.test.tslocale failure noted above, reproduced identically on this branch's pre-fix HEAD viagit stash.pnpm tsgo:extensionsandpnpm tsgo:extensions:test— both clean.knipproduction + all-exports check — clean, no new dead exports.node_modules/.bin/oxfmt— no diff.node scripts/run-oxlint.mjson touched files — exit 0.$autoreview(Codexgpt-5.6-sol, high reasoning) rerun on this commit:autoreview clean: no accepted/actionable findings reported,overall: patch is correct (0.98).Update (commit a0dec118a21): delete-and-reply instead of legacy-edit on rich-edit failure
ClawSweeper's follow-up P2 finding on the prior commit:
editCallbackMessage'scatch block fell back to
legacyEditCallbackMessage(text, editParams)wheneverthe rich raw-API edit failed for a non-terminal reason.
richTextOverrideisonly ever supplied for a message that was itself sent as rich (the model
picker's final confirmation edit), so a legacy-text retry there reproduces the
exact stale-rich-markup symptom #123886 reported — the new text lands mixed
with the prior rich body instead of replacing it.
Fixed by extracting a shared
deleteAndReplyCallbackMessagehelper (deletethe rich-sent message, then send a plain reply) and using it both for this
new failure path and for
editCallbackMessageWithButtons's existing "no textin the message" recovery, which had the same delete-then-reply logic inlined
already — a small dedup alongside the fix, not just a symptom patch.
Updated evidence
node scripts/run-vitest.mjs extensions/telegram/src/bot-handlers.callback-actions.test.ts— 8/8 passing, including a new test ("deletes and replies instead of
legacy-editing when the rich edit fails for a non-terminal reason") and the
editCallbackMessageWithButtonsdescribe block's "deletes and replies,through the real /model-picker-confirmation call shape, when the rich edit
fails" case, now reusing the shared helper.
node scripts/run-vitest.mjs extensions/telegram(full extension suite) —3594/3595 passing; same single pre-existing unrelated
setup-surface.test.tslocale failure noted above (reproduces identically on
origin/main, nottouched by this branch).
pnpm tsgo:extensions— clean.node scripts/run-oxlint.mjson both touched files — exit 0.node_modules/.bin/oxfmton both touched files — no diff.knip(production + dependencies) — clean, no new unused exports.$autoreview(Codexgpt-5.6-sol, high reasoning) rerun on thiscommit:
autoreview clean: no accepted/actionable findings reported,overall: patch is correct (0.97).bot token configured), unchanged from the original PR evidence.
Update (commit f082965e64c): correct inline comment on rich-funnel invariant
ClawSweeper's re-review on
a0dec118a21surfaced one actionable finding:extensions/telegram/src/bot-handlers.model-callback.ts:294-298. The inline comment claimed the picker's provider/model-list edit steps "already edit through the rich funnel when richMessages is enabled." That's inaccurate:editCallbackMessageWithButtonsonly takes the rich path when the caller explicitly suppliesrichTextOverride, and none of the list/pagination/error edit calls in this file pass one — only the terminal confirmation does.Verified the finding against real code before fixing:
bot-handlers.callback-actions.tsgates rich routing onif (!richMessages || !richTextOverride)falling back to legacy — both conditions are required, not justrichMessages.editMessageWithButtons/editCallbackMessageWithButtonscall sites inbot-handlers.model-callback.ts: only the final confirmation call supplies rich blocks; every provider-list/model-list/pagination/error edit omitsrichTextOverrideand stays on the legacy funnel.Fix: reworded the comment to state the true invariant — those list/pagination/error steps stay on the legacy HTML funnel, and this terminal confirmation is the one call that explicitly opts into the rich funnel via
richTextOverride. Comment-only change, no behavior difference.Validation:
node scripts/run-vitest.mjs extensions/telegram/src/bot-handlers.callback-actions.test.ts extensions/telegram/src/bot.test.ts— 149/149 passing.node scripts/run-oxlint.mjs extensions/telegram/src/bot-handlers.model-callback.ts— clean.node_modules/.bin/oxfmt extensions/telegram/src/bot-handlers.model-callback.ts— applied.git diff --check— clean.Note: ClawSweeper's proof-confidence score on this PR is driven by the disclosed, unresolved "no bot token configured in this sandbox" limitation — real Telegram behavior proof for the rich-edit/delete-and-reply path is still outstanding and I can't produce it here. That gap remains honestly disclosed rather than worked around.
Update (commit 952e6f88239): correct remaining rich-funnel comment (late finding)
ClawSweeper's re-review on
f082965e64csurfaced one actionable finding:extensions/telegram/src/model-confirmation-message.ts:4-7. Flagged as a late finding: the same inaccurate claim fixed atbot-handlers.model-callback.ts:294-298in the prior commit was still present in this file's JSDoc header ("the picker's provider/model-list edits already went through the rich funnel"), and duplicated in a regression-test comment atbot.test.ts:2881.Verified before fixing: grepped every
richBlocksusage inextensions/telegram/src/**—model-confirmation-message.tsis the sole producer, and the terminal confirmation edit inbot-handlers.model-callback.tsis the sole consumer. Provider/list/pagination/error edits never supplyrichTextOverrideand stay legacy-only, confirming the same corrected invariant already landed in the previous commit.Fix: reworded both comments to state that legacy HTML is used by every other picker step (and as this confirmation's fallback), while rich blocks are used only by this terminal confirmation, which explicitly opts into the rich funnel via
richTextOverride. Comment-only change, no behavior difference.Validation:
node scripts/run-vitest.mjs extensions/telegram/src/bot-handlers.callback-actions.test.ts extensions/telegram/src/bot.test.ts— 149/149 passing.node_modules/.bin/oxfmton both touched files — clean, no reformatting needed.git diff --check— clean.Note: the disclosed "no bot token configured in this sandbox" real-Telegram-proof gap remains unresolved and unchanged from prior updates.
Update (commit d55b43e32ef): send fallback before deleting the picker
ClawSweeper's re-review on
952e6f88239(reviewed_at2026-08-16T01:39:38.304Z) surfaced one actionable finding:extensions/telegram/src/bot-handlers.callback-actions.ts:115-118.deleteAndReplyCallbackMessagedeleted the rich picker before awaitingsendMessage. If that send failed, the model selection had already been applied but the user lost both the picker and its confirmation — a silent-failure outcome per this repo's own severity doctrine (silent failure ranks above crash or missing feature).Verified before fixing:
deleteAndReplyCallbackMessagein full: it awaiteddeleteCallbackMessage()(swallowing its own errors) and only then calledreplyToCallbackChat(text, replyParams). Exactly as described.git log --oneline -- extensions/telegram/src/bot-handlers.callback-actions.tsthat this helper (and its ordering) was introduced by this PR's own commita0dec118a21, not a pre-existing unrelated defect — squarely in-scope to fix here.Fix: reordered
deleteAndReplyCallbackMessageto callreplyToCallbackChat(send) first, then makedeleteCallbackMessagebest-effort only after a successful send. A send failure now propagates untouched and never triggers a delete, so the picker is never destroyed without a working replacement.Added two regression tests in
bot-handlers.callback-actions.test.ts:sendMessage's invocation order is beforedeleteMessage's (fails pre-fix: order was reversed);sendMessagerejection propagates anddeleteMessageis never called (fails pre-fix: delete already happened unconditionally before the send was even attempted).Both new tests were confirmed to fail against the pre-fix code (via
git stashof the production change alone) for the intended reason, then pass after the fix.Validation:
node scripts/run-vitest.mjs extensions/telegram/src/bot-handlers.callback-actions.test.ts extensions/telegram/src/bot.test.ts— 151/151 passing.node_modules/.bin/oxfmton both touched files — applied, clean.git diff --check— clean..claude/skills/autoreview/scripts/autoreview --mode local(Codex, gpt-5.6-sol, high reasoning) — clean, no accepted/actionable findings.Note: the disclosed "no bot token configured in this sandbox" real-Telegram-proof gap remains unresolved and unchanged from prior updates.
Update (commit 4ebf2f18165): forward business context to the fallback picker's deletion
ClawSweeper's re-review on
d55b43e32ef(reviewed_at2026-08-16T03:37:58.723Z) surfaced one actionable finding:extensions/telegram/src/bot-handlers.callback-actions.ts:119-121.deleteAndReplyCallbackMessagesends the replacement with the callback's business context but then callsdeleteCallbackMessage, whose delete omitted it. On a Business callback whose rich edit fails, the replacement could be sent while deletion silently failed and was swallowed, leaving the stale interactive picker behind.Verified before fixing:
deleteCallbackMessage: it calledbot.api.deleteMessage(chat_id, message_id)unconditionally, while its siblingslegacyEditCallbackMessageandreplyToCallbackChatboth forwardbusiness_connection_id.node_modules/grammy/out/core/api.d.ts):deleteMessage(chat_id, message_id, signal?)has nobusiness_connection_idparameter at all — unlikeeditMessageText/sendMessage/editMessageReplyMarkup, which all accept one.@grammyjs/types/methods.d.ts):deleteMessagegenuinely has no such field. Telegram instead exposes a dedicated method for this exact case,deleteBusinessMessages(business_connection_id, message_ids), which grammY surfaces asbot.api.deleteBusinessMessages(...). Deleting a business-sent message is a different Bot API call, notdeleteMessageplus an extra field.Fix:
deleteCallbackMessagenow callsbot.api.deleteBusinessMessages(business_connection_id, [message_id])when the callback carries business context, and falls back to the existingbot.api.deleteMessage(chat_id, message_id)otherwise.Added a regression test in
bot-handlers.callback-actions.test.tsasserting that a Business callback's rich-edit-failure recovery deletes viadeleteBusinessMessageswith the right connection id and message id, and never callsdeleteMessage. Confirmed it fails against the pre-fix code (viagit stashof the production change alone —deleteBusinessMessagesis never called pre-fix) for the intended reason, then passes after the fix.Validation:
node scripts/run-vitest.mjs extensions/telegram/src/bot-handlers.callback-actions.test.ts extensions/telegram/src/bot.test.ts— 152/152 passing.pnpm tsgo:extensionsandpnpm tsgo:extensions:test— clean.node_modules/.bin/oxfmton both touched files — applied, clean.git diff --check— clean..claude/skills/autoreview/scripts/autoreview --mode local(Codex, gpt-5.6-sol, high reasoning) — clean, no accepted/actionable findings ("patch is correct (0.99)").Note: the disclosed "no bot token configured in this sandbox" real-Telegram-proof gap remains unresolved and unchanged from prior updates.
Update (head 6328eb54392): mock-gateway harness — executed transcript + verdict JSON (real-behavior proof)
ClawSweeper's
needs real behavior proofgate asks for the added Gateway harness to be executed against this head, with its terminal output and verdict JSON supplied together. This section supersedes and consolidates my two earlier (separately-posted, and confusingly-worded) proof updates into one honest, co-located block.Per
AGENTS.md's real-behavior-proof gate — "a mock-gateway harness run (mock channel API + mock provider + ephemeral gateway, verdict JSON in the PR body) satisfies it for channel-visible changes covering the changed path; live-channel proof is stronger evidence."Harness:
test/e2e/qa-lab/runtime/telegram-model-picker-gateway.e2e.test.ts— a real ephemeral Gateway (startQaGatewayChild,richMessages: true) + a mock OpenAI-compatible provider (startQaMockOpenAiServer) + a local mock Telegram Bot API HTTP server that captures the real HTTP body of everyeditMessageTextcall. It drives the actual production chain end-to-end: callback router → model callback handler → callback actions → grammYapi.raw.editMessageText.Executed transcript (this exact head,
6328eb5):OpenClaw 2026.8.1 (6328eb5)in the gateway boot log confirms the run built and exercised the current PR head, not a stale dist.Test Files 1 passed (1) / Tests 1 passed (1)— the single e2e case passed. (Duration is dominated by the one-time dist rebuild the e2e config triggers whengit HEADchanged; the assertions themselves run in ~16s.)Verdict JSON for the run above:
{ "harness": "mock-gateway e2e — test/e2e/qa-lab/runtime/telegram-model-picker-gateway.e2e.test.ts", "head": "6328eb543924fbc92376a786a15da6f150baea5a", "changedPath": "Telegram /models picker callback -> model selection -> rich-edit confirmation (bot-handlers.callback-router.ts -> bot-handlers.model-callback.ts -> bot-handlers.callback-actions.ts -> grammY api.raw.editMessageText)", "topology": "ephemeral gateway (startQaGatewayChild, own port + state dir, richMessages: true) + mock OpenAI-responses provider (startQaMockOpenAiServer) + real local mock Telegram Bot API HTTP server (getMe/getUpdates/editMessageText/answerCallbackQuery/deleteWebhook) intercepting the real grammY HTTP client", "steps": [ { "step": 1, "action": "gateway starts polling; mock server's first getUpdates responds with an empty batch", "observed": "short poll completes with no updates, matching telegram-ingress-worker.runtime.ts's pollingConfirmed gate (confirm ownership before the long poll)" }, { "step": 2, "action": "mock server injects a synthetic callback_query on the next getUpdates poll: data=\"mdl_sel_mock-openai/gpt-5.6-luna-alt\" against the picker message (chat 555444, message_id 42)", "observed": "gateway ingests the update and dispatches it into the real callback router" }, { "step": 3, "action": "wait for an editMessageText HTTP call to arrive at the mock server", "observed": "exactly one editMessageText POST to /bot<token>/editMessageText, chat_id=555444, message_id=42", "proves": "the callback router resolved the mdl_sel_ callback through handleTelegramModelCallback and reached the terminal confirmation edit" }, { "step": 4, "action": "inspect the captured request body", "observed": "rich_message.blocks is present, is an array, and has length > 0; text and parse_mode are both undefined", "proves": "the edit went through getTelegramRichRawApi(bot.api).editMessageText with a rich_message payload (bot-handlers.callback-actions.ts's rich funnel), not legacyEditCallbackMessage's positional text/parse_mode shape -- the exact rich-vs-legacy distinction #123886 is about" } ], "verdict": "PASS — the changed path is proven on a real gateway: a rich-enabled account's /models final confirmation is delivered through the rich edit funnel (rich_message.blocks over the real Bot-API-shaped HTTP transport), not the legacy plain-text editMessageText path" }Known gap (honestly disclosed, unchanged): this is mock-gateway proof, not a live Telegram Desktop/bot-to-bot recording — no bot token is configured in this sandbox. Per
AGENTS.mdthis harness verdict satisfies the real-behavior-proof gate for this channel-visible change; a maintainer wanting stronger live evidence can trigger Mantis with the exact comment ClawSweeper suggests (@openclaw-mantis telegram desktop proof: verify that a rich-enabled /models selection leaves one clean confirmation without stale picker markup).Update (head 6328eb54392): pre-land autoreview now run — TruffleHog + Codex, clean
ClawSweeper's latest review flagged a real gap: "Autoreview could not run because TruffleHog is unavailable in the review environment." That's an accurate finding about the review sandbox — my own local sandbox does have
trufflehoginstalled, so I ran the repo's mandatory pre-landautoreviewgate here directly against this exact branch (fix/telegram-rich-callback-edit, head6328eb5) vsorigin/main:TruffleHog's pre-scan of the full added/modified/deleted content came back clean (no verified/unknown secrets), and Codex's structured review of the complete branch-vs-
mainbundle returned no accepted or actionable findings. This satisfies the repo's pre-land autoreview gate ($autoreview) for this PR; the previously-reported "TruffleHog unavailable" blocker was specific to the review environment, not this branch's content.The remaining, correctly-identified gap is still real-Telegram-callback proof per
extensions/telegram/AGENTS.md:131(the mock-gateway harness above is supplemental, not sufficient, per that scoped policy) — that piece requires either a maintainer-triggered Mantis run or bot-to-bot QA-lane credentials I don't have standing access to provision myself.