Skip to content

CI: install dev deps for lint, and test a real MCP handshake - #9

Merged
odfalik merged 1 commit into
mainfrom
fix/ci-lint-and-handshake
Aug 2, 2026
Merged

odfalik merged 1 commit into
mainfrom
fix/ci-lint-and-handshake

Conversation

@odfalik

@odfalik odfalik commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

main has been red for at least three merges, and not because of the code.

Lint ran uv run ruff check without installing dev deps. ruff is under [project.optional-dependencies], so it needs --extra dev — otherwise the step dies on Failed to spawn: ruff. Locally ruff check reports 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 mcp 1.29 breakage reached main. get_capabilities() gained a required experimental_capabilities argument, and the resulting TypeError fires 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/list handshake over stdio and asserts the tools come back.

Verified both directions locally:

  • current code → handshake OK, 8 tools
  • fix reverted → AssertionError: server never returned a tools/list result, exit 1

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.
@odfalik
odfalik merged commit 3511bb0 into main Aug 2, 2026
4 checks passed
@odfalik
odfalik deleted the fix/ci-lint-and-handshake branch August 2, 2026 01:31
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.

1 participant