fix(v2): detect MSYS2 bash from native toolchain git exec paths#1590
Conversation
- recognize ucrt64/clang64/clangarm64 prefixes in git --exec-path alongside legacy mingw32/mingw64 when locating bash on Windows - port the three MSYS2 regression tests from kaos to the v2 probe
🦋 Changeset detectedLatest commit: 94821ba The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 94821bab11
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| * Ported from `packages/kaos/test/environment.test.ts` (the MSYS2 cases added | ||
| * by the bash-detection fix); the v1 file carries the full POSIX / Git for | ||
| * Windows / Scoop shim matrix, which the vendored probe shares verbatim. |
There was a problem hiding this comment.
Remove porting notes from the test header
packages/agent-core-v2/AGENTS.md says comments in this package should not "note porting / skeleton status"; this new header adds provenance about being ported from the kaos suite instead of describing only the test scenario/responsibility. Please drop the porting note or move any necessary rationale into the commit/PR text rather than the source header.
Useful? React with 👍 / 👎.
fix(v2): detect MSYS2 bash from native toolchain git exec paths (MoonshotAI#1590)
Related Issue
Ports the fix from #1580 (which resolves #1579) to the experimental v2 engine.
Problem
agent-core-v2vendors the kaos shell probe insrc/_base/execEnv/environmentProbe.ts, and it still only recognizes the legacymingw32/mingw64prefixes when inferring the bash location fromgit --exec-path. On a Windows host where git comes from a native MSYS2 toolchain (e.g. exec pathC:/msys64/ucrt64/libexec/git-core), the v2 engine fails to detect bash even though it exists atC:\msys64\usr\bin\bash.exe.What changed
MINGW_PREFIX_SETcovering all current MSYS2 toolchain prefixes (ucrt64/clang64/clangarm64next to the legacymingw32/mingw64) and switched the exec-path scan to a set lookup, mirroring the kaos fix from fix(kaos): detect bash when git comes from a native MSYS2 toolchain #1580.test/_base/execEnv/environmentProbe.test.tswith the three MSYS2 regression cases ported from the kaos suite, adapted to the v2probeHostEnvironmentAPI (the v2 probe previously had no dedicated test file).Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.