Skip to content

refactor(feishu): remove unused send test fixtures - #160913

Merged
vincentkoc merged 1 commit into
mainfrom
refactor/test-audit-feishu-send-fixtures-20260929
Sep 29, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
refactor/test-audit-feishu-send-fixtures-20260929

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

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

  • All three affected suites passed before cleanup: 39 tests.
  • All three passed after cleanup: 38 tests, including SDK transport, concurrency, reply fallback, and provider-error coverage.
  • All 20 selected check:changed checks passed, including extension-test typechecking, typed lint, and dead-export scans.
  • Formatting, git diff --check, and independent P2 review passed.
  • SDK requests use a local fake HTTP transport; no live Feishu or whole-plugin validation is claimed.

@vincentkoc vincentkoc self-assigned this Sep 29, 2026
@clawsweeper

clawsweeper Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@vincentkoc
vincentkoc marked this pull request as ready for review September 29, 2026 02:57
@openclaw-barnacle openclaw-barnacle Bot added channel: feishu Channel integration: feishu size: XS labels Sep 29, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 29, 2026
@clawsweeper

clawsweeper Bot commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 28, 2026, 11:04 PM ET / September 29, 2026, 03:04 UTC.

ClawSweeper review

What this changes

Removes 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
Reviewed head: bb0bc97cabcc01408c2995aeab8790c09a18ee8a

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-supported test cleanup retains the stronger SDK transport check and has no identified correctness finding.
Proof confidence 🌊 off-meta tidepool Not applicable: This member-authored PR changes tests only. The retained edit test exercises the production edit function through the real Lark SDK with local fake HTTP transport; the PR body reports focused before-and-after test results. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This member-authored PR changes tests only. The retained edit test exercises the production edit function through the real Lark SDK with local fake HTTP transport; the PR body reports focused before-and-after test results. No stored-data contract changes.
Evidence reviewed 6 items Introduced change: The pinned PR delta deletes two runtime mocks and one mocked card-edit case; it changes no production file.
Retained edit coverage: The remaining test calls the real Lark SDK with a local fake HTTP transport and checks the card PATCH payload, rich-post PUT route, and returned results.
Production edit paths: Current main uses the SDK patch method for cards and update method for rich-post text; the changed test files do not alter these paths.
Findings None None.
Security None None.

How this fits together

OpenClaw'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
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -45. Total -45 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 3 0 45 -45
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 0 45 -45

Review metrics

None.

Technical review

Best 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.

Labels

Label changes:

  • add P3: This is a small test-only cleanup with no user-visible behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This member-authored PR changes tests only. The retained edit test exercises the production edit function through the real Lark SDK with local fake HTTP transport; the PR body reports focused before-and-after test results. No stored-data contract changes.

Label justifications:

  • P3: This is a small test-only cleanup with no user-visible behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This member-authored PR changes tests only. The retained edit test exercises the production edit function through the real Lark SDK with local fake HTTP transport; the PR body reports focused before-and-after test results. No stored-data contract changes.

Evidence

What I checked:

  • Introduced change: The pinned PR delta deletes two runtime mocks and one mocked card-edit case; it changes no production file. (extensions/feishu/src/send.test.ts:752, bb0bc97cabcc)
  • Retained edit coverage: The remaining test calls the real Lark SDK with a local fake HTTP transport and checks the card PATCH payload, rich-post PUT route, and returned results. (extensions/feishu/src/send.test.ts:620, bb0bc97cabcc)
  • Production edit paths: Current main uses the SDK patch method for cards and update method for rich-post text; the changed test files do not alter these paths. (extensions/feishu/src/send.ts:549, 6d644f278050)
  • Still needed on main: Current main retains both runtime test mocks and the duplicate card-edit case, so it has not incorporated this cleanup. (extensions/feishu/src/send.test.ts:755, 6d644f278050)
  • Area history: File history identifies prior Feishu edit-route work by Peter Steinberger and prior Feishu send-path work by Vincent Koc; the available history does not prove source-line introduction. (extensions/feishu/src/send.ts, 27c0c8582c7f)
  • Discussion and validation claim: The PR body reports 39 affected tests before and 38 after cleanup, plus selected changed-file checks; the two visible comments are bot status messages. These results were reported by the author, not rerun in this read-only review. (bb0bc97cabcc)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@vincentkoc
vincentkoc merged commit b9dde66 into main Sep 29, 2026
164 checks passed
@vincentkoc
vincentkoc deleted the refactor/test-audit-feishu-send-fixtures-20260929 branch September 29, 2026 03:22
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 29, 2026
MarMarLabs added a commit to MarMarLabs/openclaw that referenced this pull request Sep 29, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: feishu Channel integration: feishu P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant