Skip to content

fix(cli): add help text to four options that printed none - #2083

Open
akx-vishnu wants to merge 1 commit into
ClickHouse:mainfrom
akx-vishnu:fix/cli-help-2072
Open

akx-vishnu wants to merge 1 commit into
ClickHouse:mainfrom
akx-vishnu:fix/cli-help-2072

Conversation

@akx-vishnu

@akx-vishnu akx-vishnu commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Closes: #2072
Related: #1942

Changelog category (leave one):

  • Improvement

Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):

loom reconcile --restored, loom reembed --batch-size, loom settings history --limit and loom code lint-instructions --json now describe themselves in --help, with the defaults of --batch-size (200) and --limit (50).

Why

These four options printed no description in --help, while the options beside them all have one, so an operator had to read the source to learn what they do.

Scope and risk

Only the help= strings change, in server/cli/restore.py, maintenance.py, settings_cmd.py and code.py. No option name, default, choice or behaviour changes. The help strings follow the casing of their neighbours (lower case in restore.py and code.py, capitalised in maintenance.py and settings_cmd.py). The --restored text says why both is refused, as _refusal does.

Compatibility, rollout and rollback

  • Wire: none.
  • Operator steps: none.
  • Rollback: reverting restores the old help and the snapshots; nothing else is left behind.

Tests

  • Regenerated the CLI snapshots under Python 3.12 (LOOM_UPDATE_CLI_SNAPSHOT=1 python -m pytest tests/unit/test_cli_surface_snapshot.py). Only the four help lines changed in cli_tree.json and cli_help.json; I checked every line of the diff.
  • python -m pytest tests/unit/test_cli_surface_snapshot.py: 2 passed.
  • ruff check and ruff format --check on the changed files: pass, lines within 100 columns.
  • python scripts/codegen/docs_reference.py --check: all references current.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated (an agent wrote most of the diff): Claude Code. I checked the four help strings against each option's code (_refusal for --restored, reembed_all's batch for --batch-size), the snapshot diff line by line, and ran the checks above.

Note

Low Risk
Documentation-only argparse help strings and test snapshots; no command behavior or wire format changes.

Overview
Adds missing argparse help= descriptions so four Loom CLI flags show up in --help like their neighbors, with no changes to option names, defaults, choices, or runtime behavior.

loom code lint-instructions --json now says it prints the report as JSON instead of text. loom reembed --batch-size documents that it controls rows read per page (default 200). loom settings history --limit explains the newest-first cap (default 50). loom reconcile --restored describes which store was restored from backup and notes that both is refused because neither store holds the cross-store records.

Unit CLI surface snapshots (cli_help.json, cli_tree.json) were regenerated to match the updated help output.

Reviewed by Cursor Bugbot for commit 0cf1a22. Bugbot is set up for automated code reviews on this repo. Configure here.

loom reconcile --restored, loom reembed --batch-size, loom settings history
--limit and loom code lint-instructions --json showed no description in
--help. Add a one-line help string to each, in the style of the options
beside them, with the defaults of --batch-size and --limit. The CLI
snapshots are regenerated under Python 3.12; only help lines change.

Closes ClickHouse#2072

Signed-off-by: akx-vishnu <akx-vishnu@users.noreply.github.com>
@vercel

vercel Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
loom-docs Ready Ready Preview Dec 3, 2026 12:00pm UTC
loom-telemetry Ready Ready Preview Dec 3, 2026 12:00pm UTC

Request Review

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Options of loom reconcile, reembed, settings history and code lint-instructions print no help text

1 participant