Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

test: MCP tests fail when the developer's ~/.claude.json has MCP servers (HOME is not sandboxed)

オープン 初心者向け
#1,386 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
cli, testing-qa

調査の方向性

test/preload.ts から始めて、MCP のディスカバリが HOME をどのように取得しているかを調べ、続いて test/mcp/headers.test.ts と test/server/httpapi-mcp.test.ts を確認します。開発者の MCP 設定がディスカバリに影響できないよう、テストスイートが分離されたホームディレクトリを使用することを確認します。実在する内容のある ~/.claude.json がある場合とない場合の両方でこれらのテストを実行し、報告された 15/15 の結果を確認します。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
805
フォーク
122
平均マージ
2日 10時間
マージ済み PR(30日)
63

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

AltimateAI/altimate-code のほかの issue

AltimateAI/altimate-code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。