test(agent): pin Windows HOME variables in tilde-dependent tests - #63562
test(agent): pin Windows HOME variables in tilde-dependent tests#63562LceAn wants to merge 1 commit into
Conversation
|
Thanks for the focused Windows test-isolation fix. The two target failures are real on current main: Problems
Suggested changes
Automated hermes-sweeper review. |
Related to #49118: this PR now expands the same Windows HOME-profile isolation to seven tests, so it is a broader, complementary test fix rather than a duplicate. |
9eb3d83 to
e6825b0
Compare
|
Updated per review. Added the portable HOME/USERPROFILE setup to all five named sibling tests (seven total), and changed the two mixed-separator string assertions to Focused validation: all 7 target nodes passed. The broader canonical seven-file run still exposes independent existing Windows clean-env baselines: CLI files fail collection because the runner removes USERPROFILE/LOCALAPPDATA before |
e6825b0 to
ec72a8e
Compare
|
Maintenance update: rebased onto current |
Pin USERPROFILE alongside HOME and clear HOMEDRIVE/HOMEPATH in all seven tests that assert tilde expansion resolves under a temporary home. Use Path-based assertions for the two helpers that preserve a mixed separator after ntpath.expanduser, so the tests compare path semantics rather than platform-specific string formatting. Addresses review feedback on NousResearch#63562.
ec72a8e to
4d41a5f
Compare
|
Second-pass maintenance: kept the seven per-test HOME/USERPROFILE fixtures as the narrow fix; no global fixture was introduced. The broader runner and production image-routing PRs remain complementary, not duplicates. |
What & why
On POSIX,
expanduser("~")honorsHOME; on Windows it prefersUSERPROFILE, thenHOMEDRIVE/HOMEPATH. Tests that set onlyHOMEcan therefore resolve~against the real Windows profile instead of their temporary directory.Change
Apply the portable test-home setup to all seven reviewed tilde-dependent tests:
HOMEandUSERPROFILEto the temporary test directory;HOMEDRIVEandHOMEPATHfallbacks;Path.No production code changes are involved.
Validation
The seven focused behaviors pass on native Windows (six pytest targets plus direct MCP certificate-path verification); lint and diff checks pass.
Related / duplicate analysis
Complementary to #67196, which changes canonical runner/Hindsight isolation. Not a duplicate of #34374/#61571/#61668: those change production image-routing recognition, while this PR only repairs test fixtures.