Skip to content

fix(executor): fold the command stem's ASCII case in PATH lookup (#999) - #1000

Merged
caomengxuan666 merged 1 commit into
masterfrom
fix/999-command-stem-ci
Oct 22, 2026
Merged

caomengxuan666 merged 1 commit into
masterfrom
fix/999-command-stem-ci

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

Summary

ping/netstat/tracert were command not found on every live install: System32 ships those applets with UPPERCASE on-disk names (PING.EXE, NETSTAT.EXE, TRACERT.EXE, also HOSTNAME.EXE), and the rubash#799 byte-exact stem contract rejected every lowercase invocation (owner: PING uppercase resolved, ping missed; which found it while command -v didn't — the two faces disagreed).

Relaxes the fold arm to compare the stem ASCII-case-insensitively, per the owner ruling:

Test plan

  • tests/issue799_command_name_case_regressions.rs rewritten for the relaxed contract; new lowercase_invocation_reaches_uppercase_disk_name regression (PING.EXE as real PE + NETSTAT.EXE, reached as ping, ping.exe, netstat) — 5/5 green
  • cargo test --lib executor::path 72/72 (rewritten TOOLB/GHOST_TOOL staleness assertions)
  • E2E on the debug build: command -v ping → /c/Windows/system32/PING.EXE, ping -n 1 127.0.0.1 executes, rc 0
  • CI lanes

Note: bash.exe (thin forwarder to the installed host shell) keeps reporting the installed engine's behavior until niu rebuilds with this — engine-side fix only.

Fixes #999

System32 ships PING.EXE / NETSTAT.EXE / TRACERT.EXE / HOSTNAME.EXE; the
rubash#799 byte-exact stem contract made lowercase ping/netstat/tracert
unreachable (owner live report on 1.4.1/1.4.3, PING uppercase resolved).
The fold arm now compares the stem ASCII-case-insensitively (owner
ruling: parity with CMD/PowerShell/msys — the #799 harvest hang is
accepted again as the price of Windows parity). Byte-equal spellings
still win within a directory; extensionless on-disk names stay byte-
exact; the resolved spelling is always the on-disk one.

tests/issue799_command_name_case_regressions.rs rewritten for the
relaxed contract, with a new System32-uppercase regression (PING.EXE +
NETSTAT.EXE reached as ping/ping.exe/netstat).

Fixes #999
@caomengxuan666
caomengxuan666 merged commit 50e86e8 into master Oct 22, 2026
8 checks passed
caomengxuan666 added a commit that referenced this pull request Oct 22, 2026
- finalize the 10-22 batch into [1.4.3]: the command-stem ASCII case
  fold (#998/#1000), the interactive ${v^^} crash fix (niubash#503),
  cli_tests isolation (#996), the no-IFS short-circuit re-land
  (#995/#1002), and the assoc/signal/test-bench perf batch
- backfill the missing [1.4.2] and [1.4.1] sections from the tag
  boundaries (the bump-only releases left them unwritten)
- PROJECT version 1.4.2 -> 1.4.3
@caomengxuan666
caomengxuan666 deleted the fix/999-command-stem-ci branch October 23, 2026 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant