From 31e6242fa359feb88071125c95bb5555ba80f0ad Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Sun, 20 Sep 2026 15:20:01 -0700 Subject: [PATCH] fix(tests): point the CLI minting/call-site probes at the new init and TUI-runtime mixins test_every_minting_site_imports_the_one_helper, test_session_startup_calls_maybe_pull_org_skills and test_cli_session_store_unavailable_banner_honors_policy located their code by reading cli.py; the phases now live in hermes_cli/cli_init_mixin.py and hermes_cli/cli_tui_runtime_mixin.py. --- tests/agent/test_grid_sweep_cli_tui_stream_diagnostics.py | 4 ++-- tests/agent/test_org_skill_namespace.py | 4 ++-- tests/hermes_state/test_hermes_state_ids.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/agent/test_grid_sweep_cli_tui_stream_diagnostics.py b/tests/agent/test_grid_sweep_cli_tui_stream_diagnostics.py index 2a76ebac09..33e2bd9548 100644 --- a/tests/agent/test_grid_sweep_cli_tui_stream_diagnostics.py +++ b/tests/agent/test_grid_sweep_cli_tui_stream_diagnostics.py @@ -179,10 +179,10 @@ def test_cli_provider_fallback_notice_honors_policy(tmp_path, monkeypatch, setti @pytest.mark.parametrize("setting", MODES) def test_cli_session_store_unavailable_banner_honors_policy(tmp_path, monkeypatch, setting, capsys): _policy(tmp_path, monkeypatch, setting) - import cli as climod + from hermes_cli import cli_init_mixin as m from hermes_state_user_copy import describe_storage_failure, storage_failure_details from rich.console import Console - _cli_block(climod, "failure = describe_storage_failure(e)", "_run_state_db_auto_maintenance(self._session_db)", + _cli_block(m, "failure = describe_storage_failure(e)", "_run_state_db_auto_maintenance(self._session_db)", {"e": RuntimeError("disk I/O error"), "describe_storage_failure": describe_storage_failure, "storage_failure_details": storage_failure_details, "Console": Console}) err = capsys.readouterr().err diff --git a/tests/agent/test_org_skill_namespace.py b/tests/agent/test_org_skill_namespace.py index 1d05b4de2e..ecdacfeb46 100644 --- a/tests/agent/test_org_skill_namespace.py +++ b/tests/agent/test_org_skill_namespace.py @@ -220,10 +220,10 @@ class TestOrgPullIsWiredIn: import pathlib cli_src = ( - pathlib.Path(__file__).resolve().parents[2] / "cli.py" + pathlib.Path(__file__).resolve().parents[2] / "hermes_cli" / "cli_tui_runtime_mixin.py" ).read_text(encoding="utf-8") assert "maybe_pull_org_skills" in cli_src, ( - "cli.py session startup must call maybe_pull_org_skills() — " + "CLI session startup (hermes_cli/cli_tui_runtime_mixin.py) must call maybe_pull_org_skills() — " "without a call site the org mirror is never populated and org " "skills never load (the function being importable is not enough)." ) diff --git a/tests/hermes_state/test_hermes_state_ids.py b/tests/hermes_state/test_hermes_state_ids.py index d33e1c3d2e..4e2389e9e1 100644 --- a/tests/hermes_state/test_hermes_state_ids.py +++ b/tests/hermes_state/test_hermes_state_ids.py @@ -24,7 +24,7 @@ SITES = [ ("tui_gateway.server", lambda mod: mod._new_session_key()), ("gateway.session_lifecycle", lambda mod: mod._new_session_id(datetime(2026, 1, 2, 3, 4, 5))), ("hermes_state_portability", None), - ("cli", None), + ("hermes_cli.cli_init_mixin", None), ]