Repository navigation
Commit f0ce432
feat: render a skipped check as skipped, not as a green tick (#260)
* feat: render a skipped check as skipped, not as a green tick
PR #258 in this repository reported "All 5 checks passed" over five green
ticks while validating nothing: its author is dependabot[bot], which the
org config lists in ignore_authors, so every rule was bypassed. The report
had no way to say so -- ScopeResult knew only pass and fail, and a skip
arrived looking exactly like a pass.
The bare labels in that summary were the only hint anything was different,
and only because a skipped check reports no value. That was incidental, not
a signal.
commit-check 2.13.4 reports "status": "skip", so this consumes it:
* ScopeResult.status gains "skip", set when every check in the scope
skipped. One real verdict outranks the skips.
* Skipped scopes render "⊘ <label> (skipped)" -- deliberately not a ✔,
and with no value, because nothing was examined.
* The headline distinguishes the three cases. All skipped reads
"⊘ All N checks skipped — nothing was validated"; a partial skip reads
"✅ 3 of 5 checks passed, 2 skipped" rather than claiming all passed.
* The step log line follows the same rule.
Back-compatible by construction: against an engine that never emits "skip"
no branch here is reachable, and a test pins that the old rendering is
unchanged.
Adds a golden test for the fully skipped report so the layout stays exact,
alongside tests for the partial-skip headline, failure precedence, and the
one-real-verdict rule. The output specification comment and the README gain
the skipped case, the README's rendered from the real renderer.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U9zFxq8V4qxG4aMzJhGBFn
* fix: stop reporting a skipped run as a failure
Review found the same defect this PR set out to fix, one layer down.
run_commit_check has always failed only on "fail", but add_job_summary,
add_pr_comments (two call sites) and set_result_output each asked
`all(scope.status == "pass")` instead. Those were equivalent only while
pass and fail were the only statuses. With skip added, a skipped-only run
rendered "⊘ All N checks skipped" and then exited 1 and emitted result
status "fail" -- a bypassed policy turned into a broken build.
Four copies of a two-state assumption is the same shape as the four copies
of the reduce-to-overall rule in commit-check#537, so it gets the same
remedy: overall_status() and exit_code_for(), defined once and used by
every path.
Three smaller findings, all real:
* _markdown_table skipped only `pass` scopes, so a run with both a failure
and a skip added a row with no value and no rule links -- a blank
accusation under a "Failed checks" heading. It now takes failures only.
* The all-skipped verdict fired on an empty result set, where
`skipped == total` is trivially true, reporting "All 0 checks skipped".
It now requires a scope, matching the guard the step log already had.
* The step log said "all checks passed (2 skipped)" for a partial skip,
contradicting its own report headline. It now reads
"2 of 3 checks passed, 1 skipped".
Each fix is pinned by a test that fails when the fix is reverted, checked
one at a time.
Not changed: the requirements.txt pin. The README documents 2.13.4 as the
minimum for ⊘ to appear, and 2.13.4 does not exist yet -- commit-check#537
is still open. Pinning it now would install a version that cannot be
resolved. The rendering is back-compatible by construction, so the bump
belongs with the release, not here.
The subject avoids "treat", which reads as imperative but is absent from
the 396-verb list in commit-check 2.13.1 -- the version this action still
pins. It was added by commit-check#527 and shipped in 2.13.2, so the
whitelist on the runner is three releases behind the project's own. The
pin bump in #258 fixes that; this only sidesteps it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U9zFxq8V4qxG4aMzJhGBFn
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>1 parent e6270e1 commit f0ce432
3 files changed
Lines changed: 302 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
306 | 340 | | |
307 | 341 | | |
308 | 342 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
105 | 115 | | |
106 | 116 | | |
107 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
108 | 122 | | |
109 | 123 | | |
110 | 124 | | |
111 | 125 | | |
112 | 126 | | |
113 | 127 | | |
114 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
115 | 155 | | |
116 | 156 | | |
117 | 157 | | |
| |||
326 | 366 | | |
327 | 367 | | |
328 | 368 | | |
329 | | - | |
| 369 | + | |
330 | 370 | | |
331 | 371 | | |
332 | 372 | | |
| |||
384 | 424 | | |
385 | 425 | | |
386 | 426 | | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
387 | 432 | | |
388 | 433 | | |
389 | 434 | | |
| |||
467 | 512 | | |
468 | 513 | | |
469 | 514 | | |
470 | | - | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
471 | 525 | | |
472 | 526 | | |
473 | 527 | | |
| |||
495 | 549 | | |
496 | 550 | | |
497 | 551 | | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
498 | 561 | | |
499 | 562 | | |
500 | 563 | | |
| |||
507 | 570 | | |
508 | 571 | | |
509 | 572 | | |
510 | | - | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
511 | 577 | | |
512 | 578 | | |
513 | 579 | | |
| |||
592 | 658 | | |
593 | 659 | | |
594 | 660 | | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
595 | 680 | | |
596 | 681 | | |
597 | 682 | | |
| |||
666 | 751 | | |
667 | 752 | | |
668 | 753 | | |
| 754 | + | |
669 | 755 | | |
670 | 756 | | |
671 | 757 | | |
672 | | - | |
673 | | - | |
674 | | - | |
675 | | - | |
| 758 | + | |
676 | 759 | | |
677 | 760 | | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
678 | 774 | | |
679 | 775 | | |
680 | 776 | | |
| |||
702 | 798 | | |
703 | 799 | | |
704 | 800 | | |
705 | | - | |
| 801 | + | |
706 | 802 | | |
707 | 803 | | |
708 | 804 | | |
| |||
714 | 810 | | |
715 | 811 | | |
716 | 812 | | |
717 | | - | |
| 813 | + | |
718 | 814 | | |
719 | 815 | | |
720 | 816 | | |
| |||
872 | 968 | | |
873 | 969 | | |
874 | 970 | | |
875 | | - | |
| 971 | + | |
876 | 972 | | |
877 | 973 | | |
878 | 974 | | |
| |||
882 | 978 | | |
883 | 979 | | |
884 | 980 | | |
885 | | - | |
| 981 | + | |
886 | 982 | | |
887 | 983 | | |
888 | 984 | | |
| |||
0 commit comments