internal: Add label filter and display to arctl get #638
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 300 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.341
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #638"
general
weight: 0.35
lcopi
Description
arctl gethad no way to filter or display resource labels, even thoughcontent-registry kinds (agents, mcps, skills, prompts, plugins, models)
already carry a queryable
labelsmap on their metadata.This adds two flags:
-l/--labels: filters list output by comma-separatedkey=valuepairs,forwarded through
scheme.ListOptsinto the existingclient.ListOpts.Labelsquery param. It's restricted to content kinds(those with
ListTagsset) and to list mode, mirroring the existing--tag/--latestguards. It's rejected underget allfor now sincethat command builds a fresh
ListOptsper kind and mixes in kinds thatdon't support the filter at all — extending it there is a natural
follow-up.
--show-labels: a kubectl-style flag that appends a trailingLABELScolumn to table output with each row's sorted
key=valuepairs (or<none>). It reads metadata directly off thev1alpha1.Objectinterface, so it works uniformly across every registered kind without
touching per-kind
RowFuncimplementations.Change Type
/kind feature
Changelog
``
release-note-l/--labelsAdd
and--show-labelsflags toarctl getfor filtering and
`displaying resource labels.
Additional Notes
Follow-ups intentionally left out of this PR:
selection support.runGetAllcurrently buildsa fresh ListOpts
per kind itself rather than threading the caller's
arctl delete -l <label>flags through, and mixes in non-content kinds that don't support the
filter at all — extending it needs a small refactor of that dispatch path.
(bulk delete by label selector).deletehas noTYPE NAMElist mode today — it requires an explicit
or-f FILE— so
--dry-runthis would be a new list-then-delete flow with its own safety
considerations (partial-failure handling, possibly a confirmation or
), not a small addition.
Revisiting whether --all-tagsshould be reworked or removed, possibly inget all -lthe same pass as the
refactor above.
Label selection intentionally stays simple key=value equality matching, --selectornot kubectl's fuller
expression language (set-based
in/notin/exists operators). The current v1alpha1 metadata envelope
internal/cli/declarative` could use some general cleanup/TLC independentdoesn't need that expressiveness yet.
of this change.