[eric] agents: persistent client default ON (kill switch OPENSWARM_PERSISTENT_CLIENT=0); conftest pins tests off

This commit is contained in:
ciregenz
2026-07-03 15:30:01 -07:00
parent b827fc565c
commit d36fd6e4c6
2 changed files with 4 additions and 3 deletions
@@ -28,7 +28,8 @@ P_NON_BOOT_KEYS = frozenset({"can_use_tool", "stderr", "hooks", "resume", "fork_
def persistent_client_enabled() -> bool:
return os.environ.get("OSW_TTFT_PERSISTENT_CLIENT") == "1"
"""Default ON (soak-proven: warm turns 535ms -> 6ms). Kill switch: OPENSWARM_PERSISTENT_CLIENT=0."""
return os.environ.get("OPENSWARM_PERSISTENT_CLIENT", "1") != "0"
# Per-session field-level digests from the last fingerprint call; lets a mismatch log WHICH boot field drifted (probe-gated diagnostics only).
+2 -2
View File
@@ -20,8 +20,8 @@ from types import SimpleNamespace
import pytest
# Tests mock claude_agent_sdk.query, not ClaudeSDKClient; an inherited persistent-client flag would route mocked turns onto a REAL CLI spawn and wedge the suite. Pin it off; the persistent path has its own tests (test_client_pool.py + live gates).
os.environ.pop("OSW_TTFT_PERSISTENT_CLIENT", None)
# Tests mock claude_agent_sdk.query, not ClaudeSDKClient; the now-default-ON persistent client would route mocked turns onto a REAL CLI spawn and wedge the suite. Pin it OFF explicitly; the persistent path has its own tests (test_client_pool.py + live gates).
os.environ["OPENSWARM_PERSISTENT_CLIENT"] = "0"
@pytest.fixture(autouse=True)