From 7bd951b4237d9c8fa959eee6c5c4215d7e52c708 Mon Sep 17 00:00:00 2001 From: bong-water-water-bong Date: Tue, 10 Nov 2026 02:51:50 -0400 Subject: [PATCH] ci_targets_check: name the one route out that needs no `workflow` scope The drift message offered two routes -- "build it or drop the test" -- and one of them is unavailable to the lanes that actually hit this: naming the target means editing `.github/workflows/ci.yml`, and a lane identity cannot push workflow files. So the message told three different PRs tonight the same thing and left each of them to discover the missing option: engine#1799 (`npu_answer_parser_test`), engine#1810 (`serve_degenerate_test`), engine#1822 (`ops_dump_test`). All three tests are header-only or `app`-only -- they need no NPU runtime -- so each could have been folded into a target ci.yml already builds, which is what tests/npu_pack_import_test.cpp already does for the importer's seams. The message now names that middle route and says why it is the one to reach for: Three routes, and only the middle one needs no ci.yml edit: name the target in ci.yml's build list (a `.github/workflows/` edit, so it needs `workflow` scope), fold these cases into a target ci.yml ALREADY builds (the tests/npu_pack_import_test.cpp pattern), or drop the test Verified both ways: on a clean tree `--check` is rc 0 unchanged; against engine#1799's drifting head (`0effe714`, extracted to a scratch root so the main tree was not touched) the row prints the new text and still returns rc 1; `--self-test` 0 failures (it does not pin the wording, so the change could not silently break it). --- tools/ci/ci_targets_check.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/ci/ci_targets_check.py b/tools/ci/ci_targets_check.py index 1e8bbec8d..cc88d1b53 100755 --- a/tools/ci/ci_targets_check.py +++ b/tools/ci/ci_targets_check.py @@ -418,6 +418,10 @@ def check(root): # to skip it -- an NPU-only test under `if(ONEBIT_NPU)` with ONEBIT_NPU=OFF -- and telling its author to # "build it or drop the test" was a false positive. Only a test CI would register and build, and does not, is # the defect this ratchets. + # engine#1810 review: three PRs in one shift added a test `add_executable` and stopped here, because the message + # named only two routes and neither was available -- ci.yml's build list is a `.github/workflows/` file, which a lane + # identity cannot push (no `workflow` scope). Folding the cases into a target ci.yml already builds needs no scope + # at all, so the message names it. line_guard = {n: (g, u) for n, _l, g, u in scan_guards(cmake_text)} by_design = set() for name in sorted(drift): @@ -458,7 +462,10 @@ def check(root): where = f" under if({' AND '.join(guards)})" if guards else "" print(f"ci_targets_check: add_test names '{name}'{where}, and ci.yml never builds " f"{'/'.join(sorted(set(need[name])))} -- that test never reaches ctest in the configuration CI " - f"creates (it is not registered, or registered and not built); build it or drop the test") + f"creates (it is not registered, or registered and not built). Three routes, and only the middle one " + f"needs no ci.yml edit: name the target in ci.yml's build list (a `.github/workflows/` edit, so it " + f"needs `workflow` scope), fold these cases into a target ci.yml ALREADY builds (the " + f"tests/npu_pack_import_test.cpp pattern), or drop the test") if new: return 1 # A baseline entry that no longer drifts is progress; say so rather than staying silent, so the