Skip to content

feat: implement issue #1859 — dev-lead treats non-required failing checks as blocking — refuses to post comment dispositions, so pr-review can never approve (completes #1795) - #1861

Merged
don-petry merged 4 commits into
mainfrom
dev-lead/issue-1859-20260921-0129
Sep 21, 2026
Merged

don-petry merged 4 commits into
mainfrom
dev-lead/issue-1859-20260921-0129

Conversation

@don-petry

Copy link
Copy Markdown
Collaborator

Closes #1859

Implemented by dev-lead agent. Please review.

…ecks as blocking — refuses to post comment dispositions, so pr-review can never approve (completes #1795)
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 28 minutes.

Check out review usage here.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: fc8ddcc9-309b-4d40-bc51-4d7ab8b1f194

📥 Commits

Reviewing files that changed from the base of the PR and between b14c752 and 2281264.

📒 Files selected for processing (3)
  • scripts/dev-lead-fix-reviews.sh
  • scripts/lib/consumer-manifest.json
  • tests/dev-lead/unit/test_fix_reviews.bats

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (no-changes)

No changes were needed for this PR.

@don-petry
don-petry enabled auto-merge (squash) September 21, 2026 02:01
@donpetry-bot

Copy link
Copy Markdown
Contributor

Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-09-21T03:01:09Z.

Comment thread scripts/dev-lead-fix-reviews.sh

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request integrates the ci-status.sh library into the dev-lead-fix-reviews.sh script to delegate CI blocking gate logic, ensuring that only required checks block PR progression, and updates associated unit tests. Feedback on the changes suggests refining ci_blocking_reason() to distinguish between an unreadable ruleset and a successfully read but empty ruleset to avoid misleading 'failing closed' warnings, as well as verifying the jq dependency and avoiding silencing critical pipeline errors.

Comment thread scripts/dev-lead-fix-reviews.sh
@don-petry
don-petry disabled auto-merge September 21, 2026 02:03
@donpetry-bot

donpetry-bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor
Superseded by automated re-review at ed1801c6392923b1ebad35613f1d1e429cb066e1 — click to expand prior review.

Review — fix requested (cycle 1/3)

The automated review identified the following issues. Please address each one:

Findings to fix

Automated review — NEEDS HUMAN REVIEW

Risk: MEDIUM
Reviewed commit: 31960b3f28240dcb04731bbe54083128a97162e4
Cascade: triage → deep (triage: haiku 4.5 [sonnet 5] → deep: opus 4.8 [sonnet 5] + duck: o4-mini → audit: fable 5)

Summary

Substantive but well-constructed logic change (#1859/#1795): dev-lead-fix-reviews.sh delegates its blocker gate to lib/ci-status.sh (compute_ci_status) so a failing NON-required check no longer deadlocks the fix pass, while required failures, required-pending, CHANGES_REQUESTED, and an unreadable ruleset (fail-closed) still block. Correctness verified — the inlined ci_blocking_reason gate mirrors compute_ci_status exactly (confirmed by jq repro of all AC#5 cases) and the CI_STATUS_JSON reshape normalizes pending legacy statuses correctly; shellcheck clean, manifest addition valid. Escalating on gates, not code: the PR description is missing all 5 required sections and CI is not green (bats still IN_PROGRESS, template-drift FAILED).

Findings

  • info: Blocker gate correctly delegates to lib/ci-status.sh. has_hard_blockers/has_tier1_blockers now call ci_is_blocking (compute_ci_status verdict: failing|pending on the required subset, else non-blocking), preserving CHANGES_REQUESTED and unresolved-bot-thread checks. ci_blocking_reason's inlined is_pending/is_success/is_cancelled/is_required/gate-selection definitions match compute_ci_status verbatim, so the human phrase cannot drift from the actual gate. Verified by running the exact jq filter against all AC#5 cases (required-failing, required-pending plural, non-required-red -> non-blocking, all-green -> empty, unreadable-ruleset fail-closed) — outputs matched the bats assertions. [auditable: repro confirmed]
  • info: _ci_rollup_from_status_json reshape is sound. It drops all fields except name/status/conclusion, but fetch_pr_context never emits .state or .isRequired — a pending legacy status is stored as status:"in_progress"/conclusion:"pending", so after uppercasing and normalizing the synthetic "pending" conclusion to null it classifies as pending (not failing). Dev-lead relies on the ruleset required set (ruleset_required_checks) rather than .isRequired, with fail-closed on an unreadable ruleset — consistent with the library contract. [auditable: repro confirmed]
  • major: PR description is missing all 5 required sections (problem, risk, test-plan, rollback, monitoring) — body is only "Closes dev-lead treats non-required failing checks as blocking — refuses to post comment dispositions, so pr-review can never approve (completes #1795) #1859 / Implemented by dev-lead agent. Please review." Flagged by triage and the deterministic description-quality check. The trusted-stub/standards-sync carve-out does NOT apply (WORKFLOW_ONLY_CHANGE=false, TRUSTED_STUB_SYNC=false; this is a substantive shell logic change), so the missing description is a real gate failure blocking approval.
  • major: CI is not green: the bats check — the suite that exercises this exact change (223 new/changed lines in test_fix_reviews.bats, incl. the four dev-lead treats non-required failing checks as blocking — refuses to post comment dispositions, so pr-review can never approve (completes #1795) #1859 blocker-gate cases) — is still IN_PROGRESS, so the tests validating this change have not completed. Approval must wait for bats to finish green. Separately, template-drift reports FAILURE; that is the non-required check this PR is designed to stop treating as a blocker, but it should still be confirmed non-required for this branch before merge.

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.

Additional tasks

  1. Resolve all unresolved review thread comments from other reviewers
  2. Ensure all CI checks pass after your changes
  3. Rebase on the target branch if behind
  4. Do NOT modify files unrelated to the findings above

The review cascade will automatically re-review after new commits are pushed.

@donpetry-bot

Copy link
Copy Markdown
Contributor

pr-review approved on PARTIAL advisory evidence: 4/6 required advisory bots reported before the gate's quiescence-timeout fallback proceeded. Recorded for the miss-rate metric (#1596).

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-reviews (not-applied)

A commit was pushed, but it did not touch any region the review named — the requested changes were not applied. Per requested item:

  • scripts/dev-lead-fix-reviews.sh:1079 — not applied
  • scripts/dev-lead-fix-reviews.sh:1176 — not applied

@don-petry
don-petry enabled auto-merge (squash) September 21, 2026 02:16
@donpetry-bot

Copy link
Copy Markdown
Contributor

Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-09-21T03:19:08Z.

@donpetry-bot

donpetry-bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor
Superseded by automated re-review at 22812645c2d44f2a4684a434d682b91af461a036 — click to expand prior review.

Review — fix requested (cycle 2/3)

The automated review identified the following issues. Please address each one:

Findings to fix

Automated review — NEEDS HUMAN REVIEW

Risk: MEDIUM
Reviewed commit: ed1801c6392923b1ebad35613f1d1e429cb066e1
Cascade: triage → deep (triage: haiku 4.5 [sonnet 5] → deep: opus 4.8 [sonnet 5] + duck: o4-mini → audit: fable 5)

Summary

Logic change delegating dev-lead's blocker gate to lib/ci-status.sh (required-only gating, completes #1795/#1859). I confirmed the new glue is correct: red non-required checks no longer block, red required checks and CHANGES_REQUESTED still block, unreadable ruleset fails closed, and pending required checks (incl. reshaped legacy statuses) block. Both advisory findings — BASE_REF derivation in fetch_pr_context and the unreadable-vs-readable-empty 'failing closed' distinction in ci_blocking_reason — are addressed in the diff. Not security-critical (GitHub's own required-check gate still governs the real merge). Escalating rather than approving because two gates fail: the PR description is missing all 5 required sections, and CI is not yet green (bats/unit still IN_PROGRESS; several required checks QUEUED).

Findings

  • MAJOR (description-quality): PR description is missing all 5 required sections (problem, risk, test-plan, rollback, monitoring); body is only 'Closes dev-lead treats non-required failing checks as blocking — refuses to post comment dispositions, so pr-review can never approve (completes #1795) #1859 / Implemented by dev-lead agent. Please review.'. The trusted-stub/standards-sync carve-out does NOT apply (SAFETY: TRUSTED_STUB_SYNC=false, WORKFLOW_ONLY_CHANGE=false — this is a real script logic change), so the description gate stands. Requires a complete description before merge.
  • MINOR (ci-status): CI not green at head: several required checks still QUEUED/IN_PROGRESS (bats, unit, stub-structure, reusable-pin-compliance, dismiss-stale-bot-reviews-permissions, agents-paused-preflight, dev-lead/dispatch, pr-auto-review). template-drift is FAILURE but it is the known NON-required check this very PR handles (Non-required failing check silently deadlocks every merge: template-drift fails on all PRs, review agent skips as ci-failing, no approval can land #1795), so it is not a blocker. mergeStateStatus=BLOCKED, reviewDecision=REVIEW_REQUIRED. Re-check once the pending required checks finish.
  • INFO (correctness): Verified via jq against the shared compute_ci_status: reshaped-rollup gating is correct — red non-required + green required => passing; red required => failing; unreadable ruleset ('') => failing (fail closed); readable-empty ('[]') => gate-on-all-external => failing; pending required and reshaped legacy pending (status IN_PROGRESS, synthetic conclusion normalised to null) => pending. ci_blocking_reason's inline jq defs (is_terminal/is_pending/is_success/is_cancelled/is_required, own/agent filters, gate selection) mirror compute_ci_status exactly, so the human reason phrase cannot drift from the actual verdict. [auditable: repro confirmed]
  • INFO (correctness): Advisory finding (codeant, Major) resolved: fetch_pr_context now derives BASE_REF from the PR's actual base.ref via the pulls API when unset (guarded on empty PR_NUMBER/REPO, 'main' as final fallback), so fix-bot-comment/review-changes no longer apply main's required-check rules to a PR targeting another branch. Advisory finding (gemini, Medium) resolved: ci_blocking_reason distinguishes an unreadable ruleset (empty string from ruleset_required_checks) from a readable-but-empty one ('[]'), appending the 'required set unreadable — failing closed' note only in the former case; the two returns of ruleset_required_checks ('' on API error, '[]' on empty ruleset) back this distinction and both new bats tests assert it. [auditable: repro confirmed]
  • INFO (test-coverage): New behavior is well covered by bats (red non-required passes, red required blocks + names the check, CHANGES_REQUESTED blocks, unreadable fails-closed with the note, readable-empty blocks WITHOUT the note; two prior pr-review CI gate should gate on REQUIRED checks only — non-required CANCELLED *and* FAILED checks falsely block reviews #608 cancelled-check tests correctly flipped to non-blocking). NOTE: bats is not installed in this sandbox and I must not install packages, so these tests were reviewed by reading but not executed here — CI's bats/unit jobs (currently IN_PROGRESS) are the authoritative run.

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.

Additional tasks

  1. Resolve all unresolved review thread comments from other reviewers
  2. Ensure all CI checks pass after your changes
  3. Rebase on the target branch if behind
  4. Do NOT modify files unrelated to the findings above

The review cascade will automatically re-review after new commits are pushed.

@sonarqubecloud

Copy link
Copy Markdown

@don-petry
don-petry merged commit 74beeb8 into main Sep 21, 2026
61 of 64 checks passed
@don-petry
don-petry deleted the dev-lead/issue-1859-20260921-0129 branch September 21, 2026 02:37
@donpetry-bot

Copy link
Copy Markdown
Contributor

Review — fix requested (cycle 3/3)

The automated review identified the following issues. Please address each one:

Findings to fix

Automated review — NEEDS HUMAN REVIEW

Risk: MEDIUM
Reviewed commit: 22812645c2d44f2a4684a434d682b91af461a036
Cascade: triage → deep (triage: haiku 4.5 [sonnet 5] → deep: opus 4.8 [sonnet 5] + duck: o4-mini → audit: fable 5)

Summary

Correctness of the #1859/#1795 fix is sound: the blocker gate delegates to lib/ci-status.sh::compute_ci_status (required-only gating, fail-closed on an unreadable ruleset, CANCELLED non-blocking), the CI_STATUS_JSON→rollup reshape correctly normalises the synthetic pending conclusion so a pending legacy status classifies as pending (not failing), and both advisory findings are addressed (codeant: BASE_REF now derived in fetch_pr_context before the required-check lookup; gemini: the 'failing closed' note is now only emitted for a truly unreadable ruleset, not a readable-but-empty one — verified by standalone jq harness). The gate is not on any auth/secrets/merge safety path (GitHub's ruleset still enforces required checks at merge, and try_enable_auto_merge does not consume these functions), so risk is MEDIUM, not HIGH. Escalating rather than approving on two failed gates only: the PR body is missing all 5 required sections (problem/risk/test-plan/rollback/monitoring) and CI is not yet green (numerous required-candidate checks QUEUED/IN_PROGRESS; mergeStateStatus BLOCKED).

Findings

  • major: PR body ('Closes dev-lead treats non-required failing checks as blocking — refuses to post comment dispositions, so pr-review can never approve (completes #1795) #1859\n\nImplemented by dev-lead agent. Please review.') is missing all 5 required sections: problem, risk, test-plan, rollback, monitoring. This is the escalation trigger (SAFETY_CHECKS DESCRIPTION_MISSING: 5). The trusted-stub / standards-sync carve-out does NOT apply (WORKFLOW_ONLY_CHANGE=false, TRUSTED_STUB_SYNC=false; this is a substantive shell-logic change), so the missing description is a hard gate failure. Author must fill in the required sections.
  • minor: CI is not green at head SHA 2281264: many checks are still QUEUED/IN_PROGRESS (Lint, shellcheck, holdout-guard, template-drift, validate-caller-inputs, and others), reviewDecision=REVIEW_REQUIRED, mergeStateStatus=BLOCKED. No check is FAILING, but approval requires green CI — re-review once checks complete.
  • info: codeant advisory (Major, fix-bot-comment used wrong required-check rules by defaulting BASE_REF to main) is addressed: fetch_pr_context now derives BASE_REF from GET /repos/{repo}/pulls/{n}.base.ref when empty, guarded on an already-set BASE_REF, with 'main' as final fallback. fetch_pr_context runs before has_hard_blockers in all three intents (fix-reviews:1835, fix-bot-comment:1891, review-changes:1981), so the ruleset lookup sees the correct target branch. [auditable: repro unverifiable]

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.

Additional tasks

  1. Resolve all unresolved review thread comments from other reviewers
  2. Ensure all CI checks pass after your changes
  3. Rebase on the target branch if behind
  4. Do NOT modify files unrelated to the findings above

The review cascade will automatically re-review after new commits are pushed.

@donpetry-bot

Copy link
Copy Markdown
Contributor

pr-review approved on PARTIAL advisory evidence: 4/6 required advisory bots reported before the gate's quiescence-timeout fallback proceeded. Recorded for the miss-rate metric (#1596).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-human-review Flagged by automated PR review agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dev-lead treats non-required failing checks as blocking — refuses to post comment dispositions, so pr-review can never approve (completes #1795)

2 participants