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; CudaKernelRealSA module 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.py flag 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: MempoolJobContext tests to test_mempool_types.py, MinerHandle tests to test_mine_work_item.py, the StashEntry/_MiningLoopState decay-field block to test_base_miner_pump.py.
  • Trim trivial, tautological, and implementation-coupled tests; parametrize repeated cases.
  • Add a graph-structure-distinctness test to test_topology_hash.py to 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.

Merge request reports

Loading