You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: runtime-auth-service suites fail (77/96) when ORCA_REAL_CLAUDE_CLI_TEST=1 and CLAUDE_CONFIG_DIR is set #25567
ORCA_REAL_CLAUDE_CLI_TEST=1 CLAUDE_CONFIG_DIR=/some/dir \
pnpm exec vitest run --config config/vitest.config.ts src/main/claude-accounts/runtime-auth-service-
Result: 7 of 8 files fail, 77 failed / 19 passed. Without ORCA_REAL_CLAUDE_CLI_TEST=1 all 96 pass: since #23979 the global vitest guard (config/scripts/vitest-real-agent-home-write-guard.ts) unsets CLAUDE_CONFIG_DIR for every unit test. That covers the default mode. The real-CLI mode is the gap left, because the guard deliberately keeps the variable there.
Root cause
src/main/claude-accounts/runtime-paths.ts:15 prefers an inherited CLAUDE_CONFIG_DIR over homedir(). The runtime-auth suites mock node:os so homedir() points at a temp home, but never isolate the environment. The global guard in config/scripts/vitest-real-agent-home-write-guard.ts:196 deliberately keeps CLAUDE_CONFIG_DIR when ORCA_REAL_CLAUDE_CLI_TEST=1 (the real-CLI suites need it), so in that mode the resolver walks past the fake home to the developer's real config dir. The keychain double then throws Unexpected Claude config dir, and path assertions see the real dir. The shared harness src/main/claude-accounts/runtime-auth-service-test-harness.ts:141 (resetRuntimeAuthTestState) is where every suite sets up its environment.
Activity