🤖 bug: unit tests write mux.log and ~/.ssh/config in the developer's real home
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- bun, typescript
Research direction
Read tests/setup.ts, tests/ipc/setup.ts, and the log and SSH config paths identified in the issue. Start by running the named bun test command with HOME set to an empty temporary directory and confirm both files appear. Update the test setup to use a temporary XUM_ROOT and pass a temporary sshConfigPath to test service containers; done means the test run writes neither file under the real home.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- TypeScript
- Stars
- 2.1k
- Forks
- 140
- Avg merge
- 5h 1m
- Merged PRs (30d)
- 923
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No 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 coder/xum
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
🤖 fix: a Daytona connection test started before a settings save can show the old key as connectedOpen
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
Similar issues
-
[Bug]: REST API URL starting with "http" but no scheme (e.g. httpbin.org/get) is not given an http:// prefixPossibly taken @ItsDeadlyProgrammer claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
appsmithorg/appsmith#42471 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ehmpathy/rhachet-roles-bhrain#705 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Status: Triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
mermaid-js/mermaid#8546 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
braintrustdata/braintrust-sdk-javascript#2659 ·
Maintainers usually reply within 1 day