Skip to content

fix(path): drop /mnt/c from the Option-B verbatim loop - #568 verdict A/C (translation stands) - #574

Merged
caomengxuan666 merged 1 commit into
masterfrom
fix/568-verdict-a
Oct 12, 2026
Merged

caomengxuan666 merged 1 commit into
masterfrom
fix/568-verdict-a

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

Closes #568(裁决方向 A/C,2026-10-12)。维持 #444 全类翻译,把 /mnt/c 从 ea36410/#177 的 verbatim 循环移除——矛盾消除,--lib 回绿。

为什么不是方向 B:#568 的"审计实证"是测量污染

四路复测(裁决报告 2026-10-12):

  1. Git Bash 直打 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:" 同签名。
  2. PowerShell 同进程并排(无 POSIX 层):/d/repo ✅、/cygdrive/d/repo ✅、/mnt/c/Windows ❌ cannot access;touch /mnt/c/... ❌ rc=1 ENOENT 未落盘。ls.exe 纯 native(无 msys-2.0.dll 依赖)。
  3. 源码核对至 v1.1.6(c40e939):normalize_api_operand_w(native_path.cppm:101)仅 /cygdrive 折叠(L112-137)+ 单字母 /X/(L138-153,要求 [2] 为分隔符;/mnt/c 的 [2]='n' 不满足);全 src/ 无 "mnt"。
  4. 历史: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 的"旧版占比"是伪问题。

改动

验证

关联

… 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.
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.

master --lib Windows 恒红:/mnt/c verbatim 断言与 #444 全类翻译矛盾(工具链已自解析 /mnt,前提过时)

1 participant