(janitor/test-prune): prune tautological and duplicate KiloClaw plugin tests - #6040
Merged
Merged
Conversation
Remove three KiloClaw plugin tests that cannot detect a production regression: - morning-briefing: delete index.web-search-query.test.ts. The three cases mirror the single-template-literal body of buildBriefingWebSearchQuery and can only fail on cosmetic wording changes, not behavioral changes. - kilo-chat: drop the duplicate createMessage test in client.test.ts; the surviving "posts to .../send with gateway token and conversation id" test asserts the same URL/method/body plus auth and content-type headers. - kilo-chat: drop the source-text ordering test in channel.test.ts that read channel.ts and asserted string indexOf ordering. The send and upload-file runtime paths are already covered by the base64-buffer behavioral tests in the same file.
Contributor
Author
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryTest-only prune of three tautological or duplicate KiloClaw plugin tests; surviving coverage still exercises createMessage, send/upload-file runtime, and web-search collection. Files Reviewed (3 files)
Reviewed by grok-4.6 · Input: 53.3K · Output: 5.9K · Cached: 228.6K Review guidance: REVIEW.md from base branch |
pandemicsyn
approved these changes
Sep 11, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Prunes three KiloClaw plugin tests that add maintenance cost without protecting meaningful behavior. Test-only change; no production code touched.
Removed tests and surviving coverage
services/kiloclaw/plugins/kiloclaw-morning-briefing/src/index.web-search-query.test.ts(deleted, 3 cases)buildBriefingWebSearchQueryis a single branchless template literal (\latest news and updates on ${topic} from the last 24 hours`). All three cases hardcode that exact literal, so they reproduce the production body and compare it with itself. The only way they fail is a cosmetic wording edit, not a behavioral regression. Surviving coverage: the function is exercised throughcollectWebSearchinindex.lifecycle.test.ts`; the per-input interpolation has no branch/edge case to protect.services/kiloclaw/plugins/kilo-chat/src/client.test.ts(removed 1 case:createMessage posts to /_kilo/kilo-chat/send and returns messageId)posts to controller /_kilo/kilo-chat/send with gateway token and conversation idtest: same mocked response, same URL, method, and body assertions. The surviving test additionally assertsauthorizationandcontent-typeheaders, so it strictly dominates. No distinct failure mode is lost.services/kiloclaw/plugins/kilo-chat/src/channel.test.ts(removed 1 case:routes send actions before constructing the shared action client)channel.tsfrom disk and assertedindexOfordering of source fragments. It inspects source layout, not runtime behavior, and would fail on a harmless refactor (e.g. extracting the send branch into a helper) while passing on a real logic bug elsewhere. The actualsend/upload-fileruntime outcomes are already covered by the twobase64 bufferbehavioral tests in the same file, which drivehandleActionend-to-end through attachment upload + send.Verification
pnpm --filter @kiloclaw/kilo-chat test→ 199 passed (was 201)pnpm --filter @kiloclaw/kiloclaw-morning-briefing test→ 239 passed across 17 files (was 242/18)pnpm --filter @kiloclaw/kiloclaw-morning-briefing typecheck→ cleanoxfmton changed files → clean;git diff --check→ cleanscripts/lint-all.shskipsservices/kiloclaw/plugins/*).Postgres/Redis-backed suites were not run (not available in the sandbox); all removed tests are pure unit tests with no DB dependency.
Why these could not detect an additional regression
Each removed test is either a self-mirror of a one-expression function, a strict duplicate of a stronger surviving assertion, or a source-text ordering check whose behavior is already asserted directly. None guards a branch, edge case, or contract absent from the surviving coverage.