The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
test: isolate OpenCode config dirs in state-store CLI tests
Karim Farahat5ecca8883e4a
diff --git a/tests/lib/state-store.test.js b/tests/lib/state-store.test.jsindex bf0a26c09..a1e2f045c 100644--- a/tests/lib/state-store.test.js+++ b/tests/lib/state-store.test.js@@ -38,8 +38,9 @@ function cleanupTempDir(dirPath) {fs.rmSync(dirPath, { recursive: true, force: true });}-// The status CLI reconciles install-state found under $HOME, so CLI runs get an-// empty home instead of the developer's real ~/.claude.+// The status CLI reconciles install-state found under $HOME and the OpenCode+// config dirs, so CLI runs get an empty home instead of the developer's real+// ~/.claude and ~/.config/opencode.const ISOLATED_HOME = createTempDir('ecc-state-home-');process.on('exit', () => cleanupTempDir(ISOLATED_HOME));@@ -51,6 +52,8 @@ function runNode(scriptPath, args = [], options = {}) {...process.env,HOME: ISOLATED_HOME,USERPROFILE: ISOLATED_HOME,+ XDG_CONFIG_HOME: path.join(ISOLATED_HOME, '.config'),+ OPENCODE_CONFIG_DIR: path.join(ISOLATED_HOME, '.config', 'opencode'),...(options.env || {}),},});