CI: install dev deps for lint, and test a real MCP handshake - #9
Merged
Merged
Conversation
Two problems, both of which let a broken server reach main. The lint job ran `uv run ruff check` without installing dev dependencies. ruff is declared under [project.optional-dependencies], so it needs --extra dev; without it uv installs runtime deps only and the step dies on "Failed to spawn: ruff". main has been red for at least three merges for this reason alone, which trains everyone to ignore it — the code itself is clean. The test job only asserted that the module imports. That is precisely the class of bug that just shipped: mcp 1.29 made experimental_capabilities a required argument of get_capabilities(), which raises inside the stdio task group at CONNECT time, not import time. The import check stayed green while the server was completely unusable. It now drives a real initialize + tools/list handshake over stdio and asserts tools come back. Verified both ways: the handshake passes on the current code, and fails with "server never returned a tools/list result" when the fix is reverted.
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.
mainhas been red for at least three merges, and not because of the code.Lint ran
uv run ruff checkwithout installing dev deps.ruffis under[project.optional-dependencies], so it needs--extra dev— otherwise the step dies onFailed to spawn: ruff. Locallyruff checkreports All checks passed!, so this was pure CI misconfiguration. A permanently-red main is worse than no CI, because it trains you to ignore it.Test only asserted that the module imports — which is exactly why the
mcp1.29 breakage reached main.get_capabilities()gained a requiredexperimental_capabilitiesargument, and the resultingTypeErrorfires inside the stdio task group when a client connects, not on import. The import check stayed green while the server was completely unusable in every Claude Code session.It now drives a real
initialize+tools/listhandshake over stdio and asserts the tools come back.Verified both directions locally:
handshake OK, 8 toolsAssertionError: server never returned a tools/list result, exit 1