Repository navigation
test: isolate the home directory on Windows (USERPROFILE) - #50
Merged
forrestlinfeng merged 1 commit intoOct 23, 2026
Merged
Conversation
freshHome() only set HOME, but Windows resolves os.homedir() from USERPROFILE, so every isolated test still read the real ~/.evolver settings (a stale Proxy URL) and bypassed its fake Proxy. Three tests also hand-rolled the same HOME-only isolation. Set HOME, USERPROFILE, HOMEDRIVE and HOMEPATH together and restore them all, and route the hand-rolled blocks through freshHome(). Windows: 151 pass / 0 fail / 6 skipped (was 134/17/6).
|
Sentinel 已审核此变更,未发现已核验问题,但发现需要人工确认的风险。 另有 1 个需要人工确认的风险;黄色 advisory 不阻塞合并,建议开发 agent review advisory 评论并逐条确认。 开发 agent 查询详情: 调用 MCP 工具 由 Sentinel 审核 · 目标提交 ea8055cb6b0b |
|
Sentinel 保留了 1 个尚未确认的审核候选。这些黄色条目不阻塞合并;红色 P0/P1 与其他独立硬门禁不受影响。 单一猜测、缺少变更行证据或纯 checklist 的候选会统一降为 P3。
需要完整证据时,可用行末 由 Sentinel 审核 · 目标提交 ea8055cb6b0b |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
freshHome()isolated the home directory by setting onlyprocess.env.HOME. Windows resolvesos.homedir()fromUSERPROFILE, so on Windows every isolated test still read the real~/.evolver— including a stalesettings.jsonwhose Proxy URL pointed at a dead port. Tests that expected their fake Proxy instead talked to the stale endpoint and failed (17 failures), and three tests hand-rolled the same HOME-only isolation.Fix
freshHome()now snapshots and setsHOME,USERPROFILE,HOMEDRIVEandHOMEPATHtogether (the last three only onwin32), and restores or deletes each on cleanup.apply.test.jsx2,diagnostics.test.jsx1) now go throughfreshHome().Verification
Windows 11, Node v22.20.0:
The 6 skips are the existing deliberate win32 guards on
/bin/shshims. No product code changed.