fix(telegram): honor table mode while chunking#85098
Conversation
|
Codex review: needs real behavior proof before merge. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. from source inspection: current main has a table-mode-aware Telegram chunk renderer underneath, but the HTML chunk wrapper and outbound chunker path do not pass table mode or config/account context. I did not run a live failing Telegram send in this read-only review. PR rating Rank-up moves:
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. Real behavior proof Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge Security Review findings
Review detailsBest possible solution: Land the Telegram fix with a documented additive chunker-context contract, focused regression coverage, and live or maintainer-waived Telegram proof for the visible chunked/streamed table rendering path. Do we have a high-confidence way to reproduce the issue? Yes from source inspection: current main has a table-mode-aware Telegram chunk renderer underneath, but the HTML chunk wrapper and outbound chunker path do not pass table mode or config/account context. I did not run a live failing Telegram send in this read-only review. Is this the best way to solve the issue? Mostly yes: forwarding resolved config/account context to the Telegram chunker is the narrow fix shape, but the public chunker context extension needs docs/API acceptance and live Telegram proof before merge. Label changes:
Label justifications:
Full review comments:
Overall correctness: patch is incorrect Acceptance criteria:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against f52db027a0cb. |
|
ClawSweeper PR egg 🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat. Where did the egg go?
|
Summary
channels.telegram.markdown.tablesfor non-HTML/streamed chunked messages.cfg/accountIdinto chunker contexts and resolve Telegram table mode before Markdown-to-HTML chunking.markdownToTelegramHtmlChunksnow accepts chunk options; Telegram chunker forwards resolvedtableMode; core outbound planning/payload helpers pass config context; regression tests cover both direct format and adapter/core seams.Motivation
| --- |) leaking into Telegram chunked/streaming messages even whenmarkdown.tablesis configured for bullets.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Real behavior proof (required for external PRs)
Behavior or issue addressed: Telegram chunked Markdown table rendering now honors
channels.telegram.markdown.tables.Real environment tested: local source checkout with Node v22.19.0.
Exact steps or command run after this patch:
corepack pnpm exec tsx -e 'import { markdownToTelegramHtmlChunks } from "./extensions/telegram/src/format.ts"; const input=["| Name | Status |","| --- | --- |","| Bot | OK |"].join("\n"); const rendered=markdownToTelegramHtmlChunks(input,4096,{tableMode:"bullets"}).join(""); console.log("OpenClaw Telegram chunk render proof"); console.log("input:"); console.log(input); console.log("rendered:"); console.log(rendered); console.log("contains raw separator:", rendered.includes("| --- | --- |"));'Evidence after fix (screenshot, recording, terminal capture, console output, redacted runtime log, linked artifact, or copied live output):
Supplemental local tests:
node scripts/run-vitest.mjs extensions/telegram/src/format.test.ts extensions/telegram/src/outbound-adapter.test.ts src/infra/outbound/message-plan.test.ts src/plugin-sdk/reply-payload.test.tspassed (Test Files 4 passed (4)/Tests 104 passed (104)).Observed result after fix: configured
tables: "bullets"removes raw table separator output from Telegram chunked HTML and renders the table row as Telegram-safe bullet text.What was not tested: live Telegram bot delivery.
Before evidence (optional but encouraged): issue reproduction documents raw table separators in Telegram chunked/streamed output.
Root Cause (if applicable)
markdownToTelegramHtmlChunksdid not accept/passtableMode, and outbound chunker call sites only passed formatting context, not config/account context.Regression Test Plan (if applicable)
extensions/telegram/src/format.test.ts,extensions/telegram/src/outbound-adapter.test.ts,src/infra/outbound/message-plan.test.ts,src/plugin-sdk/reply-payload.test.ts.tables: "bullets"flows from outbound config/account context to Telegram Markdown chunk rendering.User-visible / Behavior Changes
Telegram chunked/streamed Markdown messages now honor configured table rendering modes instead of emitting raw Markdown tables.
Diagram (if applicable)
Security Impact (required)
Yes, explain risk + mitigation: N/ARepro + Verification
Environment
channels.telegram.markdown.tables = "bullets"Steps
bullets.Expected
bullets; raw| --- |separator text is not delivered.Actual
Evidence
Human Verification (required)
Review Conversations
Compatibility / Migration
Risks and Mitigations