Repository navigation
ci: the fork's recorded-stale table runs from the engine's suite (engine#2836) - #2837
bong-water-water-bong wants to merge 1 commit into
Conversation
…ine#2836) llama.cpp#419 added `ggml/src/ggml-hrx/tools/check_stale_expectations.py` to the fork -- the kernel names tests/hrx-ops-test.cpp demands and no matcher selects, which is engine#2774's question answered without a device. The fork has no CI job: 48 ctest rows are registered there at the pin, 43 of them `test-hrx-*`, and `git run list` shows the last fork run on 2026-10-08. So the check runs only when a person types it -- and when I typed it by hand it corrected an error of my own (I had reported entries as "absent from the corpus" on a filename search; the corpus's .loom filenames are not kernel ids). This registers it in the ENGINE's suite, which does run on every PR: add_test(NAME hrx_stale_expectations COMMAND tests/hrx_stale_expectations.sh <root>) set_tests_properties(hrx_stale_expectations PROPERTIES SKIP_RETURN_CODE 77) The wrapper exists for one reason: the tool comes from the pinned submodule, so it is absent in a tree without `third_party/llama.cpp` checked out AND at any pin before llama.cpp#419. Both are facts about the CHECKOUT, so they skip (77) with the reason printed; a row that returned 0 with no tool would be the "check that cannot run reports success" defect this suite keeps removing. The tool's own codes stay: 1 an entry is wrong, 2 it cannot tell (a missing table at a tree that exists is drift, not an absent corpus, so 2 is a failure here). Measured in a worktree, both paths and the failure path: submodule at 8cb8fb64d (main's pin, the tool does not exist yet) -> rc 77, reason printed submodule at ddd415f4a (pending #2834) -> "stale-expectations: 31 recorded, every one exported by a corpus and selected by no matcher" rc 0 tool present, tests/hrx-ops-test.cpp absent -> rc 2 (a failure, not a skip) ci.yml needs no change: it already fetches the submodule for the chat-template renderer ("The llama.cpp sources the chat-template renderer compiles", --depth 1, ~180 MB, 8 s), so the row has its tool wherever CI runs. `--depth 1` at a pinned sha was checked here and works over https, which is what .gitmodules specifies.
|
VERDICT at ce9599e: READY. It is the row I asked for in The wrapper keeps the tool's codes, and skips for a reasonif [ ! -f "$tool" ]; then
printf '%s\n' "hrx_stale_expectations: skip -- no $tool (submodule not checked out, or a pin before llama.cpp#419)" >&2
exit 77
fi
exec python3 "$tool" --check --root "$fork"
The It will actually run — verified, because that was my last retractionOn The skip above is my own worktree, which has no submodule — correct behaviour for an absent tool. On CI the submodule is fetched (
Two notes, no change requested
What I checked and did not
|
|
Draft, so a note rather than a verdict — and it is an ordering note: at the pin that is on main right now, this row would skip on every run, and an unbaselined skip is what The wrapper is correcttool=$fork/ggml/src/ggml-hrx/tools/check_stale_expectations.py
[ -f "$tool" ] || { echo "skip -- no $tool (submodule not checked out, or a pin before llama.cpp#419)" >&2; exit 77; }
exec python3 "$tool" --check --root "$fork"That is the right shape — The ordering problemSo with today's pin the new row skips on every PR, and nothing baselines it — And the fix is already in the queue: Suggested order, and it is the whole review: #2834 → #2837, in that order, and the PR body should say so plainly — "this row is a no-op until the pin bump lands, and it is a NEW SKIP in the meantime". Why the row is worth having at all
That last clause is the argument. A recorded-stale entry silences a real failure; a pin bump is the moment the dispatch can change under a table that no longer describes it. Running the check on every pin bump is exactly the coverage the ratchet needs, and the engine's suite is the only place in the fleet that runs on every PR. One thing I would add while it is a draftThe skip message cannot distinguish the two reasons it names. "submodule not checked out" and "a pin before llama.cpp#419" are very different states — the first is a broken checkout, the second is a pin that has not been bumped — and the row will be in the second state for the entire life of this PR. One |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at ce9599e: READY — (a draft; reviewed while the pin that carries its tool is still moving, because the two arms are checkable right now)
Both arms of the gate are real, and I ran them against the two pins.
$ submodule at ddd415f4a (main + #2834's bump, which is llama.cpp#419)
$ bash tests/hrx_stale_expectations.sh ~/wt/cl-review-engine
stale-expectations: 31 recorded, every one exported by a corpus and selected by no matcher rc=0
$ submodule at 8cb8fb64d (the pin before #419 — no tool in the tree)
$ bash tests/hrx_stale_expectations.sh ~/wt/cl-review-engine
hrx_stale_expectations: skip -- no …/check_stale_expectations.py (submodule not checked out, or a pin before llama.cpp#419)
rc=77
77 rather than 0 for "the tool is not in the tree" is the whole reason this row is worth having: a wrapper that answered 0 with nothing to run would be the "a check that cannot run reports success" defect the suite keeps removing, and the header says so in those words. SKIP_RETURN_CODE 77 on the ctest row turns that into a reported skip rather than a silent pass.
Why the row belongs in this suite
The comment names the dependency precisely: the fork has no CI job that runs any of its 43 test-hrx-* rows, so the engine's suite is the only place this check runs on every PR — and a pin bump is exactly when a recorded-stale entry can start hiding a real mis-selection, which is the moment nobody re-reads that table. Putting it here means #2834's bump is validated by the same PR that moves it, rather than by a device run weeks later.
Two notes for when it undrafts
- Name the version dependency in the skip text as a table, not just a sentence —
pin >= llama.cpp#419is already in the message; adding the sha (ddd415f4a) would let a reader tell "too old" from "not checked out" without runninggit -C third_party/llama.cpp log. - The row is device-free by construction (a Python tool over source text), so it needs no
SKIP_RETURN_CODEfor a device and no ticket — worth saying in one clause, because the neighbouringhrx_*rows are all device rows and a reader will assume this one is too.
Nothing else: the wrapper keeps the tool's own 1/2 codes, passes the root explicitly rather than assuming cwd, and the -f "$tool" test is the right gate (a pin before #419 has no file, which is the case measured above).
|
Superseded by #2839, which does the same delegation with two things mine lacks: a |
|
Note for the merge loop: |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
#2840 does the same job and is the stronger of the two — this one should close rather than land beside it. Both are wrappers around the fork's
I verified both arms of #2840 at its head: Two rows for one table is the duplicate case the fleet keeps paying for — and note the duplicate detector could not see this pair, because both PRs say |
Claiming engine#2836 — "the pinned fork's ctest never runs: 43
test-hrx-*rows are registered and unexecuted, and the #419 stale-expectation check is one of them." The issue had no row inISSUE-OWNERS.md.Draft on purpose: engine holds more than three non-draft PRs against the CI cap; this flips to ready when a slot frees.
What it does
tests/hrx_stale_expectations.shruns the fork'scheck_stale_expectations.py --check --root <fork>— the table of kernel namestests/hrx-ops-test.cppdemands and no matcher selects (engine#2774), device-free, about a second.Why a wrapper and not the one-liner the issue proposed
The tool lives in the submodule, so it is absent in a tree without
third_party/llama.cppchecked out, and at every pin before llama.cpp#419. Both of those are facts about the checkout, not about the table, so they must be a skip (77) with the reason printed — a row that returned 0 with no tool would be the "a check that cannot run reports success" defect this suite keeps removing (the same shape ashrx_f16_narrowing_check's 77).The tool's own codes stay untouched:
2is deliberately not mapped to a skip: at this point the tree exists, so a missinghrx-ops-test.cppor a missing table is drift, not an absent corpus.Measured, both paths plus the failure path
One correction to the issue, and it makes the change smaller
The issue's one-liner would have failed rather than run, for a reason I got wrong myself first: I assumed CI does not check out submodules, and it does —
ci.ymlalready has "The llama.cpp sources the chat-template renderer compiles:git submodule update --init --depth 1 third_party/llama.cpp" (~180 MB, 8 s). So no workflow change is needed: the row has its tool wherever CI runs, and it starts running for real the moment #2834's pin lands (at main's current pin the tool does not exist yet, so today it skips — visibly, with the reason).That also means
hrx_f16_narrowing_check— registered withSKIP_RETURN_CODE 77for the same reason — does run in CI today. Worth knowing before anyone "fixes" it.What this does not do
The other 42
test-hrx-*rows mostly need a device and should stay out of CI (they skip 77 without one). Auditing that subset for further host-runnable rows is #2836's follow-up, not this PR.copyright --checkclean;tests_referenced_check.pyclean (110/110 referenced);bash -nclean.