test: MCP tests fail when the developer's ~/.claude.json has MCP servers (HOME is not sandboxed)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- cli, testing-qa
Research direction
Start with test/preload.ts and inspect how MCP discovery obtains HOME, then review test/mcp/headers.test.ts and test/server/httpapi-mcp.test.ts. Ensure the suite uses an isolated home directory so developer MCP configuration cannot affect discovery. Run those tests with and without a populated real ~/.claude.json, then verify the reported 15/15 result.
Written by the indexing model from the issue text.
Description
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 (93fe816e20). 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.
- Dominant language
- TypeScript
- Stars
- 815
- Forks
- 135
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 58
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AltimateAI/altimate-code
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
AltimateAI/altimate-code#1384 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
AltimateAI/altimate-code#1323 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
AltimateAI/altimate-code#1288 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
AltimateAI/altimate-code#1285 ·
Maintainers usually reply within 1 day
-
privacy: Altimate Base consent dialog no longer discloses persistent per-installation identifierOpen
Difficulty 1/5 Under an hour Newbie friendliness 88/100
AltimateAI/altimate-code#1284 ·
Maintainers usually reply within 1 day
All issues in AltimateAI/altimate-code
Similar issues
-
enhancement providers-api ui-dashboard
Difficulty 2/5 1-3 hours Newbie friendliness 61/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
external-issue to-triage
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
needs triage
Difficulty 1/5 Under an hour Newbie friendliness 88/100
homarr-labs/homarr#6976 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day