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).
This commit is contained in:
Alpamys 2026-07-28 12:22:02 +05:00
parent 6e79e5e1bf
commit 91ec40bd4f
1 changed files with 8 additions and 0 deletions

View File

@ -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):