You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
apm uninstall -g of an LSP package fails without a project manifest and leaves the server configured #4045
bugLegacy classification name; prefer type/bug. Retained while discovery consumers are migrated.status/acceptedHuman scope approval; verify the issue's approval record and review contact before work.
At user scope with APM_HOME outside HOME, apm uninstall -g <lsp package> exits 1 with 'LSP cleanup failed ... without a valid project manifest', and the LSP server stays in the user's Copilot LSP config until a later install or update. User-scope uninstall must not require a project manifest and must remove the server it configured. Found by the lifecycle GATE state machine (#4031).
Decision: approve
Area: project
Scope: apm uninstall (project scope and -g) obtains the post-removal scope manifest through APMPackage.from_apm_yml(manifest_path), whether or not MCP cleanup runs, and supplies it to the existing LSP reconciler (reconcile_lsp_after_uninstall, install/lsp/integration.py, lsp-lifecycle owner). LSP entries APM wrote for a removed package then leave every target config and the lockfile; a surviving package's entries stay; the uninstall exits 0. The reconciler's rejection of a missing manifest and its fail-closed handling of target-write failures stay as they are. This also fixes #3768.
Done when: an installed-CLI lifecycle test that fails on main, at project scope and at user scope with APM_HOME outside HOME, with no MCP state anywhere in the scope. Install a local package that declares only an LSP server (copilot target), then uninstall it: exit 0, and the server is gone from .github/lsp.json / ~/.copilot/lsp-config.json and from all four lockfile LSP views (servers, configs, target ownership, provenance). Controls: a surviving package's LSP server remains; a package with both MCP and LSP servers still uninstalls cleanly; a genuine target-write refusal still exits nonzero, preserves foreign config, and never reports "without a valid project manifest". Remove the now-obsolete strict xfail in tests/integration/test_opencode_lsp_lifecycle.py so that test passes normally. One CHANGELOG line. No docs change: the docs already promise this cleanup.
Out of scope: LSP install and update; MCP cleanup; LSP target formats; target-selection or ownership-rule changes; bypasses or HOME/CWD fallbacks for a missing or invalid scope manifest; transactional rollback redesign; error wording for genuine target-write failures.
Review contact: Daniel Meppiel (@danielmeppiel)
bugLegacy classification name; prefer type/bug. Retained while discovery consumers are migrated.status/acceptedHuman scope approval; verify the issue's approval record and review contact before work.
Activity
danielmeppiel commentedon Nov 20, 2026
Update: the LSP cleanup failure on uninstall also reproduces at project scope, not only at user scope with APM_HOME outside HOME.
danielmeppiel commentedon Nov 20, 2026
Decision: approve
Area: project
Scope:
apm uninstall(project scope and-g) obtains the post-removal scope manifest throughAPMPackage.from_apm_yml(manifest_path), whether or not MCP cleanup runs, and supplies it to the existing LSP reconciler (reconcile_lsp_after_uninstall, install/lsp/integration.py, lsp-lifecycle owner). LSP entries APM wrote for a removed package then leave every target config and the lockfile; a surviving package's entries stay; the uninstall exits 0. The reconciler's rejection of a missing manifest and its fail-closed handling of target-write failures stay as they are. This also fixes #3768.Done when: an installed-CLI lifecycle test that fails on main, at project scope and at user scope with APM_HOME outside HOME, with no MCP state anywhere in the scope. Install a local package that declares only an LSP server (copilot target), then uninstall it: exit 0, and the server is gone from
.github/lsp.json/~/.copilot/lsp-config.jsonand from all four lockfile LSP views (servers, configs, target ownership, provenance). Controls: a surviving package's LSP server remains; a package with both MCP and LSP servers still uninstalls cleanly; a genuine target-write refusal still exits nonzero, preserves foreign config, and never reports "without a valid project manifest". Remove the now-obsolete strict xfail in tests/integration/test_opencode_lsp_lifecycle.py so that test passes normally. One CHANGELOG line. No docs change: the docs already promise this cleanup.Out of scope: LSP install and update; MCP cleanup; LSP target formats; target-selection or ownership-rule changes; bypasses or HOME/CWD fallbacks for a missing or invalid scope manifest; transactional rollback redesign; error wording for genuine target-write failures.
Review contact: Daniel Meppiel (@danielmeppiel)
fix(uninstall): LSP cleanup works without MCP state (#4045)
fix(uninstall): LSP cleanup works without MCP state (#4045)
fix(uninstall): LSP cleanup works without MCP state (#4045)
test(lifecycle): record #4045 in the bug ledger, sweep every LSP harn…
Merge pull request #4057 from microsoft/danielmeppiel-uninstall-lsp-4045
test(lifecycle): absorbed rows discharge three I7 obligations; record…
GATE kit: drop the cell-e expectation fixed by #4045