From 8a16147a1a5fd6031eb50ce8a279ab4599a9e378 Mon Sep 17 00:00:00 2001 From: bong-water-water-bong <277547417+bong-water-water-bong@users.noreply.github.com> Date: Tue, 10 Nov 2026 23:10:46 -0400 Subject: [PATCH] tests: register moe_expert_chunks_accum_test and shrink the unreferenced baseline to 1 (Refs #2018) The baseline file said it itself: 'Each line is a real test whose runner was never added; the fix per file is one add_python_test(...)'. For this one that baseline entry was the wrong outcome -- the test is portable and passes on a plain interpreter (4 arms, 0 failures; worst-case |sum| 11.18e6 stays inside int32 at K=11008, headroom x192), it just had no ctest row. Registering it is the shrink the file's own comment asks for, and it removes a 'never run' record from a test that in fact works. Verified: ctest moe_expert_chunks_accum, tests_referenced, tests_referenced_self, ci_targets* and python_test_order* all pass (7/7); the reference sweep now reports 41 registered python tests and 1 deliberate baseline entry. --- CMakeLists.txt | 5 +++++ tools/ci/unreferenced_py_tests.txt | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index eeed01a8f..610142905 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -306,6 +306,11 @@ add_python_test(python_test_order_check ${CMAKE_SOURCE_DIR}/tests/python_test_or add_python_test(python_test_order_check_self ${CMAKE_SOURCE_DIR}/tests/python_test_order_check.py --self-test) add_python_test(ci_targets ${CMAKE_SOURCE_DIR}/tools/ci/ci_targets_check.py --check --root ${CMAKE_SOURCE_DIR}) add_python_test(ci_targets_self ${CMAKE_SOURCE_DIR}/tools/ci/ci_targets_check.py --self-test) +# engine#2018: this one was in tools/ci/unreferenced_py_tests.txt as a baseline entry, and it should not have been: the +# file is portable and passes (worst-case |sum| 11.18e6 inside int32 at K=11008, 4 arms), it just never had a runner. A +# baseline records a test as never-run, which for a passing test is the wrong outcome -- so it is registered and the line +# is removed, which is the shrink the baseline's own comment asks for. +add_python_test(moe_expert_chunks_accum_test ${CMAKE_SOURCE_DIR}/tests/moe_expert_chunks_accum_test.py) # engine#1820: the other half of ci_targets_check -- a standalone shell test that nothing references cannot fail. # `need` is every tests/*.sh, `have` is every file that mentions its basename somewhere that can run it, and # tools/ci/unreferenced_tests.txt carries the deliberate exclusions WITH their reasons, so the list can shrink. diff --git a/tools/ci/unreferenced_py_tests.txt b/tools/ci/unreferenced_py_tests.txt index 9cef48019..e27a98d88 100644 --- a/tools/ci/unreferenced_py_tests.txt +++ b/tools/ci/unreferenced_py_tests.txt @@ -24,13 +24,13 @@ # A SET baseline, not an allow-list: `tools/ci/tests_referenced_check.py` FAILS when a name appears here that is not in # the tree's current set, and REPORTS a line whose file is registered now, so this can only shrink. # -# The number is 2, and getting it right took a correction worth recording: the first version of the rule scanned +# The number is 1 (was 2: moe_expert_chunks_accum_test.py is portable and passing, so it is registered rather than +# baselined -- engine#2018), and getting it right took a correction worth recording: the first version of the rule scanned # `RUNNERS`, which contains one FILE (CMakeLists.txt) and two directories, and tested `is_dir()` on all three -- so every # `add_python_test(...)` registration in CMakeLists.txt was invisible and 35 of 42 tests looked unregistered. The arm # "a cleared baseline entry is reported" caught it: registering a test in CMakeLists.txt did not clear its line. The true -# figure is 2 of 42, which is a healthy tree; the rule is here to keep it that way rather than to record a backlog. +# figure was 2 of 42, which is a healthy tree; the rule is here to keep it that way rather than to record a backlog. # # Each line is a real test whose runner was never added; the fix per file is one `add_python_test(...)`. # tests/hyperloom_benchmark_test.py -tests/moe_expert_chunks_accum_test.py