Found while running the full suite for the v0.12.4 release.
test/mcp/headers.test.ts (5 tests) and test/server/httpapi-mcp.test.ts ("serves status endpoint") fail on any machine whose real ~/.claude.json has an entry under mcpServers. MCP discovery reads that file from the real $HOME, so the discovered server is created alongside the test's own servers: it has no requestInit, which breaks the headers assertions, and it changes the status endpoint's result.
test/preload.ts sandboxes the XDG directories but not HOME, so other home-directory config sources may leak the same way.
Reproduced on main (93fe816). With HOME pointed at an empty temporary directory, the same three files pass (15/15).
Suggested fix: point HOME (or the discovery's home-directory lookup) at a temporary directory in test/preload.ts, or have MCP discovery honour a test override, so the suite never reads the developer's own editor and assistant configs.
Found while running the full suite for the v0.12.4 release.
test/mcp/headers.test.ts(5 tests) andtest/server/httpapi-mcp.test.ts("serves status endpoint") fail on any machine whose real~/.claude.jsonhas an entry undermcpServers. MCP discovery reads that file from the real$HOME, so the discovered server is created alongside the test's own servers: it has norequestInit, which breaks the headers assertions, and it changes the status endpoint's result.test/preload.tssandboxes the XDG directories but notHOME, so other home-directory config sources may leak the same way.Reproduced on
main(93fe816). WithHOMEpointed at an empty temporary directory, the same three files pass (15/15).Suggested fix: point
HOME(or the discovery's home-directory lookup) at a temporary directory intest/preload.ts, or have MCP discovery honour a test override, so the suite never reads the developer's own editor and assistant configs.