feat(hr-pr-followup): block the review gate on a running or non-successful cubic check

Merged
BO
2d ago
+101-18

The review gate in hr-pr-followup (check-pr-review.ts, run by the landing helper) only watched CodeRabbit's check. A cubic check that was still running, or that finished without reviewing the head, did not block a landing. This makes cubic's check block the same way.

On the head commit, a check named cubic · AI code reviewer now needs to be complete with SUCCESS:

  • A running check refuses, and --wait polls it every 30 seconds like CodeRabbit's.
  • Any other conclusion refuses with the follow-up message, including NEUTRAL and skipped.
  • A head commit with no cubic check is not blocked, because cubic has no config file to require.

Cost. NEUTRAL means cubic did not review the head. I checked real heads: house-rules #320 ("Incremental review could not start"), #301 ("Automatic AI review not started after branch rewrite") and #300 ("AI review line limit reached") are all completed / neutral, and #330's head is completed / success ("AI review completed"). Across 80 recent PRs in house-rules and swarmail, 50 were SUCCESS, 14 NEUTRAL and none failed or were cancelled (survey receipt in the Manager's records). So a NEUTRAL cubic result now blocks that PR until someone comments @cubic review or the limit clears. The refusal text and references/review-helpers.md say this.

Test. Four new tests in check-pr-review.test.js cover a running cubic check, a NEUTRAL one, a cubic commit status and --wait polling. They fail on main (14 pass, 4 fail) and pass with the change (18 pass, 0 fail). A similarly named check such as bicubic-resize tests is not treated as cubic.

Docs and checks. Updated the script header, references/review-helpers.md, the "CodeRabbit only" wording in SKILL.md, the README row and the changelog. node --test 179 pass; bun test 521 pass, 8 skipped, 0 fail; check:package --bun 236 files; oxlint (one existing warning in test/install-ps1.test.mjs); oxfmt --check clean; plain-prose pass on the new text.

This adds a commit past v0.13.0 and does not release, tag or publish. Host adoption is a separate step.


Summary by cubic

Makes the hr-pr-followup review gate treat a cubic check on the head commit like CodeRabbit's. A cubic check must complete with SUCCESS: a running one refuses (and --wait polls it every 30 seconds), and any other conclusion, NEUTRAL and skipped included, blocks landing. A head commit with no cubic check is not blocked, since cubic has no config file to require.

  • Only the check named exactly cubic · AI code reviewer counts; similarly named checks like bicubic-resize tests are ignored.
  • A successful cubic check does not satisfy the .coderabbit.yaml presence check, and a cubic commit status needs SUCCESS without the CodeRabbit-style completion description.
  • NEUTRAL means cubic did not review the head (for example "Incremental review could not start" or "AI review line limit reached"), so the PR stays blocked until someone comments @cubic review or the limit clears; the refusal text and references/review-helpers.md explain this.
  • Four new tests cover a running cubic check, NEUTRAL, a cubic commit status, and --wait polling.
  • Updated the script header, SKILL.md, the README, and the changelog.

Summary by CodeRabbit

  • Updates
    • PR follow-up checks now include Cubic reviews. A running check blocks landing unless you wait for it to finish; completed checks must be successful. Neutral or skipped results block until you comment @cubic review or the limit clears. If no Cubic check is found, it does not block.
    • Release-batching guidance now recommends checking every package—including private packages—for commits since its latest release tag, and recommends a new release when commits exist. This recommendation does not authorize tagging, publishing, or announcing.