feat: helm_list_releases — release status reachable over MCP/agent - #163
Merged
Conversation
…P/agent (#161) Helm releases had no read tool at all: an MCP host or the built-in agent could not see release status/chart/revision without the user driving the TUI. - KubeClient.list_helm_releases: LIST-only latest-revision-per-release from the helm-owned Secrets (same parsing as the browser's synthetic kind - no helm binary, no [agent] extra); ReadOps gains the abstractmethod, the eval FakeKubeClient parses scenario Secrets. - registry: helm_list_releases cluster_read on all surfaces, with a concise small-profile description (250-char budget). - executor: one line per release reusing the #158 facts renderers - revision/status/chart/app_version parity with the TUI table for free. - follow mode: mirrors as agent_navigate('helm'); the pairing test forced the FOLLOWABLE decision. Navigation-mirror mapping extracted to a table (C901). - docs/mcp.md: surface summary + follow-mode table. Closes #161 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds Helm release status as a read-only tool across agent and MCP surfaces.
Changes:
- Lists latest Helm release revisions from cluster Secrets.
- Adds formatted executor output and follow-mode navigation.
- Updates interfaces, eval fakes, tests, profiles, and MCP docs.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/korvid/k8s/client.py |
Implements Helm release listing. |
src/korvid/k8s/reads.py |
Extends the read interface. |
src/korvid/k8s/evals/fake_kube.py |
Adds scenario-backed listing. |
src/korvid/tools/registry.py |
Registers the new tool. |
src/korvid/tools/executor.py |
Formats release results. |
src/korvid/tools/follow.py |
Mirrors calls to the Helm view. |
src/korvid/agent/profiles.py |
Adds the small-profile description. |
tests/k8s/test_helm.py |
Tests selection and query scope. |
tests/tools/test_list_resources.py |
Tests tool output and errors. |
tests/tools/test_follow.py |
Tests follow-mode behavior. |
tests/tools/test_registry.py |
Updates surface-order expectations. |
tests/tools/test_executor.py |
Updates read-tool expectations. |
docs/mcp.md |
Documents availability and follow mode. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
APPROVE — issue #161 helm_list_releases 신규 리뷰.
확인한 내용:
KubeClient.list_helm_releases가 TUI helm 브라우저와 동일한 Secret 파싱 경로(release_from_secret+ type/owner 셀렉터_helm_secrets_query)를 재사용 — LIST-only, helm 바이너리 불필요. 최신 revision 축약 로직이 client/FakeKubeClient 양쪽에서 동일함을 head에서 검증.- 출력 라인의
r.namespace/r.name은_clamp미적용이지만 둘 다 K8s label-value/DNS-1123 제약(개행·제어문자 불가) 값이라 #156/#162 계열 위조 주입 표면이 없고, 나머지 facts(revision/status/chart/app_version)는summary_facts→_clamp경로로 이미 flatten+bound 처리됨 (_list_resources와 동일한 관례). - follow 모드:
_NAVIGATE_MIRRORS테이블 추출로list_operators분기와 통합, FOLLOWABLE 페어링 테스트가 신규 툴을 강제 — 미러 결정이 컴파일 타임에 잡히는 설계 유지. - 테스트 실질성: cluster-wide 경로에서
labelSelector=owner%3Dhelm실제 쿼리 문자열 단언, 혼합 revision 축약,(none)/ERROR passthrough, 미러 뷰 매핑 모두 실제 동작 검증. - registry 골든 순서 테스트/small-profile 250자 예산 준수 확인.
지적사항 없음. 좋은 작업입니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #161 (split from #158)
What
helm_list_releases— acluster_readtool on every surface (full/small agent + MCP), so release status is finally reachable without the user driving the TUI:How
KubeClient.list_helm_releases(namespace|None): LIST-only, latest revision per release, from the helm-owned release Secrets (type=helm.sh/release.v1+owner=helmselectors) — the exact parsing path the TUI's synthetichelmreleaseskind uses. No helm binary, no[agent]extra.ReadOpsgains the abstractmethod; the eval harness'sFakeKubeClientimplements it by parsing scenario Secrets (same latest-revision reduction).HelmReleaseSummary→revision= status= chart= app_version=), so TUI/tool parity is free — all values already clamped/flattened by_clamp.agent_navigate("helm"); the FOLLOWABLE/UNMIRRORED pairing test forced the decision at compile time as designed. The navigation-mirror branch was extracted to a small table (_NAVIGATE_MIRRORS) for C901.test_small_profile_trims_verbose_descriptionscaught the verbose one).Testing
tests/k8s/test_helm.py::TestListHelmReleases: latest-revision reduction across mixed revisions/statuses; cluster-wide path + helm-owner selectors when namespace omitted.tests/tools/test_list_resources.py: end-to-end tool output (facts line),(none), and error passthrough.tests/tools/test_follow.py: mirror mapping + the pairing test now covers the new tool.diagnose_pod).Full gate green: ruff, mypy --strict, tach, 2976 passed / 21 skipped, coverage ≥ 80%.