Skip to content

fix(tests): isolate lock-reap home on Windows via USERPROFILE - #2216

Merged
igorls merged 1 commit into
developfrom
fix/wave2-windows-lock-reap-home
Aug 11, 2026
Merged

fix(tests): isolate lock-reap home on Windows via USERPROFILE#2216
igorls merged 1 commit into
developfrom
fix/wave2-windows-lock-reap-home

Conversation

@igorls

@igorls igorls commented Aug 11, 2026

Copy link
Copy Markdown
Member

Summary

Windows CI failed after Wave 2 with 3 failures in tests/test_palace_locks.py from #2200:

  • test_reap_removes_stale_unlocked_lock
  • test_reap_never_removes_a_lock_held_by_another_process
  • test_maybe_reap_is_throttled

Root cause: tests only set HOME. On Windows os.path.expanduser("~") uses USERPROFILE, so the reaper never saw the tmp lock dir.

Fix

Add _isolate_home(monkeypatch, tmp_path) setting both HOME and USERPROFILE, use it across the lock-file tests.

Linux/macOS already green on develop tip after #2215; this unblocks Windows.

The #2200 reap tests only monkeypatched HOME. On Windows expanduser("~")
reads USERPROFILE, so the reaper scanned the real home and the suite
failed on test-windows after Wave 2. Share _isolate_home() that sets both.
@igorls
igorls requested a review from milla-jovovich as a code owner August 11, 2026 11:25
Copilot AI lite review requested due to automatic review settings August 11, 2026 11:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@igorls
igorls merged commit 7ebde7d into develop Aug 11, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants