Repository navigation
test: run every test file against a throwaway home - #62
Merged
Merged
Conversation
The in-process runtime tests collect through fake connectors and never isolated the CLI folder, so every run wrote their fixtures into the real ~/.vana/results of whoever ran the suite: on 2026-09-25 they replaced a real GitHub and Oura export on a developer machine with "tester" stubs. A setup file now points HOME at a fresh temp dir per test file, so ~/.vana, ~/.claude and the rest land there; tests that set their own HOME still win. Verified: a full run leaves the real ~/.vana/results untouched. Claude-Session: https://claude.ai/code/session_01Fcv6uEy4zcXaigzDNxeW3j
Contributor
|
🎉 This PR is included in version 0.32.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The in-process runtime tests run fake connectors that "collect" and write results through
getSourceResultPath, and nothing isolated the CLI folder. Everypnpm teston a developer machine wrote those fixtures into the real~/.vana/results: on 2026-09-25 Volod's real GitHub and Oura exports were replaced with 17-70 byte stubs (user "tester", 0 repos), all stamped 13:04:16 PDT, the time of a test run. CI homes are throwaway, so CI never noticed.Fix:
test/setup/isolate-home.ts(vitestsetupFiles) pointsHOMEandUSERPROFILEat a fresh temp dir for each test file and clearsVANA_HOME.os.homedir()follows HOME, so~/.vana,~/.claude/skillsand the rest land there. Tests that set their own HOME (the auth tests) still take precedence.Verified:
pnpm validate510 tests; the modification times of every file in the real~/.vana/resultsare identical before and after a full run.https://claude.ai/code/session_01Fcv6uEy4zcXaigzDNxeW3j