Skip to content

ci: Repair the broken verification gate (pytest -q) - #2

Draft
exploring-curiosity wants to merge 2 commits into
mainfrom
ci/repair-the-broken-verification-gate-pyte-1
Draft

ci: Repair the broken verification gate (pytest -q)#2
exploring-curiosity wants to merge 2 commits into
mainfrom
ci/repair-the-broken-verification-gate-pyte-1

Conversation

@exploring-curiosity

@exploring-curiosity exploring-curiosity commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Closes #1

What changed

The verification gate for this repository is broken, so no change can be proven
safe and nothing can be merged until it is fixed.

Failing command: pytest -q

Output:

==================================== ERRORS ====================================
___________ ERROR collecting tests/test_mcp_numerical_corpus_tool.py ___________
ImportError while importing test module '/Users/sudharshanramesh/Studies/MyProjects/OpenBenchPublisher/tests/test_mcp_numerical_corpus_tool.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../../.local/share/uv/python/cpython-3.12.12-macos-aarch64-none/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/test_mcp_numerical_corpus_tool.py:10: in <module>
    from apps.mcp_agent_main import app, build_labeled_numerical_corpus
apps/mcp_agent_main.py:15: in <module>
    from mcp_agent.app import MCPApp
../../../.autobuilder/envs/OpenBenchPublisher/lib/python3.12/site-packages/mcp_agent/app.py:25: in <module>
    from mcp.server.fastmcp import FastMCP
E   ModuleNotFoundError: No module named 'mcp.server.fastmcp'
_____________ ERROR collecting tests/test_mcp_text_corpus_tool.py ______________
ImportError while importing test module '/Users/sudharshanramesh/Studies/MyProjects/OpenBenchPublisher/tests/test_mcp_text_corpus_tool.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../../.local/share/uv/python/cpython-3.12.12-macos-aarch64-none/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/test_mcp_text_corpus_tool.py:10: in <module>
    from apps.mcp_agent_main import app, build_labeled_text_corpus
apps/mcp_agent_main.py:15: in <module>
    from mcp_agent.app import MCPApp
../../../.autobuilder/envs/OpenBenchPublisher/lib/python3.12/site-packages/mcp_agent/app.py:25: in <module>
    from mcp.server.fastmcp import FastMCP
E   ModuleNotFoundError: No module named 'mcp.server.fastmcp'
=============================== warnings summary ===============================
obp/config.py:14
  /Users/sudharshanramesh/Studies/MyProjects/OpenBenchPublisher/obp/config.py:14: PydanticDeprecatedSince20: Support for class-based `config` is deprecated, use ConfigDict instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.13/migration/
    class Settings(BaseModel):

-- Docs: https://docs.pytest.org/en/stable/

Repair the test suite so this command runs and passes on a clean checkout.

Rules:

  • Fix the cause. Do NOT delete, skip, or comment out tests to make the command
    pass - that removes the verification rather than repairing it.
  • If a test depends on a service or credential that is unavailable locally,
    make it skip explicitly (for example pytest.mark.skipif) with a clear
    reason, rather than deleting it.
  • Missing local dev dependencies may be added to the project's dev extras.
  • Do not change application behaviour to make a test pass; fix the test or its
    setup.

Success means pytest -q exits zero on a clean checkout of this repo.

Approach

The error is caused by an outdated import in apps/mcp_agent_main.py which tries to import FastMCP from mcp.server.fastmcp. This module path has changed in newer versions of the mcp library. I will update the import statement in apps/mcp_agent_main.py to use the correct path mcp.server.fastmcp (or check the correct path based on the library version, likely mcp.server.fastmcp is now mcp.server.fastmcp or similar, but the error says No module named 'mcp.server.fastmcp'. Looking at typical MCP library updates, FastMCP is often in mcp.server.fastmcp or mcp.server. Let's assume the library structure changed. A common change is from mcp.server.fastmcp import FastMCP to from mcp.server import FastMCP or similar. However, without running the code, I must infer. The error is No module named 'mcp.server.fastmcp'. This suggests the module mcp.server.fastmcp does not exist. It might be mcp.server.fastmcp is now mcp.server or mcp.client. Actually, looking at mcp library docs, FastMCP is usually in mcp.server.fastmcp. If that module is missing, it might be a version mismatch. I will update the import to the likely correct location mcp.server or check if mcp package is installed correctly. Wait, the error is No module named 'mcp.server.fastmcp'. This implies the file mcp/server/fastmcp.py doesn't exist. In recent mcp versions, it might be mcp.server.fastmcp is deprecated or moved. I will update the import in apps/mcp_agent_main.py to use the correct import path for FastMCP based on the current mcp library structure, likely from mcp.server import FastMCP or similar. I will also check pyproject.toml to ensure dependencies are correct. The primary fix is updating the import in apps/mcp_agent_main.py.
Files: apps/mcp_agent_main.py

Verification

Tier Result Detail
T0 Diff sanity pass internal: diff sanity
T1 Static skipped no static analysis configured
T2 Smoke skipped no build step configured
T3 Tests skipped no local substitute for: mongo (docker unavailable)
T4 Runtime skipped no runtime check configured

Why this is a draft

repair did not make any tier pass - the gate is still broken

Note: T1 (no static analysis configured), T2 (no build step configured), T3 (no local substitute for: mongo (docker unavailable)), T4 (no runtime check configured) - these were not verified.

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.

Repair the broken verification gate (pytest -q)

1 participant