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

🤖 bug: unit tests write mux.log and ~/.ssh/config in the developer's real home

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

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

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

評価

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

調査の方向性

tests/setup.ts、tests/ipc/setup.ts、およびissueで特定されているログとSSH設定のパスを読みます。まず、HOMEを空の一時ディレクトリに設定して、指定されたbun testコマンドを実行し、両方のファイルが現れることを確認します。テストのセットアップを更新して、一時的なXUM_ROOTを使い、一時的なsshConfigPathをテスト用サービスコンテナに渡します。テスト実行で実際のホームディレクトリにどちらのファイルも書き込まれなければ完了です。

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

説明

Problem

A unit-test run writes two files in the developer's real home. No test asks for this, and no test removes them.

  1. ~/.xum/logs/mux.log: log lines from tests go to the live Xum log file.
    • src/node/services/log.ts:194 opens getXumLogsDir(). Without a root, that is getXumHome() (src/common/constants/paths.ts:247).
    • writeSink (log.ts:638) has no test guard. tests/setup.ts, the bun test preload, sets no XUM_ROOT.
  2. ~/.ssh/config: a test that starts a ServiceContainer adds the # --- START MUX CODER SSH --- block when the coder CLI is installed.
    • src/node/services/serviceContainer.ts:683 calls coderService.ensureMuxCoderSSHConfig() in the background.
    • src/node/services/coderService.ts:1581 calls ensureMuxCoderSSHConfigFile. Its default path is os.homedir()/.ssh/config (src/node/runtime/muxSshConfigWriter.ts:225).
    • The block sets StrictHostKeyChecking no, UserKnownHostsFile /dev/null and a ProxyCommand for *.mux--coder hosts.
    • createTestEnvironment (tests/ipc/setup.ts:57) starts a ServiceContainer. 62 test files call it. Three of them are unit tests under src/.

Evidence (main ba9e451cab)

I ran one unit test with HOME set to an empty temp dir:

HOME="$(mktemp -d)" bun test src/node/services/turnExperiments.assembly.test.ts

The test passed. After the run, the temp home held two new files:

  • .xum/logs/mux.log with 31 lines. The first line is [startup] ServiceContainer.initialize starting.
  • .ssh/config with the MUX CODER SSH block.

With the real HOME, both writes go to the developer's own files.

Expected

A test run writes nothing under the real home. For example, the test preload points XUM_ROOT (or the log directory) at a temp dir, and test service containers pass a temp sshConfigPath.

Notes

  • Related: #7167 (tests read the host's skill folders). That issue is about reads. This one is about writes.
  • Found during research for a planned refactor of the agent loop's host calls.

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: max • Cost: $59.13

主要言語
TypeScript
スター
2.1k
フォーク
139
平均マージ
3時間 45分
マージ済み PR(30日)
953

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

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

coder/xum のほかの issue

coder/xum の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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