Discovered during v0.4.2 post-merge stress testing.
Repro
- Start servers on the default version from project dir A (
local server start dev etc.).
- From project dir B, run
chctl local remove <that-version>.
Actual
Exit 0 — the binary is deleted from under 3 running servers. The servers keep running (open fds), but local client -n dev then fails with managed_client_binary_not_found.
Root cause: remove() (crates/clickhousectl/src/local/mod.rs:200-205) calls recover_current_project_servers() then filters list_running_servers(), which is project-scoped. Servers in other projects are invisible. The guard works correctly when run from the same project (exit 1, server_running).
Expected
local remove --help says "Fails if a local server is currently running on this version" — enumerate servers across all projects (the local server list --global machinery already exists).
Discovered during v0.4.2 post-merge stress testing.
Repro
local server start devetc.).chctl local remove <that-version>.Actual
Exit 0 — the binary is deleted from under 3 running servers. The servers keep running (open fds), but
local client -n devthen fails withmanaged_client_binary_not_found.Root cause:
remove()(crates/clickhousectl/src/local/mod.rs:200-205) callsrecover_current_project_servers()then filterslist_running_servers(), which is project-scoped. Servers in other projects are invisible. The guard works correctly when run from the same project (exit 1,server_running).Expected
local remove --helpsays "Fails if a local server is currently running on this version" — enumerate servers across all projects (thelocal server list --globalmachinery already exists).