Fix #1398: [Bug] autoInstall: false 不生效,install_recommended 路径绕过了配置#1861
Open
Memtensor-AI wants to merge 6 commits into
Open
Fix #1398: [Bug] autoInstall: false 不生效,install_recommended 路径绕过了配置#1861Memtensor-AI wants to merge 6 commits into
Memtensor-AI wants to merge 6 commits into
Conversation
When skillEvolution.autoInstall is set to false, the install_recommended path in autoInstallIfNeeded() was still triggering automatic installation. This fix ensures autoInstall=false completely disables all auto-install behavior. Closes #1398 Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: harvey_xiang <harvey_xiang22@163.com>
- Remove install_recommended bypass that ignored autoInstall config - Consolidate logic: check autoInstall once at method entry - Add unit tests verifying autoInstall: false blocks all installations Fixes #1398
- Fix autoInstallIfNeeded to skip ALL auto-installation when autoInstall=false - Previously install_recommended path bypassed autoInstall config check - Add comprehensive test coverage for autoInstall behavior (false/true/default) - Closes #1398
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.
Description
修复 autoInstall: false 配置不生效的问题。
问题根因:evolver.ts 的 autoInstallIfNeeded 方法存在两个独立的自动安装路径,第二个路径(install_recommended)完全绕过了 autoInstall 配置检查。
修复方案:
变更文件:
修复后,autoInstall: false 配置将正确禁止所有自动安装行为,包括 install_recommended 路径。
Related Issue (Required): Fixes #1398
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Executor did not report tests.
Checklist
@MatthewZhuang, @CarltonXiang, @syzsunshine219 please review this PR.
Reviewer Checklist