Repository navigation
feat: implement issue #1795 — Non-required failing check silently deadlocks every merge: template-drift fails on all PRs, review agent skips as ci-failing, no approval can land - #1847
Conversation
…dlocks every merge: template-drift fails on all PRs, review agent skips as ci-failing, no approval can land
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
|
Warning Review limit reachedNext included review available in 29 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (8)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request implements branch ruleset-derived required-status-check gating to prevent non-required failing checks (such as template-drift) from deadlocking PR reviews. It fetches authoritative required checks from the GitHub ruleset API (with a classic protection fallback) and evaluates them alongside .isRequired flags, while logging any non-required failures. The review feedback suggests several performance optimizations to avoid spawning unnecessary subprocesses (like jq, printf, and sed) by using pure Bash features and conditional checks.
CodeAnt Nitpicks1 code suggestion1. The stub returns an already-filtered array and ignores
|
Superseded by automated re-review at
|
|
Failing check
This is exactly the ambient, non-required failure this PR (#1795) is designed to stop deadlocking reviews on — not a regression introduced here. The correct root-cause fix is to re-seed the external template ( Verified |
Dev-Lead — review-changes (applied)Changes committed and pushed. Requested items addressed:
|
|
Superseded by automated re-review at
|
Dev-Lead — fix-bot-comment (no-changes)Agent reasoning |
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: MEDIUM
Reviewed commit: 956d806daf69da445f530d4c335e3bef1e9606b9
Cascade: triage → deep (triage: haiku 4.5 [sonnet 5] → deep: opus 4.8 [sonnet 5] + duck: o4-mini → audit: fable 5)
Summary
Correct, well-tested fix for the #1795 merge deadlock: compute_ci_status now gates on the UNION of .isRequired and the branch-ruleset required-name set (never narrower than either, and fails closed to all-external when the ruleset API is unreadable), and the helper was hoisted into lib/ci-status.sh so all five call sites (review-one-pr.sh x2, sweep-stuck-reviews.sh, pr_stall_scan.sh, pr_mergeready_scan.sh) pass it. The CodeAnt 'Major' advisory (callers still pass only the rollup) is refuted at head — it predates the 956d806 commit that updated every caller. Impacts scripts pinned transitively via .github/workflows/pr-review.yml, consumed by 5 repos (.github-private, ContentTwin, bmad-bgreat-suite, google-app-scripts, markets); the fail-closed posture keeps that blast radius safe.
Downstream impact
This change is consumed by 5 downstream repo(s) that pin the affected reusable workflow / lib / prompt. Impacted consumers:
Impacted shared surfaces:
- .github/workflows/pr-review.yml
Impacted consumers (5, fetching up to 10):
- petry-projects/.github-private (pins .github/workflows/pr-review.yml)
.github/workflows/pr-review-canary.yml
.github/workflows/pr-review-trigger.yml
.github/workflows/test-dev-lead.yml
- petry-projects/ContentTwin (pins .github/workflows/pr-review.yml)
.github/workflows/pr-review.yml
- petry-projects/bmad-bgreat-suite (pins .github/workflows/pr-review.yml)
.github/workflows/pr-review.yml
- petry-projects/google-app-scripts (pins .github/workflows/pr-review.yml)
.github/workflows/pr-review.yml
- petry-projects/markets (pins .github/workflows/pr-review.yml)
.github/workflows/pr-review.yml
Findings
- minor: The gh stubs in both new/updated test files return an already-filtered required-name array and ignore --jq, so the jq parser inside ruleset_required_checks ('.parameters.required_status_checks[]?.context' for the ruleset endpoint and '.checks[]?.context' for the classic fallback) is never exercised against a realistic raw GitHub API response. A mis-parse of the ruleset payload would pass the suite. Coverage gap, not a defect — the parser matches the documented API shapes. Consider feeding the stub a raw rules-endpoint payload so the parser is validated end-to-end.
- info: PR body is terse (SAFETY_CHECKS: 5/5 required sections missing — problem/risk/test-plan/rollback/monitoring). Not covered by the trusted-stub carve-out (this is a real script change, not a stub sync). Treated as non-blocking here because the linked issue #1795 is present and the diff genuinely addresses it, and the change is heavily self-documented in-code and in-test; description-quality is a mechanical signal, not one of the two blocking hard-stops.
Reviewed by the PR-review cascade (triage: haiku 4.5 [sonnet 5] → deep: opus 4.8 [sonnet 5] + duck: o4-mini → audit: fable 5). Reply if you need a human review.



Closes #1795
Implemented by dev-lead agent. Please review.