fix(lsp): make language-server installs opt-in (#25015)#44134
Open
egilewski wants to merge 1 commit into
Open
Conversation
LSP defaults enabled the service and allowed missing server binaries to auto-install on first use. A first edit in a git workspace could therefore trigger npm, go, or pip installs under HERMES_HOME without an explicit user configuration choice. Make the default config and service fallback disabled/manual, and make the standalone ServerContext default manual as a defensive default. Existing users who explicitly set lsp.enabled or lsp.install_strategy keep that behavior; the LSP docs now show the opt-in flow. Validation: - /home/mac/hermes-agent/.venv/bin/python -m pytest tests/agent/lsp/test_opt_in_defaults.py tests/hermes_cli/test_config.py - /home/mac/hermes-agent/.venv/bin/python -m py_compile hermes_cli/config.py agent/lsp/manager.py agent/lsp/servers.py agent/lsp/install.py agent/lsp/__init__.py tests/agent/lsp/test_opt_in_defaults.py - git diff --check - git diff --cached --check Fixes NousResearch#25015
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
LSP was enabled by default and missing server binaries could be installed
automatically on first use. That meant a first edit inside a git workspace
could trigger npm, go, or pip installs under
HERMES_HOMEwithout anexplicit user configuration choice.
This makes the LSP defaults opt-in:
DEFAULT_CONFIG["lsp"]["enabled"]is now false, service fallback defaults are disabled/manual, and the
standalone
ServerContextdefault no longer permits installs. Users whoexplicitly set
lsp.enabled: trueorlsp.install_strategy: autokeepthat behavior. The LSP docs now show the opt-in flow.
Validation
/home/mac/hermes-agent/.venv/bin/python -m pytest tests/agent/lsp/test_opt_in_defaults.py tests/hermes_cli/test_config.py/home/mac/hermes-agent/.venv/bin/python -m py_compile hermes_cli/config.py agent/lsp/manager.py agent/lsp/servers.py agent/lsp/install.py agent/lsp/__init__.py tests/agent/lsp/test_opt_in_defaults.pygit diff --checkgit diff --cached --checkgit diff --check upstream/main...HEADcoderabbit review --plain --type committed --base upstream/mainCodeRabbit returned one trivial suggestion to add a public
LSPService.install_strategyproperty only for test assertions. The servicealready exposes this value through
LSPService.get_status(), and adding asecond public accessor would broaden the API only to make a narrow regression
test avoid an internal assertion, so I left the code unchanged.
Fixes #25015
Created by gpt-5.5 (xhigh reasoning) in Codex. Human involvement: general issue selection and resolution guidelines; commit signing; checking notifications.