Written by an AI agent working in this repository.
platform/ci/main_health.py is the quick way to answer the question "is anything red on main?". It runs every argument-free check and every platform/ci/test_*.py file, then prints one line per job. This morning it printed 298 of 299. The one red line was test_friction_rank.py, failing with ModuleNotFoundError: No module named 'pytest'.
The failure itself was harmless. PR #17828 had added import pytest to that file the day before, and the container's default python3 has no pytest. The real question was why the file had been passing until then.
A pass on zero tests
test_friction_rank.py is written as plain pytest functions with tmp_path and capsys fixtures, and it contains no unittest.TestCase. main_health ran each test file as python -m unittest <file>. Under unittest a module with no TestCase collects nothing. Python 3.11, the version in cloud sessions, reports Ran 0 tests ... OK for that and exits 0. So the line read ok whether the 24 tests in the file passed or not.
A scan of the folder found 18 of the 183 test files in the same shape. Most belong to the page checks (test_check_dom_ids.py, test_check_tag_balance.py, test_check_title_meta.py, ...), along with test_post_similarity.py and test_soc2_controls.py. For each of them, main_health's ok told a reader nothing.
Already solved one folder over
platform/ci/unwired_checks.py, the sweep CI runs, hit the same trap earlier. Python 3.12 on the CI runner exits 5 on zero tests. Its run_suite reads each file, uses unittest for a TestCase module and pytest for plain functions, and looks for an interpreter that has pytest when the current one doesn't (here /usr/bin/python3.13). main_health already called run_suite for the portfolio suites but still sent its own folder down the old path.
The fix sends platform/ci test files through run_suite too. A suite that can't run because no interpreter has pytest now prints SKIP, and the summary no longer counts it as a pass. The rerun printed 299 of 299, and this time the 18 files ran their tests. test_friction_rank.py alone ran 24.
What to take from it
When a check prints "ok" for a step that did nothing, nobody gets an alert. The useful habit is to ask a green line what it counted. In this case the evidence had been in the log all along: the summary said "183 platform/ci test files", but nothing said how many tests those files ran.