-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Windows: append helper dir to PATH (split from #5579; no env var changes) #5898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
cpjet64
wants to merge
15
commits into
openai:main
Choose a base branch
from
cpjet64:feat/win-path-precedence-only
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+5
−2
Conversation
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
Context: * Address open issues related to PATH/PATHEXT and Windows env propagation. * Prepending to PATH changed users' tool precedence (e.g., virtualenv). MCP servers on Windows missed critical env vars (COMSPEC, SYSTEMROOT, etc.). Change: * Append apply_patch temp dir to PATH instead of prepending (arg0, Node wrapper). * Expand Windows DEFAULT_ENV_VARS for MCP client to include COMSPEC, SYSTEMROOT, PROGRAMFILES, APPDATA, etc. Risk: * Low: only affects PATH ordering (preserved) and adds allowed env passthrough. No privilege broadening. Tests: * Existing rmcp-client unit tests pass. Verification: * Ran cargo fmt. * Built and ran tests: `cargo test -p codex-rmcp-client` (all passed). `cargo check -p codex-arg0` OK.
Context: * Some Windows programs (incl. MCP servers/plugins) read canonical `Path` key. * Users had to manually set PWSH/POWERSHELL; include when present. Change: * In rmcp-client env builder, ensure `Path` mirrors `PATH` on Windows. * Add PROGRAMW6432, POWERSHELL, PWSH to the default pass-through list. Risk: * Low; only adds env keys when available. No privilege expansion. Tests: * Added Windows unit test verifying PATH/Path aliasing. Verification: * cargo fmt; cargo clippy -p codex-rmcp-client; cargo test -p codex-rmcp-client (all ok).
- Conditionally declare `mut` only on Windows in env builder. - Remove unnecessary `clone()` flagged by clippy. Validated with: cargo clippy -p codex-rmcp-client -D warnings.
- On Windows, if only `Path` is provided (extra env/whitelist), ensure `PATH` is set to the same value (and vice versa). Avoids HashMap ordering races. Validated: clippy clean, rmcp-client tests pass.
…tils to upstream\n\nKeep only PATH precedence change in arg0 and Node wrapper; move env var/alias changes out of this branch.
5 tasks
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.
Problem & intent
Before/After
Scope of change
Security effects
Testing evidence
just fmt.Roll‑back plan