diff --git a/acp_agent/study_agent_acp/mcp_client.py b/acp_agent/study_agent_acp/mcp_client.py index dc607e9..44c748d 100644 --- a/acp_agent/study_agent_acp/mcp_client.py +++ b/acp_agent/study_agent_acp/mcp_client.py @@ -55,7 +55,7 @@ def call_tool(self, name: str, arguments: Dict[str, Any]) -> Dict[str, Any]: def health_check(self) -> Dict[str, Any]: try: - if _prefer_oneshot(): + if _prefer_oneshot() and hasattr(self, "_ping_oneshot"): return anyio.run(self._ping_oneshot) self._ensure_session() assert self._portal is not None diff --git a/tests/test_acp_server.py b/tests/test_acp_server.py index d1c356c..f09a062 100644 --- a/tests/test_acp_server.py +++ b/tests/test_acp_server.py @@ -155,7 +155,7 @@ def fake_llm(prompt): disease_name="GI bleed", ) assert result["status"] == "ok" - assert result["label"] == "yes" + assert result["full_result"]["label"] == "yes" @pytest.mark.acp diff --git a/tests/test_core_tools.py b/tests/test_core_tools.py index 78595f0..ee1dd52 100644 --- a/tests/test_core_tools.py +++ b/tests/test_core_tools.py @@ -87,7 +87,7 @@ def test_phenotype_validation_review_stub(): result = phenotype_validation_review("GI bleed") assert result["mode"] == "stub" assert result["label"] == "unknown" - assert len(result["phenotype_improvements"]) == 1 + assert "phenotype_improvements" not in result @pytest.mark.core diff --git a/tests/test_mcp_tools_registry.py b/tests/test_mcp_tools_registry.py index 2282018..fcc73c5 100644 --- a/tests/test_mcp_tools_registry.py +++ b/tests/test_mcp_tools_registry.py @@ -30,6 +30,7 @@ def test_register_all_tools() -> None: "phenotype_fetch_definition", "phenotype_list_similar", "phenotype_reindex", + "phenotype_index_status", "phenotype_prompt_bundle", "phenotype_recommendation_advice", "lint_prompt_bundle",