diff --git a/tests/agent/test_codex_gpt55_autoraise_notice.py b/tests/agent/test_codex_gpt55_autoraise_notice.py index 2638407fea6..743a8e4a62a 100644 --- a/tests/agent/test_codex_gpt55_autoraise_notice.py +++ b/tests/agent/test_codex_gpt55_autoraise_notice.py @@ -59,6 +59,8 @@ def _make_codex_agent(monkeypatch, tmp_path: Path, *, show_notice: bool): from hermes_cli import config as config_mod monkeypatch.setattr(config_mod, "load_config", lambda: _config(show_notice=show_notice)) + + monkeypatch.setattr(config_mod, "load_config_readonly", lambda: _config(show_notice=show_notice)) db = SessionDB(db_path=tmp_path / "state.db") stdout = io.StringIO() diff --git a/tests/agent/test_compression_max_attempts_config.py b/tests/agent/test_compression_max_attempts_config.py index 8fb23f89d0a..f56d927e4fb 100644 --- a/tests/agent/test_compression_max_attempts_config.py +++ b/tests/agent/test_compression_max_attempts_config.py @@ -46,6 +46,9 @@ def _make_agent(monkeypatch, tmp_path: Path, *, max_attempts=None): monkeypatch.setattr( config_mod, "load_config", lambda: _config(max_attempts=max_attempts) ) + monkeypatch.setattr( + config_mod, "load_config_readonly", lambda: _config(max_attempts=max_attempts) + ) db = SessionDB(db_path=tmp_path / "state.db") with contextlib.redirect_stdout(io.StringIO()): agent = AIAgent( diff --git a/tests/agent/test_proactive_prune_config.py b/tests/agent/test_proactive_prune_config.py index 104dfb020c2..66ad0369ea1 100644 --- a/tests/agent/test_proactive_prune_config.py +++ b/tests/agent/test_proactive_prune_config.py @@ -39,6 +39,8 @@ def _make_agent(monkeypatch, tmp_path: Path, **prune_keys): from hermes_cli import config as config_mod monkeypatch.setattr(config_mod, "load_config", lambda: _config(**prune_keys)) + + monkeypatch.setattr(config_mod, "load_config_readonly", lambda: _config(**prune_keys)) db = SessionDB(db_path=tmp_path / "state.db") with contextlib.redirect_stdout(io.StringIO()): agent = AIAgent( diff --git a/tests/run_agent/test_preflight_compression_cap_e2e.py b/tests/run_agent/test_preflight_compression_cap_e2e.py index e29b1ecc44f..fe7512dffb8 100644 --- a/tests/run_agent/test_preflight_compression_cap_e2e.py +++ b/tests/run_agent/test_preflight_compression_cap_e2e.py @@ -60,6 +60,11 @@ def _make_agent(monkeypatch, tmp_path: Path, *, max_attempts) -> AIAgent: monkeypatch.setattr( config_mod, "load_config", lambda: _config(max_attempts) ) + + monkeypatch.setattr( + config_mod, "load_config_readonly", lambda: _config(max_attempts) + + ) db = SessionDB(db_path=tmp_path / "state.db") with ( contextlib.redirect_stdout(io.StringIO()),