fix(feishu): use sendReplyToMessageId in streaming card start() for DM chats#94933
fix(feishu): use sendReplyToMessageId in streaming card start() for DM chats#94933ZOOWH wants to merge 2 commits into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 19, 2026, 8:07 PM ET / 00:07 UTC. Summary PR surface: Source +4, Tests +40. Total +44 across 2 files. Reproducibility: yes. from source: current main passes raw streaming reply/root metadata even when the caller marks ordinary DMs to suppress reply metadata. I did not run live Feishu delivery in this read-only review. Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land one canonical Feishu fix that suppresses ordinary-DM streaming-card reply metadata while preserving group/topic and P2P direct-thread routing, with live Feishu proof or maintainer override. Do we have a high-confidence way to reproduce the issue? Yes from source: current main passes raw streaming reply/root metadata even when the caller marks ordinary DMs to suppress reply metadata. I did not run live Feishu delivery in this read-only review. Is this the best way to solve the issue? Yes: deriving streaming.start options from the existing skipReplyToInMessages decision is the narrow owner-boundary fix. Disabling streaming or changing global Feishu reply policy would be broader. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d6075c1694ea. Label changesLabel justifications:
Evidence reviewedPR surface: Source +4, Tests +40. Total +44 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
9989775 to
651f77f
Compare
Request for maintainer proof overrideThis PR is blocked on 📣 needs proof because it lacks live Feishu DM screenshots. We do not have Feishu enterprise credentials to produce them. However, this fix is strictly source-aligned — it is a one-line change that applies the same Why a proof override is reasonable here:
A maintainer with Feishu credentials (e.g. @vincentkoc, @steipete) can override by:
Alternatively, if the sibling PR #94925 gets live proof first, we can close this in favor of the proven branch — but the code quality here is higher (🦞 patch quality per ClawSweeper) and the fix is identical in logic. |
651f77f to
9d7a35b
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
678ff82 to
fc71af1
Compare
|
@clawsweeper re-review Strengthened real behavior proof: now calling the actual production function |
|
🦞🧹 I asked ClawSweeper to review this item again. |
…M chats The streaming card path in createFeishuReplyDispatcher used the raw replyToMessageId instead of sendReplyToMessageId, bypassing the skipReplyToInMessages guard that suppresses reply mode in DM sessions. This caused DM messages to display with a "Reply to [User]" label in the Feishu client. All other send paths (text, media, structured card) already used sendReplyToMessageId. The streaming card was the only outlier. Closes openclaw#94922
…rt() in DM chats In DM chats (skipReplyToInMessages=true), the streaming card start() previously received the raw replyToMessageId and rootId, causing resolveStreamingCardSendMode to choose "reply" or "root_create" mode instead of "create". This mismatched the behavior of plain-text and static-card sends, which omit reply metadata in DMs. - Pass sendReplyToMessageId (already undefined in DM) to streaming.start() - Add streamingRootId: undefined in DM (skipReplyToInMessages=true), preserving rootId for group/thread streaming - Add regression tests for DM (both fields omitted) and group (both preserved) streaming card send modes Closes openclaw#94922
|
Closing this PR — unable to provide real Feishu environment proof that ClawSweeper requires for message-delivery merge-risk. Without a Feishu test app, the proof ceiling is stuck at supplied but not sufficient. |
Fixes #94922
Summary
start()call increateFeishuReplyDispatcherused the rawreplyToMessageIdinstead ofsendReplyToMessageId, bypassing theskipReplyToInMessagesguard that suppresses reply mode in DM sessions.sendReplyToMessageId.sendReplyToMessageIdat line 395, making it consistent with all 8 other send paths in the dispatcher.Root Cause
The
skipReplyToInMessagesguard (line 173) computessendReplyToMessageIdasundefinedwhen!isGroup && !directThreadReply(DM sessions). This correctly suppresses reply metadata for plain-text, media, and structured-card sends. But the streaming cardstart()bypassed this guard by using the rawreplyToMessageIddirectly, so DM streaming cards always fell intoresolveStreamingCardSendMode→"reply"→im.message.replyAPI → visible "Reply to" label.Change Type
Scope
Real behavior proof
Behavior addressed: Feishu streaming card sends messages with
replyToMessageIdin DM chats, causing "Reply to [User]" label instead of direct create mode.Environment tested: Node.js v24.13.1 on Linux, OpenClaw main branch and PR branch, Feishu extension source.
Exact steps run after the patch: Called the actual
resolveStreamingCardSendModeproduction function from source vianode --import tsxto verify the send mode for DM, group, and thread scenarios.Evidence after fix:
Before (upstream/main — bug present):
When the streaming card
start()receives the rawreplyToMessageIdfrom the inbound message,resolveStreamingCardSendModereturns"reply", causing the "Reply to [User]" label in Feishu DMs.After (PR branch — bug fixed):
With the fix, DM streaming cards receive
sendReplyToMessageIdwhich isundefinedwhenskipReplyToInMessagesis true, soresolveStreamingCardSendModecorrectly returns"create"→ no Reply-to label. Group and thread modes are unchanged.Observed result after the fix: DM streaming cards now use
createmode (no Reply-to label). Group replies still usereplymode (correct threading). Thread replies still useroot_createmode (correct root attachment). All reply-dispatcher test scenarios pass.What was not tested: Live Feishu DM delivery with real bot credentials and a production Feishu tenant.