Feishu: recover from withdrawn reply targets#29980
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 63af78b89c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -55,6 +55,9 @@ export function createFeishuReplyDispatcher(params: CreateFeishuReplyDispatcherP | |||
|
|
|||
| let typingState: TypingIndicatorState | null = null; | |||
| const typingCallbacks = createTypingCallbacks({ | |||
| // Deleted/withdrawn reply targets should stop Feishu typing immediately | |||
| // instead of spending another keepalive interval on the same dead message. | |||
| maxConsecutiveFailures: 1, | |||
There was a problem hiding this comment.
Keep Feishu typing retry threshold for backoff failures
Setting maxConsecutiveFailures: 1 here trips the typing start guard on the first thrown addTypingIndicator error, not only on withdrawn/deleted-target errors. Since addTypingIndicator also throws for backoff conditions (e.g. 429, 99991400, 99991403), one transient rate-limit response now stops Feishu typing keepalive for the entire reply instead of allowing the previous one-retry grace (createTypingCallbacks defaults to 2 in src/channels/typing.ts). This widens the behavior change beyond target-gone handling and can cause user-visible loss of typing indicators under temporary throttling.
Useful? React with 👍 / 👎.
Greptile SummaryThis PR implements graceful fallback handling for Feishu replies when the target message has been deleted or withdrawn. When Feishu returns error codes The implementation correctly handles both SDK response formats ( Confidence Score: 5/5
Last reviewed commit: 63af78b |
Summary
Describe the problem and fix in 2–5 bullets:
Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
Feishu now falls back to a normal send when a reply target was withdrawn or deleted, and typing keepalive stops immediately for the same terminal target-gone errors.
Security Impact (required)
No)No)No)No)No)Yes, explain risk + mitigation:Repro + Verification
Environment
Steps
230011/231003).Expected
Actual
upstream/main, the reply fails and is dropped, while typing-target errors are swallowed and the keepalive keeps retrying the same deleted message.Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
Compatibility / Migration
Yes)No)No)Failure Recovery (if this breaks)
extensions/feishu/src/send.ts,extensions/feishu/src/media.ts,extensions/feishu/src/typing.ts,extensions/feishu/src/reply-dispatcher.tsRisks and Mitigations
Verification Commands
pnpm checkstill fails on currentupstream/mainbecause of unrelated baseline typecheck errors inextensions/diagnostics-otel/src/service.ts,src/discord/voice/manager.ts,src/gateway/server-cron.ts, andsrc/shared/net/ip.ts.