Repository navigation
feat(cli): add dependency doctor command - #80
Conversation
Implementation and tests were developed with OpenAI Codex assistance and verified locally. Signed-off-by: Floze <[email protected]>
rrskris
left a comment
There was a problem hiding this comment.
Verified locally before this approval, both live paths: reachable Postgres → three status lines, exit 0 with optional failures correctly non-fatal; dead Postgres → compose fix printed, exit 2. Full suite 67 passed at 63.24% coverage, matching your numbers. Every acceptance criterion from #77 is met — run_deep_checks reused with zero duplicated logic, deterministic output, and the TypedDict result types are a genuinely nice upgrade the API side gets for free. Docs in three places, checklist filled honestly, DCO signed. First PR here and it's reference quality — welcome, @floze-the-genius! 🎉 Merging on CI green.
If you enjoyed this one: #3 (Prometheus /metrics) or #4 (/rbac/scan/diff) would both build naturally on what you just touched.
|
Marked this ready-for-review on your behalf, @floze-the-genius — the checklist and verification section read complete and it passed my local verification, so I didn't want the draft flag to hold up the merge. If you'd left it draft intentionally, say the word and I'll revert. |
Signed-off-by: Floze <[email protected]> # Conflicts: # control-plane/app/cli.py
Head branch was pushed to by a user without write access
|
Thanks for the approval and local verification. The synchronized head |
|
Merged — thanks for another solid one. |
@floze-the-genius shipped three PRs, but only the bugfix (#100) appeared in the changelog — the two features it built on, GET /rbac/scan/diff (#82) and the kaaval doctor preflight (#80), were missing entirely. Anyone reading the release notes would see the fix to a feature whose arrival was never recorded. Scope of each entry was taken from the merge commits rather than the issue titles: #80 adds the CLI command and typed health results on top of the deep health checks that #75 already provided, so it is credited for the wrapper it actually wrote, not for the checks themselves. Prep for the v1.2.0 release notes, so the credit ships in the release rather than as a later correction. Signed-off-by: Vamshi Krishna Santhapuri <[email protected]>
What this changes
Adds
python -m app.cli doctorfor dependency preflight from the command line.The command:
app.health.run_deep_checksfor Postgres, CVE feed, and Kubernetes checks0when required dependencies pass, including degraded optional checks2when a required dependency failsCloses #77.
Type
Checklist
make testequivalent passes with the CI coverage gate(not applicable: no detection rule)
hack/dev/rbac-fixtures.yamlif it's a new rule(not applicable: no detection rule)
How you verified it
pytest tests/test_cli.py -q: 14 passedpytest tests/ --cov=app --cov-fail-under=60: 67 passed, 63.65% coveragepython -m compileall -q control-plane/appnpm run lint: 0 errors, 7 existing hook warningsnpm run build: successfulAI assistance
Implementation, tests, and documentation were developed with OpenAI Codex
assistance. The contributor reviewed the diff, ran the full local checks above,
and signed off the commit under the DCO.