Commit 8cde324
committed
fix(ci): the staleness premise is false for CodeRabbit, so ship it off (#3312)
Fifth-round review of #3317. The `claimed-verdict` rule false-positives on 2 of
its 4 claimed fires, INCLUDING THE FLAGSHIP #3276, and the cause is a premise
this repo's primary reviewer does not honour: CODERABBIT SUBMITS NO REVIEW EVENT
AT ALL WHEN A RUN FINDS NOTHING ACTIONABLE. So "no review object naming the
head" is not "the head was not reviewed". Measured live 2026-08-26 on all four:
#3276 head 1305f77 -- Review queued 14:09:52 -> in progress 14:09:55 ->
success 14:12:27. A real 155 s cycle ON THE HEAD, and the walkthrough comment
updated 14:12:25Z reads "No actionable comments were generated in the recent
review" over "changes between c26e453 and 1305f77": the head, including the
commit the rule called unreviewed. #3288 is identical (181 s, head named).
BOTH FALSE.
#3227 (14 s) and #2952 (9 s) are genuine -- their walkthroughs read "Reviews
paused ... under active development", and CodeRabbit published
`success / Review completed` regardless.
NOTHING IN THE STRUCTURED DATA SEPARATES THE TWO PAIRS. The status is
byte-identical across all four; CodeRabbit publishes no check RUN on any of
these heads, so there is no `conclusion` or `output.title` to read; and the
suggested narrowing -- "a completed review cycle on this head counts as review"
-- is not a narrowing but a deletion, because clause (b) already requires
`success` on the head and a `success` on the head IS a completed cycle, so it
silences #3227 and #2952 too. What is left is cycle DURATION, an unversioned
timing heuristic on a third party, and the reviewer's PROSE, which the config
rules out on purpose. It also contradicted this file's own stated hole: #3316
has success on its head, zero reviews, and is deliberately silent.
A rule that is wrong half the time cannot gate a PR and cannot be repaired with
a discriminator that does not exist, so the machinery, the three scopings and
the four worked examples all ship and `staleReviewPolicy` DEFAULTS TO `off`.
`off` is inert rather than merely silent -- it adjudicates nothing, so it
refuses nothing and does not pay for the paginated reviews walk -- and it NEVER
prints a pass: it prints `STALE_REVIEW not adjudicated` naming the knob.
#3227/#2952 stay catchable for whoever opts in. Verified live over #3276, #3288,
#3227, #2952, #3315, #3309, #2931 and #3316: `off` is silent on all eight, and
`claimed-verdict` still reproduces its 4-fire/4-silent table exactly.
A SUPPRESSED FINDING NO LONGER RENDERS AS A CLEAN PASS. With
`staleReviewSeverity: "fail"` and the shipped `reviewVerdictSeverity: "warn"`, a
rate-limited CodeRabbit with a stale review printed
`✅ No reviewer claims a verdict ... from a review of an older commit` and exited
0, while the same input under `configured-authors` printed `❌ STALE_REVIEW` and
exited 1: the `alreadyFlagged` dedup dropped the finding, so `stale.length === 0`
conflated "clean" with "suppressed" and the severity knob was inoperative.
`staleReviews` now returns the finding with `suppressedBy` set, and the caller
suppresses the SENTENCE, not the VERDICT -- one line naming what already
reported it, and the exit code still tracks the knob.
ORDERING IS `id` ALONE, and the old `(submitted_at, id)` was strictly worse: the
primary key was the one field that can be absent, so a review AT THE HEAD with
no timestamp sorted to `''`, lost to every dated review, and would have reported
a CURRENT PR as stale -- the finding the JSDoc promises is impossible. `id` is
always present (`UNREADABLE_REVIEW_ID` refuses otherwise) and removes the class
outright. `submitted_at` is still printed, no longer compared.
`fetchCheckRunDescriptions` now walks `--paginate --slurp` through
`flattenCheckRunPages`, which refuses a partial walk. It was not live (31 check
runs on the largest head measured, against a 100 page size) but the failure mode
was the bad one: under `claimed-verdict` a missing context is adjudicated by
SILENCE, so truncation was a false negative, not a failure.
And the gate's own unit tests now RUN. Neither test file was reached by any
workflow -- test.yml names its script tests one by one and this pair was never
added, and check-test-glob-coverage audits package globs, not `scripts/`.
10 mutations run against the guards; 10 of 10 caught, and the tenth only after
adding the WIRING test the sweep proved was missing: replacing
`flattenCheckRunPages(...)` with an inline `pages.flatMap(p => p.check_runs ?? [])`
survived the entire suite, because the helper's refusal was tested and its USE
was not. Every mutation restored by inverse edit, byte-identity asserted.
Refs #3312
Claude-Session: https://claude.ai/code/session_01QPHChk3Ve9N519A4kY74361 parent 4d62077 commit 8cde324
6 files changed
Lines changed: 493 additions & 75 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
116 | 128 | | |
117 | 129 | | |
118 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
116 | 127 | | |
117 | 128 | | |
118 | 129 | | |
| |||
147 | 158 | | |
148 | 159 | | |
149 | 160 | | |
| 161 | + | |
150 | 162 | | |
151 | 163 | | |
152 | 164 | | |
| |||
436 | 448 | | |
437 | 449 | | |
438 | 450 | | |
439 | | - | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
440 | 457 | | |
441 | 458 | | |
| 459 | + | |
| 460 | + | |
442 | 461 | | |
443 | | - | |
444 | | - | |
445 | 462 | | |
446 | 463 | | |
447 | 464 | | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
| 465 | + | |
455 | 466 | | |
456 | 467 | | |
457 | 468 | | |
| |||
598 | 609 | | |
599 | 610 | | |
600 | 611 | | |
601 | | - | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
602 | 634 | | |
603 | 635 | | |
604 | 636 | | |
| |||
607 | 639 | | |
608 | 640 | | |
609 | 641 | | |
610 | | - | |
| 642 | + | |
611 | 643 | | |
612 | 644 | | |
613 | 645 | | |
614 | 646 | | |
615 | 647 | | |
616 | 648 | | |
617 | 649 | | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
618 | 669 | | |
619 | 670 | | |
620 | 671 | | |
| |||
719 | 770 | | |
720 | 771 | | |
721 | 772 | | |
722 | | - | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
723 | 778 | | |
724 | 779 | | |
725 | 780 | | |
726 | 781 | | |
727 | | - | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
728 | 787 | | |
729 | 788 | | |
730 | 789 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
616 | 616 | | |
617 | 617 | | |
618 | 618 | | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
619 | 633 | | |
620 | | - | |
| 634 | + | |
621 | 635 | | |
622 | 636 | | |
623 | | - | |
| 637 | + | |
624 | 638 | | |
625 | 639 | | |
626 | 640 | | |
| |||
633 | 647 | | |
634 | 648 | | |
635 | 649 | | |
636 | | - | |
| 650 | + | |
637 | 651 | | |
638 | 652 | | |
639 | 653 | | |
| |||
650 | 664 | | |
651 | 665 | | |
652 | 666 | | |
653 | | - | |
| 667 | + | |
654 | 668 | | |
655 | 669 | | |
656 | | - | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
657 | 688 | | |
658 | 689 | | |
659 | 690 | | |
660 | 691 | | |
661 | 692 | | |
662 | | - | |
| 693 | + | |
663 | 694 | | |
664 | 695 | | |
665 | 696 | | |
666 | 697 | | |
667 | | - | |
668 | | - | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | | - | |
673 | | - | |
674 | | - | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
675 | 728 | | |
676 | 729 | | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
682 | 738 | | |
683 | 739 | | |
684 | 740 | | |
| |||
688 | 744 | | |
689 | 745 | | |
690 | 746 | | |
691 | | - | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
692 | 751 | | |
693 | 752 | | |
694 | 753 | | |
695 | 754 | | |
696 | 755 | | |
697 | 756 | | |
698 | | - | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
699 | 761 | | |
700 | 762 | | |
701 | 763 | | |
702 | 764 | | |
703 | 765 | | |
704 | 766 | | |
705 | | - | |
| 767 | + | |
706 | 768 | | |
707 | 769 | | |
708 | 770 | | |
| |||
748 | 810 | | |
749 | 811 | | |
750 | 812 | | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
751 | 846 | | |
752 | 847 | | |
753 | 848 | | |
| |||
766 | 861 | | |
767 | 862 | | |
768 | 863 | | |
769 | | - | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
770 | 868 | | |
771 | 869 | | |
772 | 870 | | |
| |||
0 commit comments