test: prune low-value tests and exclude agent-core from the root suite - #3040
test: prune low-value tests and exclude agent-core from the root suite#3040sailist wants to merge 1 commit into
Conversation
- delete dead MicroCompaction/flag tests, an accepted-limitation it.fails, unreachable CLI input cases, duplicated TUI aggregation matrices, and strictly redundant search/minidb cases identified in the test-suite audit - exclude packages/agent-core from the root vitest projects so local pnpm test and CI shards collect the same reduced set
|
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 75e9c414ba
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| export default defineConfig({ | ||
| test: { | ||
| projects: ['packages/*', 'apps/kimi-code', 'apps/vscode'], | ||
| projects: ['packages/*', '!packages/agent-core', 'apps/kimi-code', 'apps/vscode'], |
There was a problem hiding this comment.
Keep the shipped legacy engine in an automated test gate
When users set KIMI_CODE_LEGACY_FLAG, apps/kimi-code/src/cli/run-shell.ts still selects createKimiHarness, so agent-core remains a supported runtime path rather than an unused package. Both Linux shards and Windows CI run only the root pnpm test command (.github/workflows/ci.yml lines 49 and 109); this exclusion therefore removes all 4,211 agent-core tests from every automated gate, allowing regressions in that selectable engine to merge and ship unnoticed. Keep this project in the root suite or add an explicit agent-core CI job before excluding it.
Useful? React with 👍 / 👎.
Related Issue
No linked issue — the problem is explained below.
Problem
The root
pnpm testsuite has grown slow and noisy: it collects 1,100+ Vitest files, and a first-pass audit found a large number of low-value tests — permanent skips for removed features, accepted-limitationit.failswishes, unreachable input cases, and matrices duplicated verbatim across the engine / SDK / TUI aggregation layers. In addition, the legacypackages/agent-core(v1 engine) suite is still part of the default gate even though it is no longer the shipping engine.What changed
Test-only cleanup based on a file-by-file audit; no production code is touched.
agent-core/test/agent/compaction/micro.test.ts(24 permanent skips for the removed MicroCompaction), related dead cases infull.test.ts/compaction-scenarios.test.ts/harness/runtime.test.ts, an accepted-limitationit.fails, and an emptyagent replay range buildsuite inagent-core-v2.stop()spy and two CLI cases whose input combinations are already rejected by the real validator.kimi-tui-message-flow.test.ts.searchService.test.ts, and duplicated batch/TTL/RESP/compaction-race cases inreview-round2/review-fixes/e2e/compaction-racethat are covered more strongly elsewhere.packages/agent-corefrom the root Vitest projects so localpnpm testand the five CI shards collect the exact same reduced set; the package's own suite can still be run manually insidepackages/agent-core.Verified: full
agent-core(4,211 tests),minidb(541),kimi-codeaffected files (274),agent-core-v2index (14) andkap-serversearch (96) all pass; rootvitest listconfirms the agent-core package is no longer collected while agent-core-v2 remains.Checklist
gen-changesetsskill, or this PR needs no changeset. (tests/tooling-only, not user-perceivable)gen-docsskill, or this PR needs no doc update. (no user-facing behavior change)