openclaw/extensions/feishu
yunweibang f4a2bbe0c9
fix(feishu): add early event-level dedup to prevent duplicate replies (#43762)
* fix(feishu): add early event-level dedup to prevent duplicate replies

Add synchronous in-memory dedup at EventDispatcher handler level using
message_id as key with 5-minute TTL and 2000-entry cap.

This catches duplicate events immediately when they arrive from the Lark
SDK — before the inbound debouncer or processing queue — preventing the
race condition where two concurrent dispatches enter the pipeline before
either records the messageId in the downstream dedup layer.

Fixes the root cause reported in #42687.

* fix(feishu): correct inverted dedup condition

check() returns false on first call (new key) and true on subsequent
calls (duplicate). The previous `!check()` guard was inverted —
dropping every first delivery and passing all duplicates.

Remove the negation so the guard correctly drops duplicates.

* fix(feishu): simplify eventDedup key — drop redundant accountId prefix

eventDedup is already scoped per account (one instance per
registerEventHandlers call), so the accountId prefix in the cache key
is redundant. Use `evt:${messageId}` instead.

* fix(feishu): share inbound processing claim dedupe

---------

Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-03-13 22:37:40 -05:00
..
skills feat(feishu): support Docx table create/write + image/file upload actions in feishu_doc (#20304) 2026-02-27 18:00:56 -06:00
src fix(feishu): add early event-level dedup to prevent duplicate replies (#43762) 2026-03-13 22:37:40 -05:00
index.ts Plugins/feishu: migrate to scoped plugin-sdk imports 2026-03-04 02:35:12 -05:00
openclaw.plugin.json
package.json chore: bump version to 2026.3.13 2026-03-13 04:38:32 +00:00