From 91ec40bd4f01849a4b5537ba536f3be587e6a8b7 Mon Sep 17 00:00:00 2001 From: Alpamys Date: Tue, 28 Jul 2026 12:22:02 +0500 Subject: [PATCH] test(cli): cover light cores that only a command body imports `soup mcp serve` was the named example: commands/mcp.py loads at startup, but mcp_server/registry.py is not touched until the command runs, and the server blocks -- so it cannot be probed as an invocation. Covered as a direct module import instead, together with three other lazily-loaded light cores (utils/advise, eval/gate_suites, recipes/catalog). All four measured clean. This closes the gap between "all 88 command modules are imported at startup" (true, pinned) and "therefore every light code path is covered" (was not true -- a command body's lazy import reached neither check). --- tests/test_cli_startup_is_light.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test_cli_startup_is_light.py b/tests/test_cli_startup_is_light.py index 927961c..b557e9e 100644 --- a/tests/test_cli_startup_is_light.py +++ b/tests/test_cli_startup_is_light.py @@ -86,6 +86,14 @@ def test_probe_would_catch_a_regression(): "soup_cli.utils.reward_synth", "soup_cli.utils.ship_verdict", "soup_cli.utils.layer_stream", + # Light cores that a command body imports lazily, so neither the startup + # assertion nor a `--help` invocation reaches them. `soup mcp serve` + # blocks (it is a stdio server), so its registry is covered here rather + # than as an invocation. + "soup_cli.mcp_server.registry", + "soup_cli.utils.advise", + "soup_cli.eval.gate_suites", + "soup_cli.recipes.catalog", ], ) def test_documented_light_module_stays_light(module: str):