mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-07-09 17:19:02 +00:00
The ACP test `supports session/set_config_option for mode and model` flakes in
CI at acp-integration.test.ts:516 (`expect(openaiModel).toBeDefined()`).
Root cause: `globalSetup` does not sandbox HOME, so every integration test
shares the real `$HOME/.qwen`, and `vitest.config.ts` runs test files with
`fileParallelism: true` (up to 4 at once). The ACP `authenticate` / `setModel`
handlers persist `security.auth.selectedType` (and `model.name`) to User scope.
A concurrent test (e.g. system-control's `setModel('qwen3-...')`) can clobber
the persisted auth type in the window between this agent's
`authenticate({ methodId: 'openai' })` and its `session/new`; the new session
then resolves a non-openai auth, the openai runtime model is never captured, and
it drops out of `availableModels`.
Spawn each ACP agent with a per-agent `QWEN_HOME` so `getGlobalQwenDir()` points
at an isolated dir and the authenticate -> session/new round-trip reads back
exactly what this agent wrote. Test-only; no runtime code changes.
|
||
|---|---|---|
| .. | ||
| baselines | ||
| cli | ||
| concurrent-runner | ||
| fixtures | ||
| hook-integration | ||
| interactive | ||
| sdk-typescript | ||
| terminal-bench | ||
| terminal-capture | ||
| channel-plugin.test.ts | ||
| fake-openai-server.test.ts | ||
| fake-openai-server.ts | ||
| globalSetup.ts | ||
| test-helper.ts | ||
| test-mcp-server.ts | ||
| tsconfig.json | ||
| vitest.config.ts | ||
| vitest.loadtest.config.ts | ||
| vitest.terminal-bench.config.ts | ||