mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-07 18:27:45 +02:00
[eric] agents: persistent client default ON (kill switch OPENSWARM_PERSISTENT_CLIENT=0); conftest pins tests off
This commit is contained in:
@@ -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).
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user