Repository navigation
fix(gate): MSYS_NO_PATHCONV for the wsl.exe GNU leg + fail-fast preflight - #1721
Merged
Merged
Conversation
…trip preflight The rust2-gate CI job ran the whole GNU side into MISSING (81/81, pass=0 fail=81) while wsl.exe itself "succeeded": Git Bash (MSYS2) rewrites leading-slash argv before spawning a native binary, so the harness's "wsl.exe --exec /bin/bash /mnt/<drive>/..." reached the distro as execvpe(D:/Git/usr/bin/bash) -> No such file or directory, with stderr swallowed. Byte-level repro on the local Git Bash; with MSYS_NO_PATHCONV=1 the same invocation runs the probe verbatim and /mnt automount is fine. Two semantic conflicts met here: #1625 moved the GNU leg onto this call shape (its local verification ran under the niubash family, which never converted this shape), and #1632 put the harness under Git Bash on CI. Export MSYS_NO_PATHCONV=1 inside the harness so every caller is safe, and add a one-roundtrip preflight that fails in seconds instead of MISSING-ing the corpus for minutes. Verified in the exact failing shell (Git Bash, this repo's gate subset): GNU-gated 81 PASS / 0 FAIL, win 12 / 0 - matching the pre-#1625 attested numbers.
This was referenced Nov 14, 2026
caomengxuan666
added a commit
that referenced
this pull request
Nov 15, 2026
…s as #1721) The fs-dirs/digest shards died in their GNU preflight: the workflow's own wsl.exe --exec /bin/bash call runs under Git Bash, which rewrites the leading-slash argv into Windows-native paths before the spawn — run-gate.sh's internal guard (#1721) does not cover this step because the preflight is invoked from the workflow directly. env-level MSYS_NO_PATHCONV/MSYS2_ARG_CONV_EXCL on the step; YAML safe_load validated.
caomengxuan666
added a commit
that referenced
this pull request
Nov 15, 2026
…ixes #1761) (#1766) * fix(cp)+test: resolve dir-symlink deref chain for -H/-L; re-pin 4 stale pins to GNU/rust2 contracts (Fixes #1761) The #1761 family splits two ways on adjudication: REAL cp bugs (6 tests KEEP, rust2 fixed): Win32 reports directory symlinks with the FILE attribute flag, so cp -H/-L never resolved them — cp/winfs.rs gains resolve_deref_chain/expand_for_follow (mirroring the retired C++ dereferenced_source_path), cp/copy.rs consumes it. lstat/no-deref paths untouched. STALE pins (4 tests RE-PINNED, each with its WSL GNU oracle probe): - mktemp x2: the no-tilde assertion pinned the retired C++ GetLongPathNameW 8.3 expansion (RUNNER~1 -> runneradmin); rust2 emits the template verbatim and a tilde in the directory segment is legal. - find.issue_1617: pinned the retired C++ product banner; rust2 emits the GNU findutils banner (oracle byte-identical). - dir: pinned the un-escaped path shape; rust2/ls -b emits GNU's 'test\ data' escaping. Verification: targeted ctest 88/88; full ctest 4021/4041 (20 remaining = 4 stream-driver-not-built + 16 pre-existing env shell_root/nul_txt/nice items, each with its own stored failure file). Native-symlink cases SKIP locally (no SeCreateSymbolicLinkPrivilege); junction/LX proxies verified — the privileged CI runner is authoritative. * ci(gate): MSYS_NO_PATHCONV on the shard GNU-preflight step (same class as #1721) The fs-dirs/digest shards died in their GNU preflight: the workflow's own wsl.exe --exec /bin/bash call runs under Git Bash, which rewrites the leading-slash argv into Windows-native paths before the spawn — run-gate.sh's internal guard (#1721) does not cover this step because the preflight is invoked from the workflow directly. env-level MSYS_NO_PATHCONV/MSYS2_ARG_CONV_EXCL on the step; YAML safe_load validated. * ci(gate): pin the WSL distro to Ubuntu-24.04 — the rolling distro ships uutils coreutils The gate-shard GNU preflight (doing exactly its job) refused the oracle: the rolling 'Ubuntu' distro now defaults to uutils coreutils — 'ls (uutils coreutils) 0.8.0' on the runner — so every shard would have scored rust2 against the wrong oracle. Pin Ubuntu-24.04 to match the attestation box (GNU coreutils 9.4 / C.UTF-8) and set it as the default distro so run-gate.sh's bare wsl.exe calls land on it. * fix(path): skip POSIX-spelled TEMP/TMP when resolving /tmp — breaks the Git Bash circular mapping Under a Git Bash parent, TEMP/TMP arrive in the MSYS form '/tmp' itself. tmp_base() trusted the value verbatim, so /tmp resolved to /tmp and every temp-file command failed (the CI gate's mk16-p-dir row: rust2 rc 1 vs GNU rc 0, on a runner where GNU's /tmp is real). tmp_base now skips candidates that cannot name a Windows directory (leading '/'), keeping niubash#94's TMPDIR > TEMP > TMP priority and falling through to the next candidate; when every candidate is POSIX-spelled the caller's no-tmpdir path applies, as before. Verified: driver with TEMP=/tmp TMP=/tmp creates in %LOCALAPPDATA%/Temp and exits 0 (was rc 1); winux-core 31/0. * fix(path): GetTempPathW last-resort when every tmp candidate is POSIX-spelled The CI gate-shard env is exactly TMPDIR unset + TEMP/TMP=/tmp (Git Bash parent): the priority skip left tmp_base at None, the caller's ? propagated it, and mk16-p-dir still failed. niubash#94's intent is a usable per-user temporary namespace — when no env candidate names a Windows directory, query GetTempPathW (which itself skips candidates that do not exist, landing on USERPROFILE\Temp under a Git Bash parent). Purity note documented in tmp_base: this last-resort arm reads process state, on purpose. tmp_maps_through_tmpdir_temp_tmp's tail re-pinned to the new contract (fallback names a Windows path, never a POSIX spelling). Verified: env -u TMPDIR TEMP=/tmp TMP=/tmp driver mktemp -p /tmp creates in %LOCALAPPDATA%/Temp rc 0; winux-core 31/1-fail -> green after the re-pin; cargo fmt normalized ln.rs drift brought by the rebase.
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.
The rust2-gate CI job (from #1632) scored the whole GNU side MISSING because Git Bash rewrites leading-slash argv for native spawns:
wsl.exe --exec /bin/bash /mnt/...reached the distro asexecvpe(D:/Git/usr/bin/bash)(#1625 moved the harness onto this call shape after the CI job's local verification had run under the niubash family, which never converted it).Verified in the exact failing shell (local Git Bash): gate subset 81/0 GNU + 12/0 win — the pre-#1625 attested numbers.