Repository navigation
refactor(feishu): remove unused send test fixtures - #160913
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 28, 2026, 11:04 PM ET / September 29, 2026, 03:04 UTC. ClawSweeper reviewWhat this changesRemoves unused Feishu send-test runtime mocks and a duplicate card-edit test. Merge readiness✅ Ready for maintainer review Current main still contains the fixtures and duplicate test this PR removes. The retained SDK transport test covers card-edit requests, and the deletions show no concrete loss of coverage. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw's Feishu plugin turns outbound messages and edits into Lark SDK requests. These suites check send, reply, and edit behavior using mocked clients or a local HTTP transport. flowchart LR
A[Outbound message or edit] --> B[Feishu send module]
B --> C{Send or edit path}
C --> D[Lark SDK transport]
D --> E[Feishu API]
F[Feishu send tests] --> B
F --> G[Request and result checks]
D --> G
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests -45. Total -45 across 3 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep the focused test cleanup and its retained SDK transport coverage; complete the repository's ordinary PR gates. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR removes redundant test code rather than reporting a product failure. The retained assertions and production paths are visible in source. Is this the best way to solve the issue? Yes: removing the duplicate mock-level case is a narrow cleanup because the retained SDK transport test checks its payload and route. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6d644f278050. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
Co-authored-by: Vincent Koc <[email protected]>
94 upstream commits, including the Telegram, Matrix and Feishu cleanup (openclaw#160970), the removal of unused Feishu send test fixtures (openclaw#160913) and hosted network access for the agentsapi plugin (openclaw#161004). Four conflicts. Two are in Feishu code. In extensions/feishu/src/send.ts, openclaw#160970 has sendMessageFeishu resolve its target from params and pass the whole target to sendReplyOrFallbackDirect. That shape is kept. The target still carries accountId from this branch's send-target.ts, so the table mode keeps following the delivering account. In extensions/feishu/src/reply-dispatcher.ts, openclaw#160970 inlined markVisibleReplySent at six call sites. This branch moved those senders into reply-senders.ts, which marks a visible reply through that callback, so the helper and the createFeishuReplySenders call are kept. The inlined assignments that merged cleanly elsewhere in the file behave the same. The other two are generated, docs/.generated/config-baseline.counts.json and docs/.generated/config-baseline.sha256. openclaw#161004 takes plugin from 4431 to 4436. This branch keeps channel at 3788 and core stays at 2475. Both files came from upstream and were regenerated. build:docker ran in a separate detached checkout of this commit outside the nested node_modules install. Regenerating there changed those two files and nothing else, giving the predicted counts, the upstream core and plugin hashes, this branch's channel hash and a new combined hash. The three generated-file checks pass there. Upstream deleted 28 test files in this range. None of them were added or changed by this branch. Feishu: 107 files and 1858 tests in the extension project, 17 files and 311 tests in the database-workers project. Each is one lower than the previous merge because openclaw#160913 removed a card edit test from send.test.ts and openclaw#160970 removed a botName test from monitor.reaction.test.ts, neither touched by this branch. The forwarder test and the routing guards pass, 431 tests. tsgo:core, tsgo:extensions, tsgo:extensions:test, tsgo:test:root, the line-cap, max-lines and assertion-safety ratchets against upstream/main, oxlint and oxfmt on the 43 changed code files all pass.
What Problem This Solves
Feishu send tests retain unused runtime fixtures and a mock-only card-edit case already covered by the real SDK transport test.
User Impact
No user-visible change. This maintainer-requested test cleanup removes 45 test lines and one duplicate case without changing production code.
Why This Change Was Made
Send and edit paths now use SDK markdown helpers directly. Remove the unused runtime mocks from concurrency and reply-fallback suites, while retaining the throwing runtime-independence guards. The existing SDK-backed edit test remains the primary proof for the card payload, result, and distinct PATCH/PUT routes.
Evidence
check:changedchecks passed, including extension-test typechecking, typed lint, and dead-export scans.git diff --check, and independent P2 review passed.