Skip to content

fix(gate): MSYS_NO_PATHCONV for the wsl.exe GNU leg + fail-fast preflight - #1721

Merged
caomengxuan666 merged 1 commit into
mainfrom
fix/gate-msys-no-pathconv
Nov 14, 2026
Merged

caomengxuan666 merged 1 commit into
mainfrom
fix/gate-msys-no-pathconv

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

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 as execvpe(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).

  • export MSYS_NO_PATHCONV=1 in the harness (honored by MSYS2/Git Bash, ignored by niubash) — fixes every caller, not just CI
  • fail-fast GNU roundtrip preflight: broken invocation now dies in seconds with an actionable message instead of MISSING-ing the corpus for ~6 minutes

Verified in the exact failing shell (local Git Bash): gate subset 81/0 GNU + 12/0 win — the pre-#1625 attested numbers.

…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.
@caomengxuan666
caomengxuan666 merged commit b3e48db into main Nov 14, 2026
9 of 10 checks passed
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.
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.

1 participant