From 3b2e445890e185b275d52f384bad576f04cb55d4 Mon Sep 17 00:00:00 2001 From: Bartok9 Date: Thu, 16 Jul 2026 01:05:32 -0400 Subject: [PATCH] test(config): use schema-known key in config-set confirm-flow test Since #34067 validation, config set refuses unknown top-level keys, so test_config_set_requires_confirmation_then_writes must target a valid path. Switch console.test -> telegram.test (PlatformConfig open-dict). --- tests/hermes_cli/test_console_engine.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/hermes_cli/test_console_engine.py b/tests/hermes_cli/test_console_engine.py index 5333efd1095a..0c8274bf0f15 100644 --- a/tests/hermes_cli/test_console_engine.py +++ b/tests/hermes_cli/test_console_engine.py @@ -404,18 +404,21 @@ def test_help_lists_supported_commands_and_not_full_cli(): def test_config_set_requires_confirmation_then_writes(_isolate_hermes_home): engine = HermesConsoleEngine() - pending = engine.execute("config set console.test true") + # Use a schema-known key path. Since #34067, `config set` refuses unknown + # top-level keys, so this flow test must target a valid path (telegram is a + # PlatformConfig-shaped dict that accepts arbitrary child keys). + pending = engine.execute("config set telegram.test true") assert pending.status == "confirm_required" from hermes_cli.config import read_raw_config assert read_raw_config() == {} - result = engine.execute("config set console.test true", confirmed=True) + result = engine.execute("config set telegram.test true", confirmed=True) assert result.status == "ok" - assert "console.test" in result.output - assert read_raw_config()["console"]["test"] is True + assert "telegram.test" in result.output + assert read_raw_config()["telegram"]["test"] is True def test_sessions_list_and_stats_use_isolated_session_store(_isolate_hermes_home):