[codex] fix Telegram live-owned stuck ingress claims#95282
[codex] fix Telegram live-owned stuck ingress claims#95282Premsenareddy wants to merge 1 commit into
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Keep this PR open, but it is not merge-ready: the patch addresses the right Telegram stuck-ingress symptom and has strong Mantis proof, yet it can fail a claim owned by another live process using only age plus this gateway's lack of active handler state. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Close this PR as superseded by #95299. So I’m closing this here and keeping the remaining discussion on #95299. Review detailsBest possible solution: Close this PR as superseded by #95299. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current main keeps other-live-process Telegram claims guarded while later same-lane updates remain pending, and Mantis before/after proof shows the visible stuck-message recovery on this PR. Is this the best way to solve the issue? No. The PR targets the right failure and has real Telegram proof, but age plus this process having no active handler is not enough stale-owner proof for another live worker without maintainer policy approval. Security review: Security review cleared: The diff changes Telegram runtime recovery logic and tests only; it adds no dependency, workflow, secret, permission, package, or remote code execution surface. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 108d6d7eca00. |
Mantis Telegram Desktop ProofSummary: Mantis captured native Telegram Desktop before/after GIFs showing Main leaving the stuck-lane message unanswered while This PR delivers a bot response.
Motion-trimmed clips: |
|
ClawSweeper applied the proposed close for this PR.
|
|
🦞👀 Reason: structured ClawSweeper close marker: close-required (sha=66a9d60f5eca88b6a297a61ff1742cce85d6902c) Usage: |




Summary
Root cause
The Telegram isolated ingress drain recovered dead or unowned durable claims, but it skipped any claim held by a live process. If that live worker stopped making progress without leaving active handler state behind, the durable
channel_ingress_eventsrow stayed claimed and later same-lane updates remained blocked until gateway restart or manual SQL cleanup.Validation
node scripts/run-vitest.mjs extensions/telegram/src/polling-session.test.tsnode scripts/run-vitest.mjs src/channels/message/ingress-queue.test.ts extensions/telegram/src/polling-session.test.ts src/logging/diagnostic-stuck-session-recovery.runtime.test.ts src/logging/diagnostic.test.ts./node_modules/.bin/oxfmt --check --threads=1 extensions/telegram/src/polling-session.ts extensions/telegram/src/polling-session.test.tsgit diff --checkFixes #95248