diff --git a/packages/cli/src/serve/workspaceAgents.test.ts b/packages/cli/src/serve/workspaceAgents.test.ts index c12728def..908f68920 100644 --- a/packages/cli/src/serve/workspaceAgents.test.ts +++ b/packages/cli/src/serve/workspaceAgents.test.ts @@ -677,6 +677,18 @@ describe('workspace agents routes', () => { }); it('returns 500 agent_delete_partial when one level unlink silently fails', async () => { + // Windows ignores Unix-style permission bits passed to + // `fs.chmod` — the user-agents directory stays writable, the + // unlink succeeds, and the partial-delete path this test + // exercises is unreachable. SubagentManager's `unlink` import + // (`import * as fs from 'fs/promises'`) creates a sealed + // namespace object that vitest can't `spyOn`, so a per-platform + // mock is also off-limits. The route logic itself is + // platform-agnostic; the Ubuntu + macOS runs cover it. Mirrors + // the `process.platform === 'win32'` early-return idiom used in + // `customBanner.test.ts:232`. + if (process.platform === 'win32') return; + const bridge = buildBridgeStub(); const app = buildApp({ bridge, boundWorkspace: workspace }); diff --git a/packages/cli/src/serve/workspaceMemory.test.ts b/packages/cli/src/serve/workspaceMemory.test.ts index adf49a8f1..eadc2a452 100644 --- a/packages/cli/src/serve/workspaceMemory.test.ts +++ b/packages/cli/src/serve/workspaceMemory.test.ts @@ -384,6 +384,15 @@ describe('workspace memory routes', () => { }); it('omits errorMessage + filePath in 500/413 responses unless QWEN_SERVE_DEBUG is on', async () => { + // Windows ignores Unix-style permission bits passed to + // `fs.chmod` — the directory stays writable, the POST succeeds + // with 200, and the EACCES path this test exercises is + // unreachable. The route logic itself is platform-agnostic; the + // Ubuntu + macOS runs cover it. Mirrors the + // `process.platform === 'win32'` early-return idiom already used + // in `customBanner.test.ts:232`. + if (process.platform === 'win32') return; + // Default: production response carries no `errorMessage` or // `filePath` fields — operators read the daemon stderr log // for the path. Setting QWEN_SERVE_DEBUG=1 enables both.