Repository navigation
fix(feishu): allow card-action callbacks to bypass requireMention in groups (#85450) - #85609
zhouhe-xydt wants to merge 2 commits into
Conversation
…ingSignatures Add latestAssistantIndex guard to stripInvalidThinkingSignatures so it skips the most recent assistant turn, matching the existing behavior in dropThinkingBlocks. Anthropic requires thinking blocks in the latest assistant message to be sent back verbatim; modifying them causes invalid_request_error. Fixes openclaw#85557
…groups Structured card action callbacks (e.g., execute_confirmed) were silently dropped in group chats with requireMention=true because the synthetic message built from the card action has no mentions array. Since clicking a button on a bot-sent card is already direct bot engagement, the requireMention check should not apply. Fixes openclaw#85450
|
Codex review: needs real behavior proof before merge. Latest ClawSweeper review: 2026-05-23 03:56 UTC / May 22, 2026, 11:56 PM ET. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. from source inspection: card-action synthetic events are dispatched through PR rating Rank-up moves:
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. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review findings
Review detailsBest possible solution: Land a narrow Feishu-only fix that uses an internal card-action signal, preserves normal Do we have a high-confidence way to reproduce the issue? Yes from source inspection: card-action synthetic events are dispatched through Is this the best way to solve the issue? No as-is. The Feishu fix direction is plausible, but the patch should use an internal synthetic card-action marker and should not bundle unrelated thinking/session changes. Label changes:
Label justifications:
Full review comments:
Overall correctness: patch is incorrect Security concerns:
Acceptance criteria:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against bb5abefcf58a. |
|
ClawSweeper PR egg 🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat. Where did the egg go?
|
Summary
Fixes structured card action callbacks (e.g., `execute_confirmed`) being silently dropped in Feishu group chats with `requireMention: true`.
Problem
When a user clicks a button on a bot-sent interactive card in a group chat with `requireMention: true`, the card action handler builds a synthetic message and dispatches it via `handleFeishuMessage`. Because the synthetic message has no `mentions` array, `checkBotMentioned` returns `false`, and `resolveFeishuGroupSenderActivationIngressAccess` drops the message with:
```
message in group {chatId} did not mention bot
```
This is incorrect because clicking a button on a bot-sent card is already direct engagement with the bot — the user should not need to @mention the bot separately.
Changes
Verification
Behavior addressed: Prevent card action callbacks from being dropped in requireMention groups
Real environment tested: Local source checkout, Ubuntu Linux, Node 22
Exact steps or command run after this patch:
Evidence after fix: 7 tests pass, 0 failures; formatting check passes
Observed result after fix: Card-action synthetic messages bypass requireMention and are dispatched normally
What was not tested: Live Feishu webhook with actual card button click in a group chat
Fixes #85450