From 7383b370f0741a7b04377a030e8671977481170e Mon Sep 17 00:00:00 2001 From: Kyle Isom Date: Sat, 28 Mar 2026 19:13:02 -0700 Subject: [PATCH] Fix mcp ps showing registry version instead of runtime, error on unknown component mcp ps now uses the actual container image and version from the runtime instead of the registry, which could be stale after a failed deploy. Deploy now returns an error when the component filter matches nothing instead of silently succeeding with zero results. Co-Authored-By: Claude Opus 4.6 (1M context) --- internal/agent/deploy.go | 3 +++ internal/agent/status.go | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/internal/agent/deploy.go b/internal/agent/deploy.go index 87e3478..f6b074d 100644 --- a/internal/agent/deploy.go +++ b/internal/agent/deploy.go @@ -34,6 +34,9 @@ func (a *Agent) Deploy(ctx context.Context, req *mcpv1.DeployRequest) (*mcpv1.De filtered = append(filtered, cs) } } + if len(filtered) == 0 { + return nil, fmt.Errorf("component %q not found in service %q", target, serviceName) + } components = filtered } diff --git a/internal/agent/status.go b/internal/agent/status.go index 547a8f4..0a93b8c 100644 --- a/internal/agent/status.go +++ b/internal/agent/status.go @@ -99,6 +99,12 @@ func (a *Agent) liveCheckServices(ctx context.Context) ([]*mcpv1.ServiceInfo, er if rc, ok := runtimeByName[containerName]; ok { ci.ObservedState = rc.State + if rc.Version != "" { + ci.Version = rc.Version + } + if rc.Image != "" { + ci.Image = rc.Image + } if !rc.Started.IsZero() { ci.Started = timestamppb.New(rc.Started) }