diff --git a/tests/test_baseline_result.py b/tests/test_baseline_result.py index 5af30fcf..4b5015ec 100644 --- a/tests/test_baseline_result.py +++ b/tests/test_baseline_result.py @@ -270,4 +270,33 @@ def test_phase7_modules_import_cleanly(): assert hasattr(src.mcp_client, "get_tree_result") assert hasattr(src.mcp_client, "web_search_result") assert hasattr(src.mcp_client, "fetch_url_result") - assert hasattr(src.mcp_client, "get_ui_performance_result") \ No newline at end of file + assert hasattr(src.mcp_client, "get_ui_performance_result") + +# ============ Phase 8 tests (3) ============ + +def test_phase8_mcp_client_silent_swallow_zero(): + """Phase 8 CRITICAL anti-sliming phase: mcp_client INTERNAL_SILENT_SWALLOW = 0.""" + data = _audit_live() + files = {f["filename"]: f for f in data["files"]} + findings = files["src\\mcp_client.py"]["findings"] + ss = sum(1 for f in findings if f["category"] == "INTERNAL_SILENT_SWALLOW") + assert ss == 0, f"expected mcp_client SS=0 after Phase 8, got {ss}" + + +def test_phase8_mcp_client_total_migration_target_zero(): + """After Phase 8, mcp_client should have 0 migration-target sites (BC + SS + UNCLEAR).""" + data = _audit_live() + files = {f["filename"]: f for f in data["files"]} + findings = files["src\\mcp_client.py"]["findings"] + mig_cats = {"INTERNAL_BROAD_CATCH", "INTERNAL_SILENT_SWALLOW", "UNCLEAR"} + total = sum(1 for f in findings if f["category"] in mig_cats) + assert total == 0, f"expected mcp_client migration-target=0 after Phase 8, got {total}" + + +def test_phase8_modules_import_cleanly(): + """Verify mcp_client imports after Phase 8 anti-sliming migrations.""" + import src.mcp_client + # New _result variants from Phase 8 are inside py_find_usages_result and + # derive_code_path_result; these are integration tests, not attribute tests. + assert hasattr(src.mcp_client, "py_find_usages_result") + assert hasattr(src.mcp_client, "derive_code_path_result")