Repository navigation
Backport Windows remote MCP environment preservation to 0.160 - #51121
Conversation
Backport #50129. Preserve SYSTEMROOT, TEMP, and TMP when explicit remote environment variables enable filtering.
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b30ce510b0
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let env = shell_environment::create_env_from_vars( | ||
| [ | ||
| ("PATH".to_string(), "/remote/bin".to_string()), | ||
| ("SystemRoot".to_string(), r"C:\Windows".to_string()), |
There was a problem hiding this comment.
Add integration coverage for the remote MCP launch
When a Unix orchestrator launches a Windows MCP server with a source = "remote" variable, this test calls the private remote_env_policy helper and manually recreates the exec-server conversion, so it can pass even if the actual launch path fails to classify the variable or transmit the allowlist in ExecParams. Add an integration test through the remote MCP launch path that verifies SYSTEMROOT, TEMP, and TMP survive while an unrequested secret does not.
AGENTS.md reference: AGENTS.md:L112-L121
Useful? React with 👍 / 👎.
Backport #50129 to the 0.160 release line so a Unix host can start remote stdio MCP servers on Windows when explicit remote environment variables are configured.
Preserve
SYSTEMROOT,TEMP, andTMPin the remote environment allowlist. The existing regression test checks these variables survive while unrequested secrets remain excluded.This is the exact single-file patch from #50129, based on the immutable 0.160.0 release's content commit (
cb7799623b2241f536d799f2d46259148fb987ce). No unrelated main changes are included.Validation:
990a7674801ac5adbc6c8c6380568e18b3d396e2.cargo build -p codex-cli --bin codexpassed.just test -p codex-rmcp-client: 332 passed, 9 skipped, 4 setup failures initially. After building the CLI, all threestreamable_http_remoteintegration tests passed on retry. The remaining OAuth auth-status test cannot create its lock directory in the read-only local home.CI currently reports unrelated failures in unchanged formatter tests, lint imports, spelling checks, manifest-feature exceptions, and unlinked-file checks. The Linux and Windows production build checks passed; remaining checks are running.