Skip to content

Add CI test for MCP server compile tool error handling#8938

Merged
pelikhan merged 2 commits into
mainfrom
copilot/add-ci-job-compile-gh-aw
Jan 4, 2026
Merged

Add CI test for MCP server compile tool error handling#8938
pelikhan merged 2 commits into
mainfrom
copilot/add-ci-job-compile-gh-aw

Conversation

Copilot AI commented Jan 4, 2026

Copy link
Copy Markdown
Contributor

Adds CI validation that the gh-aw MCP server correctly exposes the compile tool and returns errors for invalid workflows.

Changes

  • New CI job mcp-server-compile-test that:
    • Spawns MCP server via Go SDK's stdio transport
    • Invokes compile tool through MCP protocol
    • Validates error response structure (valid: false, errors array)
    • Tests with workflow containing invalid frontmatter field

Implementation

// Connects to MCP server and calls compile tool
client := mcp.NewClient(&mcp.Implementation{
    Name: "ci-test-client", Version: "1.0.0",
}, nil)

serverCmd := exec.Command(binaryPath, "mcp-server", "--cmd", binaryPath)
session, _ := client.Connect(ctx, &mcp.CommandTransport{Command: serverCmd}, nil)

// Invoke compile on invalid workflow
result, err := session.CallTool(ctx, &mcp.CallToolParams{
    Name: "compile",
    Arguments: map[string]any{"workflows": []string{"test-invalid.md"}},
})

The test verifies end-to-end MCP server functionality: tool discovery, invocation, and error propagation for validation failures.

Original prompt

Add new ci.yml job that runs a compile command through the gh-aw MCP server.

  • builds gh-aw
  • launches the gh-aw mcp-server
  • uses the inspect command to invoke the "compile" tool and retrieve the output

The tool should emit an error.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add new ci.yml job for compiling gh-aw Add CI test for MCP server compile tool error handling Jan 4, 2026
Copilot AI requested a review from pelikhan January 4, 2026 21:59
@pelikhan pelikhan marked this pull request as ready for review January 4, 2026 22:03
@pelikhan pelikhan merged commit 25cc141 into main Jan 4, 2026
162 of 164 checks passed
@pelikhan pelikhan deleted the copilot/add-ci-job-compile-gh-aw branch January 4, 2026 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants