fix(feishu): respect skipReplyToInMessages in streaming card start#95236
Conversation
When blockStreaming is enabled, the Feishu streaming card delivery path started the streaming session with the raw replyToMessageId parameter, bypassing the skipReplyToInMessages filter that already existed for regular text/card message replies. This caused Feishu DM (direct message) replies to incorrectly show a "Reply to [User]" label, since the streaming card was sent as a reply rather than a top-level message. The fix changes replyToMessageId to sendReplyToMessageId in the streaming.start() call, so the skipReplyToInMessages flag is respected in the streaming path as well. Fixes openclaw#94922
|
Thanks for the contribution. This PR still needs the requested real-behavior proof, and the branch has been idle since that ask. This external PR should close as stalled and unproven: the required real Feishu proof ask has been visible for more than 14 days, the head/check activity is also older than 14 days, and the branch still has a blocking copied-test finding plus a dirty merge state. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. So I’m closing this for now to keep the review queue honest. Please reopen or open a fresh PR with real-behavior proof (a live run, logs, or a reproducible validation transcript) and it will be reviewed again. Review detailsBest possible solution: Keep the canonical issue open and accept a fresh or reopened rebased PR only after dispatcher-backed tests plus redacted live Feishu proof or an explicit maintainer proof override. Do we have a high-confidence way to reproduce the issue? Yes, source-level only: ordinary Feishu DMs set Is this the best way to solve the issue? No, not as a merge candidate. The runtime direction is narrow and plausible, but the branch remains unproven, dirty against current main, and keeps copied-logic tests that do not exercise the dispatcher. Security review: Security review cleared: The diff only touches Feishu dispatcher routing and colocated tests; it does not change secrets, dependencies, workflows, packaging, install scripts, or permission surfaces. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 13c1d3c4083a. |
…ges is set When skipReplyToInMessages is true for ordinary DMs, both the reply target and the root message id must be filtered so the streaming card does not route through root_create or reply_to modes. - Add effectiveRootId that mirrors the sendReplyToMessageId filtering - Update allowTopLevelReplyFallback to use effectiveRootId - Add 6 focused regression tests for DM/group/topic/edge cases Fixes openclaw#94922
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
… tests Restores the original 82 dispatcher-backed tests that were accidentally replaced by the Phase 10 helper-only tests. Adds 6 new focused tests verifying the effectiveRootId and sendReplyToMessageId filtering for ordinary DM vs group/topic scenarios on top of the restored suite. Total: 88 tests passing. Fixes openclaw#94922
|
Restored the full dispatcher-backed test suite (82 original tests) and added 6 new Phase 10 tests on top. Total: 88 tests passing. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
|
Hi @mmyzwl — thank you for working on this! I'm the original reporter of #94922. |
|
ClawSweeper applied the proposed close for this PR.
|
What Problem This Solves
When
blockStreamingis enabled (default), the Feishu streaming card delivery path started the streaming session with the rawreplyToMessageIdparameter, bypassing theskipReplyToInMessagesfilter that already existed for regular text/card message replies.This caused Feishu DM (direct message) replies to incorrectly show a "Reply to [User]" label, since the streaming card was sent as a reply rather than a top-level message.
The fix:
replyToMessageIdtosendReplyToMessageIdin thestreaming.start()callrootIdwhenskipReplyToInMessagesis true — the rawrootIdalone could still route the DM streaming card throughroot_createeven whenreplyToMessageIdwas clearedFixes #94922
Evidence
Behavior addressed: Feishu DM streaming card incorrectly used reply-to mode instead of top-level delivery.
Phase 10 changes:
effectiveRootIdthat also respectsskipReplyToInMessages, preventing root_create routing in ordinary DMsReal setup tested: Node v24.13.1, Linux x86_64
Exact steps or command run after this patch:
$ pnpm test -- extensions/feishu/src/reply-dispatcher.test.tsAfter-fix evidence:
Observed result after the fix: The streaming card
start()call now passesreplyToMessageId: sendReplyToMessageIdandrootId: effectiveRootId, both respectingskipReplyToInMessages. For ordinary DMs the card is delivered as top-level; for group/topic threads the reply metadata is preserved.What was not tested: Live end-to-end test with actual Feishu API (requires Feishu bot credentials). The fix is verified through unit tests and code review.
Tests and validation
Risk checklist
Did user-visible behavior change? (
Yes)Did config, environment, or migration behavior change? (
No)Did security, auth, secrets, network, or tool execution behavior change? (
No)What is the highest-risk area?
skipReplyToInMessagesshould befalseHow is that risk mitigated?
sendReplyToMessageIdvariable plus the neweffectiveRootId, both derived from the sameskipReplyToInMessagesflag used by all other delivery pathsCurrent review state
What is the next action?