Repository navigation
feat(local): rename local server to local clickhouse; add postgres list and local status (#1159) - #1169
feat(local): rename local server to local clickhouse; add postgres list and local status (#1159)#1169sdairs wants to merge 3 commits into
Conversation
`local server` becomes `local clickhouse`, with the visible alias `ch`. `server` stays as a hidden alias, so existing scripts keep working. `local postgres` gains the visible alias `pg`. Help text, agent context blocks, error hints and guidance commands, and the docs now name `local clickhouse`. Telemetry already records the canonical command name for an alias; a unit test now pins that `server`, `clickhouse` and `ch` all record `local clickhouse ...` on both the successful and the failed-parse capture paths. BREAKING CHANGE: telemetry and JSON guidance record `local clickhouse` where they previously recorded `local server`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…local status (#1159) `local clickhouse list` and `local clickhouse stop-all` now cover ClickHouse only, and recover, check and stop only ClickHouse servers, so they never contact Docker. `local postgres stop-all` likewise recovers and checks only Postgres. New commands: - `local postgres list [--json]` lists the project's Postgres instances in the existing engine-aware list shape. - `local status [--json]` lists every ClickHouse server and Postgres instance in the project: the combined view `local server list` gave before, with the same table and the same JSON object (`servers`, `total_servers`, `total_running_servers`, `project_scope`, and `guidance` when empty). An empty list's hint and JSON guidance name the command that produced it; `postgres list` offers no `--global` hint, since global discovery finds only ClickHouse. BREAKING CHANGE: `local clickhouse list` (and `local server list`) no longer include Postgres instances, and `local clickhouse stop-all` no longer stops them. Use `local status` and `local postgres stop-all`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
90fbc5a to
909696b
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 3 potential issues.
There are 4 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 909696b. Configure here.
| Err(_) if skip_entry_errors => continue, | ||
| Err(error) => return Err(error), | ||
| } | ||
| } |
There was a problem hiding this comment.
Omitted-name stop still hits Docker
High Severity
list_clickhouse_server_names_locked still lists every engine and runs Postgres liveness, so a nameless clickhouse stop or clickhouse remove contacts Docker. In a mixed project that fails with docker_unavailable instead of stopping or removing ClickHouse, even though list and stop-all already skip Docker.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 909696b. Configure here.
| /// Best-effort count used only for the informational notice during start. | ||
| pub(crate) fn advisory_running_server_count_locked(lock: &MetadataLock) -> usize { | ||
| list_all_servers_locked_inner(lock, true) | ||
| list_all_servers_locked_inner(lock, None, true) |
There was a problem hiding this comment.
Start note counts Postgres too
Medium Severity
advisory_running_server_count_locked still counts every engine, but the clickhouse start note now sends users to local clickhouse list, which is ClickHouse-only. A running Postgres instance inflates the count and will not appear in that list.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 909696b. Configure here.
|
Small follow-up: preserve Postgres visibility in JSON recovery hints (P3). This is also covered by the existing inline finding. Confirmed on the current head, For a stopped Postgres instance named Suggested correction in
This affects structured recovery advice, including output consumed by coding agents. The ordinary human error message and Postgres operations remain correct, so this is a small troubleshooting fix rather than a merge blocker. |
…em (#1159) `local clickhouse list` no longer includes Postgres, so the `--json` recovery command for errors Postgres also raises sent callers to a list that could not show the instance. - `server_not_found`, `server_not_running`, `server_running` and `invalid_server_name` now point at `local status`. - `startup_exit` and `startup_timeout` pick `local clickhouse list` or `local postgres list` from the failing engine. Adds unit coverage for both mappings and a subprocess test that follows the hint for a stopped Postgres instance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Resolved in d3a0656, as suggested:
The selection-required errors still point at Gates: fmt, both clippy configurations, the |


Closes #1159. Stacked on #1166.
Summary
local serveris nowlocal clickhouse. It has a visible aliaschand a hidden aliasserver, so every existinglocal server …invocation still parses.local postgresgains a visible aliaspg.Engine-only commands (breaking). These now cover one engine only, per the decision recorded on Add local postgres list and rename local server to local clickhouse (ch) #1159:
local clickhouse listandlocal clickhouse stop-allcover ClickHouse only, and never contact Docker. This applies through theserveralias too.local postgres stop-allwas already Postgres-only, and now skips the ClickHouse process scan.New
local postgres list [--json]: Postgres instances in this project.New
local status [--json]: every ClickHouse and Postgres instance in the project. This is the combined viewlocal server listgave on main.JSON shape is unchanged.
statusandpostgres listreturn the same objectserver list --jsonreturned (servers,total_servers,total_running_servers,project_scope,guidance), with the same entry fields.Telemetry records the canonical name for every alias (
local clickhouse …,local postgres …). A new unit test pins this. The recorded path changes fromlocal server …tolocal clickhouse …, so any dashboards keyed on the old path need updating.Engine-correct hints (third commit, from review):
startup_exitandstartup_timeoutpoint at their own engine's list.server_not_found,server_not_running,server_running,invalid_server_name) point atlocal status, because Postgres raises them too.clickhouse startcounts ClickHouse only.ch stopandch removewith no name no longer need Docker.local statushas a short agent-context block.Release notes (breaking)
local server stop-allandlocal server list(hidden alias) now cover ClickHouse only. Uselocal statusto see everything, andlocal postgres stop-allto stop Postgres.local server …tolocal clickhouse ….Docs
Updated:
README.mddocs/guides/local-development.mdanddocs/guides/user-defined-functions.mddocs/reference/automation.mdanddocs/reference/telemetry.mdcli-help-textskillscripts/test-postgres-integration.shStill to update, outside this repo:
docs/concepts/features/interfaces/cli.mdx)infra-clickhouseandinfra-postgresagent skillsThose still say
local serverand describeserver listas including Postgres. The commands keep working through the alias, but the "includes Postgres" claim is now wrong.Tests
clickhouse,ch,server,postgres,pg),postgres listandstatus, with and without--json.clickhouse,ch,pgandstatusappear inlocal --help, andserverdoesn't.tests/local_engine_lists_test.rs(no live Docker):clickhouse listandstop-allwork with Docker unreachable and exclude Postgres.postgres listandstatusare tested against a wiremock Docker.--no-default-featurescheck,cargo test -p clickhousectland the Python classifier tests all pass.local_postgres_client_input_testfails intermittently, and also does on the base commit (1 in 6 runs), so the flakiness predates this PR.scripts/test-postgres-integration.shwas only syntax-checked. It needs a localpostgres:18-alpineimage.🤖 Generated with Claude Code
Note
Medium Risk
Breaking CLI semantics for combined list/stop-all and telemetry command paths, though hidden
serveralias preserves invocations; broad touch of error/JSON guidance increases regression risk for automation.Overview
Renames the local ClickHouse command group from
local servertolocal clickhouse, with visible aliaschand a hiddenserveralias so existing scripts keep working.local postgresgets a visiblepgalias.Splits listing and bulk-stop by engine (breaking vs the old combined
local server list/stop-allbehavior):local clickhouse listandclickhouse stop-allare ClickHouse-only and skip Docker;local postgres listis new;local statusshows both engines in one view (replacing the old combined list). Server metadata recovery and listing can target one engine so ClickHouse lists do not call Docker and Postgres lists do not scan processes.Updates user-facing guidance across errors,
--jsonrecovery commands, README/docs, and telemetry so paths readlocal clickhouse …and name-only server errors point atlocal statuswhile startup failures point at the relevant engine’s list.Reviewed by Cursor Bugbot for commit d3a0656. Bugbot is set up for automated code reviews on this repo. Configure here.