Repository navigation
fix(tests): session_queue ~/state test sets USERPROFILE next to HOME (#692, class 5) - #925
Conversation
Codex Review Summary: ✅ CompletedThis 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. |
Review 1 of 3: PR #925I ran five reviews (code quality, performance, test coverage, documentation accuracy, security). None found a Blocker. What the reviews confirmed:
I could not run pytest or ruff locally because this job's permissions didn't allow it. CI is the check. Notes, no action before merge
Verdict: approve |
|
This branch is 6 commits behind Generated by Claude Code |
…692, class 5) Run 38008915302 (windows-latest, Suite) failed test_root_and_job_paths_preserve_intake_context[~/state] in tests_py/hooks/test_session_queue.py. The test set HOME only; on Windows Path.expanduser reads USERPROFILE (ntpath, Python >= 3.8) and falls back to HOMEDRIVE+HOMEPATH, so "~/state" resolved under the runner's profile, not tmp_path. Test defect, not a product one: session_queue.queue_root expands "~" the platform's way. Refs #692 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018kyZYsqjqvVrsjKfbTBS2U
54dadc3 to
7533609
Compare
|
Claude finished @cdeust's task in 37s —— View job Review 2 of 3: PR #925
The rebased patch has the same scope as before: 7 lines added in 2 files, the test change plus the CHANGELOG entry. Because the code didn't change, I did not run new review agents. This job's permissions did not let me run pytest, ruff or Verdict: approve |
Review 2 of 3: PR #925The last review covered 54dadc3, and it found no Blockers. Since then the branch was only rebased onto I could not run pytest, ruff or Notes, no action before merge
Verdict: approve |
Summary
Next slice of #692, class 5.
test_root_and_job_paths_preserve_intake_context[~/state](tests_py/hooks/test_session_queue.py) failed on Windows in run 38008915302 (job 114084097957, imagewindows-2025-vs2026):Root cause (in the test). The test set
HOMEonly. On Windows,Path.expanduser(ntpath, Python ≥ 3.8) readsUSERPROFILE, falls back toHOMEDRIVE+HOMEPATH, and ignoresHOME. So~/stateresolved toC:\Users\runneradmin\state, outside the test root.session_queue.queue_rootexpands~the way each platform does, so the product is fine. The test now setsUSERPROFILEnext toHOME, astests_py/_hermetic_hook_env.pyand the other home-sensitive tests already do.The other class-5 item named for this run,
test_capture_dispatch::test_spawn_or_transport_failure_is_logged_and_telemetried, is already fixed onmainby 52ce518 (#693), which pinsis_supported=True. This PR has no change for it.Refs #692
Type of change
Test plan
pytest tests_py/hooks/test_session_queue.py(Linux): 14 passed.ntpath.expanduser("~/state")simulation with the runner's variables givesC:\Users\runneradmin/statewithHOMEalone andC:\tmp\t/stateonceUSERPROFILEis set. That matches the failing assertion above.ruff checkandruff format --checkon the changed file: OK.python scripts/check_craftsmanship.py: OK.ntpathsimulation. The Windows re-measurement is still on Windows: full-suite debt of 194 failing tests (measured 2026-10-10), fix order by root cause #692's list of remaining slices.Audit notes
Coding-standards compliance
Breaking changes
None.
Reviewer checklist
### Fixed.Generated by Claude Code