Skip to content

fix: resolve MCP registry test CI failure - #38

Merged
OkiriGabriel merged 2 commits into
mainfrom
fix/mcp-registry-test
Aug 1, 2026
Merged

OkiriGabriel merged 2 commits into
mainfrom
fix/mcp-registry-test

Conversation

@OkiriGabriel

Copy link
Copy Markdown
Collaborator

Summary

  • Fixes failing tests/test_mcp.py::test_register_agent_tools_registers_all_tools on CI
  • Removes unnecessary patch("devops_mcp.registry.*") calls that raised AttributeError: module 'devops_mcp' has no attribute 'registry'
  • Test now imports register_agent_tools directly and passes mock mcp/agent (which is all the function uses)

Context

This failure was blocking PRs #35, #36, and #37 — all unrelated to MCP; they were failing on the same pre-existing main CI issue.

Test plan

  • pytest tests/test_mcp.py -v (passes when mcp is installed, as in CI)
  • CI green on this PR

Made with Cursor

OkiriGabriel and others added 2 commits August 1, 2026 09:31
Remove unnecessary patch() calls that failed with AttributeError when
unittest.mock tried to resolve devops_mcp.registry before the submodule
was loaded. register_agent_tools only uses the mcp/agent mocks passed in.

Co-authored-by: Cursor <[email protected]>
mcp 2.0.0 on PyPI no longer provides mcp.server.fastmcp, which broke CI
and the registry import. Pin to >=1.9.0,<2.0.0 and test register_agent_tools
with mock mcp/agent instances directly.

Co-authored-by: Cursor <[email protected]>
@OkiriGabriel
OkiriGabriel merged commit 48cec1f into main Aug 1, 2026
10 checks passed
@OkiriGabriel
OkiriGabriel deleted the fix/mcp-registry-test branch August 1, 2026 08:35
OkiriGabriel pushed a commit that referenced this pull request Aug 17, 2026
The <2.0.0 cap landed in PR #38 but with no rationale in the file, so a
future bump could silently re-remove it. mcp 2.0.0 removed
mcp.server.fastmcp, which devops_mcp/registry.py and
devops_mcp/server.py import; without the cap a fresh install resolves
mcp 2.0.0 and tests/test_mcp.py::test_register_agent_tools_registers_all_tools
fails at import (ModuleNotFoundError: No module named 'mcp.server.fastmcp').

Co-Authored-By: Kimi K3 <[email protected]>
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