Guard pr-reviewer READY sentinel on CI and mergeability
User description
Summary
- tighten the review harness READY instruction so pending/in-progress checks and merge conflicts block READY
- verify a harness READY sentinel with live GitHub mergeability and statusCheckRollup data before Slack notification
- downgrade READY and log a warning when GitHub reports conflicts, unknown mergeability, pending checks, in-progress checks, or failed checks
Tests
- npm test
Summary by cubic
Guard the READY sentinel so we only ping Slack when the PR is mergeable and all required checks are complete and passing. READY is now verified against GitHub mergeability and statusCheckRollup; if not satisfied, we downgrade and log instead of notifying.
-
Bug Fixes
- Verify harness READY via GitHub (
mergeable,statusCheckRollup) usinggh pr view; suppress Slack ping and log a warning when checks are pending/in‑progress/failed or the PR isn’t mergeable. - Tighten the prompt to only allow READY when all checks are complete/passing and no merge conflicts; add tests for prompt text and READY gating.
- Verify harness READY via GitHub (
-
Migration
- Ensure the runtime has the GitHub CLI (
gh) installed and authenticated; the agent callsgh pr view --json mergeable,statusCheckRollup.
- Ensure the runtime has the GitHub CLI (
CodeAnt-AI Description
Only send READY when the PR is actually mergeable and checks are finished
What Changed
- The review flow now ignores a READY signal unless GitHub shows the PR can be merged and every required check has finished and passed.
- If checks are still pending, in progress, failed, or the PR has merge conflicts, the READY signal is downgraded and Slack is not notified.
- The review prompt now tells the agent not to print READY until those conditions are met.
- Added coverage for READY gating and for the updated prompt wording.
Impact
✅ Fewer premature READY alerts
✅ Fewer Slack pings on blocked PRs
✅ Clearer handoff only when review can move forward
💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
@codeant-ai ask: Your question here
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
@codeant-ai ask: Can you suggest a safer alternative to storing this secret?
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
@codeant-ai: Your feedback here
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
@codeant-ai: Do not flag unused imports.
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
@codeant-ai: review
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.