Skip to content

Commit 8ade5e1

Browse files
Copilotpelikhan
andcommitted
Enable mcp-gateway in smoke-copilot and remove feature flag
- Move IMPLEMENTATION_SUMMARY.md to specs/mcp-gateway.md - Remove feature flag requirement from gateway.go - Enable mcp-gateway in smoke-copilot.md workflow - Add MCP gateway test requirement to smoke-copilot - Integrate gateway step generation in mcp_servers.go - Update tests to reflect feature flag removal Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
1 parent 6e42e2d commit 8ade5e1

6 files changed

Lines changed: 46 additions & 11 deletions

File tree

.github/workflows/smoke-copilot.lock.yml

Lines changed: 27 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/smoke-copilot.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ network:
2121
- github
2222
sandbox:
2323
agent: awf # Firewall enabled
24+
mcp:
25+
container: ghcr.io/githubnext/mcp-gateway
26+
port: 8080
2427
tools:
2528
cache-memory: true
2629
edit:
@@ -54,7 +57,8 @@ strict: true
5457
3. **Bash Tool Testing**: Execute bash commands to verify file creation was successful (use `cat` to read the file back)
5558
4. **GitHub MCP Default Toolset Testing**: Verify that the `get_me` tool is NOT available with default toolsets. Try to use it and confirm it fails with a tool not found error.
5659
5. **Cache Memory Testing**: Write a test file to `/tmp/gh-aw/cache-memory/smoke-test-${{ github.run_id }}.txt` with content "Cache memory test for run ${{ github.run_id }}" and verify it was created successfully
57-
6. **Available Tools Display**: List all available tools that you have access to in this workflow execution.
60+
6. **MCP Gateway Testing**: Verify that the MCP gateway is running by checking if the container is active and the health endpoint is accessible
61+
7. **Available Tools Display**: List all available tools that you have access to in this workflow execution.
5862

5963
## Output
6064

pkg/workflow/gateway.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"fmt"
66
"strings"
77

8-
"github.com/githubnext/gh-aw/pkg/constants"
98
"github.com/githubnext/gh-aw/pkg/logger"
109
)
1110

@@ -44,8 +43,8 @@ func isMCPGatewayEnabled(workflowData *WorkflowData) bool {
4443
return false
4544
}
4645

47-
// Then check if the feature flag is enabled
48-
return isFeatureEnabled(constants.MCPGatewayFeatureFlag, workflowData)
46+
// MCP gateway is enabled by default when sandbox.mcp is configured
47+
return true
4948
}
5049

5150
// getMCPGatewayConfig extracts the MCPGatewayConfig from sandbox configuration

pkg/workflow/gateway_test.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,27 +129,24 @@ func TestIsMCPGatewayEnabled(t *testing.T) {
129129
expected: false,
130130
},
131131
{
132-
name: "sandbox.mcp without feature flag",
132+
name: "sandbox.mcp configured",
133133
data: &WorkflowData{
134134
SandboxConfig: &SandboxConfig{
135135
MCP: &MCPGatewayConfig{
136136
Container: "test",
137137
},
138138
},
139139
},
140-
expected: false,
140+
expected: true,
141141
},
142142
{
143-
name: "sandbox.mcp with feature flag",
143+
name: "sandbox.mcp configured",
144144
data: &WorkflowData{
145145
SandboxConfig: &SandboxConfig{
146146
MCP: &MCPGatewayConfig{
147147
Container: "test",
148148
},
149149
},
150-
Features: map[string]bool{
151-
"mcp-gateway": true,
152-
},
153150
},
154151
expected: true,
155152
},

pkg/workflow/mcp_servers.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,15 @@ func (c *Compiler) generateMCPSetup(yaml *strings.Builder, tools map[string]any,
542542
yaml.WriteString(" \n")
543543
}
544544

545+
// Generate MCP gateway steps if configured
546+
// Note: Currently passing nil for mcpServersConfig as the gateway is configured via Docker
547+
gatewaySteps := generateMCPGatewaySteps(workflowData, nil)
548+
for _, step := range gatewaySteps {
549+
for _, line := range step {
550+
yaml.WriteString(line + "\n")
551+
}
552+
}
553+
545554
// Use the engine's RenderMCPConfig method
546555
yaml.WriteString(" - name: Setup MCPs\n")
547556

File renamed without changes.

0 commit comments

Comments
 (0)