-
fix(child_env): preserve MSVC toolchain vars for Windows exec_shell
Sync to CNB / sync (push) Has been cancelledRelease / parity (push) Has been cancelledRelease / resolve (push) Has been cancelledRelease / build (deepseek-linux-arm64, deepseek, ubuntu-24.04-arm, aarch64-unknown-linux-gnu) (push) Has been cancelledRelease / build (deepseek-linux-x64, deepseek, ubuntu-latest, x86_64-unknown-linux-gnu) (push) Has been cancelledRelease / build (deepseek-macos-arm64, deepseek, macos-latest, aarch64-apple-darwin) (push) Has been cancelledRelease / build (deepseek-macos-x64, deepseek, macos-latest, x86_64-apple-darwin) (push) Has been cancelledRelease / build (deepseek-tui-linux-arm64, deepseek-tui, ubuntu-24.04-arm, aarch64-unknown-linux-gnu) (push) Has been cancelledRelease / build (deepseek-tui-linux-x64, deepseek-tui, ubuntu-latest, x86_64-unknown-linux-gnu) (push) Has been cancelledRelease / build (deepseek-tui-macos-arm64, deepseek-tui, macos-latest, aarch64-apple-darwin) (push) Has been cancelledRelease / build (deepseek-tui-macos-x64, deepseek-tui, macos-latest, x86_64-apple-darwin) (push) Has been cancelledRelease / build (deepseek-tui-windows-x64.exe, deepseek-tui.exe, windows-latest, x86_64-pc-windows-msvc) (push) Has been cancelledRelease / build (deepseek-windows-x64.exe, deepseek.exe, windows-latest, x86_64-pc-windows-msvc) (push) Has been cancelledRelease / docker (push) Has been cancelledRelease / release (push) Has been cancelled发布于
2026-05-12 04:19:44 +00:00 Harvested from PR #1487 by @Jianfengwu2024 — the rest of that PR
(the TriadMind architecture-governance crate) needs a Discussion-
level design conversation before it can land, but this Windows
env-allowlist fix is a clean independent improvement and stands on
its own.When the parent shell has already loaded VsDevCmd / vcvars (the
standard pattern for running Rust + MSVC on Windows),exec_shell
was stripping the toolchain env on its way to the child. The result:
the model findslink.exeviaPATHbut the linker can't resolve
kernel32.lib/ucrt.libbecause LIB and the SDK roots were
filtered out. Any model-drivencargo buildfrom inside the TUI
silently broke on Windows installs that don't run inside a Developer
Command Prompt.Adds 13 MSVC-related env vars to the
is_allowed_parent_env_key
allowlist so they survive the sanitization pass:LIB / LIBPATH / INCLUDE
VSINSTALLDIR / VCINSTALLDIR / VCTOOLSINSTALLDIR
WINDOWSSDKDIR / WINDOWSSDKVERSION
UNIVERSALCRTSDKDIR / UCRTVERSION
EXTENSIONSDKDIR / DEVENVDIR / VISUALSTUDIOVERSIONAlso extends the
mcp_env_allowlist_inherits_base_keysfixture and
addssanitized_child_env_preserves_windows_toolchain_varsas a
regression test (locked underenv_lock()so it serialises with the
other env-mutating tests in the file).Pure additive — no non-Windows behaviour changes.
Harvested from PR #1487 by @Jianfengwu2024
下载附件