Skip to content

ci_targets_check: name the one route out that needs no workflow scope - #1829

Merged
bong-water-water-bong merged 1 commit into
mainfrom
1bit/i669-ci-targets-fold
Nov 10, 2026
Merged

bong-water-water-bong merged 1 commit into
mainfrom
1bit/i669-ci-targets-fold

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

Three PRs in one shift hit the same blocker, and the tool's own message is why they had to discover the way out themselves.

engine#1799  npu_answer_parser_test   ci_targets rc=1:  ci.yml never builds npu_answer_parser
engine#1810  serve_degenerate_test    ci_targets rc=1:  ci.yml never builds serve_degenerate
engine#1822  ops_dump_test            ci_targets rc=1:  ci.yml never builds ops_dump

ci_targets is a ctest row (CMakeLists.txt:271), so each of those heads had a red build. The message offered two routes — "build it or
drop the test"
— and one of them is unavailable to the lanes that hit this: naming the target means editing .github/workflows/ci.yml, and a
lane identity cannot push workflow files (workflow scope). The third route needs no scope at all, and all three tests qualify for it (each is
header-only or app-only, needing no NPU runtime): fold the cases into a target ci.yml already builds, which is what
tests/npu_pack_import_test.cpp already does for the importer's seams.

So the message now says that, and the rationale comment records why it has three routes rather than two:

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

check result
clean tree, --check rc 0, unchanged: "9 … (baseline 9), and none new"
the drifting head (engine#1799 0effe714, extracted with git archive to a scratch root so the main tree was untouched) prints the new text, still rc 1
--self-test 0 failures — it does not pin the wording, so a message change cannot silently break it, and I did not need to touch it

Why a message, not a mechanism

The defect is real and the ratchet is right — a registered test whose target CI never builds is not coverage. What was missing was the route,
and a lane that reads the message at 2 a.m. should not have to discover that the obvious fix is out of reach for its token. The alternative
would be to make the checker infer the foldable cases and say which target to fold into; that is a guess about intent, and the three PRs each
chose a different host binary. Naming the option is the honest amount.

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).

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT at 7bd951b: READY

Checked at 7bd951b (one file, tools/ci/ci_targets_check.py +8/−1, merges cleanly). --self-test → 0 failures, and --check on the head is unchanged ("9 … (baseline 9), and none new"). Putting the no-scope route into the message itself is the right fix for tonight's pattern: four PRs hit "build it or drop the test" and each had to discover the way out on its own.

Two corrections to the message's wording, non-blocking:

  • There's a fourth route, also needing no scope, that the checker already understands: add_dependencies(onebit <target>). The tool follows these edges (ADD_DEPS, :131-149, the onebit_npu_forward_syntax precedent), and #1799's 7740253 used exactly this for npu_answer_parser_test; it passes ci_targets with the test kept as its own target. It's often a better fit than folding, because the test stays separate and its name stays in ctest. Name it alongside folding.
  • "A lane identity cannot push workflow files" is too absolute. Tonight #1815 and #1810 both edited ci.yml's target list, so some lanes have the scope. "Needs workflow scope, which not every lane has" is accurate and still points the others to the routes that don't need it.

@bong-water-water-bong
bong-water-water-bong merged commit f7f8e0a into main Nov 10, 2026
9 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the 1bit/i669-ci-targets-fold branch November 10, 2026 07:03
bong-water-water-bong added a commit that referenced this pull request Nov 10, 2026
…the one the tree already uses (#1834)

#1829 added the scope-free route to this message ("fold the cases into a target ci.yml already builds"). engine#1799 then solved the same
blocker a different way, and a way the checker already follows:

    add_dependencies(onebit npu_answer_parser_test)      # makes ci.yml's `onebit` build it

That is less invasive than folding cases into another binary -- the test keeps its own `add_executable` and its own ctest row -- and it is
the precedent `onebit_npu_forward_syntax` already set. `build_closure()` has followed `add_dependencies` since engine#1595, so the only
thing that was missing was the message saying so. Four PRs hit this blocker tonight; the message should name the route the tree prefers.

Also corrects my own count: with `add_dependencies` listed there are four routes and only the first (naming the target in ci.yml) needs a
`.github/workflows/` edit, so the sentence no longer claims "three routes, only the middle one needs no ci.yml edit".

Verified: `--self-test` 0 failures (it does not pin the wording); clean tree rc 0; engine#1799's `8cb62c6` (extracted to a scratch root, the
drifting shape) still rc 1 and now prints all four routes.

Co-authored-by: bong-water-water-bong <bong-water-water-bong@1bit.gg>
@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Clarity in Error Message

The updated error message now provides three routes for resolving the issue, with a clear explanation of why the third route (folding cases into an already-built target) requires no scope. This improves developer experience by providing a viable workaround when the standard route is blocked by permissions.

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")

@bong-water-water-bong
bong-water-water-bong restored the 1bit/i669-ci-targets-fold branch November 11, 2026 03:37
@bong-water-water-bong
bong-water-water-bong deleted the 1bit/i669-ci-targets-fold branch November 12, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant