fix: improve message delivery reliability (Telegram + Feishu)#266
Open
lowmiaq-gmail wants to merge 2 commits intoop7418:mainfrom
Open
fix: improve message delivery reliability (Telegram + Feishu)#266lowmiaq-gmail wants to merge 2 commits intoop7418:mainfrom
lowmiaq-gmail wants to merge 2 commits intoop7418:mainfrom
Conversation
Telegram notifications: - Add retry with exponential backoff to sendMessage() (was fire-and-forget) - Skip retry for 4xx errors (except 429 rate limit) - Max 2 retries with jittered backoff Feishu adapter: - Add retry (max 2) with exponential backoff to resource downloads - Size-limit failures skip retry (not transient) - Persist last processed message_id to channel_offsets table (survives restart) - Increase in-memory dedup cap from 1000 to 5000 Root cause: notifications and resource downloads had zero retry logic, causing silent message loss on transient network failures. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Someone is attempting to deploy a commit to the op7418's projects Team on Vercel. A member of the Team first needs to authorize it. |
When bridge_parallel_tasks setting is enabled and the current session is busy processing a message, new incoming messages automatically spawn ephemeral worker sessions instead of queueing behind the active task. This allows users to send multiple independent tasks via Feishu/Telegram and have them processed concurrently with separate Claude streams, eliminating the sequential bottleneck. - channel-router: add createWorkerBinding() for ephemeral worker sessions - bridge-manager: detect busy sessions and dispatch to workers - handleMessage: accept optional binding override for worker routing - Worker sessions inherit model, provider, working dir, mode from parent - Backward compatible: disabled by default (opt-in via setting) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
channel_offsets表(重启后不丢 dedup 状态)Root Cause
通知发送和资源下载没有任何重试逻辑,网络瞬态故障(超时、断连、429 限流)直接导致消息静默丢失。
Changes
src/lib/telegram-bot.tscallWithRetry()— 指数退避重试,4xx(非 429)不重试sendMessage()切换为callWithRetrysrc/lib/bridge/adapters/feishu-adapter.tsdownloadResource()包裹重试循环(文件过大直接返回,不浪费重试)addToDedup()写入channel_offsets表持久化DEDUP_MAX1000 → 5000Test plan
🤖 Generated with Claude Code