Repository navigation
fix(path): drop /mnt/c from the Option-B verbatim loop - #568 verdict A/C (translation stands) - #574
Merged
Merged
Conversation
… A/C, #444 translation stands The verbatim loop in virtual_system_root_operand_resolution_keeps_option_b_ and_legacy_verbatim (ea36410, #177) still listed /mnt/c, contradicting the #444 pin (46d7942) one file over - Windows --lib was permanently red. The #568 'audit evidence' that the toolchain resolves /mnt natively was measurement pollution: Git Bash converts /mnt/c -> C:\\ at spawn (MSYS2 WSL-interop), so ls.exe rc=0 tested Git Bash, not WinuxCmd. PowerShell side-by-side (no POSIX layer): /d/repo ok, /cygdrive/d/repo ok, /mnt/c/Windows ENOENT, touch rc=1 no file. Source audit to v1.1.6 (c40e939): normalize_api_operand_w only folds /cygdrive and single-letter /X/; zero /mnt commits v1.1.2..v1.1.6. - remove /mnt/c from the loop; comment pins the boundary (shape-class test proves windows_virtual_system_root_argument("/mnt/c") == false) and hands the /mnt contract to the #444 test, untouched - docs/windows-path-contract.md L2: correct the polluted 1.1.5 note and the violation ledger entry - feature ask for a native /mnt arm: WinuxCmd#1172 cargo test --lib executor::path: 68 passed (was 67+1). Full --no-fail-fast failure set identical to fresh master by name.
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.
Closes #568(裁决方向 A/C,2026-10-12)。维持 #444 全类翻译,把
/mnt/c从 ea36410/#177 的 verbatim 循环移除——矛盾消除,--lib回绿。为什么不是方向 B:#568 的"审计实证"是测量污染
四路复测(裁决报告 2026-10-12):
ls.exe /mnt/c/...rc=0 是假象:bat 观测显示 bash 传给 native 子进程的 argv 已是C:\Windows(MSYS2 运行时 WSL-interop 在 spawn 前转换/mnt/c→C:\);ARG_CONV_EXCL/MSYS_NO_PATHCONV在该环境未生效。rc=0 测的是 Git Bash 的转换层,不是 WinuxCmd。原帖 touch "rc=0 落在 C:" 同签名。/d/repo✅、/cygdrive/d/repo✅、/mnt/c/Windows❌ cannot access;touch /mnt/c/...❌ rc=1 ENOENT 未落盘。ls.exe 纯 native(无 msys-2.0.dll 依赖)。normalize_api_operand_w(native_path.cppm:101)仅 /cygdrive 折叠(L112-137)+ 单字母/X/(L138-153,要求[2]为分隔符;/mnt/c的[2]='n'不满足);全 src/ 无 "mnt"。git log -S '/mnt' -- src/v1.1.2..v1.1.6 零提交;v1.1.4→v1.1.5 的 native_path 变化只有 cygdrive 折叠(6410315/[bug] Unset-PATH external-failure message differs (rc same) #1145)。不存在任何支持 /mnt 的已发布版本,方向 B 的"旧版占比"是伪问题。改动
src/executor/path.rs:virtual_system_root_operand_resolution_keeps_option_b_and_legacy_verbatimverbatim 循环删/mnt/c,加注释声明边界(形状类测试自证windows_virtual_system_root_argument("/mnt/c") == false)并把 /mnt 契约移交 fix(path): translate /mnt/X drive argv for every child class (niubash#164) #444 测试独占。fix(path): translate /mnt/X drive argv for every child class (niubash#164) #444 的windows_mnt_drive_argument_translates_for_every_child未动。docs/windows-path-contract.md:§2 L2 更正"工具侧同样可解析(1.1.5 实测)"污染注记(划线保留 + 更正引四路证据);违规台账 master --lib Windows 恒红:/mnt/c verbatim 断言与 #444 全类翻译矛盾(工具链已自解析 /mnt,前提过时) #568 条目同步为已裁决。ls/cp/touch /mnt/...继续由引擎预翻译(fix(path): translate /mnt/X drive argv for every child class (niubash#164) #444 修复面保留)。验证
cargo test --lib executor::path:68 全绿(原 67 绿/1 红,唯一红即 master --lib Windows 恒红:/mnt/c verbatim 断言与 #444 全类翻译矛盾(工具链已自解析 /mnt,前提过时) #568 引述测试)cargo test --no-fail-fast:失败集与 fresh master(f9fe68c6)逐名双向一致(双方各仅upstream_suite_slice_snapshots,为工作树缺third_party/bash/tests套件文件的环境性共红,与本 PR 无关;并行跑出的 pb10k 差异经空闲复跑 5/5 证实为负载 flake)cargo fmt --check干净关联