mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
test: complete the readonly-stub pairing sweep (6 more files)
Final pass: per_model_threshold_init_ordering, memory_provider_init, plugin_context_engine_init, api_max_retries_config, invalid_context_length_warning, tool_call_guardrail_runtime all stub agent_init config reads that now resolve through load_config_readonly(). Verified by running the complete 59-file suspect list (every test file that stubs load_config in string or attribute form and intersects the swapped modules): 3,063 tests, 0 failed.
This commit is contained in:
parent
a16fd675df
commit
7142dc4580
6 changed files with 15 additions and 1 deletions
|
|
@ -46,6 +46,7 @@ def test_plugin_engine_gets_context_length_on_init():
|
|||
|
||||
with (
|
||||
patch("hermes_cli.config.load_config", return_value=cfg),
|
||||
patch("hermes_cli.config.load_config_readonly", return_value=cfg),
|
||||
patch("plugins.context_engine.load_context_engine", return_value=engine),
|
||||
patch("agent.model_metadata.get_model_context_length", return_value=204_800),
|
||||
patch("run_agent.get_tool_definitions", return_value=[]),
|
||||
|
|
@ -83,6 +84,7 @@ def test_active_context_engine_tools_survive_explicit_platform_toolsets():
|
|||
|
||||
with (
|
||||
patch("hermes_cli.config.load_config", return_value=cfg),
|
||||
patch("hermes_cli.config.load_config_readonly", return_value=cfg),
|
||||
patch("plugins.context_engine.load_context_engine", return_value=engine),
|
||||
patch("agent.model_metadata.get_model_context_length", return_value=204_800),
|
||||
patch("run_agent.get_tool_definitions", return_value=[]),
|
||||
|
|
@ -116,6 +118,7 @@ def test_plugin_engine_update_model_args():
|
|||
|
||||
with (
|
||||
patch("hermes_cli.config.load_config", return_value=cfg),
|
||||
patch("hermes_cli.config.load_config_readonly", return_value=cfg),
|
||||
patch("plugins.context_engine.load_context_engine", return_value=engine),
|
||||
patch("agent.model_metadata.get_model_context_length", return_value=131_072),
|
||||
patch("run_agent.get_tool_definitions", return_value=[]),
|
||||
|
|
@ -169,6 +172,7 @@ def test_codex_gpt55_autoraise_suppressed_for_plugin_engine():
|
|||
|
||||
with (
|
||||
patch("hermes_cli.config.load_config", return_value=cfg),
|
||||
patch("hermes_cli.config.load_config_readonly", return_value=cfg),
|
||||
patch("plugins.context_engine.load_context_engine", return_value=engine),
|
||||
patch("agent.model_metadata.get_model_context_length", return_value=272_000),
|
||||
patch("run_agent.get_tool_definitions", return_value=[]),
|
||||
|
|
@ -195,6 +199,7 @@ def test_codex_gpt55_autoraise_still_applies_to_builtin_compressor():
|
|||
|
||||
with (
|
||||
patch("hermes_cli.config.load_config", return_value=cfg),
|
||||
patch("hermes_cli.config.load_config_readonly", return_value=cfg),
|
||||
patch("agent.context_compressor.get_model_context_length", return_value=272_000),
|
||||
patch("run_agent.get_tool_definitions", return_value=[]),
|
||||
patch("run_agent.check_toolset_requirements", return_value={}),
|
||||
|
|
@ -221,6 +226,7 @@ def test_codex_gpt55_autoraise_applies_when_plugin_engine_missing():
|
|||
|
||||
with (
|
||||
patch("hermes_cli.config.load_config", return_value=cfg),
|
||||
patch("hermes_cli.config.load_config_readonly", return_value=cfg),
|
||||
patch(
|
||||
"plugins.context_engine.load_context_engine",
|
||||
side_effect=ValueError("not found"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue