Repository navigation
Commit 665ea86
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_01U9zFxq8V4qxG4aMzJhGBFn1 parent 7aab503 commit 665ea86
2 files changed
Lines changed: 121 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 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 | + | |
129 | 155 | | |
130 | 156 | | |
131 | 157 | | |
| |||
340 | 366 | | |
341 | 367 | | |
342 | 368 | | |
343 | | - | |
| 369 | + | |
344 | 370 | | |
345 | 371 | | |
346 | 372 | | |
| |||
490 | 516 | | |
491 | 517 | | |
492 | 518 | | |
493 | | - | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
494 | 523 | | |
495 | 524 | | |
496 | 525 | | |
| |||
541 | 570 | | |
542 | 571 | | |
543 | 572 | | |
544 | | - | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
545 | 577 | | |
546 | 578 | | |
547 | 579 | | |
| |||
726 | 758 | | |
727 | 759 | | |
728 | 760 | | |
729 | | - | |
| 761 | + | |
730 | 762 | | |
731 | 763 | | |
732 | 764 | | |
| |||
766 | 798 | | |
767 | 799 | | |
768 | 800 | | |
769 | | - | |
| 801 | + | |
770 | 802 | | |
771 | 803 | | |
772 | 804 | | |
| |||
778 | 810 | | |
779 | 811 | | |
780 | 812 | | |
781 | | - | |
| 813 | + | |
782 | 814 | | |
783 | 815 | | |
784 | 816 | | |
| |||
936 | 968 | | |
937 | 969 | | |
938 | 970 | | |
939 | | - | |
| 971 | + | |
940 | 972 | | |
941 | 973 | | |
942 | 974 | | |
| |||
946 | 978 | | |
947 | 979 | | |
948 | 980 | | |
949 | | - | |
| 981 | + | |
950 | 982 | | |
951 | 983 | | |
952 | 984 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1433 | 1433 | | |
1434 | 1434 | | |
1435 | 1435 | | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
0 commit comments