Repository navigation
feat(feishu): bot-to-bot conversation support with @mention handling - #89783
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 17, 2026, 6:40 AM ET / 10:40 UTC. Summary PR surface: Source +367, Tests +377, Docs +18, Generated 0. Total +762 across 18 files. Reproducibility: not applicable. as a strict current-main bug reproduction gate: this PR adds supported Feishu bot-to-bot semantics, and its body supplies a credible live before/after delivery scenario for the underlying failure mode. Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Keep the feature plugin-local, explicitly document the default-off upgrade transition in the PR context and Feishu docs, and retain the payload-correct required mentions, shared loop guard, identity checks, and non-streaming fallback for bot-authored turns. Do we have a high-confidence way to reproduce the issue? Not applicable as a strict current-main bug reproduction gate: this PR adds supported Feishu bot-to-bot semantics, and its body supplies a credible live before/after delivery scenario for the underlying failure mode. Is this the best way to solve the issue? Yes for the implementation shape: Feishu-owned ingress, shared loop protection, verified bot identity, and payload-specific per-unit mentions are the narrow maintainable solution; the unresolved question is the intentional default and upgrade policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 9769642e7f60. Label changesLabel justifications:
Evidence reviewedPR surface: Source +367, Tests +377, Docs +18, Generated 0. Total +762 across 18 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
Review history (6 earlier review cycles)
|
ce11c92 to
817d87c
Compare
54ae4e1 to
679b90f
Compare
679b90f to
73b42e2
Compare
|
@clawsweeper re-review The previous review came back as Since the prior reviews, the two P1 findings were addressed:
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
0a2cc41 to
a3d4f97
Compare
a3d4f97 to
d533e2e
Compare
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
|
Maintainer rework complete. Final shape:
Proof:
Contributor credit remains with @GeekyMax; release-note context and the exact co-author trailer are in the PR body. |
|
Merged via squash.
|
Summary
Adds a bounded, default-off Feishu bot-to-bot ingress path.
channels.feishu.allowBots: true(or the account-scoped equivalent) opts an account into bot-authored group messages. Omitted/false remains disabled.channels.defaults.botLoopProtectionpolicy. No Feishu-only loop-control surface is added.message_toolsends remain author-controlled.Required Feishu permissions for this opt-in path are
im:message.group_at_msg.include_bot:readonlyandim:message:readonly.Why
Feishu can deliver bot-authored group mentions, but app-scoped bot IDs and payload-specific mention syntax make a naive implementation unsafe and unreliable. The final implementation verifies recipient identity at the Feishu transport boundary, keeps shared loop policy in core, and adds no behavior for existing configurations.
Verification
node scripts/run-vitest.mjs extensions/feishu/src/bot.test.ts extensions/feishu/src/bot-name.test.ts extensions/feishu/src/markdown.test.ts extensions/feishu/src/reply-dispatcher.test.ts extensions/feishu/src/bot.stripBotMention.test.ts extensions/feishu/src/config-schema.test.ts extensions/feishu/src/bot.checkBotMentioned.test.ts— 7 files, 274 tests passed.node --import tsx scripts/generate-bundled-channel-config-metadata.ts --check— passed.node --import tsx scripts/generate-config-doc-baseline.ts --check— passed.node scripts/plugin-sdk-surface-report.mjs --check— passed.node scripts/format-docs.mjs --check— 718 files clean.node scripts/generate-docs-map.mjs --check— passed.Real behavior proof
Contributor proof used two bots and one human in a live Feishu group. Bot-to-bot exchanges continued across text, chunked, and card replies; the deterministic reply backstop restored a missing model-authored mention; and disabling bot ingress suppressed replies. Identifiers were redacted. The maintainer rework preserves that ingress/reply capability while making it default-off and adding verified recipient identity plus shared loop protection.
Release note
Feishu accounts can opt into bot-authored group mentions with reliable peer-bot reply mentions and the shared bot-loop guard.
Co-authored-by: Max Huang [email protected]