ClickHouse / ClickHouse/clickhousectl

Document JSON output contracts across domains; assess compatibility before normalizing API-shaped output

Open
#863 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
74
Forks
5
Avg merge
2d 11h
Merged PRs (30d)
196

Description

## Validated scope and current-PR plan — 2026-09-11

This section records the QA review and the current decision to finalize existing PRs without opening new PRs. It supersedes the proposed routing/fix suggestions in the original report below; the original observations are retained. Central plan: #757.

### Disposition

Deferred from this existing-PR finalization pass. Keep the issue open; no new PR is requested now. This is not a resolution, a severity downgrade, or a waiver of release acceptance.

### Validation and corrections

Most examples follow existing contracts: cloud settings list has a server-owned settings wrapper, ClickPipe settings schema uses snake_case, Backup.sizeInBytes is declared number, and metrics timestamps are wire timestamps. None proves serializer corruption. Document API-shaped cloud JSON and local output conventions first. A same-domain rename or removing wrappers is a compatibility change. If integral byte typing is desired, reconcile the upstream schema before changing the API library; do not fold into #772’s unrelated duration fix. Human date formatting can be improved in #837 without changing JSON.

---

## Original QA report

Found in the 2026-09-11 QA sweep of the combined PR stack at [`d2c37f81`](https://github.com/ClickHouse/clickhousectl/commit/d2c37f814fff53fe68d636e34103e2d0550bf84d), top PR #823, installed release build (package version still 0.4.2). Reproduced behaviour only; no implementation included.

Severity: medium for agents writing jq against more than one surface; consistent *within* each domain.

| output | shape | keys |
|---|---|---|
| `cloud service list --json`, `backup list --json` | bare array | camelCase |
| `cloud service settings list --json` | `{"settings":[…]}` | camelCase |
| `local server list --json` | `{"servers":[…],"total_servers":N,"project_scope":{…}}` | snake_case |
| `local init --json`, local errors | object | snake_case |
| `clickpipe get --json` | object | camelCase |
| `clickpipe settings get --json` | object | snake_case |
| `cloud backup get` `sizeInBytes` | `7139565.0` (float for a byte count) | |
| `cloud postgres metrics` data points | bare epoch seconds although the request takes RFC 3339 | |

Not proposing a big-bang rename. Worth an explicit, documented rule (e.g. cloud = API casing verbatim, local = snake_case; lists are arrays unless they carry metadata) and fixing the outliers that break it within their own domain (`settings list` wrapper, `clickpipe settings get` casing, float byte counts).

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the listed JSON entry points: cloud service and backup lists, cloud service settings, local server and init, ClickPipe get and settings, backup get, and cloud Postgres metrics. Compare their current shapes and casing with the original QA table, then document the cloud and local conventions and record compatibility decisions for each outlier; done means the contracts and any deferred changes are explicit.

Written by the indexing model from the issue text.

Assessment

Tech stack
json, rust
Domain
api, cli, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.