From 5107bf203190ebbe171ee4fbe956248ab337aa16 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Feb 2026 15:54:19 +0000 Subject: [PATCH 1/2] Initial plan From 5e262435079895125f45a811a97b72fe58e55f0d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Feb 2026 15:59:20 +0000 Subject: [PATCH 2/2] Reject mounts field for HTTP servers (T-CFG-019) Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> --- internal/config/config_stdin_test.go | 1 - internal/config/validation.go | 6 +++++- internal/config/validation_test.go | 10 ++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/internal/config/config_stdin_test.go b/internal/config/config_stdin_test.go index 15f243b7..17985547 100644 --- a/internal/config/config_stdin_test.go +++ b/internal/config/config_stdin_test.go @@ -439,7 +439,6 @@ func TestConvertStdinServerConfig_HTTPServerNoDockerArgs(t *testing.T) { Entrypoint: "/ignored", EntrypointArgs: []string{"ignored"}, Args: []string{"--ignored"}, - Mounts: []string{"/ignored:/ignored"}, Env: map[string]string{ "IGNORED": "ignored", }, diff --git a/internal/config/validation.go b/internal/config/validation.go index 66bb1a52..ff663eff 100644 --- a/internal/config/validation.go +++ b/internal/config/validation.go @@ -144,12 +144,16 @@ func validateStandardServerConfig(name string, server *StdinServerConfig, jsonPa } } - // For HTTP servers, url is required + // For HTTP servers, url is required and mounts are not allowed if server.Type == "http" { if server.URL == "" { logValidation.Printf("Validation failed: HTTP server missing url field, name=%s", name) return rules.MissingRequired("url", "HTTP", jsonPath, "Add a 'url' field (e.g., \"https://example.com/mcp\")") } + if len(server.Mounts) > 0 { + logValidation.Printf("Validation failed: HTTP server has mounts field, name=%s", name) + return rules.UnsupportedField("mounts", "mounts are only supported for stdio (containerized) servers", jsonPath, "Remove the 'mounts' field from HTTP server configuration; mounts only apply to stdio servers") + } } logValidation.Printf("Server config validation passed: name=%s", name) diff --git a/internal/config/validation_test.go b/internal/config/validation_test.go index d3c75c85..53cc1ad6 100644 --- a/internal/config/validation_test.go +++ b/internal/config/validation_test.go @@ -284,6 +284,16 @@ func TestValidateStdioServer(t *testing.T) { }, shouldErr: false, }, + { + name: "http server with mounts should be rejected (T-CFG-019)", + server: &StdinServerConfig{ + Type: "http", + URL: "https://example.com/mcp", + Mounts: []string{"/host/path:/container/path:ro"}, + }, + shouldErr: true, + errorMsg: "mounts are only supported for stdio", + }, { name: "empty type defaults to stdio with container", server: &StdinServerConfig{