fix(feishu): send card JSON message params as cards#100883
Conversation
Co-authored-by: martingarramon <[email protected]>
…06 (1) Co-authored-by: martingarramon <[email protected]>
Reported-by: @ZenoRewn Co-authored-by: martingarramon <[email protected]>
|
Codex review: needs changes before merge. Reviewed July 6, 2026, 8:57 AM ET / 12:57 UTC. Summary PR surface: Source +124, Tests +525. Total +649 across 7 files. Reproducibility: yes. Current-main source shows plain Feishu card JSON reaches the text path, and the PR's remaining prefix gap is source-reproducible because the runner applies channel/account prefixes while the new Feishu helper only strips the global prefix. Review metrics: 1 noteworthy metric.
Stored data model 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:
Risk before merge
Maintainer options:
Copy recommended automerge instructionNext step before merge
Security Review findings
Review detailsBest possible solution: Keep the Feishu-local parser, but strip the same responsePrefix cascade that the runner applies and cover global, channel, and account prefixes before merging. Do we have a high-confidence way to reproduce the issue? Yes. Current-main source shows plain Feishu card JSON reaches the text path, and the PR's remaining prefix gap is source-reproducible because the runner applies channel/account prefixes while the new Feishu helper only strips the global prefix. Is this the best way to solve the issue? No, not yet. A Feishu-plugin-local parser is the maintainable layer, but it must match the runner's documented prefix cascade before this is the best fix. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 5cd71db85ec4. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +124, Tests +525. Total +649 across 7 files. View PR surface stats
Acceptance criteria:
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
|
|
Merged via squash.
|
* fix(feishu): send plain card JSON as interactive cards Co-authored-by: martingarramon <[email protected]> * fix(clownfish): address review for gitcrawl-21-autonomous-drip-20260706 (1) Co-authored-by: martingarramon <[email protected]> * fix(feishu): preserve native card compatibility Reported-by: @ZenoRewn Co-authored-by: martingarramon <[email protected]> * fix(feishu): fix native card fallback precedence * fix(feishu): fix native card fallback precedence --------- Co-authored-by: openclaw-clownfish[bot] <280122609+openclaw-clownfish[bot]@users.noreply.github.com> Co-authored-by: martingarramon <[email protected]>
* fix(feishu): send plain card JSON as interactive cards Co-authored-by: martingarramon <[email protected]> * fix(clownfish): address review for gitcrawl-21-autonomous-drip-20260706 (1) Co-authored-by: martingarramon <[email protected]> * fix(feishu): preserve native card compatibility Reported-by: @ZenoRewn Co-authored-by: martingarramon <[email protected]> * fix(feishu): fix native card fallback precedence * fix(feishu): fix native card fallback precedence --------- Co-authored-by: openclaw-clownfish[bot] <280122609+openclaw-clownfish[bot]@users.noreply.github.com> Co-authored-by: martingarramon <[email protected]>
Fixes #53486.
What Problem This Solves
Feishu
message(action=send)and thread replies rendered valid native interactive-card JSON from the plainmessageortextparameter as raw text. This also affected the real runtime path wheremessages.responsePrefixis applied before plugin dispatch.Why This Change Was Made
Feishu now detects and sanitizes supported native card JSON locally, including v2
body.elements, legacy top-levelelements, wrapped interactive cards, and valid legacydivtext elements. Explicit structuredpresentationorinteractiveinput remains authoritative over raw card JSON, including document-comment fallback rendering. Malformed JSON, invalid root legacy text shapes, ordinary JSON, and card-plus-media requests keep their existing fallback or rejection behavior.This preserves contributor credit for @martingarramon from #77268 and reporter credit for @ZenoRewn. Blocked lineage PRs #93706 and #94262 were evidence only and were not used as executable sources.
User Impact
Feishu proactive sends can render valid card JSON as interactive cards again, including when a configured response prefix is present. Structured card content is no longer discarded or preceded by raw JSON text.
Evidence
div+lark_md/plain_text, invalid root legacy text fallback, wrapped cards, structured-input precedence, malformed/ordinary JSON fallback, and card-plus-media rejection.git diff --checkpassed.b9eb00afe45f747dca4420bcb2c93e4423bcd921.