fix(telegram): chain over-limit stream previews#74508
Conversation
|
Codex review: needs real behavior proof before merge. Summary Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path. Real behavior proof Next step before merge Review detailsBest possible solution: Retry the Codex review after fixing the execution failure. Do we have a high-confidence way to reproduce the issue? Unclear. The review failed before ClawSweeper could establish a reproduction path. Is this the best way to solve the issue? Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction. What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 30e079dd89b4. |
69cf98b to
b07fa2c
Compare
e1f14a1 to
d71b634
Compare
d62caa9 to
dfb9139
Compare
dfb9139 to
c9eba64
Compare
Scope change -- pivoting to per-account API queueMarking as draft while this is overhauled. Original approach: chain overflow reasoning messages and halve draft stream edit frequency when the Telegram message length limit is hit. Why that's insufficient: the 1000ms throttle (and any reduction) operates per-dispatch. Ten concurrent sessions on the same bot account each behave individually but collectively can still burst past Telegram's ~30 req/sec account-level limit. Throttling per-message doesn't fix a per-account resource. New approach: per-account token bucket queue wrapping all mutating Telegram API calls (
The existing Update (May 7): Per-account queue is future work. Current HEAD ( Fixed: adaptive throttle wired into send gate ( Remaining: P2 per-account scoping (acknowledged, out of scope for this PR), P2 stale hashes (rebase concern, will regenerate before merge), P3 gate retry timing (low priority). All 35 tests pass. |
a390eec to
efce48e
Compare
d78a974 to
dd845b5
Compare
dd845b5 to
928083f
Compare
55c084a to
0b72bbd
Compare
ab2c26b to
159ca85
Compare
|
Combined test branch available: If you'd like to try both fixes together: npm install -g anagnorisis2peripeteia/openclaw#5.6+claude-cli-telegram-reasoningWhat's included:
Feedback welcome -- especially on how the reasoning stream behaves during long thinking blocks and whether the overflow chaining feels natural. |
|
Landed via rebase onto main.
Thanks @anagnorisis2peripeteia! |
Summary
Verification
Real behavior proof
extensions/telegram/src/draft-stream.ts, wires it to real Telegram Bot APIsendMessage,editMessageText, anddeleteMessage, sends a 4050-character first preview, then updates to 5050 characters in the live group.{ "ok": true, "runMarker": "PR74508-mowx7yo3", "firstUpdateLength": 4050, "overflowUpdateLength": 5050, "sentMessages": [ { "messageId": 5422, "length": 4050 }, { "messageId": 5423, "length": 1000 } ], "retained": [{ "messageId": 5422, "length": 4050, "retain": true }], "warnMessages": [], "cleanup": [ { "messageId": 5422, "ok": true }, { "messageId": 5423, "ok": true } ] }