Repository navigation
ci(mcp-diff): prebuild HTTP server and fail when a side is unreachable - #3440
Merged
Merged
Conversation
The streamable-http job started the server with `go run` and relied on
mcp-server-diff's fixed http_startup_wait_ms sleep. On the baseline
worktree (.mcp-diff-base) nothing is cached, and since the typed tool
refactors compile+link exceeds 5s, so every baseline probe hit
ECONNREFUSED ("fetch failed"). The action treats a one-sided startup
failure as a non-fatal "config-missing" and diffs against an empty
baseline, so fail_on_error never triggered and the job stayed green.
Build the binary in install_command (which completes on both sides
before the server starts) and start it directly, and add a step that
fails the job if any configuration did not start on either side.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The workflow changes correctly address delayed startup and detect previously non-fatal unreachable servers.
Review effort: Balanced
Findings: None
What changed in this PR
Prebuilds the HTTP server during MCP-diff setup and verifies both comparison sides were successfully probed.
Changes:
- Builds and launches a compiled server binary.
- Fails CI on one-sided probe failures.
- Logs protocol versions and tool counts.
| File | Description |
|---|---|
.github/workflows/mcp-diff.yml |
Improves HTTP diff startup reliability and probe validation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
mcp-diff-httpjob has been green without ever reaching the baseline server. This PR prebuilds the server binary on both sides so it is listening before the action probes. It also adds a guard step that fails the job if either the base or the head server could not be reached.Why
go run ./cmd/github-mcp-server http --port 8082.mcp-server-diffv3.0.0 (40d992e) sleeps forhttp_startup_wait_ms(5000) and then probes, with no readiness check..mcp-diff-baseworktree with nothing cached. Since the typed-tool refactors (feat(issues): add typed metadata, comment, and dependency outputs #3391–refactor(actions): type consolidated MCP tools #3398), compiling and linking there takes longer than 5s. Locally,go runin a fresh worktree took 7.5s before it was listening; a prebuilt binary took 0.2s.fetch failed).fail_on_error: truedidn't fail the job (action bug):compareConfigResultstreats a startup failure on only one side asconfigMissing("may not exist on that version"). That is non-fatal, and the working side is diffed against an empty baseline.fail_on_erroronly checksdiffs.has("error"), which is set only when both sides fail. With a single shared HTTP server, an ECONNREFUSED on every config therefore shows up as "25 configuration(s) have API changes" with exit 0.What changed
install_commandnow also runsgo build -o bin/github-mcp-server ./cmd/github-mcp-server. The action runs this to completion on both the PR checkout and the baseline worktree before starting the server, so the 5s wait only covers process startup.http_start_commandis now./bin/github-mcp-server http --port 8082(bin/is gitignored).Verify both sides were probed:::error::<config>: server unreachable on <base|branch> side: …if any config hasconfigMissingon either side.Recommended upstream fixes for
SamMorrowDrums/mcp-server-diff, to be filed separately:core.debug).fail_on_erroralso cover one-sided failures.MCP impact
Prompts tested (tool changes only)
Security / limits
contents: readpermissions.Tool renaming
deprecated_tool_aliases.goLint & tests
./script/lint: not run, since no Go code changed.actionlint .github/workflows/mcp-diff.ymlpassed../script/test: not run, since no Go code changed.I ran the pinned action's
dist/index.jslocally against2d5ad6e, the same commit as the failing main run:fetch failedgo run::error::default: server unreachable on base side: TypeError: fetch faileddefault: base=2026-07-28 head=2026-07-28 tools base=46 head=46I also sent a manual
initializerequest with curl to./bin/github-mcp-server http, using the generatedAuthorizationheader, and it succeeded.Docs