The cold background index takes the hydration lock once per phase. The
setup accepted any lock that survived 150 ms, so on a loaded runner it
could return during a short opening phase, and the pre-exit lock check
then landed in the gap before the next phase.
The test wrote 2,000 session files of 30 KB per run to keep the child holding the hydration lock, but the lock window depends on bytes while setup and teardown depend on file count, so on Windows CI the fixture alone pushed it past 30 s. The same 60 MB now lives in 100 files with the identical lock window. The readiness gate also waits for the lock to still be held after a 150 ms settle, since early index phases blink it for a few milliseconds. Test only, no product change.
os.homedir() reads USERPROFILE on Windows and never HOME, so the
isolation setup and every test that moved home were still resolving the
developer's real home directory. Fixtures came back empty, real sessions
leaked into counts, and the code under test wrote plans, receipts and a
sync ledger into the real ~/.config/codeburn during a run.
USERPROFILE now joins the redirected variables and a shared setHome()
helper moves HOME and USERPROFILE together; every spawn env carries both.
The remaining Windows-only failures were POSIX-shaped fixtures: chmod
tricks that only toggle a read-only attribute on NTFS, pid 1 as an
always-alive lock holder, splitting paths on '/', bare tar, mode-bit
expectations, and per-file timeouts too short for the cost of a tsx spawn.
Each gets a platform-aware equivalent so nothing is skipped on Windows and
the POSIX branches stay byte-for-byte what they were.
Full run on Windows: 267 files passed, 2 skipped, 3592 tests passed.