Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/smoke-codex.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions .github/workflows/smoke-codex.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ tools:
serena:
languages:
go: {}
web-fetch:
runtimes:
go:
version: "1.25"
Expand Down Expand Up @@ -78,9 +79,10 @@ timeout-minutes: 15
- Use the Serena MCP server tool `activate_project` to initialize the workspace at `${{ github.workspace }}` and verify it succeeds (do NOT use bash to run go commands)
- After initialization, use the `find_symbol` tool to search for symbols and verify that at least 3 symbols are found in the results
3. **Playwright Testing**: Use the playwright tools to navigate to https://github.com and verify the page title contains "GitHub" (do NOT try to install playwright - use the provided MCP tools)
4. **File Writing Testing**: Create a test file `/tmp/gh-aw/agent/smoke-test-codex-${{ github.run_id }}.txt` with content "Smoke test passed for Codex at $(date)" (create the directory if it doesn't exist)
5. **Bash Tool Testing**: Execute bash commands to verify file creation was successful (use `cat` to read the file back)
6. **Build gh-aw**: Run `GOCACHE=/tmp/go-cache GOMODCACHE=/tmp/go-mod make build` to verify the agent can successfully build the gh-aw project (both caches must be set to /tmp because the default cache locations are not writable). If the command fails, mark this test as ❌ and report the failure.
4. **Web Fetch Testing**: Use the web-fetch MCP tool to fetch https://github.com and verify the response contains "GitHub" (do NOT use bash or playwright for this test - use the web-fetch MCP tool directly)
5. **File Writing Testing**: Create a test file `/tmp/gh-aw/agent/smoke-test-codex-${{ github.run_id }}.txt` with content "Smoke test passed for Codex at $(date)" (create the directory if it doesn't exist)
6. **Bash Tool Testing**: Execute bash commands to verify file creation was successful (use `cat` to read the file back)
7. **Build gh-aw**: Run `GOCACHE=/tmp/go-cache GOMODCACHE=/tmp/go-mod make build` to verify the agent can successfully build the gh-aw project (both caches must be set to /tmp because the default cache locations are not writable). If the command fails, mark this test as ❌ and report the failure.

## Output

Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/smoke-copilot.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,17 @@ strict: true
- Use the Serena MCP server tool `activate_project` to initialize the workspace at `${{ github.workspace }}` and verify it succeeds (do NOT use bash to run go commands - use Serena's MCP tools)
- After initialization, use the `find_symbol` tool to search for symbols (find which tool to call) and verify that at least 3 symbols are found in the results
4. **Playwright Testing**: Use the playwright tools to navigate to <https://github.com> and verify the page title contains "GitHub" (do NOT try to install playwright - use the provided MCP tools)
5. **File Writing Testing**: Create a test file `/tmp/gh-aw/agent/smoke-test-copilot-${{ github.run_id }}.txt` with content "Smoke test passed for Copilot at $(date)" (create the directory if it doesn't exist)
6. **Bash Tool Testing**: Execute bash commands to verify file creation was successful (use `cat` to read the file back)
7. **Discussion Interaction Testing**:
5. **Web Fetch Testing**: Use the web-fetch tool to fetch https://github.com and verify the response contains "GitHub" (do NOT use bash or playwright for this test - use the web-fetch tool directly)
6. **File Writing Testing**: Create a test file `/tmp/gh-aw/agent/smoke-test-copilot-${{ github.run_id }}.txt` with content "Smoke test passed for Copilot at $(date)" (create the directory if it doesn't exist)
7. **Bash Tool Testing**: Execute bash commands to verify file creation was successful (use `cat` to read the file back)
8. **Discussion Interaction Testing**:
- Use the `github-discussion-query` safe-input tool with params: `limit=1, jq=".[0]"` to get the latest discussion from ${{ github.repository }}
- Extract the discussion number from the result (e.g., if the result is `{"number": 123, "title": "...", ...}`, extract 123)
- Use the `add_comment` tool with `discussion_number: <extracted_number>` to add a fun, playful comment stating that the smoke test agent was here
8. **Build gh-aw**: Run `GOCACHE=/tmp/go-cache GOMODCACHE=/tmp/go-mod make build` to verify the agent can successfully build the gh-aw project (both caches must be set to /tmp because the default cache locations are not writable). If the command fails, mark this test as ❌ and report the failure.
9. **Discussion Creation Testing**: Use the `create_discussion` safe-output tool to create a discussion in the announcements category titled "copilot was here" with the label "ai-generated"
10. **Workflow Dispatch Testing**: Use the `dispatch_workflow` safe output tool to trigger the `haiku-printer` workflow with a haiku as the message input. Create an original, creative haiku about software testing or automation.
11. **PR Review Testing**: Review the diff of the current pull request. Leave 1-2 inline `create_pull_request_review_comment` comments on specific lines, then call `submit_pull_request_review` with a brief body summarizing your review and event `COMMENT`.
9. **Build gh-aw**: Run `GOCACHE=/tmp/go-cache GOMODCACHE=/tmp/go-mod make build` to verify the agent can successfully build the gh-aw project (both caches must be set to /tmp because the default cache locations are not writable). If the command fails, mark this test as ❌ and report the failure.
10. **Discussion Creation Testing**: Use the `create_discussion` safe-output tool to create a discussion in the announcements category titled "copilot was here" with the label "ai-generated"
11. **Workflow Dispatch Testing**: Use the `dispatch_workflow` safe output tool to trigger the `haiku-printer` workflow with a haiku as the message input. Create an original, creative haiku about software testing or automation.
12. **PR Review Testing**: Review the diff of the current pull request. Leave 1-2 inline `create_pull_request_review_comment` comments on specific lines, then call `submit_pull_request_review` with a brief body summarizing your review and event `COMMENT`.

## Output

Expand All @@ -150,7 +151,7 @@ strict: true
- Overall status: PASS or FAIL
- Mention the pull request author and any assignees

3. Use the `add_comment` tool to add a **fun and creative comment** to the latest discussion (using the `discussion_number` you extracted in step 7) - be playful and entertaining in your comment
3. Use the `add_comment` tool to add a **fun and creative comment** to the latest discussion (using the `discussion_number` you extracted in step 8) - be playful and entertaining in your comment

4. Use the `send_slack_message` tool to send a brief summary message (e.g., "Smoke test ${{ github.run_id }}: All tests passed! ✅")

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/smoke-gemini.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions .github/workflows/smoke-gemini.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ tools:
edit:
bash:
- "*"
web-fetch:
safe-outputs:
add-comment:
hide-older-comments: true
Expand Down Expand Up @@ -58,9 +59,10 @@ timeout-minutes: 10
## Test Requirements

1. **GitHub MCP Testing**: Use GitHub MCP tools to fetch details of exactly 2 merged pull requests from ${{ github.repository }} (title and number only)
2. **File Writing Testing**: Create a test file `/tmp/gh-aw/agent/smoke-test-gemini-${{ github.run_id }}.txt` with content "Smoke test passed for Gemini at $(date)" (create the directory if it doesn't exist)
3. **Bash Tool Testing**: Execute bash commands to verify file creation was successful (use `cat` to read the file back)
4. **Build gh-aw**: Run `GOCACHE=/tmp/go-cache GOMODCACHE=/tmp/go-mod make build` to verify the agent can successfully build the gh-aw project. If the command fails, mark this test as ❌ and report the failure.
2. **Web Fetch Testing**: Use the web-fetch MCP tool to fetch https://github.com and verify the response contains "GitHub" (do NOT use bash or playwright for this test - use the web-fetch MCP tool directly)
3. **File Writing Testing**: Create a test file `/tmp/gh-aw/agent/smoke-test-gemini-${{ github.run_id }}.txt` with content "Smoke test passed for Gemini at $(date)" (create the directory if it doesn't exist)
4. **Bash Tool Testing**: Execute bash commands to verify file creation was successful (use `cat` to read the file back)
5. **Build gh-aw**: Run `GOCACHE=/tmp/go-cache GOMODCACHE=/tmp/go-mod make build` to verify the agent can successfully build the gh-aw project. If the command fails, mark this test as ❌ and report the failure.

## Output

Expand Down
20 changes: 4 additions & 16 deletions pkg/workflow/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,31 +59,19 @@ func renderMCPFetchServerConfig(yaml *strings.Builder, format string, indent str
switch format {
case "json":
// JSON format (for Claude, Copilot, Custom engines)
// Use container key per MCP Gateway schema (container-based stdio server)
yaml.WriteString(indent + "\"web-fetch\": {\n")
yaml.WriteString(indent + " \"command\": \"docker\",\n")
yaml.WriteString(indent + " \"args\": [\n")
yaml.WriteString(indent + " \"run\",\n")
yaml.WriteString(indent + " \"-i\",\n")
yaml.WriteString(indent + " \"--rm\",\n")
yaml.WriteString(indent + " \"mcp/fetch\"\n")
yaml.WriteString(indent + " ]\n")
// Note: tools field is NOT included here - the converter script adds it back
// for Copilot. This keeps the gateway config compatible with the schema.
yaml.WriteString(indent + " \"container\": \"mcp/fetch\"\n")
if isLast {
yaml.WriteString(indent + "}\n")
} else {
yaml.WriteString(indent + "},\n")
}
case "toml":
// TOML format (for Codex engine)
// Use container key per MCP Gateway schema (container-based stdio server)
yaml.WriteString(indent + "\n")
yaml.WriteString(indent + "[mcp_servers.\"web-fetch\"]\n")
yaml.WriteString(indent + "command = \"docker\"\n")
yaml.WriteString(indent + "args = [\n")
yaml.WriteString(indent + " \"run\",\n")
yaml.WriteString(indent + " \"-i\",\n")
yaml.WriteString(indent + " \"--rm\",\n")
yaml.WriteString(indent + " \"mcp/fetch\"\n")
yaml.WriteString(indent + "]\n")
yaml.WriteString(indent + "container = \"mcp/fetch\"\n")
}
}
25 changes: 10 additions & 15 deletions pkg/workflow/fetch_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,9 @@ Fetch content from the web.
t.Errorf("Expected compiled workflow to contain web-fetch MCP server configuration, but it didn't")
}

// Verify the Docker command is present
if !strings.Contains(lockContent, `"mcp/fetch"`) {
t.Errorf("Expected web-fetch MCP server to use the mcp/fetch Docker image, but it didn't")
}

// Verify that the MCP server is configured with Docker
if !strings.Contains(lockContent, `command = "docker"`) {
t.Errorf("Expected web-fetch MCP server to have Docker command")
// Verify the container image is present (MCP Gateway schema: container key)
if !strings.Contains(lockContent, `container = "mcp/fetch"`) {
t.Errorf("Expected web-fetch MCP server to use the mcp/fetch container image, but it didn't")
}
}

Expand Down Expand Up @@ -124,13 +119,13 @@ Fetch content from the web.
lockContent := string(lockData)

// Claude uses JSON format, check that web-fetch is NOT configured as an MCP server
// Look for the MCP server configuration pattern with "command": "docker"
// Look for the MCP server configuration pattern with "container": "mcp/fetch"
// We can't simply search for "web-fetch" because Claude will have it in the allowed tools
if strings.Contains(lockContent, `"web-fetch": {`) && strings.Contains(lockContent, `"command": "docker"`) {
if strings.Contains(lockContent, `"web-fetch": {`) && strings.Contains(lockContent, `"container": "mcp/fetch"`) {
// Check if both appear close together (indicating MCP server config)
dockerIdx := strings.Index(lockContent, `"command": "docker"`)
containerIdx := strings.Index(lockContent, `"container": "mcp/fetch"`)
webFetchIdx := strings.Index(lockContent, `"web-fetch": {`)
if dockerIdx > 0 && webFetchIdx > 0 && dockerIdx-webFetchIdx < 200 {
if containerIdx > 0 && webFetchIdx > 0 && containerIdx-webFetchIdx < 200 {
t.Errorf("Expected Claude workflow NOT to contain web-fetch MCP server (since Claude has native web-fetch support), but it did")
}
}
Expand Down Expand Up @@ -194,10 +189,10 @@ Fetch content from the web.
}

// Also check for JSON format MCP server config
if strings.Contains(lockContent, `"web-fetch": {`) && strings.Contains(lockContent, `"command": "docker"`) {
dockerIdx := strings.Index(lockContent, `"command": "docker"`)
if strings.Contains(lockContent, `"web-fetch": {`) && strings.Contains(lockContent, `"container": "mcp/fetch"`) {
containerIdx := strings.Index(lockContent, `"container": "mcp/fetch"`)
webFetchIdx := strings.Index(lockContent, `"web-fetch": {`)
if dockerIdx > 0 && webFetchIdx > 0 && dockerIdx-webFetchIdx < 200 {
if containerIdx > 0 && webFetchIdx > 0 && containerIdx-webFetchIdx < 200 {
t.Errorf("Expected Copilot workflow NOT to contain web-fetch MCP server, but it did")
}
}
Expand Down
15 changes: 5 additions & 10 deletions pkg/workflow/fetch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,7 @@ func TestRenderMCPFetchServerConfig(t *testing.T) {
includeTools: false,
expectSubstr: []string{
`"web-fetch": {`,
`"command": "docker"`,
`"mcp/fetch"`,
`"container": "mcp/fetch"`,
`},`,
},
},
Expand All @@ -145,8 +144,7 @@ func TestRenderMCPFetchServerConfig(t *testing.T) {
includeTools: false,
expectSubstr: []string{
`"web-fetch": {`,
`"command": "docker"`,
`"mcp/fetch"`,
`"container": "mcp/fetch"`,
`}`, // No comma
},
},
Expand All @@ -158,8 +156,7 @@ func TestRenderMCPFetchServerConfig(t *testing.T) {
includeTools: true,
expectSubstr: []string{
`"web-fetch": {`,
`"command": "docker"`,
`"mcp/fetch"`,
`"container": "mcp/fetch"`,
`},`,
},
},
Expand All @@ -171,8 +168,7 @@ func TestRenderMCPFetchServerConfig(t *testing.T) {
includeTools: true,
expectSubstr: []string{
`"web-fetch": {`,
`"command": "docker"`,
`"mcp/fetch"`,
`"container": "mcp/fetch"`,
`}`, // No comma
},
},
Expand All @@ -184,8 +180,7 @@ func TestRenderMCPFetchServerConfig(t *testing.T) {
includeTools: false,
expectSubstr: []string{
`[mcp_servers."web-fetch"]`,
`command = "docker"`,
`"mcp/fetch"`,
`container = "mcp/fetch"`,
},
},
}
Expand Down
1 change: 1 addition & 0 deletions smoke-test-claude-22292196576.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Smoke test file - Run 22292196576