[PowerX] audit power tests and remove the one tautological file, keeping B200 exporter coverage / 审计功耗测试,删除唯一重言文件并保留 B200 覆盖 - #3089
Conversation
There was a problem hiding this comment.
Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.
Additional findings (outside the current diff — GitHub can't attach inline comments there):
-
🟡
runners/test_kimik3_bh_power.py— Deleting this file removes the only coverage for b200/h200 Kimi-K3 power runtime selection (wrong-commit detection, power-pin stamping, power on/off routing to the correct git repo) and for evidence bundling on a failed power run; the replacement in utils/test_gb300_power_official_contract.py only exercises the exporter cold-import '#'-separator invariant, not runtime selection. Fix: add or keep parametrized coverage of the b200/h200 wrong-head/power-routing and failure-evidence-bundling behavior (e.g. alongside the existing gb300-only test_kimi_power_gate_rejects_unsupported_route/test_kimi_power_route_rejects_wrong_commit tests) before removing this file, since gb300 is covered but b200/h200 are not.Extended reasoning...
utils/test_gb300_power_official_contract.py has test_kimi_agentx_route_uses_recipe_power_gate, test_kimi_power_gate_rejects_unsupported_route, and test_kimi_power_route_rejects_wrong_commit, but each is parametrized only on launcher_name='launch_gb300-nv.sh' (lines 398-434). No test anywhere now sources launch_b200-nscale-slurm.sh or launch_h200-dgxc-slurm.sh to check that a wrong git HEAD aborts the run, that the AGENTX_POWER_SRT_SLURM_PIN stamp is written only when power is enabled, or that bundle_server_logs is invoked before a non-zero exit on a failed power run for those two launchers. A future change that breaks wrong-head detection or evidence bundling specifically in launch_b200-nscale-slurm.sh or launch_h200-dgxc-slurm.sh would pass CI silently, whereas before this diff it was caught by test_kimi_power_selects_verified_runtime and test_kimi_failed_power_stages_evidence_before_exit.
Verification: nit (coverage gap, no production break). The candidate's factual claim holds. The deleted runners/test_kimik3_bh_power.py::test_kimi_power_selects_verified_runtime provided real (not merely tautological) b200/h200 coverage: wrong-head abort ("assert result.returncode != 0; assert not stamp.exists()"), pin stamping gated on power ("stamp.read_text().strip() == 'a'*40" only when power), and…
|
Re the b200/h200 route-coverage suggestion in the review summary: not extending it here. The shared harness slices on |
Description
Audited all 15 test files I added since June: three were already removed in #2799, ten exercise real code with hand-worked expectations and stay, one was tautological.
runners/test_kimik3_bh_power.pyasserted its own stubs (bundle_server_logswroteserver evidence, the test asserted it back) and compared a dumped yaml fixture to itself. Deleted. Its one real invariant, the B200 dcgm-exporter URI carrying exactly one#, moves into the shared contract test beside GB300 and H200; one stub-echo assertion on the enroot fixture there is also removed.中文
审计了我自六月以来新增的全部 15 个测试文件:3 个已在 #2799 中删除,10 个跑的是真实代码且期望值为手工推导,予以保留,1 个为重言测试。
runners/test_kimik3_bh_power.py断言的是自己的 stub(bundle_server_logs写入server evidence,测试再断言该字符串),并把导出的 yaml fixture 与自身比较。已删除。其中唯一真实的不变量,即 B200 dcgm-exporter URI 只含一个#,已并入共享契约测试,与 GB300、H200 同列;该文件中一条断言 enroot stub 自身输出的语句同时删除。Related Issue
None.
Type of Change
Checklist
perf-changelog.yamland have not edited historical entries — n/aOWNER/MEMBER/COLLABORATOR) has commented/reuse-sweep-runon this PR — n/aVerification
CI pytest for this path: 476 passed. Breaking the B200 launcher's
#separator fails the migrated case.Note
Low Risk
Test-only cleanup and consolidation; no production launcher or runtime behavior changes.
Overview
Removes
runners/test_kimik3_bh_power.py, which mostly asserted stub behavior and round-tripped YAML fixtures, and drops it from the test-process-result workflow path filters and pytest command.The meaningful B200 invariant—dcgm-exporter cold import must use
docker://nvcr.io#...with exactly one#—moves intotest_exporter_cold_import_uses_nvidia_registryalongside GB300 and H200. That test now parametrizeslaunch_b200-nscale-slurm.sh, optionally skips cache-path rewriting, pulls inenroot_uri_for_imagewhen present, and stops asserting the stub enroot fixture’s file contents (only the import reference is checked).Reviewed by Cursor Bugbot for commit 589d162. Bugbot is set up for automated code reviews on this repo. Configure here.