ci: review-gate passes when cubic is out of quota and CodeRabbit reviewed

Merged
RI
14h ago
+10-0

cubic's free review quota is used up, so review-gate failed on every pull request even when CodeRabbit had reviewed it. With this change the gate passes with a warning when cubic reports its limit is reached and CodeRabbit finished a review of the same commit. It still fails when neither bot reviewed: cubic out of quota and CodeRabbit rate limited, or CodeRabbit skipped the commit.

Same file as machine-made/bun-do#13 (merged).

Verification

  • Gate step tested against a fake gh with fixed check-run JSON, 10 cases, all as expected: cubic out of quota with CodeRabbit finished on the same commit passes with a warning; cubic out of quota with CodeRabbit rate limited, skipped, no files or path filters fails; cubic error or missing fails; both reviewed passes.
  • Live on machine-made/bun-do#13 and #12: review-gate passed with "cubic is out of review quota; CodeRabbit reviewed this commit."

Summary by CodeRabbit

  • Chores
    • Automated review checks now handle quota exhaustion conditionally. When a review service reports that its limit has been reached, the gate passes with a warning only if the separate review check has completed successfully; otherwise, the gate fails. This keeps the outcome visible and prevents quota exhaustion alone from being treated as a successful review.