test(config): point dict-value and deep-creation tests at schema keys

`display.tool_progress_overrides` (deprecated) and the fabricated `agent.max_iterations`
were unknown sub-keys under known sections, the shape `hermes config set` now refuses
before writing. The tests exercise value-shape parsing and section creation, not those
keys, so they use `mcp_servers.demo.env` and `agent.max_turns` instead.
This commit is contained in:
teknium1
2026-09-15 12:12:12 -07:00
committed by Teknium
parent 0e63a1bc5c
commit 33b6c4c650
2 changed files with 6 additions and 6 deletions
@@ -344,9 +344,9 @@ class TestBackwardCompatibility:
assert cfg["custom_providers"][0]["name"] == "p2"
def test_deep_creation_without_siblings_unchanged(self, _isolated_hermes_home):
set_config_value("agent.max_iterations", "50")
set_config_value("agent.max_turns", "50")
saved = _read_config(_isolated_hermes_home)
assert saved["agent"]["max_iterations"] == 50
assert saved["agent"]["max_turns"] == 50
def test_greedy_never_beats_exact_nested_structure(self):
"""A literal dotted key never shadows the plain-split path when the
@@ -36,9 +36,9 @@ def test_list_literal_is_parsed_to_list(user_home):
def test_mapping_literal_is_parsed_to_dict(user_home):
from hermes_cli.config import set_config_value, read_raw_config
set_config_value("display.tool_progress_overrides", '{"terminal": "off"}')
set_config_value("mcp_servers.demo.env", '{"terminal": "off"}')
raw = read_raw_config()
assert raw["display"]["tool_progress_overrides"] == {"terminal": "off"}
assert raw["mcp_servers"]["demo"]["env"] == {"terminal": "off"}
def test_yaml_flow_list_is_parsed(user_home):
@@ -97,11 +97,11 @@ def test_multiline_yaml_mapping_is_parsed(user_home):
from hermes_cli.config import set_config_value, read_raw_config
set_config_value(
"display.tool_progress_overrides",
"mcp_servers.demo.env",
"terminal: off\nbrowser: on",
)
raw = read_raw_config()
assert raw["display"]["tool_progress_overrides"] == {
assert raw["mcp_servers"]["demo"]["env"] == {
"terminal": False,
"browser": True,
}