From 008cd3fd742c4005ecd94ff4be97e8eb63d526ca Mon Sep 17 00:00:00 2001 From: Jason Walker <913443@dadeschools.net> Date: Thu, 9 Jul 2026 14:24:20 -0400 Subject: [PATCH] fix: keep tests free of host MCP stale-runtime probes (#590) patch.dict(os.environ, clear=True) also drops PYTEST_CURRENT_TEST, which re-enables live MCP process health checks against operator daemons and makes merge-gate unit tests environment-dependent. Stub the diagnostic in conftest so unit tests stay isolated. --- tests/conftest.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index e14d42a..7a9d84f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -74,6 +74,9 @@ def _reset_mutation_authority(monkeypatch): monkeypatch.setattr(mcp_server, "_preflight_capability_baseline_porcelain", None) monkeypatch.setattr(mcp_server, "_preflight_resolved_task", None) monkeypatch.setattr(mcp_server, "_preflight_reviewer_violation_files", []) + # Unit tests must not depend on live host MCP process health. Tests that + # use patch.dict(..., clear=True) drop PYTEST_CURRENT_TEST, which would + # otherwise re-enable the stale-runtime probe against operator daemons. monkeypatch.setattr( mcp_server, "_check_mcp_runtimes_diagnostics",