fix(file-tools): normalize Windows MSYS task paths - #46995
Conversation
|
Duplicate of #44735 — both normalize MSYS/Cygwin-style drive paths in |
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Normalizes Windows MSYS task paths in the file tools layer. Handles cross-platform path edge case (2 files, ~4.8KB diff).
Looks Good
- Platform compatibility fix
- No behavior change on non-Windows systems
- No security implications
Reviewed by Hermes Agent (cron batch, 2026-06-16)
|
Superseded in spirit by #61915 — same MSYS file-tool normalization, rebased onto current |
Git Bash hands file tools paths like /c/Users/... which Path() on native Windows treats as relative \\c\\Users\\... under the process cwd. Reuse local._msys_to_windows_path (extended for /cygdrive and /mnt drive forms) in _resolve_path_for_task / _resolve_base_dir so read/write/search land on the real drive. Container/WSL Linux paths are left untouched. Salvages #50488 (drops unrelated desktop artifact commit); tests adapted from #46995. Co-authored-by: Jeff Watts <186512915+lEWFkRAD@users.noreply.github.com> Co-authored-by: LeonSGP43 <cine.dreamer.one@gmail.com>
Git Bash hands file tools paths like /c/Users/... which Path() on native Windows treats as relative \\c\\Users\\... under the process cwd. Reuse local._msys_to_windows_path (extended for /cygdrive and /mnt drive forms) in _resolve_path_for_task / _resolve_base_dir so read/write/search land on the real drive. Container/WSL Linux paths are left untouched. Salvages NousResearch#50488 (drops unrelated desktop artifact commit); tests adapted from NousResearch#46995. Co-authored-by: Jeff Watts <186512915+lEWFkRAD@users.noreply.github.com> Co-authored-by: LeonSGP43 <cine.dreamer.one@gmail.com>
|
Thanks for the Windows regression coverage. Automated hermes-sweeper review found that this exact file-tool path-resolution guarantee is already on current
Closing as implemented on main. |
Git Bash hands file tools paths like /c/Users/... which Path() on native Windows treats as relative \\c\\Users\\... under the process cwd. Reuse local._msys_to_windows_path (extended for /cygdrive and /mnt drive forms) in _resolve_path_for_task / _resolve_base_dir so read/write/search land on the real drive. Container/WSL Linux paths are left untouched. Salvages NousResearch#50488 (drops unrelated desktop artifact commit); tests adapted from NousResearch#46995. Co-authored-by: Jeff Watts <186512915+lEWFkRAD@users.noreply.github.com> Co-authored-by: LeonSGP43 <cine.dreamer.one@gmail.com>
Git Bash hands file tools paths like /c/Users/... which Path() on native Windows treats as relative \\c\\Users\\... under the process cwd. Reuse local._msys_to_windows_path (extended for /cygdrive and /mnt drive forms) in _resolve_path_for_task / _resolve_base_dir so read/write/search land on the real drive. Container/WSL Linux paths are left untouched. Salvages NousResearch#50488 (drops unrelated desktop artifact commit); tests adapted from NousResearch#46995. Co-authored-by: Jeff Watts <186512915+lEWFkRAD@users.noreply.github.com> Co-authored-by: LeonSGP43 <cine.dreamer.one@gmail.com>
Git Bash hands file tools paths like /c/Users/... which Path() on native Windows treats as relative \\c\\Users\\... under the process cwd. Reuse local._msys_to_windows_path (extended for /cygdrive and /mnt drive forms) in _resolve_path_for_task / _resolve_base_dir so read/write/search land on the real drive. Container/WSL Linux paths are left untouched. Salvages NousResearch#50488 (drops unrelated desktop artifact commit); tests adapted from NousResearch#46995. Co-authored-by: Jeff Watts <186512915+lEWFkRAD@users.noreply.github.com> Co-authored-by: LeonSGP43 <cine.dreamer.one@gmail.com>
Git Bash hands file tools paths like /c/Users/... which Path() on native Windows treats as relative \\c\\Users\\... under the process cwd. Reuse local._msys_to_windows_path (extended for /cygdrive and /mnt drive forms) in _resolve_path_for_task / _resolve_base_dir so read/write/search land on the real drive. Container/WSL Linux paths are left untouched. Salvages NousResearch#50488 (drops unrelated desktop artifact commit); tests adapted from NousResearch#46995. Co-authored-by: Jeff Watts <186512915+lEWFkRAD@users.noreply.github.com> Co-authored-by: LeonSGP43 <cine.dreamer.one@gmail.com>
Fixes #46876
Summary
Proof
.venv/bin/pytest tests/tools/test_file_tools.py -q -k WindowsMsysPathResolution.venv/bin/pytest tests/tools/test_windows_native_support.py -q -k GitBashPathNormalization.venv/bin/ruff check tools/file_tools.py tests/tools/test_file_tools.pygit diff --check