Repository navigation
test: fix Windows default-home isolation fixtures - #7242
Conversation
Windows homedir() follows USERPROFILE at call time. Keep the production fixture default home stable and restore the protected home before testing guarded unpinned refusal, while retaining worker-home rewrite coverage for guarded callers.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
…ry-windows-isolation
|
✅ Deterministic PR hygiene checks passed. |
|
Maintainer landing note: every PR-scope check passed on head |
Summary
homedir()followsUSERPROFILEchanges there: the fixtures changed that variable to a worker home but still expected the registry/mirror seeded in the startup home. This caused both owner-registry assertions and the service-state production read to fail.OPENCODEX_HOME. Guarded callers still exercise worker-home rewrites; the owner-registry fixture restores the protected home before its unpinned refusal check. Every existing registry, mirror, alias, contents and refusal assertion remains.tests/for home-isolation, startup-home and HOME/USERPROFILE rewrite patterns. Only these two fixtures assume a cached home while asserting startup-home contents. Related wrapper, guard, Claude home and OpenCode transport tests were included in expanded remote checks.dev(050bb444a0, including fix(gui): restore keep-native-v1 qualifier placement #7237) before final validation. The PR diff remains two test files only.Verification
0f4dffc8ecd882aacef9cd48aafbfe9952527e1a.git diff --check). Full-suite coverage is delegated to hosted CI because parallel worktrees share local resources.4ed45e9516,ocx-lane-ci2.shlabelf6-base-repro-win-1016: typecheck exit 0; owner-registry 0 pass, 2 fail, matching hosted assertions. The service-state suite on the first PR head reproduced 1 pass, 1 fail withbefore: null, matching the additional hosted failure.homedir()changes withUSERPROFILE; changing/restoring/changing it toggled the result. Reproduction on another host with fixture-owned startup paths and deleted registry overrides supports a fixture assumption failure rather than runner-image drift, inherited registry overrides or path casing.miniand Linuxlidge:OCX_TEST_NO_QUEUE=1 OCX_LANE_SLOTS=3 ~/bin/ocx-lane-ci2.sh 0f4dffc8ecd882aacef9cd48aafbfe9952527e1a <label> <test files>. Labels:f6-final-win-1016,f6-final-linux-1016. Each ran typecheck plus:tests/config/owner-registry-isolation.test.tstests/config/owner-registry-acl.test.tstests/service/service-state-isolation.test.tstests/ci-workflows/test-runner.test.tstests/ci-workflows/test-home-guard.test.tstests/claude-integration/claude-config-home-isolation.test.tstests/providers/opencode-management-transport.test.tslidge: typecheck exit 0; 145 pass, 3 skip, 0 fail across 7 files.bun run structure:checkandbun run privacy:scanalso passed on the final head.mini: typecheck exit 0; all 10 owner-registry/ACL/service-state tests passed. Expanded run: 147 pass, 1 fail across 7 files. The sole failure is the unchangedtest-home-guard.test.ts:639whole-tree scan exceeding its 5-second deadline (6.48s). It also failed on the previous head (7.94s), and a single-test--parallel=1run on the unmodified baseline4ed45e9516reproduced it (7.76s). This existing performance/timeout issue remains outside this fixture repair; no timeouts were increased. Other wrapper, guard, Claude-home and OpenCode tests passed.pull_request, exact head0f4dffc8ecd882aacef9cd48aafbfe9952527e1a. All four Ubuntu test shards, gates, API usage, storage policy, keyring, Docker smoke andcicompleted successfully. React Doctor and PR hygiene also passed. Policy-excluded jobs were skipped and are not counted as passing cross-platform evidence.workflow_dispatch, lane=all, same exact head: all nine Windows shards completed successfully. Raw logs confirm both service-state cases in Windows 2/9 and both owner-registry cases in Windows 5/9 passed.tests/ci-workflows/import-cycle-ratchet.test.ts:59(directory index.tsx imports close cycles); macOS 3/3 and macOS control failedtests/codex-integration/codex-provider-routing.test.ts:176(concurrent sync processes leave a complete restorable config); desktop shell failed Rust clippy'smanual_noop_wakeratdesktop/src-tauri/src/process_spawn.rs:173. These areas are unchanged by this PR and were left for their owners. A remaining dispatch test job was still finishing at handoff. Earlier superseded dispatches were cancelled and are not passing evidence.Checklist