Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open Beginner friendly
#7,209 0 comments 0 reactions 0 assignees View on GitHub

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
Domain
devtools, testing

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.

  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

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from coder/xum

All issues in coder/xum

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.