fix #87299: [Bug]: Spurious "Something went wrong" and Codex app-server failures in large Telegram direct sessions#89930
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 3, 2026, 9:45 PM ET / 01:45 UTC. Summary PR surface: Source +4, Tests +43. Total +47 across 2 files. Reproducibility: yes. by source inspection: current main sends the generic Telegram fallback whenever dispatchError is set, even if delivery state already recorded a visible final response. I did not run a live current-main Telegram repro in this read-only review. 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:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the Telegram fallback fix with focused tests after exact-path proof or explicit maintainer acceptance, while leaving the linked Codex app-server path separate. Do we have a high-confidence way to reproduce the issue? Yes by source inspection: current main sends the generic Telegram fallback whenever dispatchError is set, even if delivery state already recorded a visible final response. I did not run a live current-main Telegram repro in this read-only review. Is this the best way to solve the issue? Yes for the Telegram duplicate-fallback half: the dispatch boundary already owns delivered, suppressed, and queued-final facts, so this is the narrow maintainable location. It is not the full solution for the separate Codex app-server client-closed incident in the linked issue. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against d54addcd284f. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +4, Tests +43. Total +47 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
|
e04c0be to
a550561
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Summary
Refs #87299
Root Cause
dispatchErroras enough to send the generic failure fallback, even when the dispatch boundary already knew that a final response had reached the user or was queued for delivery.queuedFinalresult before consideringdispatchError. The generic fallback still sends when no final response was delivered/suppressed/queued, but it is suppressed for the duplicate-message path after a successful final response.Real behavior proof
Something went wrong while processing your request. Please try again.message when a later dispatch/cleanup warning is recorded.a5505616a4, Telegram bot@moongpbot, and modeldeepseek/deepseek-v4-flash.a5505616a438b61f92700672083b4f1f9feac71e.Regression Test Plan
extensions/telegram/src/bot-message-dispatch.test.ts.Verification
node scripts/run-vitest.mjs extensions/telegram/src/bot-message-dispatch.test.tspnpm exec oxfmt --check --threads=1 extensions/telegram/src/bot-message-dispatch.ts extensions/telegram/src/bot-message-dispatch.test.tsnpx oxlint --deny=warn --ignore-path=.oxlintignore extensions/telegram/src/bot-message-dispatch.ts extensions/telegram/src/bot-message-dispatch.test.tsgit diff --checka5505616a438b61f92700672083b4f1f9feac71e:pr-final-statusreportedFAIL=1 PENDING=0 PASS=128 SKIPPED=27.Run agentic native Telegram proof, attributed to the exact-path Mantis capture limitation above.Review findings addressed
Refs #87299and stating that this PR covers only the Telegram duplicate-fallback half, not the Codex app-server client-closed half.Merge risk
merge-risk: 🚨 message-delivery.