Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#449·Auto-claude-code-research-in-sleep

Test suite rewrites the real $HOME/.aris/repo, breaking an existing install

Author: AfonsoZhangCreated Sep 26, 2026Updated Sep 26, 2026

Running the test suite rewrites the real $HOME/.aris/repo, repointing an existing ARIS install at whatever clone the tests ran from — or, in one case, at a pytest temp directory that is deleted on exit. After that, every skill that resolves a helper through the canonical chain in shared-references/integration-contract.md §2 silently loads helpers from the wrong tree, or fails once the temp directory is gone.

I hit this for real: I keep the canonical install outside the clone, ran pytest tests/ once on a throwaway clone under /tmp, and a later save_trace.sh resolution picked up the /tmp clone. Nothing warned me; the skills just started resolving elsewhere.

Cause

tools/install_aris.sh writes the global pointer, by design:

bash
GLOBAL_POINTER="$HOME/.aris/repo"

tests/test_install_aris_selective.py invokes the installer with an overridden $HOME and asserts on the pointer inside that sandbox — the correct pattern. Four other test modules run the same installer with no HOME override, so the write lands in the developer's real home directory.

Reproduce

With a sentinel in the pointer before each module, run each one alone:

bash
$ for f in test_install_aris_replace_link test_install_aris_tools_symlink \
           test_codex_install_update test_copilot_install; do
    echo "SENTINEL-$f" > ~/.aris/repo
    python3 -m pytest tests/$f.py -q >/dev/null 2>&1
    echo "$f -> $(cat ~/.aris/repo)"
  done

test_install_aris_replace_link  -> /tmp/<clone>          # overwritten
test_install_aris_tools_symlink -> /tmp/<clone>          # overwritten
test_codex_install_update       -> /tmp/<clone>          # overwritten
test_copilot_install            -> /tmp/pytest-of-<user>/pytest-69/test_install_copilot_uninstall2/aris

All four clobber the sentinel. test_copilot_install is the worst case: the pointer ends up inside a pytest temp directory that no longer exists after the run, so helper resolution reaches its last layer and finds nothing.

Nothing else in $HOME was touched in my run — ~/.claude/skills, ~/.agents/skills and ~/.codex/skills were unchanged. It is the pointer only.

Observed on Linux/WSL2, Python 3.10.12, at 341f914; the suite otherwise passes (749 passed, 20 skipped).

Suggested fix

Give the four modules the same env={"HOME": str(self.home), ...} treatment test_install_aris_selective.py already uses. A suite-wide guard would be stronger — e.g. an autouse fixture in tests/__init__.py or a conftest.py that points HOME at tmp_path for every test, so a future installer test cannot reintroduce this by omission.

Happy to send a PR for either shape — say which you prefer. (Unrelated to #447/#448, which are about arXiv 406 handling.)

Source: wanshuiyin/Auto-claude-code-research-in-sleep

View original on GitHubView discussion on GitHub