fix(feishu): serialize message handling per chat to prevent skipped messages#31807
Merged
Takhoffman merged 2 commits intoopenclaw:mainfrom Mar 2, 2026
Merged
Conversation
Contributor
Greptile SummaryFixed Feishu group chat message skipping by adding per-chat serial queue - messages from the same Implementation:
Scope:
Correctness verified:
Confidence Score: 5/5
Last reviewed commit: 58b2127 |
…essages With fireAndForget=true, all incoming Feishu messages are dispatched concurrently. When multiple messages arrive rapidly in the same group chat, they race through handleFeishuMessage and the agent may only process the latest one, silently dropping earlier messages. Add a per-chat serial queue (createChatQueue) that ensures messages from the same chat_id are processed in FIFO order. Messages from different chats still run concurrently for performance. Closes openclaw#31727
58b2127 to
d922b38
Compare
Contributor
|
PR #31807 - fix(feishu): serialize message handling per chat to prevent skipped messages (#31807) Merged after verification.
|
dawi369
pushed a commit
to dawi369/davis
that referenced
this pull request
Mar 3, 2026
…essages (openclaw#31807) thanks @Sid-Qin Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check (fails on unrelated pre-existing TypeScript error in src/browser/chrome.ts) Co-authored-by: Sid-Qin <201593046+Sid-Qin@users.noreply.github.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
OWALabuy
pushed a commit
to kcinzgg/openclaw
that referenced
this pull request
Mar 4, 2026
…essages (openclaw#31807) thanks @Sid-Qin Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check (fails on unrelated pre-existing TypeScript error in src/browser/chrome.ts) Co-authored-by: Sid-Qin <201593046+Sid-Qin@users.noreply.github.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
…essages (openclaw#31807) thanks @Sid-Qin Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check (fails on unrelated pre-existing TypeScript error in src/browser/chrome.ts) Co-authored-by: Sid-Qin <201593046+Sid-Qin@users.noreply.github.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.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
fireAndForget: truedispatches all messages concurrently — when message B arrives while message A is still being processed, they race throughhandleFeishuMessageand the agent may only respond to B.extensions/feishu/src/monitor.account.ts— added acreateChatQueue()utility that creates a per-chat serial queue. Messages from the samechat_idare now processed in FIFO order (each waits for the previous one to complete). Messages from different chats still run concurrently for performance.bot.tsare all untouched. ThefireAndForgetpattern is preserved — the queue just serializes within a chat.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
Security Impact (required)
NoNoNoNoNoRepro + Verification
Environment
Steps
Expected
Actual
Evidence
The queue cleans up automatically when the chain for a chat_id completes.
Human Verification (required)
npx tsc --noEmit).then(task, task)pattern)Compatibility / Migration
YesNoNoFailure Recovery (if this breaks)
extensions/feishu/src/monitor.account.tsRisks and Mitigations