fix(telegram): preserve rich forwarded message text#98735
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 1, 2026, 2:25 PM ET / 18:25 UTC. Summary PR surface: Source +87, Tests +215. Total +302 across 7 files. Reproducibility: yes. at source level: current Review metrics: 1 noteworthy metric.
Stored data model 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 findings
Review detailsBest possible solution: Include all visible Bot API rich-message text fields, especially details summaries, add regression coverage, and provide successful after-fix Telegram proof before merge. Do we have a high-confidence way to reproduce the issue? Yes at source level: current Is this the best way to solve the issue? No: the shared helper is the right layer, but this patch is incomplete because it omits details summaries and lacks a successful after-fix live Telegram proof. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 53fe2e4bc3ca. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +87, Tests +215. Total +302 across 7 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
|
b990f2a to
389d88b
Compare
|
Landed via rebase onto main.
|
What Problem This Solves
Fixes an issue where Telegram messages delivered as rich messages could reach the agent as
[unsupported Telegram rich_message received]instead of the visible message text.This affected rich-message-only Telegram updates, including forwarded messages from clients where Telegram leaves
textandcaptionempty but populatesrich_message.Why This Change Was Made
Telegram inbound body resolution now extracts visible text from
rich_message.markdown,rich_message.html, and nested rich message blocks before falling back to the existing unsupported placeholder.The same extraction path is used for the main inbound body, reply-target descriptions, and cached conversation context so rich-message text does not disappear in follow-up turns. Unsupported rich message shapes still keep the loud placeholder.
AI-assisted.
User Impact
Users can forward or send Telegram rich messages to the bot and have the agent see the actual message body. In
requireMentiongroups, rich-message-only updates also participate in mention detection when the extracted rich text mentions the bot or matches configured mention patterns.Evidence
Before-fix live repro on
origin/mainat8d9a7ab2cab:Focused tests after the fix:
Other checks:
After-fix live Telegram rerun was attempted, but the shared SUT bot token was being polled elsewhere: