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.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)."
|
||||
)
|
||||
|
||||
@@ -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),
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user