You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add a platform-neutral final-response document IR plus conservative Markdown parsing
render Feishu assistant final responses as Card JSON v2 behind platforms.feishu.extra.final_response_format: legacy | auto | card (default remains legacy)
enforce Feishu Card v2 bounds before transport: serialized request size, markdown element size, table count/columns/page size, and lossless multi-card partitioning
keep MEDIA:/unsupported attachments on the legacy path and support safe image-in-card final replies
prevent command, ephemeral, and unanchored thread/topic responses from leaking into the Card v2 path
make multi-card and legacy multi-chunk delivery lossless: once any part is visible, later failure reports PARTIALLY_DELIVERED and suppresses full-payload retry/fallback
document the new modes in English and Simplified Chinese
Safety / compatibility
no behavior change without the hermes_final_response semantic marker and explicit Feishu format configuration
invalid format values fall back to legacy
unanchored thread/topic responses never send an interactive card to the parent chat
unknown document blocks fail fast instead of being silently dropped
explicit FinalDeliveryState values are validated against SendResult.success
all tests/gateway/test_feishu*.py: 527 passed (-n 0)
real Feishu API smoke:
DM final response fetched back as interactive
multi-card CJK and anchored thread cases passed in the earlier smoke run
unanchored thread used receive_id_type=thread_id with a non-interactive legacy payload, never targeted the parent chat, and created no visible message on the historical-topic rejection
default/legacy mode fetched back as post
canonical full suite executed before the final conflict-free rebase in four scripts/run_tests.sh --slice I/4 shards:
33 failures across 14 unrelated files in this root/live-profile environment
2 shard-only failures passed immediately on isolated rerun
28 failures across 10 files reproduced on that candidate's exact base
the remaining 3 are connected-home leakage from the live weixin profile in cron/Kanban tests; this branch does not modify those components
no Feishu/Card/renderer/final-delivery focused test failed
after rebasing all commits onto current origin/main, static checks, the 349-test focused suite, and the real Feishu smoke all passed again
late independent review blockers were closed with regression tests: mismatched direct tables degrade losslessly, public element limits are validated/clamped, string delivery states normalize to the enum before identity-based fallback decisions, public fenced-code parsing preserves trailing newlines, and ambiguous interactive timeouts (raised exceptions and returned-failure strings) suppress cross-format fallback
Thanks for the opt-in Feishu implementation. The premise remains present on the inspected main: final text reaches BasePlatformAdapter._send_with_retry() at gateway/platforms/base.py:5029, while FeishuAdapter._build_outbound_payload() only selects legacy text/post payloads and deliberately sends Markdown tables as plain text at plugins/platforms/feishu/adapter.py:4524-4534.
The PR keeps activation in the existing platform-specific PlatformConfig.extra surface (gateway/config.py:476-477) and defaults the new behavior to legacy mode. Static inspection found no concrete correctness defect in the changed implementation. GitHub reports the branch mergeable, although it is behind the inspected checkout and should receive normal post-merge validation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
platforms.feishu.extra.final_response_format: legacy | auto | card(default remainslegacy)MEDIA:/unsupported attachments on the legacy path and support safe image-in-card final repliesPARTIALLY_DELIVEREDand suppresses full-payload retry/fallbackSafety / compatibility
hermes_final_responsesemantic marker and explicit Feishu format configurationlegacyFinalDeliveryStatevalues are validated againstSendResult.successVerification
ruff,compileall, andgit diff --check: passed-n 0)tests/gateway/test_feishu*.py: 527 passed (-n 0)interactivereceive_id_type=thread_idwith a non-interactive legacy payload, never targeted the parent chat, and created no visible message on the historical-topic rejectionpostscripts/run_tests.sh --slice I/4shards:weixinprofile in cron/Kanban tests; this branch does not modify those componentsorigin/main, static checks, the 349-test focused suite, and the real Feishu smoke all passed again