Skip to content

feat(ragctl): consolidated control-plane CLI scaffold (Step 0.10) - #36

Merged
officialCodeWork merged 2 commits into
mainfrom
build/phase-0/step-0.10-ragctl-cli-scaffold
May 23, 2026
Merged

feat(ragctl): consolidated control-plane CLI scaffold (Step 0.10)#36
officialCodeWork merged 2 commits into
mainfrom
build/phase-0/step-0.10-ragctl-cli-scaffold

Conversation

@officialCodeWork

Copy link
Copy Markdown
Owner

Summary

  • New workspace package packages/ragctl/ owns the ragctl entry point.
  • Working command groups (carried over from earlier steps): config validate / config diff (0.4), traces (0.7), eval run / eval show (0.8), version (0.10).
  • Scaffold sub-apps that announce their target step and exit 0 so the published command shape is stable from day one: ingest → 1.10, query → 3.1, logs → 5.6, tenant → 6.1, plugin → 1.1, secret → 6.7.
  • Shell completion is wired through Typer's --install-completion / --show-completion flags (bash, zsh, fish, PowerShell).
  • The old rag_config.cli module is deleted; the single internal importer (tests/eval/test_cli.py) is updated. No backwards-compat shim — per the user's standing preference against compat shims.
  • Side fixes: add py.typed markers to rag-config and rag-observability so downstream mypy can resolve their types; extend the Typer-friendly B008 ignore to packages/ragctl/src/ragctl/main.py.

Phase 0 closes: 13 / 13 steps complete. Next: Phase 1 Step 1.1 — Storage backends.

Documentation

  • docs/reference/ragctl.md — full command reference (overview, usage, internals, extension points)
  • docs/guides/ragctl-quickstart.md — 5-minute operator tour
  • docs/README.md — new reference/ and guides/ index sections
  • packages/ragctl/README.md — package overview

Test plan

  • uv run pytest -x -q — 499 passed, 1 skipped (19 new ragctl tests)
  • uv run ruff check . — clean
  • uv run ruff format --check . — clean
  • uv run mypy packages/ apps/gateway/ — 67 source files, no issues
  • CI matrix passes on ubuntu-22.04, macos-14, windows-latest
  • Manual: uv run ragctl --help shows all 10 sub-command groups
  • Manual: uv run ragctl version prints ragctl 0.1.0
  • Manual: each scaffold group exits 0 and prints its target step

Notes

A separate task chip has been spawned to fix a pre-existing RAG001 false positive on packages/core/src/rag_core/audit.py — not caused by this PR.

Deep Kumar Singh Kushwah and others added 2 commits May 24, 2026 01:05
Add `packages/ragctl/` — a dedicated workspace member that exposes the
single `ragctl` command, replacing the embedded CLI inside `rag-config`.

Working command groups (carried over from earlier steps):
  - `config validate` / `config diff`          (Step 0.4)
  - `traces`                                   (Step 0.7)
  - `eval run` / `eval show`                   (Step 0.8)
  - `version`                                  (Step 0.10)

Scaffold sub-apps that announce their target step and exit 0, so the
published command shape is stable from day one:
  - `ingest`  → Step 1.10
  - `query`   → Step 3.1
  - `logs`    → Step 5.6
  - `tenant`  → Step 6.1
  - `plugin`  → Step 1.1
  - `secret`  → Step 6.7

Shell completion is enabled via Typer's `--install-completion` and
`--show-completion` flags (bash/zsh/fish/PowerShell).

The `ragctl` entry point now lives in `rag-ragctl`'s pyproject.toml.
The old `rag_config.cli` module is removed; the only internal importer
(`tests/eval/test_cli.py`) is updated to `from ragctl.main import app`.

Side fixes:
  - Add `py.typed` markers to `rag-config` and `rag-observability` so
    downstream mypy can resolve their types.
  - Extend the Typer-friendly `B008` per-file ignore to
    `packages/ragctl/src/ragctl/main.py`.

Tests: 19 new ragctl tests (root smoke, scaffold parametrized over all 6
stubbed groups, completion wiring). Full suite: 499 passed, 1 skipped.

Documentation:
  - `docs/reference/ragctl.md`     — full command reference + internals
  - `docs/guides/ragctl-quickstart.md` — operator quickstart
  - `docs/README.md`               — new reference/ and guides/ index sections
  - `packages/ragctl/README.md`    — package overview

Phase 0 closes: 13/13 steps complete. Next step: 1.1 — Storage backends.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Typer 0.25's Rich-formatted ``--help`` wraps long flag names like
``--install-completion`` across lines in headless CI (no tty → narrow
width), so the substring assertions in test_completion.py failed on
ubuntu-22.04 and macos-14 even though they passed locally.

Replace the substring tests with structural checks on the underlying
Click command's registered params. The completion flags either are or
aren't on the command — that's the real contract we care about and it's
resilient to Rich-formatting quirks.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@officialCodeWork
officialCodeWork merged commit bd8ff4f into main May 23, 2026
10 checks passed
officialCodeWork added a commit that referenced this pull request May 23, 2026
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.

1 participant