🤖 bug: unit tests write mux.log and ~/.ssh/config in the developer's real home
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 76/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- bun, typescript
調査の方向性
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.
~/.xum/logs/mux.log: log lines from tests go to the live Xum log file.src/node/services/log.ts:194opensgetXumLogsDir(). Without a root, that isgetXumHome()(src/common/constants/paths.ts:247).writeSink(log.ts:638) has no test guard.tests/setup.ts, thebun testpreload, sets noXUM_ROOT.
~/.ssh/config: a test that starts aServiceContaineradds the# --- START MUX CODER SSH ---block when thecoderCLI is installed.src/node/services/serviceContainer.ts:683callscoderService.ensureMuxCoderSSHConfig()in the background.src/node/services/coderService.ts:1581callsensureMuxCoderSSHConfigFile. Its default path isos.homedir()/.ssh/config(src/node/runtime/muxSshConfigWriter.ts:225).- The block sets
StrictHostKeyChecking no,UserKnownHostsFile /dev/nulland aProxyCommandfor*.mux--coderhosts. createTestEnvironment(tests/ipc/setup.ts:57) starts aServiceContainer. 62 test files call it. Three of them are unit tests undersrc/.
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.logwith 31 lines. The first line is[startup] ServiceContainer.initialize starting..ssh/configwith 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 ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
coder/xum のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
area:desktop area:ui bug platform:macos
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
anthropics/claude-code#106183 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
feature:App-Tour feature:Chat ready Web
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
digitalfabrik/integreat-app#4523 · リアクション 2 件 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Required Lexical field accepts two empty paragraphs対応中かも @lazerg が今日担当しました。 オープンBug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
payloadcms/payload#19222 ·
メンテナーはふだん 1 日以内に返信