Skip to content

(janitor/test-prune): prune tautological and duplicate KiloClaw plugin tests - #6040

Merged
kilo-code-bot[bot] merged 1 commit into
mainfrom
janitor/test-prune-kiloclaw-plugins
Sep 11, 2026
Merged

(janitor/test-prune): prune tautological and duplicate KiloClaw plugin tests#6040
kilo-code-bot[bot] merged 1 commit into
mainfrom
janitor/test-prune-kiloclaw-plugins

Conversation

@kilo-code-bot

@kilo-code-bot kilo-code-bot Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

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

  1. services/kiloclaw/plugins/kiloclaw-morning-briefing/src/index.web-search-query.test.ts (deleted, 3 cases)

    • buildBriefingWebSearchQuery is 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 through collectWebSearchinindex.lifecycle.test.ts`; the per-input interpolation has no branch/edge case to protect.
  2. services/kiloclaw/plugins/kilo-chat/src/client.test.ts (removed 1 case: createMessage posts to /_kilo/kilo-chat/send and returns messageId)

    • Strict subset of the surviving posts to controller /_kilo/kilo-chat/send with gateway token and conversation id test: same mocked response, same URL, method, and body assertions. The surviving test additionally asserts authorization and content-type headers, so it strictly dominates. No distinct failure mode is lost.
  3. services/kiloclaw/plugins/kilo-chat/src/channel.test.ts (removed 1 case: routes send actions before constructing the shared action client)

    • Implementation-detail test that read channel.ts from disk and asserted indexOf ordering 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 actual send / upload-file runtime outcomes are already covered by the two base64 buffer behavioral tests in the same file, which drive handleAction end-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 → clean
  • oxfmt on changed files → clean; git diff --check → clean
  • These packages are excluded from the repo lint scope (scripts/lint-all.sh skips services/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.

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.
@kilo-code-bot kilo-code-bot Bot added the janitor Automated dead-code/duplication cleanup label Sep 10, 2026
@kilo-code-bot
kilo-code-bot Bot enabled auto-merge (squash) September 10, 2026 07:36
@kilo-code-bot

kilo-code-bot Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Test-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)
  • services/kiloclaw/plugins/kilo-chat/src/channel.test.ts
  • services/kiloclaw/plugins/kilo-chat/src/client.test.ts
  • services/kiloclaw/plugins/kiloclaw-morning-briefing/src/index.web-search-query.test.ts

Reviewed by grok-4.6 · Input: 53.3K · Output: 5.9K · Cached: 228.6K

Review guidance: REVIEW.md from base branch main

@kilo-code-bot
kilo-code-bot Bot merged commit 185a2cb into main Sep 11, 2026
19 checks passed
@kilo-code-bot
kilo-code-bot Bot deleted the janitor/test-prune-kiloclaw-plugins branch September 11, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

janitor Automated dead-code/duplication cleanup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant