Repository navigation
Commit 0816365
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 a4bcac9 commit 0816365
2 files changed
Lines changed: 121 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
126 | 152 | | |
127 | 153 | | |
128 | 154 | | |
| |||
337 | 363 | | |
338 | 364 | | |
339 | 365 | | |
340 | | - | |
| 366 | + | |
341 | 367 | | |
342 | 368 | | |
343 | 369 | | |
| |||
487 | 513 | | |
488 | 514 | | |
489 | 515 | | |
490 | | - | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
491 | 520 | | |
492 | 521 | | |
493 | 522 | | |
| |||
538 | 567 | | |
539 | 568 | | |
540 | 569 | | |
541 | | - | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
542 | 574 | | |
543 | 575 | | |
544 | 576 | | |
| |||
723 | 755 | | |
724 | 756 | | |
725 | 757 | | |
726 | | - | |
| 758 | + | |
727 | 759 | | |
728 | 760 | | |
729 | 761 | | |
| |||
763 | 795 | | |
764 | 796 | | |
765 | 797 | | |
766 | | - | |
| 798 | + | |
767 | 799 | | |
768 | 800 | | |
769 | 801 | | |
| |||
775 | 807 | | |
776 | 808 | | |
777 | 809 | | |
778 | | - | |
| 810 | + | |
779 | 811 | | |
780 | 812 | | |
781 | 813 | | |
| |||
933 | 965 | | |
934 | 966 | | |
935 | 967 | | |
936 | | - | |
| 968 | + | |
937 | 969 | | |
938 | 970 | | |
939 | 971 | | |
| |||
943 | 975 | | |
944 | 976 | | |
945 | 977 | | |
946 | | - | |
| 978 | + | |
947 | 979 | | |
948 | 980 | | |
949 | 981 | | |
| |||
| 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