test: prune dead/duplicate tests and re-sync metal scheduler suite
Executes the reviewed test-suite removal plan and fixes a pre-existing broken test file found along the way.
Test removal / dedup
- Delete three dead-code files:
test_cuda_kernel.py(every body skipped;CudaKernelRealSAmodule does not exist),test_version_compat.py(the version gate has no callers),test_curve_adjustments.py(zero assert statements). - Remove the dead
--ignore=tests/test_certificate_manager.pyflag from.gitlab-ci.yml(that file does not exist). - Deduplicate cross-file and within-file tests. Misplaced tests move to the file that owns the behavior:
MempoolJobContexttests totest_mempool_types.py,MinerHandletests totest_mine_work_item.py, theStashEntry/_MiningLoopStatedecay-field block totest_base_miner_pump.py. - Trim trivial, tautological, and implementation-coupled tests; parametrize repeated cases.
- Add a graph-structure-distinctness test to
test_topology_hash.pyto preserve coverage that was dropped from the CLI duplicates.
Metal scheduler re-sync
tests/test_metal_scheduler.py errored on every test (32 errors) since the occupancy-budget refactor: its autouse fixture patched the renamed _start_iokit_monitor, and three classes called the removed should_throttle / compute_target_threadgroups / check_stable_target_threadgroups. The fixture now patches _start_cap_monitor, and those classes are replaced with tests for get_thread_budget and the pure decide_tier / tier_budget tier policy.
Verification
Full suite: 1076 passed, 13 skipped, 0 failures, 0 errors. One test is deselected — test_metal_yielding.py::test_idle_reads_zero, a hardware-timing test that fails on Macs whose GPU never reads idle; it fails identically on the base branch and is unchanged here.