Repository navigation
Description
Task
T-003b· Milestone M1 — Foundation · Size XS · Priority P1 · Epic #1Implements NFR-CFG-002
Branch
feat/t-003b-command-with-masked-secrets— one task = one branch = one PR (doc 32 §6)
Summary
Add the config CLI group that prints the resolved settings tree and, with --sources, which source set each value.
Context / motivation
Operators debugging a deployment need to see what configuration a process actually resolved (doc 27 §2, runbook doc 30 §1).
Scope
In scope
backend/src/roboprobe/cli/config.pywithshow [--sources] [--json].- Secrets masked as
**********. - Emit log event
config.loadedwith sources only, never values (doc 34 §6).
Implementation guidance
- Use
explain_sources()from T-003a. Render nested keys as dotted paths in a Rich table;--jsonprints a dict for scripting. - Standards: respect the layering contracts (doc 16 §2) and conventions in doc 34; no hard-coded tunables — thresholds/defaults come from typed settings (doc 27); no magic numbers (ruff
PLR2004); public APIs typed (mypy strict) and documented.
Acceptance criteria
-
roboprobe config showlists every key; secrets masked. -
--sourcesshowsdefault|toml|dotenv|env|cli|secret_fileper key. - Exit code 2 with readable errors on invalid config.
- Tests listed below added and green in CI; coverage of new code meets the gate in doc 18 §3.
- Docs, config reference and CHANGELOG
Unreleasedupdated where behaviour, keys or interfaces changed. - Definition of Done (doc 32 §3) satisfied.
Tests required
- CliRunner tests with env/TOML fixtures.
Dependencies
Blocked by: #19 (T-003a), #20 (T-008)
Blocks: no other task (leaf)
Parallelization notes
Files / paths owned by this task — avoid editing other paths; shared files (pyproject.toml entry points, cli/main.py, api/routers/__init__.py, router.tsx, docker/compose.yaml, ci.yml) are append-only:
backend/src/roboprobe/cli/config.pybackend/tests/unit/cli/test_config_cmd.py
Single new module + one registration line in cli/main.py.
Definition of Done
Per doc 32 §3 and AGENTS.md §5: lint, format, mypy strict and import-linter green; tests added and passing; docs updated; PR template completed with Closes #<this issue>; Conventional Commit messages referencing T-003b (doc 16 §6); commits authored only by the repository owner identity (AGENTS.md §4); CI green; reviewer checklist (doc 32 §5.1) satisfied.
References
Design docs: doc 27 §2 · doc 30 §1 · doc 34 §6
Requirements: NFR-CFG-002 (traceability: doc 28)
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsDone
Activity