Default Windows bash sandbox to off / Windows Bash 沙箱默认关闭#6106
Merged
SivanCola merged 4 commits intoJul 6, 2026
Conversation
Drop the dead BashMode comparison in the project delta condition (an empty raw value always resolves to the platform default on both sides) and replace per-test runtimeGOOS save/restore boilerplate with a setRuntimeGOOS helper whose t.Setenv call panics under t.Parallel, keeping the package-global override race-free.
Run ApplyUserConfigUpgradesOnStartup from migrateLegacyConfigForCLI so Windows CLI-only users also get the one-time bash = "enforce" to off migration instead of waiting for a desktop launch. The upgrade is config_version-gated, so desktop and CLI never double-apply it, and metadata commands (version/help) still leave the config untouched. Also drop the unused bool return of the migration helper.
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
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.
Summary
bash = "enforce"tooff, then preserves any later manual enforce choice.migrateLegacyConfigForCLI), so Windows CLI-only users get the enforce-to-off migration without ever launching the desktop app. The upgrade is config_version-gated, so desktop and CLI never double-apply it; metadata commands (version/help) still leave the config untouched. Note: this also extends the pre-v3 DeepSeek official-pricing reset to CLI startup (previously desktop-only).BashModecomparison in the project delta render, drop the unused bool return of the migration helper, and add asetRuntimeGOOStest helper whoset.Setenvguard panics undert.Parallel, keeping the package-global GOOS override race-free.Known tradeoff
The old config template always wrote
bash = "enforce"explicitly, so the migration cannot distinguish the template default from a deliberate pre-v4 enforce choice on Windows; both are rewritten tooffonce. Any enforce set after the migration is preserved.Validation
go test ./internal/config ./internal/clicd desktop && go test ./...go vet ./internal/config ./internal/cliandGOOS=windows go build ./...(root and desktop modules)Cache-impact: low - config default/version and desktop/CLI startup migration only; no provider-visible prompt text, tool schema, or tool ordering changes.
Cache-guard: scripts/check-cache-impact.sh plus focused config/CLI/desktop tests listed above.
System-prompt-review: reviewed internal/config/config.go changes; DefaultSystemPrompt and LanguagePolicy text are unchanged.