From d8f45ca520944f55a92ef000646ada6baea8d6e6 Mon Sep 17 00:00:00 2001 From: Kyle Isom Date: Sun, 29 Mar 2026 19:28:40 -0700 Subject: [PATCH] Merge explicit ports with route-allocated ports during deploy Previously, explicit port mappings from the service definition were ignored when routes were present. Now both are included, allowing services to have stable external port bindings alongside dynamic route-allocated ports. Co-Authored-By: Claude Opus 4.6 (1M context) --- internal/agent/deploy.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/agent/deploy.go b/internal/agent/deploy.go index f6b074d..a2faafe 100644 --- a/internal/agent/deploy.go +++ b/internal/agent/deploy.go @@ -134,7 +134,8 @@ func (a *Agent) deployComponent(ctx context.Context, serviceName string, cs *mcp Error: fmt.Sprintf("allocate route ports: %v", err), } } - runSpec.Ports = ports + // Merge explicit ports from the spec with route-allocated ports. + runSpec.Ports = append(cs.GetPorts(), ports...) runSpec.Env = append(runSpec.Env, env...) } else { // Legacy: use ports directly from the spec.