The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(compat-fallout): repoint 8 test files off dropped facade names (run_agent._DB_PERSISTED_MARKER/_EPHEMERAL_SCAFFOLDING_FLAGS/_is_ephemeral_scaffolding, cli.AIAgent, main._make_tui_argv/_print_curator_recent_run_notice/_format_time_ago, model_switch._collect_authed_provider_slugs, acp has_provider shim); arg_coercion test imports model_tools to populate registry
Tekniumda96762ef83f
diff --git a/tests/acp_adapter/test_detect_provider_entra.py b/tests/acp_adapter/test_detect_provider_entra.pyindex 6d9409ab9d4..5ffd0b3886c 100644--- a/tests/acp_adapter/test_detect_provider_entra.py+++ b/tests/acp_adapter/test_detect_provider_entra.py@@ -34,7 +34,6 @@ class TestDetectProviderEntra:side_effect=_fake_runtime,):assert _acp_auth.detect_provider() == "azure-foundry"- assert _acp_auth.has_provider() is Truedef test_string_api_key_still_works(self):from acp_adapter import auth as _acp_authdiff --git a/tests/agent/test_cursor_optimizations_parity.py b/tests/agent/test_cursor_optimizations_parity.pyindex afb8e967bc9..fad6187f3d3 100644--- a/tests/agent/test_cursor_optimizations_parity.py+++ b/tests/agent/test_cursor_optimizations_parity.py@@ -140,6 +140,8 @@ def test_parity_token_memo():def test_parity_persist_bounded_scan():print("=== parity: _flush_messages_to_session_db bounded scan ===")import run_agent as ra+ from agent.context_compressor import _DB_PERSISTED_MARKER+ from agent.session_persistence import _is_ephemeral_scaffoldingclass FakeDB:def __init__(self):@@ -187,10 +189,10 @@ def test_parity_persist_bounded_scan():for lst in (la, lb):head = [dict(m) for m in lst[:3]]for m in head:- m.pop(ra._DB_PERSISTED_MARKER, None)+ m.pop(_DB_PERSISTED_MARKER, None)tail = [dict(m) for m in lst[-4:]]for m in tail:- m.pop(ra._DB_PERSISTED_MARKER, None)+ m.pop(_DB_PERSISTED_MARKER, None)lst[:] = head + [{"role": "user", "content": "SUMMARY"}] + tailA._db_flush_scan_prefix = NoneA._flush_messages_to_session_db_unlocked(la, None)@@ -232,15 +234,15 @@ def bench():flushed = copy.deepcopy(msgs)for m in flushed:if isinstance(m, dict):- m[ra._DB_PERSISTED_MARKER] = True+ m[_DB_PERSISTED_MARKER] = Truedef old_scan():for _idx, m in enumerate(flushed):if not isinstance(m, dict):continue- if ra._is_ephemeral_scaffolding(m):+ if _is_ephemeral_scaffolding(m):continue- if m.get(ra._DB_PERSISTED_MARKER):+ if m.get(_DB_PERSISTED_MARKER):continueprefix = flushed[:]@@ -254,9 +256,9 @@ def bench():m = flushed[_idx]if not isinstance(m, dict):continue- if ra._is_ephemeral_scaffolding(m):+ if _is_ephemeral_scaffolding(m):continue- if m.get(ra._DB_PERSISTED_MARKER):+ if m.get(_DB_PERSISTED_MARKER):continuepold = timeit(old_scan)diff --git a/tests/agent/test_verification_stop_caching.py b/tests/agent/test_verification_stop_caching.pyindex 83bde23206e..86827c41cbc 100644--- a/tests/agent/test_verification_stop_caching.py+++ b/tests/agent/test_verification_stop_caching.py@@ -29,21 +29,22 @@ def _fresh_run_agent(hermes_home):def test_verification_flags_registered_as_ephemeral(tmp_path, monkeypatch):monkeypatch.setenv("HERMES_HOME", str(tmp_path / ".hermes"))- ra = _fresh_run_agent(tmp_path)+ _fresh_run_agent(tmp_path)+ from agent.session_persistence import _EPHEMERAL_SCAFFOLDING_FLAGS, _is_ephemeral_scaffolding- assert "_verification_stop_synthetic" in ra._EPHEMERAL_SCAFFOLDING_FLAGS- assert "_pre_verify_synthetic" in ra._EPHEMERAL_SCAFFOLDING_FLAGS+ assert "_verification_stop_synthetic" in _EPHEMERAL_SCAFFOLDING_FLAGS+ assert "_pre_verify_synthetic" in _EPHEMERAL_SCAFFOLDING_FLAGS# The nudge messages ARE scaffolding (they carry the synthetic flag).- assert ra._is_ephemeral_scaffolding(+ assert _is_ephemeral_scaffolding({"role": "user", "content": "[System: run tests]", "_pre_verify_synthetic": True})- assert ra._is_ephemeral_scaffolding(+ assert _is_ephemeral_scaffolding({"role": "user", "content": "[System: run tests]", "_verification_stop_synthetic": True})# Real messages (including the assistant candidate) are not.- assert not ra._is_ephemeral_scaffolding({"role": "user", "content": "hi"})- assert not ra._is_ephemeral_scaffolding({"role": "assistant", "content": "premature done"})+ assert not _is_ephemeral_scaffolding({"role": "user", "content": "hi"})+ assert not _is_ephemeral_scaffolding({"role": "assistant", "content": "premature done"})def _make_agent(ra, session_id, tmp_path):diff --git a/tests/hermes_cli/test_curator_recent_run_notice.py b/tests/hermes_cli/test_curator_recent_run_notice.pyindex 6b4e5911412..3f6dcb756a3 100644--- a/tests/hermes_cli/test_curator_recent_run_notice.py+++ b/tests/hermes_cli/test_curator_recent_run_notice.py@@ -31,12 +31,12 @@ def curator_env(tmp_path, monkeypatch, capsys):importlib.reload(hermes_constants)from agent import curatorimportlib.reload(curator)- from hermes_cli import main as hermes_main- importlib.reload(hermes_main)+ from hermes_cli import update_cmd_maint+ importlib.reload(update_cmd_maint)yield {"curator": curator,- "main": hermes_main,+ "main": update_cmd_maint,"capsys": capsys,}diff --git a/tests/hermes_cli/test_mcp_discovery_timing.py b/tests/hermes_cli/test_mcp_discovery_timing.pyindex acca272716b..cfe0ad6cd7a 100644--- a/tests/hermes_cli/test_mcp_discovery_timing.py+++ b/tests/hermes_cli/test_mcp_discovery_timing.py@@ -241,7 +241,8 @@ def test_init_agent_forwards_single_query_flag(monkeypatch):"ensure_mcp_discovery_before_agent_build",_fake_ensure,)- monkeypatch.setattr(cli_mod, "AIAgent", lambda *_a, **_k: types.SimpleNamespace())+ import run_agent+ monkeypatch.setattr(run_agent, "AIAgent", lambda *_a, **_k: types.SimpleNamespace())assert cli._init_agent() is Trueassert seen.get("single_query") is True@@ -269,7 +270,8 @@ def test_init_agent_defaults_to_interactive(monkeypatch):"ensure_mcp_discovery_before_agent_build",_fake_ensure,)- monkeypatch.setattr(cli_mod, "AIAgent", lambda *_a, **_k: types.SimpleNamespace())+ import run_agent+ monkeypatch.setattr(run_agent, "AIAgent", lambda *_a, **_k: types.SimpleNamespace())assert cli._init_agent() is Trueassert seen.get("single_query") is Falsediff --git a/tests/hermes_cli/test_nous_policy_surfaces.py b/tests/hermes_cli/test_nous_policy_surfaces.pyindex d6862b64199..689bce05321 100644--- a/tests/hermes_cli/test_nous_policy_surfaces.py+++ b/tests/hermes_cli/test_nous_policy_surfaces.py@@ -203,7 +203,7 @@ class TestNousPrefetch:def test_nous_is_not_collected_for_prefetch(self, monkeypatch):import hermes_cli.auth as auth_mod- import hermes_cli.model_switch as ms+ import hermes_cli.model_switch_providers as msmonkeypatch.setattr(auth_mod, "_load_auth_store",diff --git a/tests/hermes_cli/test_web_server.py b/tests/hermes_cli/test_web_server.pyindex 4a237c0556f..025e0348c57 100644--- a/tests/hermes_cli/test_web_server.py+++ b/tests/hermes_cli/test_web_server.py@@ -4695,11 +4695,11 @@ class TestPtyWebSocket:def test_resolve_chat_argv_injects_gateway_ws_url(monkeypatch):- import hermes_cli.main as cli_main+ import hermes_cli.main_tui_launch as tui_launchimport hermes_cli.web_server as wsmonkeypatch.setattr(- cli_main,+ tui_launch,"_make_tui_argv",lambda *_args, **_kwargs: (["node", "fake-tui.js"], Path("/tmp")),)diff --git a/tests/run_agent/test_tool_arg_coercion.py b/tests/run_agent/test_tool_arg_coercion.pyindex ad0d0cf372b..459d1c69203 100644--- a/tests/run_agent/test_tool_arg_coercion.py+++ b/tests/run_agent/test_tool_arg_coercion.py@@ -8,6 +8,7 @@ against the tool's JSON Schema before dispatch.from unittest.mock import patch+import model_tools # noqa: F401 — populates the tool registry the "real schema" tests readfrom tools.arg_coercion import (coerce_tool_args,_coerce_value,