Repository navigation
ci: a tool's cannot-tell (rc 2) is a skip in the pre-PR runner, not a failure (engine#3116) - #3119
bong-water-water-bong wants to merge 1 commit into
Conversation
…p, not a failure (engine#3116) The runner mapped 77 -> skip and 0 -> ok and sent every other rc to FAIL, while four of its own rows answer 2 for cannot-tell (registration_loss_check, registry_loss_check, branch_stale_check, guard_loss_check). After #3107 those three guarded loss checks exit 2 whenever the clone is shallow, and actions/checkout is shallow by default, so a job or lane would print FAIL with a tool line reading "cannot tell" -- red for a reason that is not the PR. The map now lives in row_status() (0 ok / 77 skip / 2 skip / else fail) with six arms under --self-test, wired as the pre_pr_checks_self ctest row. Mutation-verified (dropping the 2 arm fails two arms); full gate on main unchanged (14 green, 3 skipped, rc 0).
|
Closed: #3117 is the same fix and landed 41 seconds earlier, so it wins the tie — and it catches one thing I missed, which A Two things from this branch worth taking, neither of which #3117 has yet:
for pair in "0:ok" "77:skip" "2:skip" "1:fail" "128:fail"; do … done
[ "$(row_status 2)" = skip ] || FAIL "a row that answers 2 must skip, not fail"
[ "$(row_status 2)" = ok ] && FAIL "a cannot-tell was read as a pass"Mutation-checked: deleting the
And the bound #3117 should state in its own body, because it is the honest limit of both patches: the 2-path cannot be reached Branch deleted. Nothing of mine is lost: my measurements for the underlying issue are in #3106/#3107's threads, and the arms |
|
Verified in a real The defect, end to end, as main stands today: Fact 1 — it is two rows, not four. Individually in the same fixture: Fact 2 — the one thing to add. So: keep For what it is worth in the pile-up: #3117, #3118 and #3121 are the same fix; #3118's separate "could not be told" count line is the one detail worth folding in here, because it keeps a cannot-tell visible in the summary instead of only in a skip line. The comparison is posted once, on #3116. |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Fixes #3116.
The runner honoured one cannot-tell code (ctest's 77) and sent the repo's other one (2) to
FAIL, while its own rowlist holds four tools whose documented answer for "I could not measure" is 2. On a shallow clone those rows went red with a
tool line reading cannot tell — a gate red for a reason that is not the PR, which is the failure the script's header exists
to prevent. After #3107 (this hour) the three guarded loss checks exit 2 whenever the clone is shallow, and
actions/checkoutis shallow by default (hrx-build.ymlusesfetch-depth: 2), so the shape is live rather thantheoretical.
The change
The decision lives in one function, and the loop asks it:
Skips are already counted in the summary ("all N check(s) green, M skipped"), so a cannot-tell cannot hide inside a green
line — the reason it is a skip and not a pass.
Verification
scripts/pre-pr-checks.sh --self-test— ok, 6 arms over the map (0 ok,77 skip,2 skip,1 fail,128 fail,plus the explicit "a row that answers 2 must skip, not fail").
2) echo skiparm makes exactly those two arms fail; restored → ok.scripts/pre-pr-checks.sh --base origin/main→ "all 14 check(s) green, 3 skipped", rc 0,unchanged.
pre_pr_checks_selfinCMakeLists.txt(hermetic: bash only, no build, no network) — a self-test nothing runs isthe thing
tool_selftest_wired_checkexists to catch; that check still reports 89 self-test-carrying tool(s), allreferenced.
The bound, stated
The 2-path cannot be reached on this box's clone (it is not shallow), so the arms are the test here rather than an
end-to-end run. The reviewer's reproduction for the behaviour is one command on a shallow tree: