Repository navigation
Fix Feishu card action mention gating - #85481
googlerest wants to merge 10 commits into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 28, 2026, 12:07 PM ET / 16:07 UTC. Summary PR surface: Source +18, Tests +27. Total +45 across 2 files. Reproducibility: yes. at source level: current main builds synthetic group card-action text messages without mentions, and the existing requireMention gate drops unmentioned group messages. I did not run a live Feishu card click 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 the narrow Feishu plugin fix after redacted live card-click proof, transport logs, or explicit maintainer acceptance of the source/unit proof gap, while keeping group mention gating and p2p callbacks unchanged. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main builds synthetic group card-action text messages without mentions, and the existing requireMention gate drops unmentioned group messages. I did not run a live Feishu card click in this read-only review. Is this the best way to solve the issue? Yes for the code shape: adding a group-only synthetic bot mention reuses the existing Feishu mention gate instead of bypassing policy. The remaining question is proof, not a better code location. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 27c1685f106d. Label changesLabel justifications:
Evidence reviewedPR surface: Source +18, Tests +27. Total +45 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
|
|
ClawSweeper PR egg 🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat. Where did the egg go?
|
giodl73-repo
left a comment
There was a problem hiding this comment.
This is the right fix shape for #85450. The PR keeps the Feishu group admission and sender gates intact, and only makes synthetic group card-action callbacks carry the same bot mention metadata that the existing requireMention path already understands.
No blocking findings.
Reviewed code path: extensions/feishu/src/card-action.ts, extensions/feishu/src/bot-content.ts, extensions/feishu/src/bot.ts, extensions/feishu/src/policy.ts, and extensions/feishu/src/bot.card-action.test.ts.
Verification:
- node scripts/run-vitest.mjs extensions/feishu/src/bot.card-action.test.ts extensions/feishu/src/bot.test.ts extensions/feishu/src/policy.test.ts passed: 3 files, 102 tests.
- git diff --check origin/main...HEAD passed.
- Live checks on a7247eb34fcb16dd02f3e6a23a012369aa142942: Real behavior proof, preflight, security-fast, dependency-change-awareness, check-lint, check-prod-types, check-additional-extension-channels, and checks-fast-contracts-channels-b are green.
I did not run a live Feishu group button click, but the source contract is direct: checkBotMentioned reads event.message.mentions, and this patch supplies a non-broadcast bot open_id mention only for group synthetic callbacks. p2p callbacks remain unchanged.
|
Heads up: this PR needs to be updated against current |
44a315c to
7416145
Compare
Updated real behavior proof — current head 7416145b67Environment: macOS arm64 (M4), Node v25.9.0, branch Key passing tests (card-action specific): Full results: git diff --check: no output. 118 tests pass on macOS arm64 at commit 7416145b67 (up from 102 at prior head). The test "marks synthetic group card callbacks as mentioning the bot" directly asserts the fix. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@steipete — updated proof is in the comment above (118 tests on macOS arm64, commit 7416145b67, including the specific "marks synthetic group card callbacks as mentioning the bot" assertion). The PR is already approved by giodl73-repo. Live Feishu credentials are not available in this environment. Per ClawSweeper's maintainer options, you can accept source and unit evidence and merge if the direct mention-gate contract, regression tests, approval, and green checks are sufficient. |
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
Adds botOpenId param to buildSyntheticMessageEvent so group card actions include a bot mention in the synthetic message event, enabling the existing mention-gating logic to correctly scope responses in group chats. Also preserves upstream/main fix: card-action-c-* temporary IDs are filtered via validReplyTargetId to avoid 'Invalid ids' errors from the streaming reply API.
7416145 to
9f7328e
Compare
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
|
@steipete — following up on the proof update from 5 days ago (commit 7416145, 118 tests on macOS arm64, commit 9f7328e now at HEAD after merging main). ClawSweeper's June 21 re-review still blocks on live Feishu group card-click evidence. Since a live Feishu environment is not available here, requesting you consider Maintainer option 2 from the ClawSweeper review:
Current merge readiness:
Can you confirm whether to merge on current evidence, or specify what live proof format would unblock this? @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
|
@openclaw-mantis visual task: verify in Feishu that a requireMention group card button click reaches the agent and p2p card callbacks stay unchanged. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@openclaw-mantis visual task: verify in Feishu that a requireMention group card button click reaches the agent |
|
@openclaw-mantis visual task: verify in Feishu that a requireMention group card button click reaches the agent while p2p callbacks remain unchanged. |
|
@steipete Hi! Could you please trigger the Mantis visual task by commenting the following command? Since I am a contributor, the bot did not respond to my trigger. Thank you! @openclaw-mantis visual task: verify in Feishu that a requireMention group card button click reaches the agent while p2p callbacks remain unchanged. |
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
|
CI failed on |
|
CI is green. Could a maintainer please merge? |
|
CI is green and patch quality is 🐚 platinum hermit per ClawSweeper. The only remaining blocker is live Feishu proof. Could a maintainer trigger Mantis to capture it? @openclaw-mantis visual task: verify in Feishu that a requireMention group card button click reaches the agent while p2p callbacks remain unchanged. |
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
|
Closing due to inactivity. |
Fixes #85450.
Summary
botOpenIdis known.Real behavior proof
Behavior or issue addressed: Feishu structured card button callbacks in
requireMention: truegroup chats were synthesized as group text messages without bot mention metadata, so the existing group activation gate could treat the callback as not addressing the bot and drop it. After this patch, synthetic group card callbacks include a bot mention entry whenbotOpenIdis available, while p2p callbacks still omit synthetic mentions.Real environment tested: Local macOS OpenClaw checkout at
/Users/googlerest/.openclaw/workspace/openclaw-src, branchcodex/fix-85450-feishu-card-mention, commit2482f7f442 Fix Feishu card action mention gating.Exact steps or command run after this patch:
Evidence after fix: Terminal output copied from the local OpenClaw checkout:
Observed result after fix: The Feishu card-action regression now asserts that a synthetic group callback has
message.chat_type === "group"and includesmentions: [{ key: "mention_bot", id: { open_id: "ou_bot" }, name: "bot" }]. The same suite also asserts that p2p card callbacks keepmessage.mentionsundefined. The broader Feishu bot and policy regression files passed with the same patch.git diff --checkcompleted with no output.What was not tested: I did not run a live Feishu group chat card click because this local environment does not have live Feishu credentials.