Repository navigation
(tests): isolate CODEX_HOME in every test that runs a scan - #1164
Merged
Merged
Conversation
Tests that run the scan worker or the Codex harness pass read the real ~/.codex on a machine with Codex history; a shared helper points CODEX_HOME at an empty temporary directory, and a guard test keeps new scan tests on it.
Reconcile and projects-query tests read the real ~/.codex through the Codex harness listing; they now use the helper, the guard recognises those entry points, and nested helpers restore in reverse order.
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.
Closes #1150
Tests that run the scan worker,
populateCacheViaWorkeror the Codex harness pass isolated the Claude projects directory but notCODEX_HOME, so on a machine with Codex history they read the developer's real~/.codex(e.g.17 !== 3upserts insession-cache-cold-start-progress) and every commit touchingsession-cache.jsfailed the local hook.test/fixtures/isolated-codex-home.cjspointsCODEX_HOMEat an empty temporary directory and restores the previous value (deleting it when it was unset).test/isolated-codex-home.test.jsfails if a scan-running test file does not use the helper.Test-only change: no changelog entry.