fix(telegram): avoid replaying long streamed replies#87657
Conversation
3a89c60 to
911a17a
Compare
|
Codex review: needs maintainer review before merge. Reviewed May 28, 2026, 9:58 AM ET / 13:58 UTC. Summary PR surface: Source +71, Tests +131. Total +202 across 2 files. Reproducibility: yes. the linked issue has a 2026-05-28 current-main Telegram bot-to-bot E2E repro with a long streamed response replaying as multiple Telegram replies. Source inspection of current main shows the finalization path falls back when delivered stream text has advanced beyond the first chunk. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the narrow Telegram long-stream replay fix after CI is clean, and keep the broader duplicate-report thread open until non-Telegram/session symptoms are separately proven fixed or ruled out. Do we have a high-confidence way to reproduce the issue? Yes: the linked issue has a 2026-05-28 current-main Telegram bot-to-bot E2E repro with a long streamed response replaying as multiple Telegram replies. Source inspection of current main shows the finalization path falls back when delivered stream text has advanced beyond the first chunk. Is this the best way to solve the issue? Yes for the Telegram long streamed reply replay path: the PR fixes the owner-local finalization logic instead of adding a second delivery path. It is not, by itself, the complete solution for the broader cross-channel duplicate symptoms in the linked issue. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 8ba71e4afffc. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +71, Tests +131. Total +202 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
|
911a17a to
26d3a4c
Compare
|
Merged with rebase. Proof before merge:
Known gap: no broad changed gate rerun here; earlier broad check was blocked by an unrelated current-main type error outside the Telegram files. |
Summary
Refs #86519.
Verification
node scripts/run-vitest.mjs extensions/telegram/src/lane-delivery.test.ts -- --reporter=verbose-> 32 passedbugExists: false,mockRequests: 1,restartedReplyIds: []bugExists: false,mockRequests: 1,restartedReplyIds: []pnpm check:changedcurrently fails in untouchedsrc/plugin-sdk/approval-reaction-runtime.ts:300on latestorigin/main(ApprovalActionView.kind), outside this diff.Behavior addressed: duplicate Telegram replay after long streamed replies
Real environment tested: real Telegram bot-to-bot group with mocked OpenAI SSE
Exact steps or command run after this patch: focused Vitest, changed check, Telegram E2E long-response probes
Evidence after fix: no restarted segment-01 reply in either E2E run
Observed result after fix: long replies continue as Telegram chunks without replaying the beginning
What was not tested: full suite / Testbox