fix(feishu): preserve streaming card content#90181
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 4, 2026, 2:09 AM ET / 06:09 UTC. Summary PR surface: Source -14, Tests 0. Total -14 across 2 files. Reproducibility: yes. A high-confidence source path is Review metrics: none identified. 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
Security Review detailsBest possible solution: Land the focused Feishu plugin fix after normal CI and maintainer merge gates, keeping streaming CardKit updates cumulative. Do we have a high-confidence way to reproduce the issue? Yes. A high-confidence source path is Is this the best way to solve the issue? Yes. Removing suffix extraction at the FeishuStreamingSession CardKit update boundary is the narrowest maintainable fix because the dispatcher already passes cumulative snapshots and the replacement path remains for non-prefix rewrites. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against ce0d5117bf04. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source -14, Tests 0. Total -14 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 re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
d87c6c3 to
22ead4d
Compare
|
Landed via temp rebase onto main. Thanks @mushuiyu886! |
* fix(feishu): preserve streaming card content * fix(feishu): preserve streaming card content (openclaw#90181) (thanks @mushuiyu886) --------- Co-authored-by: sliverp <[email protected]>
* fix(feishu): preserve streaming card content * fix(feishu): preserve streaming card content (openclaw#90181) (thanks @mushuiyu886) --------- Co-authored-by: sliverp <[email protected]>
* fix(feishu): preserve streaming card content * fix(feishu): preserve streaming card content (openclaw#90181) (thanks @mushuiyu886) --------- Co-authored-by: sliverp <[email protected]>
* fix(feishu): preserve streaming card content * fix(feishu): preserve streaming card content (openclaw#90181) (thanks @mushuiyu886) --------- Co-authored-by: sliverp <[email protected]>
* fix(feishu): preserve streaming card content * fix(feishu): preserve streaming card content (openclaw#90181) (thanks @mushuiyu886) --------- Co-authored-by: sliverp <[email protected]>
* fix(feishu): preserve streaming card content * fix(feishu): preserve streaming card content (openclaw#90181) (thanks @mushuiyu886) --------- Co-authored-by: sliverp <[email protected]>
* fix(feishu): preserve streaming card content * fix(feishu): preserve streaming card content (openclaw#90181) (thanks @mushuiyu886) --------- Co-authored-by: sliverp <[email protected]>
Summary
Fixes #90164
Real behavior proof
Behavior addressed: Feishu streaming-card update calls must preserve the cumulative reply text in the CardKit content element. Latest
origin/mainstill sends only the suffix when the visible text is alreadyhelloand the next streamed snapshot ishello!; the patched PR head sends the cumulativehello!body for the sameFeishuStreamingSession.update()path.Real environment tested: Local Linux detached worktree at latest
origin/main(344417c0de19c23ceb68a88c044b473fe1847f8f) and local Linux patched PR head (d87c6c3ed4530664cb4316219a21b2c645785fe7). Both runs imported the realextensions/feishu/src/streaming-card.tsproduction code and used productionfetchWithSsrFGuardagainst a live local Feishu-compatible HTTP server that implemented the tenant-token and CardKit content update endpoints. The fetch boundary was not mocked; the local HTTP server captured the actual token request and CardKitPUTrequest bodies.Exact steps or command run after this patch:
Evidence after fix:
Observed result after fix: The same real
FeishuStreamingSession.update()path that sent suffix-onlycontent: "!"on latestorigin/mainnow sends cumulativecontent: "hello!"on the patched head, while still authenticating once and using the CardKit content elementPUTendpoint. This preserves the full visible streaming-card text instead of overwriting the element with only the newest chunk.What was not tested: No live Feishu/Lark tenant or real user chat was used, and no real Feishu credentials were exercised. The proof used a live local Feishu-compatible HTTP server to verify the production HTTP boundary and request payloads without external credentials.
Regression Test Plan
extensions/feishu/src/streaming-card.test.tsnow asserts cumulative CardKit content bodies for throttled flushes, natural-boundary immediate pushes, failed update retries, and non-OK update retries.extensions/feishu/src/reply-dispatcher.test.tswas run with the streaming-card tests to keep the dispatcher-to-session streaming path covered.env -C "/home/0668001029/openclaw-worktrees/issue-90164" node scripts/run-vitest.mjs extensions/feishu/src/streaming-card.test.ts extensions/feishu/src/reply-dispatcher.test.ts --reporter=verbose.Root Cause
FeishuStreamingSession.update()received cumulative merged streaming text, but converted it back to suffix-only content before calling the CardKit content element update endpoint.