fix(telegram): expose spooled handler timeout config#87891
Conversation
|
Thanks for the contribution. ClawSweeper proposes closing this for now: the implementation may be reasonable, but passing review and proof does not establish that OpenClaw should add this product surface. Close for unconfirmed product direction: the patch is coherent and proof-backed, but it adds a new public Telegram operator config contract without maintainer sponsorship for the key name, bounds, default, and support commitment. This is a proposal only until the separate default-off apply policy is enabled and all live maintainer-signal checks pass. A maintainer can sponsor the direction, request a narrower version, or apply Review detailsBest possible solution: Keep the internal recovery path and the linked lane-release fix separate; expose a public timeout knob only if a maintainer sponsors the API name, bounds, default, docs, and support contract. Do we have a high-confidence way to reproduce the issue? Yes for the claimed config gap: current main has the internal isolated-ingress timeout hook but no public schema/type/docs/monitor wiring for Is this the best way to solve the issue? No as a merge path: the implementation is narrow and plausible, but adding a public Telegram config knob is not the best default without maintainer sponsorship. The safer path is to land the runtime lane-release repair separately and add this tuning surface only after the API contract is accepted. Security review: Security review cleared: Security review cleared: the diff changes Telegram config schema/types/docs/generated metadata/tests and one option-plumbing line, with no dependency, lockfile, workflow, secret, permission, or code-execution surface concern found. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 82dfd8910743. |
|
Added runtime proof to the PR body. The proof uses the real @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Summary
channels.telegram.spooledUpdateHandlerTimeoutMswith top-level and per-account config supportWhy
Telegram isolated ingress already fails stale claimed spool updates after a handler timeout, but operators could not tune that timeout from
channels.telegram. A wedged.processingfile can therefore keep a same-chat lane blocked until the default 25 minute timeout.Runtime Proof
I ran a redacted local runtime harness against the PR head using the real
TelegramPollingSession, real spool files, real reply-fence timeout recovery path, and a fake Telegram Bot runtime to avoid live network calls. The harness configuredisolatedIngress.spooledUpdateHandlerTimeoutMs = 200, wrote two same-lane spooled updates, wedged update42, and verified update43drained only after timeout recovery restarted isolated ingress.{ "configuredTimeoutMs": 200, "configuredAbortGraceMs": 200, "elapsedMs": 475, "workerCreateCount": 2, "botConstructCount": 2, "events": [ "first:42", "second:43" ], "failedUpdateIds": [ 42 ], "pendingUpdateIds": [], "timeoutLog": "[telegram] Telegram isolated polling spool handler timed out behind update 42 on lane telegram:-100:topic:10 after 205ms; marking the update failed, aborting active reply work, and restarting isolated ingress so later updates can drain." }This shows the configured timeout was honored by the isolated-ingress runtime path: update
42was failed after the configured timeout budget and the later same-lane update43drained after the restart.Validation
pnpm config:channels:checkpnpm exec vitest run extensions/telegram/src/config-schema.test.ts extensions/telegram/src/polling-session.test.tspassed locally while preparing the patch. A later rerun in this workspace timed out in Vitest/Rolldown pre-test bundling with repeated plugin timing warnings before any assertion output.