fix(telegram): send progress previews as html text#94891
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 19, 2026, 5:15 AM ET / 09:15 UTC. Summary PR surface: Source +9, Tests -28. Total -19 across 2 files. Reproducibility: yes. Current main is source-reproducible: progress-mode dispatch always passes a Review metrics: none identified. 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:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the producer-boundary fix after maintainer review, green focused checks, and real Telegram proof showing non-rich progress previews render as formatted standard HTML while rich mode still uses rich messages. Do we have a high-confidence way to reproduce the issue? Yes. Current main is source-reproducible: progress-mode dispatch always passes a Is this the best way to solve the issue? Yes. Fixing the producer boundary is the narrowest maintainable path because AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8aaf937bc045. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +9, Tests -28. Total -19 across 2 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
|
1bf927a to
44788a2
Compare
Summary
richMessagesis offrichMessagepreviews only for the explicitrichMessages === truetransportparseMode: "HTML"Root Cause
Telegram progress draft rendering always produced a
richMessageHTML preview shape, even when account config hadrichMessagesoff. The draft stream usually normalized that shape back into standardsendMessage/editMessageTextwithparse_mode: "HTML", but the producer contract was wrong and leak-prone: false-mode progress should never carry a raw rich-message payload.Distill / Greybeard Pass
Distill: fixed the producer boundary instead of adding another fallback in
draft-stream; false-mode now emits its actual transport shape directly, while rich-mode remains the only path that producesrichMessage.Greybeard: no hot-path optimization needed. The branch is stable per account config, and the patch does not add new per-line work beyond the existing progress HTML render/join path.
Verification
OPENCLAW_VITEST_MAX_WORKERS=1 pnpm test extensions/telegram/src/draft-stream.test.ts extensions/telegram/src/bot-message-dispatch.test.ts -- --reporter=verbosegit diff --check.agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main