Priority: low Complexity: low Status: open
Coverage for subprocess-launched CLI invocations requires manually setting CODEX_SUBPROCESS_COVERAGE=1:
CODEX_SUBPROCESS_COVERAGE=1 make test
When this variable is set, build_cmd and run_module_cmd in test_update_ai_agents_metrics.py switch to coverage run --parallel-mode. Without it, subprocess calls produce no coverage data. This is a manual workaround, not a proper solution.
coverage.py supports automatic subprocess tracking via COVERAGE_PROCESS_START + a .pth file installed in site-packages. With this in place, all subprocess invocations are covered transparently — no env toggle, no test-code branching.
Steps:
COVERAGE_PROCESS_START to pyproject.toml coverage config (points to pyproject.toml).pth file is installed in the venv (via coverage itself or pytest-cov)CODEX_SUBPROCESS_COVERAGE branching from build_cmd and run_module_cmdmake testmake test produces coverage data for subprocess-launched CLI calls without any extra env variableCODEX_SUBPROCESS_COVERAGE flag and related branching removed from test helpersmake verify passes