fix(ci): raise the global testTimeout and drop --legacy-peer-deps (real-CI feedback)

The first run of this PR against real Windows and real npm found two things
the local macOS pass could not:

1. ci-windows lost a THIRD file to vitest's 5000 ms default —
   `tests/git.spec.ts:85` ("caps status entries at the truncation limit")
   took 9607 ms building a pathological untracked set with real git calls.
   Three different files (git / powershell / agent-pty), one root cause, so
   per-file timeouts were whack-a-mole: vitest.config.ts now sets a global
   `testTimeout: 15_000`. The two heaviest suites keep their own 30 s budgets
   and a genuinely hung case still fails.

2. `--legacy-peer-deps` made the mount lane's CLI install broken instead of
   robust: it skips exactly the peers a global install has to supply, and
   `@deepseek-ai/cordis-plugin-group` — required at boot by
   `@deepseek-ai/dsh-app-boot` — is a peer, not a dependency, so the CLI died
   with ERR_MODULE_NOT_FOUND (`Cannot find package
   '@deepseek-ai/cordis-plugin-group'`) before the smoke could start. The
   flag is removed; the pin to a fully-published rc.2 (no ETARGET) plus the
   4 GB heap (no resolver OOM) is the whole fix.

Verified locally: a plain `npm install -g @deepseek-ai/dsh@0.1.5-rc.2` into a
scratch prefix (with NODE_OPTIONS=--max-old-space-size=4096) resolves the peer
(`dsh/node_modules/@deepseek-ai/cordis-plugin-group` present), that CLI reports
0.1.5-rc.2, and `DSH_CMD` pointed at it runs the mount lane green — 7 passed.
`pnpm test` stays green with the new timeout: 126 files / 1312 passed / 9 skipped.

Docs (plan §C, AGENTS.md §2, both READMEs' v0.19.1 entries) record the rejected
middle step and why, so nobody re-adds it.
This commit is contained in:
Menghuan1918 committed 2026-09-11 12:10:16 +08:00
1 parent 62c83ff611
commit 5451f5c699
6 files changed
+38 -21

No files matched your search

+10
View File
@@ -21,6 +21,16 @@ export default defineConfig({
inline: [/@deepseek-ai\/dsh-client-ui-primitives/],
},
},
// A handful of suites drive REAL processes (git, powershell, node-pty),
// and vitest's 5000 ms default is simply below what a loaded 2-core CI
// runner needs for a single cold spawn: the 2026-09-09/10 window lost
// cases in tests/agent-pty.spec.ts (a PowerShell + ConPTY pair per
// terminal), tests/install-powershell.spec.ts (12.1 s for one
// powershell.exe start) and tests/git.spec.ts (9.6 s to build a
// pathological untracked set) — three different files, one cause. Raise
// the default to cover them; the pty and PowerShell suites still declare
// their own 30 s budgets, and a genuinely hung test still fails.
testTimeout: 15_000,
// The Playwright headless-render lane lives in tests/e2e (specs named
// *.e2e.ts). Keep vitest from ever collecting it, both by naming (the
// default include only matches *.test.* / *.spec.*) and by an explicit