Repository navigation
ci: name all 16 tests that skip in CI, so ctest_skips stops crying wolf on a green main (engine#2715) - #2726
Conversation
…s (engine#2715) main 46c405b's own build job ran 373 tests and skipped 16; the baseline named 7, so `tools/ci/ctest_skips.py --log <that log>` exited 1 with nine complaints about tests that cannot run in the build container at all. A detector whose permanent findings are false is read as noise, and the tenth skip -- the one that matters -- arrives as line ten. Reasons are the tests' own: the Whisper fixture variables, torch/numpy for laya_finetune, the gpu-kernels checkout for hip_f16_audit, the onnx module for q4nx_tail_head, a device for token_rate_floor_device. Not from `--write`: it drops the licence header and writes "# TODO: why this cannot run here" for every row, which would replace seven real reasons with nine placeholders. Verified on main 46c405b's CI log: rc 1 with 9 unbaselined -> rc 0, "16 of 373 test(s) did not run, all named in the baseline (0 failed)".
|
ready for review at |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at f3877c9: READY
Verified end to end against a real CI log, in both directions: the baseline now names exactly the set that skips, and main's baseline produces the false alarms the PR describes.
The run
The build job's log from main run 43914353020 (completed 17:23Z), timestamps stripped, fed to the tool:
$ python3 tools/ci/ctest_skips.py --log mainci.plain.log # this PR's baseline
ctest_skips: 16 of 375 test(s) did not run, all named in the baseline (0 failed) rc 0
$ (main's baseline restored, same log)
ctest_skips: token_rate_floor_device SKIPPED and the baseline does not name it -- …
ctest_skips: whisper_transcribe_jfk SKIPPED and the baseline does not name it -- …
ctest_skips: whisper_transcribe_jfk_lv3 SKIPPED and the baseline does not name it -- …
… rc 1
The set, compared rather than eyeballed
I extracted the skipped rows from that log (N - <name> (Skipped)) and diffed them against the baseline's names:
16 in the log: amdxdna_restart audio_exec audio_kernel_plan hip_f16_audit laya_finetune npu_import_contract
npu_repack_path onnx_graph patch_sfs_atomic q4nx_tail_head serve_client_hangup_cpu
serve_context_limit_cpu serve_embed_vectors_cpu token_rate_floor_device
whisper_transcribe_jfk whisper_transcribe_jfk_lv3
16 in the baseline
skipped but not named: (none) named but never skipped: (none)
So the missing nine are the nine the tool complained about, nothing was added that does not skip, and the seven pre-existing entries stayed. That matters for the ratchet: an entry that suppresses nothing is reported by the tool itself (a baseline entry that no longer drifts is progress), so an over-inclusive baseline would not have survived the run anyway.
The reasons are the right kind — each names why the row cannot run here rather than "skipped": the audio/whisper rows need a pack the build job never fetches, laya_finetune needs torch which the container does not install, hip_f16_audit needs a gpu-kernels checkout at the pin, q4nx_tail_head needs the onnx module, token_rate_floor_device needs a device and a ticket. --self-test is unchanged and still passes.
One consequence worth stating in the body if you edit it: this baseline is now a complete inventory, so the next skip — a test that starts skipping because something broke — is the only unnamed row, which is exactly what makes the check worth running. That is the whole value the issue asked for.
PR Reviewer Guide 🔍(Review updated until commit f3877c9)Here are some key observations to aid the review process:
|
|
Undrafted at State at undraft: |
|
Persistent review updated to latest commit f3877c9 |
…0) (#2736) The tool's useful mode was wired nowhere: only --self-test was a ctest row, so a suite that skipped its way to green and a suite that ran read the same summary line. #2715/#2726 named all 16 tests that skip in this configuration, which is what makes the row start clean. Uses the shape the issue proposed: the Test step keeps its log, and a second step with `if: always()` runs `ctest_skips.py --log build/ctest.log` so a red ctest still gets the report. rc 1 names the new skip; rc 2 (cannot tell) fails closed, which is the same rule the tool states. Also corrects CMakeLists.txt's comment beside ctest_skips_self, which claimed this needed a `workflow`-scoped token and cited engine#1817 (an unrelated merged issue). The transport is the real obstacle: an HTTPS OAuth push that edits .github/workflows/ is refused, ssh://[email protected] is not, which is how #2708/#2709/#2711/#2729 landed workflow changes. Co-authored-by: bong-water-water-bong <[email protected]>
…ine#2836) The row added in the previous commit returns 77 until the pin carries the fork script, and engine#2736's census fails on any skip the baseline does not name -- so without this the build goes red for a skip that is the row working correctly. Adding the row to tools/ci/ctest_skips.txt with the reason is the same step #2726 did for the sixteen that already skipped at that time. Verified with the census itself on a synthetic log that names every baselined row: baseline with the row -> "16 of 16 test(s) did not run, all named in the baseline" rc 0 baseline WITHOUT it -> "hrx_stale_expectations SKIPPED and the baseline does not name it" rc 1 The mutant is the point: the entry is load-bearing, not bookkeeping.
…uarded on the pin that carries it (engine#2836) (#2840) * ci: run the fork's stale-expectation check from the engine's suite (engine#2836) The fork registers 48 ctest rows and no engine job runs any of them -- the engine never builds the fork's tests -- so a row there means it runs only when a person types ctest in a fork checkout. Most of those 42 test-hrx-* rows need a device and are right to be absent. check_stale_expectations.py (fork #419) is not: pure python, ~1 s, no fixture, and it answers engine#2774's question (is a recorded-stale expectation still selected by no matcher?) without a device. Not a direct add_test, for a measured reason: the script arrived at fork ddd415f4a and the engine pins 8cb8fb64d, which does not contain it. A row pointing at the path would fail on every PR with "can't open file" until the pin moves -- red from the moment it merges. So tools/ci/stale_expectations_check.py wraps it and returns 77 with a message naming ddd415f4a, the same shape as hrx_f16_narrowing_check when the corpus submodule is absent. The row is present, says why it cannot run, and goes live on the first bump that carries the tool. Measured: current pin -> SKIPPED ... "the fork added it in ddd415f4a" rc 77 fork at ddd415f4a -> stale-expectations: 31 recorded, every one exported by a corpus and selected by no matcher rc 0 Self-test (hermetic, 4 arms): absent -> 77, present+green -> 0, present+red -> 1 (the row can report a real finding), present+prints -> 0. * ci: baseline the new row's skip, so the skip census stays honest (engine#2836) The row added in the previous commit returns 77 until the pin carries the fork script, and engine#2736's census fails on any skip the baseline does not name -- so without this the build goes red for a skip that is the row working correctly. Adding the row to tools/ci/ctest_skips.txt with the reason is the same step #2726 did for the sixteen that already skipped at that time. Verified with the census itself on a synthetic log that names every baselined row: baseline with the row -> "16 of 16 test(s) did not run, all named in the baseline" rc 0 baseline WITHOUT it -> "hrx_stale_expectations SKIPPED and the baseline does not name it" rc 1 The mutant is the point: the entry is load-bearing, not bookkeeping. * ci: drop the baseline entry, because the bump landed and the row is live (engine#2836) CI said the good version of this: "hrx_stale_expectations is in tools/ci/ctest_skips.txt but it no longer skips -- drop the line, the list should shrink". The engine's pin moved to ddd415f4a during the night -- the commit that adds the fork's script -- so the row ran the real check, it passed (rc 0), and the skip entry became shrink drift. That is the pair working: the row was guarded on the pin, the bump arrived, and the census told us to shrink the list rather than letting a stale skip sit there. Dropped; verified with the census on a log where every remaining baselined row skips and this one passes: ctest_skips: 15 of 16 test(s) did not run, all named in the baseline (0 failed) rc 0 * ci: remove two files my shell created and I committed by accident (engine#2836) 93c89d4 carried two zero-byte files whose NAMES are lines of my own tool's output -- '16 of 16 test(s) did not run, all named in the baseline' and 'hrx_stale_expectations SKIPPED and the baseline does not name it'. They came from an unquoted command substitution in a redirect, and 'git add -A' committed them without me reading the file list: both CI failures on that build follow from them -- copyright.py --check refuses a name with no comment style, and the census step then found no build/ctest.log because the build had stopped. Reproduced locally (copyright rc 1 with both names printed), removed, copyright rc 0, pre-pr 12 green. The lesson is in the state file rather than only here: read 'git status' before 'add -A' when a turn has run shell commands whose text ended up in the output. * ci: drop two empty files that a skip message created, and name the skip in the baseline (engine#2840) Two empty files were committed at the repo root whose NAMES are the text of two skip messages: "16 of 16 test(s) did not run, all named in the baseline" "hrx_stale_expectations SKIPPED and the baseline does not name it" They came from a local run that used the message as a redirect target, and git add -A took them. Removed. The second one was also the finding, not just an artefact: tools/ci/ctest_skips.py exits 1 when a row skips and the baseline does not name it, so the row was failing that check with exactly that sentence. 93c89d4 dropped the baseline entry on the belief that the pin bump had landed; measured at this pin, third_party/llama.cpp/ggml/src/ggml-hrx/tools/check_stale_expectations.py is ABSENT, so the row does skip (77) and must be named. Re-added with the reason and the commit that turns it on (fork ddd415f4a). Verified: ctest_skips.py --self-test ok, and every non-comment line in ctest_skips.txt still parses as "name # reason" (0 malformed). * ci: the row passes at this pin, so it must NOT be named as a skip (engine#2840) bf417b5 re-added the baseline entry on the measurement "check_stale_expectations.py is ABSENT at this pin". It is present. CI measured the row itself one build earlier, on this same pin: 86/384 Test #92: hrx_stale_expectations ................... Passed 0.11 sec ctest_skips: hrx_stale_expectations is in tools/ci/ctest_skips.txt but it no longer skips A row that passes is not a skip, and naming it fails the census on every PR from then on. The measurement trap is worth recording because it is easy to fall into: third_party/llama.cpp is EMPTY in a worktree that has not run `git submodule update --init`, so `[ -f third_party/llama.cpp/.../check_stale_expectations.py ]` is false for a reason that has nothing to do with the pin. The pin is ddd415f4a (git ls-tree origin/main third_party/llama.cpp) and the fork has the file at that commit (git ls-tree --name-only ddd415f4a ggml/src/ggml-hrx/tools/). * ci: the row is live at this pin, so stop saying it skips (engine#2836, two reviews) Two reviews made the same point and it is right: the comment described the reason the wrapper exists as if it were the state of the row. After the merge, the checkout carries main's gitlink (ddd415f4a, which has the script), so the row RUNS -- but a reader debugging "why did this not catch X" would read "this row skips (77)", believe it inert, and stop looking. A comment that is false in the merged tree is worse than no comment, because it is the one a debugger trusts. Reworded in three places, all to "conditional on the pin" rather than "true of this engine": - CMakeLists.txt: on a pin before ddd415f4a it skips and names the commit; at ddd415f4a or later it runs and passes, so the row is live, not inert. - the wrapper's docstring: a checkout CAN be before ddd415f4a (that is the reason for the wrapper); at or after it the file is there and the row simply runs. - the runtime skip message: "this checkout is at a pin older than that", not "this engine pins an older commit" -- the message only prints when the file is genuinely absent, and it now says so about the checkout it actually measured. Also, from the other review: a skip path that CREATES files as a side effect is a defect of the same family as #2830's self-test writing into the artefact a human reads. The two zero-byte files that broke the previous build (e180dc2) came from my own shell, not from the wrapper -- the self-test writes only into a TemporaryDirectory -- but the sentence is now in the wrapper's header so a third skip arm does not get to invent artefacts. self-test 4 arms ok, pre-pr 12 green, 3 skipped. * ci: the sentence the previous message promised, actually added (engine#2836) 03eff66's message said the wrapper's header now states that a skip path creates nothing; it did not -- I described the change I intended instead of the one I made. Adding it rather than amending, because force-pushing a lane branch is not a thing this lane does. The claim: the self-test writes only inside a TemporaryDirectory and nothing here touches the tree it reads, so a skip cannot leave an artefact for a reader to mistake for a finding (#2830's defect). * ci: the skip has two causes and they need different fixes (engine#2836 review) The CHANGES verdict is right and it is the sharper version of the last round: in CI the submodule is checked out (`ci.yml:77`), so the row runs and the skip is unreachable there. It is reachable in exactly one place -- a tree with an empty `third_party/llama.cpp` -- and for THAT tree the message said "this checkout is at a pin older than ddd415f4a", which is false: the pin is fine and the submodule is not initialised. Two causes, two fixes, one message: the reader would run the wrong one and conclude the row is broken. It is not a hypothetical. Earlier today another lane measured "the tool is ABSENT at this pin" in a lane worktree -- my worktree has the same property, `ls third_party/llama.cpp` is empty -- and that reading nearly put a permanent skip into ctest_skips.txt on a pin where the row passes. So `skip_message()` now measures which of the two it is and says so: - `third_party/llama.cpp` empty or missing -> "an uninitialised submodule, not an old pin", with `git submodule update --init third_party/llama.cpp` in the message; - submodule checked out and the file absent -> "a pin older than ddd415f4a", as before. Two new arms, one per cause, so the distinction cannot silently collapse: 7 arms, self-test ok. And the proof is this worktree, which IS the first case: $ python3 tools/ci/stale_expectations_check.py --root . -> rc 77, "third_party/llama.cpp is not checked out here ... That is an uninitialised submodule, not an old pin" pre-pr 12 green, 3 skipped. --------- Co-authored-by: bong-water-water-bong <[email protected]>
Fixes #2715.
What
tools/ci/ctest_skips.pyasks the right question — which tests did not run, and is that the set we expect? — against a checked-in baseline. On main46c405b's own CI log the answer was nine false alarms: 16 tests skip, the baseline named 7, so the tool exited 1 on a green main.A detector whose permanent findings are false is read as noise, and the tenth skip — the one that matters — arrives as line ten.
The change
tools/ci/ctest_skips.txt+11 lines: the nine unnamed tests, each with the reason that test itself prints, and a comment explaining why the Whisper rows share one cause.audio_execONEBIT_TEST_WHISPER(pack dir or encoder.onnx) unset —tests/audio_exec_test.cpp:74onnx_graph.onnx—tests/onnx_graph_test.cpp:44audio_kernel_planONEBIT_TEST_WHISPER_PACKunset —tests/audio_kernel_plan.sh:29whisper_transcribe_jfk_PACKand_WAVunset (CMake sets only_IDS_FILE) —tools/whisper_transcribe.cpp:176whisper_transcribe_jfk_lv3_PACK_LV3/_WAV_LV3unset —tests/whisper_lv3_row.shlaya_finetunehip_f16_auditllama.cpponlyq4nx_tail_headCMakeLists.txt:302)token_rate_floor_deviceNot from
--write. It regenerates the file without the Apache notice and writes# TODO: why this cannot run herefor every row, which would replace seven real reasons with sixteen placeholders. It is a starting point, not a faithful refresh — worth knowing, since the header still says "--write".Proof
On main
46c405b's real CI log, same command, before and after:Negative control: reverting this file alone brings the 9 lines and
rc 1back.scripts/pre-pr-checks.sh: 12 green, 3 skipped. Rebased onto current mainb6783c3.The half this does not fix, said plainly
Nothing runs the check against a real log, so the baseline can rot again — that is how it got here. Enforcement needs the CI Test step to write a log (
ctest --test-dir build --output-on-failure --output-log build/ctest.log) and onectest_skips.py --log build/ctest.logstep beside it; a workflow edit needsworkflowscope, which this lane's token does not have — the same wall as #2707/#2708. Until that lands, this PR restores the tool's signal without keeping it honest on its own.