Skip to main content
Glama
sudo-ai-git

io.github.sudo-ai-git/mcp-benchmark-hygiene

mcp-benchmark-hygiene

mcp-name: io.github.sudo-ai-git/mcp-benchmark-hygiene

エージェントベンチマーク/関数グレーディングを静かに破壊するpytest設定漏れを、決定的に検出します。

LLM不要。ネットワーク不要。1つの質問に確実に答えます:

このワークスペース内で python -m pytest <tests> を実行した場合、合格コードを 不合格と誤判定するホストのカバレッジ/アボートゲートを継承しますか?


このツールが検出するバグ

自動エージェント評価ハーネスは、しばしばターゲットのワークスペース内で python -m pytest <hidden_tests> を実行します。そのワークスペースが、pytestの addopts を持つリポジトリルートの下にネストしている場合、例えば:

[tool.pytest.ini_options]
addopts = "--cov=harness --cov-report=term-missing:skip-covered --cov-fail-under=80"

...pytestはそのホストの pyproject.toml をrootdirとして解決し、addopts を継承し、ホスト自身のカバレッジゲートで失敗します(harness が0%で収集 → しきい値未満 → 非ゼロ終了)。ハーネスはその後、機能的にPASSするコードをFAILEDとして記録します。

これはまさに sudo-ai-git/vulcanbench-findings に文書化されたバグです:VulcanBenchの宣言的グレーダーは、この理由で全ての機能タスクを 0.0 と誤判定しました。-o addopts= で漏れを中和すると、同じワークスペースは10/10で合格しました。

Related MCP server: forge-repo-mcp

このツールが提供する修正

ワークスペースが CORRUPTED とフラグされた場合、ツールは修正済みコマンドを返します:

python -m pytest -o addopts= <tests>

-o addopts= は継承されたカバレッジ/アボートゲートを除去します。(または、リポジトリルートの外からグレーダーを実行します。)

ツール

ツール

目的

inspect_workspace(path)

完全な分析:iniチェーン、有効なaddopts、CLEAN/CORRUPTED/UNKNOWN判定 + 修正済みコマンド

check_addopts(path)

シンプルなブール値:corrupted + 理由

summarize(analysis)

1行の実用的な要約文字列

決定的コア(依存関係なし)

分析はワークスペースディレクトリからファイルシステムルートまで上方向に走査し、pytestが最初に見つける順序で pyproject.toml / pytest.ini / tox.ini / setup.cfg を読み、addopts を抽出します。フラグ:

  • カバレッジゲート — --cov、--cov-fail-under、--cov-report、--cov-config

  • アボート/厳格ゲート — --maxfail、-x、--strict、--strict-markers、--pdb、--ff

終了コードを変更する、またはグレーディングを中止するゲートのみがフラグされます。無害な addopts は正確な文字列とともに CLEAN と報告されます。

インストールと実行(MCP stdio)

1コマンド(推奨)— リポジトリからインストール、PyPIトークン不要:

uv tool install git+https://github.com/sudo-ai-git/mcp-benchmark-hygiene
mcp-benchmark-hygiene                        # run stdio server
mcp-benchmark-hygiene --http --port 8137     # or Streamable HTTP

または pipx を使用:pipx install git+https://github.com/sudo-ai-git/mcp-benchmark-hygiene

ソースから直接(フォールバック):

{ "mcpServers": {
    "benchmark-hygiene": { "command": "python3", "args": ["/abs/path/to/mcp_server.py"] }
}}

公式の mcp Pythonパッケージ(pip install mcp)が必要です。決定的コア(inspect_workspace / check_addopts / summarize)はゼロ依存でインポートおよび実行されます — mcp パッケージはstdioサーバーにのみ必要です。

Streamable HTTP(リモート/Smithery公開用)

python3 mcp_server.py --http --port 8137   # serves on http://<host>:8137/mcp/

--http を指定して実行すると、stdioの代わりにStreamable HTTP(リモートMCPエンドポイント)で提供されます。これは smithery mcp publish <url> がURLベースの公開に期待するトランスポートです — Smitheryサービストークンが存在すれば、サーバーはそのままデプロイされます。

例

inspect_workspace(path="/home/runner/vulcanbench/workspace/task-1")
→ {
    "ok": true,
    "workspace": "/home/runner/vulcanbench/workspace/task-1",
    "ini_chain": [{"file": "/home/runner/vulcanbench/pyproject.toml",
                   "addopts": "--cov=harness ... --cov-fail-under=80"}],
    "effective_addopts": "--cov=harness ... --cov-fail-under=80",
    "will_corrupt_grading": true,
    "verdict": "CORRUPTED",
    "fixed_command": ["python3", "-m", "pytest", "-o", "addopts=", "<tests>"],
    "reasons": ["coverage gate(s) present: ['--cov', '--cov-fail-under']"]
}

検証

  • python3 test_detector.py — 5/5のコア検出チェック(ルートゲート、ネストされた 継承、クリーン、アボートゲート、pyproject-no-pytest)

  • python3 test_e2e.py — 実際のMCP stdioトランスポートを駆動し(initialize → tools/call)、CORRUPTED / CLEANがワイヤーを通して伝わることを検証

ファミリーの一部

これは sudo-ai-git による3つの決定的、LLM不要のエージェント信頼MCPサーバーの1つです:

  • mcp-skill-sec — インストール前のスキル/セキュリティ監査

  • mcp-verify-claim — エビデンスに基づき、誠実に階層化されたクレーム報告

  • mcp-benchmark-hygiene — pytest設定漏れ/評価の誠実性検出(このリポジトリ)

ライセンスと由来

MIT。文書化されたVulcanBench #79の発見から独立して導出されました。morganlinton/VulcanBenchによる推奨や提携を意味するものではありません。

カスタム統合の依頼

これをあなたの内部システム(認証、ロギング、セキュリティスキャン合格、ホスティング)に接続する必要がありますか? カスタムビルドリクエスト を開いてください。MIT参照アセットはどちらの方法でも自由に使用できます。

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to run and analyze pytest tests for desktop applications through interactive commands. Supports test execution, filtering, result analysis, and debugging for comprehensive test automation workflows.
    2
    -
  • A
    license
    A
    quality
    B
    maintenance
    Provides structured, sandboxed test and lint feedback for coding agents, returning compact typed verdicts with failure fingerprints instead of raw runner output. It enables impact-selected test execution in isolated containers, distinguishing pre-existing failures from regressions.
    4
    Apache 2.0