Skip to content

(janitor/test-prune): prune tautological and library-behavior extension tests - #7331

Merged
kilo-code-bot[bot] merged 1 commit into
mainfrom
janitor/test-prune-extension
Oct 19, 2026
Merged

kilo-code-bot[bot] merged 1 commit into
mainfrom
janitor/test-prune-extension

Conversation

@kilo-code-bot

@kilo-code-bot kilo-code-bot Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Removes 8 low-value tests in the extension that cannot detect a plausible production regression because they assert mock/library passthrough or a one-line ternary with no repo-owned branching.

Deletions and surviving coverage

entrypoints/sidepanel/workflow-settings-state.test.ts

  • Removed describe('workflow run request atom') (3 tests: defaults to undefined, sets and reads a run request, can be cleared back to undefined).
  • These verify Jotai's built-in atom()/store.set/store.get semantics, not repository logic. The atom declaration is atom<WorkflowRunRequest | undefined>(); its type is enforced by TypeScript, and the surrounding deriveWorkflowRunDisabledReason / deriveWorkflowSettingsView / toWorkflowSettingsListItem tests are untouched.

src/shared/agent-conversation.test.ts

  • Removed search_workflows/get_workflow, save_workflow/save_memory, and run_workflow/delete_workflow tool-call blocks (3 tests). Each only asserted that createWorkflowToolCall echoes its own name and arguments inputs verbatim — a property already guaranteed by the object literal and its fully-typed return type (WorkflowToolCallEvent).
  • Surviving coverage in the same file still exercises groupConversationEvents, getConversationScrollKey (message + thinking growth + in-flight/completed tool exchange), and cross-reload event-id uniqueness, plus the full event-shape contract in creates stable conversation events.

src/shared/model-picker-rows.test.ts

  • Removed describe('modelRowDisplayId()') (2 tests) covering a one-line id.startsWith('cli:') ? id.slice(4) : id ternary. The CLI-catalog prefix boundary that matters for safety is still pinned by the kept isGatewayModelId() tests, and buildExtensionModelPickerRows() tests remain.

Why these cannot detect an additional plausible regression

  • The atom tests only round-trip values through Jotai; any bug in deriveWorkflowRunDisabledReason/deriveWorkflowSettingsView is covered elsewhere, and the atom's default/type cannot regress at runtime without a compile error.
  • The factory passthrough tests re-assert a spread; the only way they fail is by editing the production literal, which TypeScript already constrains via the return type.
  • The display-id ternary is cosmetic and fully bounded by the adjacent isGatewayModelId boundary tests.

Verification

  • pnpm --filter kilo-extension vitest --run <3 changed files>: 37 passed (was 45; 8 removed).
  • Extension tsc --noEmit: passed.
  • oxlint (type-aware, --deny-warnings) on changed files: 0 warnings/errors.
  • oxfmt --list-different on changed files: clean.

Remove tests that assert a factory echoes its own inputs, re-assert
Jotai's atom read/write semantics, or pin a one-line ternary with no
repo-owned branching logic:

- workflow-settings-state: drop the workflowRunRequestAtom describe block
  (verifies Jotai store set/get round-trips, not repo logic)
- agent-conversation: drop three workflow tool-call blocks that only
  assert createWorkflowToolCall echoes name/arguments verbatim
- model-picker-rows: drop the modelRowDisplayId block (trivial 'cli:'
  prefix strip already bounded by the kept isGatewayModelId tests)

The factory output shapes and the atom type are already enforced by
TypeScript; the surviving tests still cover groupConversationEvents,
scroll-key generation, event-id uniqueness, isGatewayModelId, and
buildExtensionModelPickerRows.
@kilo-code-bot kilo-code-bot Bot added the janitor Automated dead-code/duplication cleanup label Oct 9, 2026
@kilo-code-bot
kilo-code-bot Bot enabled auto-merge (squash) October 9, 2026 07:43
@kilo-code-bot

kilo-code-bot Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor Author

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

This PR deletes eight tautological/library-behavior extension tests (Jotai atom() round-trips, createWorkflowToolCall input passthrough, and the one-line modelRowDisplayId ternary) with no production-code changes; the deletions are internally consistent and leave remaining coverage and imports valid.

Files Reviewed (3 files)
  • apps/extension/entrypoints/sidepanel/workflow-settings-state.test.ts - removed workflowRunRequestAtom describe block; unused createStore/atom imports also dropped
  • apps/extension/src/shared/agent-conversation.test.ts - removed 3 factory passthrough tests; createWorkflowToolCall still imported and used
  • apps/extension/src/shared/model-picker-rows.test.ts - removed modelRowDisplayId() block; CLI_CATALOG_ID_PREFIX still imported and used by isGatewayModelId() tests

Verified: changed lines only remove test code, no unused imports remain, no production code altered, and no memory-leak surface introduced.


Reviewed by deepseek-v4.1-flash · Input: 45.2K · Output: 3.9K · Cached: 277.8K

Review guidance: REVIEW.md from base branch main

@eshurakov eshurakov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Independently reviewed all three test-only diffs at 094d413 against base 2084412, the identical production blobs at both revisions, surviving coverage, CI logs, and existing review comments; no major regression or coverage issue found.

Workflow Run retains component-level atom wiring and approval/mode/concurrency coverage. Removed workflow factory cases repeat the same branch-free name/arguments passthrough. Display-ID tests do lose direct formatting assertions, but the helper only renders text; selection retains the original model ID and gateway-boundary tests remain. TypeScript and isGatewayModelId tests are not substitutes for those runtime/display assertions, but that limitation is non-blocking here.

Verified head-matched CI: extension typecheck/lint/format and 1,613 tests across 100 files passed, including all 37 surviving tests in the changed files; Firefox build passed; Chrome E2E had 149 passed and 16 skipped. No local tests run or workspace changes made. Head rechecked immediately before approval.

Files Reviewed (3 files)
  • apps/extension/entrypoints/sidepanel/workflow-settings-state.test.ts
  • apps/extension/src/shared/agent-conversation.test.ts
  • apps/extension/src/shared/model-picker-rows.test.ts

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