feat: implement issue #425 — dev-lead: Incomplete issue resolution - missing code reviews and CI failures - #426
Conversation
…missing code reviews and CI failures
|
Warning Review limit reached
More reviews will be available in 35 minutes and 38 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThis PR implements conditional "no-changes" gating to prevent incorrect terminal markers when Tier-1 blockers (failing CI checks or CHANGES_REQUESTED reviews) remain unresolved. It adds context-fetching functions to collect CI and review state, updates four prompt templates with new holistic assessment phases, and wires the gating logic into three dev-lead automation flows. ChangesTier-1 blocker gating for no-changes terminal markers
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 introduces a holistic assessment phase to the dev-lead agent prompts (fix-bot-comment, fix-reviews, and review-changes) by fetching and passing CI check results and PR review states, preventing the agent from declaring "no-changes" when Tier 1 blockers exist. A critical issue was identified in the reviews API fetching logic, where historical reviews could cause stale "CHANGES_REQUESTED" states to be incorrectly treated as active blockers; a code suggestion was provided to group reviews by user and only keep the latest state.
| ALL_REVIEWS_JSON=$(gh api "repos/${REPO}/pulls/${PR_NUMBER}/reviews?per_page=100" \ | ||
| --jq '[.[] | {id:.id, user:.user.login, state:.state, submitted_at:.submitted_at}]' \ | ||
| 2>/dev/null || echo "[]") |
There was a problem hiding this comment.
The GitHub PR Reviews API returns the complete history of all reviews submitted on a pull request. If a reviewer previously requested changes (CHANGES_REQUESTED) but later approved (APPROVED) or dismissed their review, both entries will be present in the returned list. The current simple mapping will include the stale CHANGES_REQUESTED state, causing the agent to incorrectly treat it as an active Tier 1 blocker.
To fix this, we should group the reviews by user and only keep the latest review per user (sorted by review ID) to accurately reflect the current state of the PR reviews.
| ALL_REVIEWS_JSON=$(gh api "repos/${REPO}/pulls/${PR_NUMBER}/reviews?per_page=100" \ | |
| --jq '[.[] | {id:.id, user:.user.login, state:.state, submitted_at:.submitted_at}]' \ | |
| 2>/dev/null || echo "[]") | |
| ALL_REVIEWS_JSON=$(gh api "repos/${REPO}/pulls/${PR_NUMBER}/reviews?per_page=100" \ | |
| --jq '[ [.[] | select(.user != null)] | group_by(.user.login)[] | sort_by(.id) | last | {id:.id, user:.user.login, state:.state, submitted_at:.submitted_at} ]' \ | |
| 2>/dev/null || echo "[]") |
Dev-Lead — review-changes (applied)Changes committed and pushed. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c35d5b3e05
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ALL_REVIEWS_JSON=$(gh api "repos/${REPO}/pulls/${PR_NUMBER}/reviews?per_page=100" \ | ||
| --jq '[.[] | {id:.id, user:.user.login, state:.state, submitted_at:.submitted_at}]' \ |
There was a problem hiding this comment.
Filter stale changes-requested reviews
Because this fetch passes every historical PR review to the prompt, the new instruction to treat any CHANGES_REQUESTED entry as a Tier 1 blocker will misclassify PRs where a reviewer requested changes on an older commit and later the author pushed fixes or the review was superseded. In that common case there may be no open review thread and GitHub may no longer require action at the current head, but dev-lead is told it must not declare no-changes, causing repeated unnecessary runs or attempts to fix already-stale feedback. Include only blocking/current-head review state (or at least the latest review per reviewer / reviewDecision with commit oid) instead of the full review history.
Useful? React with 👍 / 👎.
| ${CI_STATUS_JSON} | ||
| ``` | ||
|
|
||
| Identify any checks with `conclusion` = `"failure"` or `"timed_out"`. These are **Tier 1 blockers** — fix them even if no review thread specifically asks for it. |
There was a problem hiding this comment.
Treat every blocking check conclusion as actionable
This prompt only makes failure and timed_out Tier 1 blockers, so a required check on the current head with another non-success conclusion such as cancelled, action_required, or stale can still leave the PR unmergeable while the agent is allowed to declare no-changes. The existing CI gate in scripts/review-one-pr.sh explicitly classifies CANCELLED, STALE, and ACTION_REQUIRED as failing, so the new holistic path should use the same non-success semantics rather than this narrower list.
Useful? React with 👍 / 👎.
| CI_STATUS_JSON=$(gh api "repos/${REPO}/commits/${HEAD_SHA}/check-runs?per_page=100" \ | ||
| --jq '[.check_runs[] | {name:.name, status:.status, conclusion:.conclusion, details_url:.details_url}]' \ |
There was a problem hiding this comment.
Include legacy commit statuses in CI context
Fetching only /check-runs misses commit status contexts reported by integrations such as Jenkins or other external CI systems; GitHub exposes those through the separate combined-status/statuses API, not this check-runs response. In repos that still use required commit statuses, CI_STATUS_JSON can be [] even though the PR is blocked, so the agent may still post a no-changes terminal marker without addressing the failing required status.
Useful? React with 👍 / 👎.
| -F owner="${REPO%%/*}" -F repo="${REPO##*/}" -F pr="$PR_NUMBER" \ | ||
| --jq '.data.repository.pullRequest.reviewThreads.nodes | map(select(.isResolved == false))' 2>/dev/null || echo "[]") | ||
| export OPEN_THREADS_JSON | ||
| fetch_pr_context |
There was a problem hiding this comment.
Gate no-changes on the fetched blockers
This fetch only supplies blocker data to the prompt, but the shell still posts a terminal status=no-changes whenever the engine exits 0 without file edits. If the model fails to act on a failing check or unresolved CHANGES_REQUESTED review, scripts/dev-lead-retry.sh treats that no-changes marker as terminal for the SHA, so the PR can remain blocked while automatic retries stop. Use the fetched context in the script to avoid posting no-changes when blockers are still present.
Useful? React with 👍 / 👎.
Dev-Lead — review-changes (applied)Changes committed and pushed. |
There was a problem hiding this comment.
Pull request overview
This PR targets issue #425 by adding a “holistic assessment” step to dev-lead’s review-related intents, surfacing CI check results and overall PR review states (including CHANGES_REQUESTED) to reduce false “no-changes” outcomes when PRs are still blocked.
Changes:
- Added
fetch_pr_context()to collect and exportCI_STATUS_JSON(check runs) andALL_REVIEWS_JSON(all review states) before invoking the engine. - Updated dev-lead prompts (fix-reviews / review-changes / fix-bot-comment) to introduce a Phase 0 “Holistic Assessment” using those exported JSON payloads.
- Added unit tests asserting that the script calls the check-runs and PR reviews endpoints for the relevant intents.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/dev-lead-fix-reviews.sh | Exports CI + review-state context and invokes it before the engine for fix-reviews/fix-bot-comment/review-changes. |
| prompts/dev-lead/fix-reviews.md | Adds Phase 0 Holistic Assessment instructions using CI_STATUS_JSON / ALL_REVIEWS_JSON. |
| prompts/dev-lead/review-changes.md | Adds Phase 0 Holistic Assessment for human review-changes flow. |
| prompts/dev-lead/fix-bot-comment.md | Adds PR state assessment block before acting on a bot comment. |
| tests/dev-lead/unit/test_fix_reviews.bats | Adds tests to ensure the script fetches check-runs and PR reviews before running. |
| # All PR reviews with state — includes APPROVED, CHANGES_REQUESTED, COMMENTED from | ||
| # every reviewer (human and bot). Gives the agent a full picture of who is blocking. | ||
| ALL_REVIEWS_JSON=$(gh api "repos/${REPO}/pulls/${PR_NUMBER}/reviews?per_page=100" \ | ||
| --jq '[ [.[] | select(.user != null)] | group_by(.user.login)[] | sort_by(.id) | last | {id:.id, user:.user.login, state:.state, submitted_at:.submitted_at} ]' \ |
| fetch_pr_context | ||
| rc=0 | ||
| build_and_run "fix-reviews" || rc=$? | ||
| [ "$rc" -eq 2 ] && handle_rate_limit "fix-reviews" |
| fetch_pr_context | ||
| rc=0 | ||
| build_and_run "fix-bot-comment" || rc=$? | ||
| [ "$rc" -eq 2 ] && handle_rate_limit "fix-bot-comment" |
| fetch_pr_context | ||
| rc=0 | ||
| build_and_run "review-changes" || rc=$? | ||
| [ "$rc" -eq 2 ] && handle_rate_limit "review-changes" |
| ${CI_STATUS_JSON} | ||
| ``` | ||
|
|
||
| Identify any checks with `conclusion` = `"failure"` or `"timed_out"`. These are **Tier 1 blockers** — fix them even if no review thread specifically asks for it. |
| {"id":2,"user":{"login":"alice"},"state":"APPROVED","submitted_at":"2024-01-02T00:00:00Z"} | ||
| ]' | ||
| local jq_expr='[ [.[] | select(.user != null)] | group_by(.user.login)[] | sort_by(.id) | last | {id:.id, user:.user.login, state:.state, submitted_at:.submitted_at} ]' | ||
|
|
||
| run bash -c "printf '%s' '$input' | jq -r '$jq_expr'" | ||
|
|
||
| [ "$status" -eq 0 ] | ||
| # Result should have only alice; the null-user entry is filtered out | ||
| local count | ||
| count=$(echo "$output" | jq 'length') | ||
| [ "$count" -eq 1 ] | ||
| } | ||
|
|
||
| # ── holistic assessment: CI_STATUS_JSON and ALL_REVIEWS_JSON fetching ────────── | ||
| # These tests verify that fix-reviews, review-changes, and fix-bot-comment all |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d953148ec3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| CI_STATUS_JSON=$(gh api "repos/${REPO}/commits/${HEAD_SHA}/check-runs?per_page=100" \ | ||
| --jq '[.check_runs[] | {name:.name, status:.status, conclusion:.conclusion, details_url:.details_url}]' \ |
There was a problem hiding this comment.
Paginate check-run collection before assessing blockers
In PRs whose head SHA has more than 100 check runs (common with large matrix CI), this request only returns the first page because GitHub caps per_page at 100 and gh api only follows additional pages when --paginate is used. A required failing/timed-out check on a later page will be absent from CI_STATUS_JSON, so the holistic prompt can still conclude there are no Tier 1 CI blockers and allow a terminal no-changes marker while the PR remains unmergeable.
Useful? React with 👍 / 👎.
| DON_PETRY_BOT_GH_PAT: | ||
| required: false | ||
| GH_PAT: |
There was a problem hiding this comment.
Pass the declared secrets through the wrapper
When org repos invoke this via .github/workflows/pr-review-reusable.yml, that wrapper still passes only CLAUDE_CODE_OAUTH_TOKEN, GOOGLE_API_KEY, and COPILOT_GITHUB_TOKEN, while this workflow reads secrets.DON_PETRY_BOT_GH_PAT for GH_TOKEN and secrets.GH_PAT for Copilot. Adding these accepted secret names here without updating the wrapper leaves both tokens empty in that reusable path, so gh auth status/API calls fail before the review agent can run.
Useful? React with 👍 / 👎.
| ALL_REVIEWS_JSON=$(gh api "repos/${REPO}/pulls/${PR_NUMBER}/reviews?per_page=100" \ | ||
| --jq '[ [.[] | select(.user != null)] | group_by(.user.login)[] | sort_by(.id) | last | {id:.id, user:.user.login, state:.state, submitted_at:.submitted_at} ]' \ |
There was a problem hiding this comment.
Paginate reviews before deduping reviewer state
In PRs with more than 100 submitted reviews, this only dedupes the first page returned by the reviews API; GitHub list endpoints cap per_page at 100 and gh api needs --paginate to request the rest. A current CHANGES_REQUESTED review on a later page will be omitted from ALL_REVIEWS_JSON, so the prompt can think there are zero review blockers and permit a no-changes terminal marker while the PR is still blocked.
Useful? React with 👍 / 👎.
Dev-Lead — review-changes (applied)Changes committed and pushed. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5bfb4e0ed4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| statuses_json=$(gh api "repos/${REPO}/commits/${HEAD_SHA}/statuses?per_page=100" \ | ||
| --jq '[.[] | {name:.context, status:(if .state == "pending" then "in_progress" else "completed" end), conclusion:(if .state == "success" then "success" elif .state == "failure" or .state == "error" then "failure" else null end), details_url:.target_url}]' \ |
There was a problem hiding this comment.
Use only the latest status per context
For legacy commit statuses, this endpoint returns the status history for the ref, newest first, rather than the combined/latest status per context. If Jenkins (or another status-based integration) reports failure and then later reports success for the same context on the same SHA, both entries are merged into CI_STATUS_JSON, so has_tier1_blockers still sees the old failure and suppresses the terminal no-changes marker even though GitHub now considers that context passing. Use the combined status endpoint or dedupe by context before mapping conclusions.
Useful? React with 👍 / 👎.
| ${ALL_REVIEWS_JSON} | ||
| ``` | ||
|
|
||
| Treat any check with `conclusion` = `"failure"` or `"timed_out"` and any review with `state` = `"CHANGES_REQUESTED"` as **Tier 1 blockers** — address them in addition to the bot comment below. Only declare "no-changes" when zero Tier 1 blockers exist. |
There was a problem hiding this comment.
Include all gated check conclusions
In fix-bot-comment runs where a required check is cancelled, action_required, stale, or startup_failure, the shell gate treats it as a Tier-1 blocker and suppresses no-changes, but this prompt tells the engine only failure and timed_out are in scope. That mismatch can leave the agent repeatedly doing nothing for a PR that the wrapper will keep retrying; align this list with has_tier1_blockers (the same narrowed wording remains in review-changes.md).
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Actionable comments posted: 6
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/pr-review.yml:
- Around line 12-15: The inputs DON_PETRY_BOT_GH_PAT and GH_PAT are declared
optional but are consumed unconditionally later as GH_TOKEN and
COPILOT_GITHUB_TOKEN; update the workflow inputs so DON_PETRY_BOT_GH_PAT and
GH_PAT are required (set required: true) to enforce the contract and prevent
runtime auth failures when GH_TOKEN and COPILOT_GITHUB_TOKEN are populated from
those inputs.
In `@prompts/dev-lead/fix-bot-comment.md`:
- Around line 18-34: The prompt's Tier‑1 blocker set is incomplete: update the
logic that computes Tier‑1 CI failures to include the additional statuses used
by the shell gate (scripts/dev-lead-fix-reviews.sh) — specifically add
cancelled, action_required, stale, and startup_failure to the list of blocker
conclusions so the agent treats them as Tier‑1 blockers; locate the code/path
that builds or checks the CI_STATUS_JSON/Tier‑1 list (the prompt section labeled
"CI check results" / any function or variable that filters by conclusion) and
expand the filter to include these exact status strings and ensure any
downstream "no-changes" suppression logic mirrors the shell script’s behavior.
In `@prompts/dev-lead/review-changes.md`:
- Around line 30-48: Update the Phase 0 CI blocker logic in the "Phase 0 —
Holistic Assessment" text so the agent treats additional conclusion values as
Tier‑1 blockers: include "cancelled", "action_required", "stale", and
"startup_failure" alongside "failure" and "timed_out" when evaluating
CI_STATUS_JSON; adjust the guidance under "CI check results" to instruct
identifying any checks whose `conclusion` is one of these values as Tier 1
blockers so the script will not declare "no-changes" while those states exist.
In `@scripts/dev-lead-fix-reviews.sh`:
- Around line 288-290: ALL_REVIEWS_JSON currently fetches only the first page
(per_page=100) and misses reviews on subsequent pages; update the fetch to
paginate through the GitHub API before deduping so you capture every review for
REPO/PR_NUMBER. Specifically, replace the single-page gh api call that sets
ALL_REVIEWS_JSON with a paginated request (e.g., use gh api --paginate or
iterate pages) so the jq grouping/deduping logic still runs over the full set of
reviews; keep references to ALL_REVIEWS_JSON, PR_NUMBER, and REPO so the rest of
the script remains unchanged.
- Around line 266-291: fetch_pr_context currently converts all gh api failures
into empty arrays (CI_STATUS_JSON and ALL_REVIEWS_JSON), which makes
has_tier1_blockers treat missing context as "no blockers" and allows
post_no_changes to run; change fetch_pr_context to set a flag (e.g.,
CONTEXT_FETCH_OK=false by default, set to true only if all gh api calls succeed)
and ensure any gh api failure leaves CONTEXT_FETCH_OK=false; then update the
gating logic that currently calls post_no_changes to also require
CONTEXT_FETCH_OK=true (in addition to existing checks) so post_no_changes is
skipped when context fetch failed; reference fetch_pr_context, CI_STATUS_JSON,
ALL_REVIEWS_JSON, CONTEXT_FETCH_OK, has_tier1_blockers, and post_no_changes when
making the changes.
In `@tests/dev-lead/unit/test_fix_reviews.bats`:
- Around line 1117-1231: Add a new test in
tests/dev-lead/unit/test_fix_reviews.bats that exercises the fail-closed
behavior by making the assessment gh API calls fail: reuse the same structure as
the existing tests (use tmpdir, export INTENT_TYPE like
fix-reviews/fix-bot-comment/review-changes, DEV_LEAD_DRY_RUN=true,
PR_NUMBER/HEAD_SHA/REPO/REVIEW_ENGINE/BASE_REF/PROMPTS_DIR, and
PATH="$STUB_BIN_DIR:$PATH"), but replace the _make_assessment_gh_stub behavior
with a stubbed gh that returns non-zero exit status or error payloads for the
commits/*/check-runs, commits/*/statuses, and pulls/*/reviews endpoints; run the
FIX_REVIEWS_SCRIPT from the non-git tmpdir so the no-changes path is reachable
and assert the script exits 0, does NOT print "status=no-changes", and DOES emit
the Tier-1 warning (e.g. "Tier-1 blockers still present") to ensure no terminal
no-changes is posted on assessment failures.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 95fae936-16bb-41f3-ac09-41bbccb92275
📒 Files selected for processing (7)
.github/workflows/force-deploy-pr-review.yml.github/workflows/pr-review.ymlprompts/dev-lead/fix-bot-comment.mdprompts/dev-lead/fix-reviews.mdprompts/dev-lead/review-changes.mdscripts/dev-lead-fix-reviews.shtests/dev-lead/unit/test_fix_reviews.bats
|
@coderabbitai resolve |
Dev-Lead — review-changes (applied)Changes committed and pushed. |
✅ Action performedComments resolved and changes approved. |
Dev-Lead — review-changes (applied)Changes committed and pushed. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a741c764d7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ${CI_STATUS_JSON} | ||
| ``` | ||
|
|
||
| Identify any checks with `conclusion` = `"failure"`, `"timed_out"`, `"cancelled"`, `"action_required"`, or `"stale"`. These are **Tier 1 blockers** — fixing them is explicitly in-scope even if no review thread specifically asks for it. |
There was a problem hiding this comment.
Include startup_failure in the blocker prompt
In fix-reviews runs where a required check ends with conclusion: "startup_failure", the shell gate treats it as a Tier-1 blocker (has_tier1_blockers includes startup_failure), but this prompt omits it from the list of checks the agent is told to fix. That mismatch can make the agent do nothing for this failure class while the wrapper suppresses the no-changes marker, leading to repeated retries without actionable instructions; align this list with the shell gate.
Useful? React with 👍 / 👎.
Dev-Lead — review-changes (applied)Changes committed and pushed. |
|
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: c73274f9bf59438386bd0f9b5b0e6328eec1f0cf
Cascade: triage → deep (triage: haiku 4.5 → deep: sonnet 4.6 + duck: o4-mini → audit: opus 4.7)
Summary
PR correctly implements issue #425 by adding a holistic assessment phase (fetch_pr_context + has_tier1_blockers) to prevent premature 'no-changes' declarations when CI is failing or CHANGES_REQUESTED reviews are present. The two new PAT secrets (DON_PETRY_BOT_GH_PAT, GH_PAT) are threaded correctly via the workflow_call secrets block with required: false — standard GitHub pattern, not a smell. All CI checks including CodeQL, Agent Security Scan, and gitleaks pass; 14+ new BATS unit tests cover the critical deduplication and gating logic.
Findings
- INFO: DON_PETRY_BOT_GH_PAT and GH_PAT are added as optional (required: false) secrets to pr-review-reusable.yml and pr-review.yml workflow_call interfaces. They are forwarded using the standard ${{ secrets.X }} syntax and are not logged or hardcoded. This is the correct GitHub Actions pattern for threading PATs through reusable workflows.
- INFO: ALL_REVIEWS_JSON and CI_STATUS_JSON are injected into LLM prompts, which expands the prompt-injection surface. However, the jq expressions intentionally omit review bodies — ALL_REVIEWS_JSON contains only {id, user, state, submitted_at} and CI_STATUS_JSON only {name, status, conclusion, details_url}. Check-run names (details_url, context names) theoretically could carry adversarial content but this is a constrained, pre-existing pattern in the codebase (OPEN_THREADS_JSON, COMMENT_BODY were already injected).
- INFO: Statuses dedup uses group_by(.context)[] | first (relies on API returning newest-first), while reviews dedup uses sort_by(.id) | last (explicit sort). Both approaches are correct and consistent with the respective GitHub API contracts. The assumption about statuses API ordering is documented in comments and validated by a dedicated BATS test.
- INFO: coderabbitai posted CHANGES_REQUESTED (review ID 4424759336) then DISMISSED (ID 4424779786, the later review). The has_tier1_blockers() dedup picks the latest review per user (DISMISSED), which is not in the CHANGES_REQUESTED set — no false blocker. mergeStateStatus BLOCKED reflects branch protection requiring review approval, not a code issue.
- INFO: 14+ new BATS tests cover: jq dedup for reviews (CHANGES_REQUESTED superseded by APPROVED), null-user filtering, CI check-runs/statuses/reviews endpoint calls for all three intents, no-changes gating with Tier-1 blockers present, no-changes posting when blockers are absent, and stale legacy CI failure not treated as blocker when superseded by newer success.
Reviewed by the PR-review cascade (triage: haiku 4.5 → deep: sonnet 4.6 + duck: o4-mini → audit: opus 4.7). Reply if you need a human review.
…missing code reviews and CI failures (#426) * feat: implement issue #425 — dev-lead: Incomplete issue resolution - missing code reviews and CI failures * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>
…missing code reviews and CI failures (#426) * feat: implement issue #425 — dev-lead: Incomplete issue resolution - missing code reviews and CI failures * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>
…missing code reviews and CI failures (#426) * feat: implement issue #425 — dev-lead: Incomplete issue resolution - missing code reviews and CI failures * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>
…missing code reviews and CI failures (#426) * feat: implement issue #425 — dev-lead: Incomplete issue resolution - missing code reviews and CI failures * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>
…missing code reviews and CI failures (#426) * feat: implement issue #425 — dev-lead: Incomplete issue resolution - missing code reviews and CI failures * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>
…missing code reviews and CI failures (#426) * feat: implement issue #425 — dev-lead: Incomplete issue resolution - missing code reviews and CI failures * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>
…missing code reviews and CI failures (#426) * feat: implement issue #425 — dev-lead: Incomplete issue resolution - missing code reviews and CI failures * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>
…missing code reviews and CI failures (#426) * feat: implement issue #425 — dev-lead: Incomplete issue resolution - missing code reviews and CI failures * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>
…missing code reviews and CI failures (#426) * feat: implement issue #425 — dev-lead: Incomplete issue resolution - missing code reviews and CI failures * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>
…missing code reviews and CI failures (#426) * feat: implement issue #425 — dev-lead: Incomplete issue resolution - missing code reviews and CI failures * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>
…missing code reviews and CI failures (#426) * feat: implement issue #425 — dev-lead: Incomplete issue resolution - missing code reviews and CI failures * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>
…missing code reviews and CI failures (#426) * feat: implement issue #425 — dev-lead: Incomplete issue resolution - missing code reviews and CI failures * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>
…missing code reviews and CI failures (#426) * feat: implement issue #425 — dev-lead: Incomplete issue resolution - missing code reviews and CI failures * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>
…missing code reviews and CI failures (#426) * feat: implement issue #425 — dev-lead: Incomplete issue resolution - missing code reviews and CI failures * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>
…missing code reviews and CI failures (#426) * feat: implement issue #425 — dev-lead: Incomplete issue resolution - missing code reviews and CI failures * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>
…missing code reviews and CI failures (#426) * feat: implement issue #425 — dev-lead: Incomplete issue resolution - missing code reviews and CI failures * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>
…missing code reviews and CI failures (#426) * feat: implement issue #425 — dev-lead: Incomplete issue resolution - missing code reviews and CI failures * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>
…missing code reviews and CI failures (#426) * feat: implement issue #425 — dev-lead: Incomplete issue resolution - missing code reviews and CI failures * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>
…missing code reviews and CI failures (#426) * feat: implement issue #425 — dev-lead: Incomplete issue resolution - missing code reviews and CI failures * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>
…missing code reviews and CI failures (#426) * feat: implement issue #425 — dev-lead: Incomplete issue resolution - missing code reviews and CI failures * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>
…missing code reviews and CI failures (#426) * feat: implement issue #425 — dev-lead: Incomplete issue resolution - missing code reviews and CI failures * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>
…missing code reviews and CI failures (#426) * feat: implement issue #425 — dev-lead: Incomplete issue resolution - missing code reviews and CI failures * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>
…missing code reviews and CI failures (#426) * feat: implement issue #425 — dev-lead: Incomplete issue resolution - missing code reviews and CI failures * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>
…missing code reviews and CI failures (#426) * feat: implement issue #425 — dev-lead: Incomplete issue resolution - missing code reviews and CI failures * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>
…missing code reviews and CI failures (#426) * feat: implement issue #425 — dev-lead: Incomplete issue resolution - missing code reviews and CI failures * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>
…missing code reviews and CI failures (#426) * feat: implement issue #425 — dev-lead: Incomplete issue resolution - missing code reviews and CI failures * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>



Closes #425
Implemented by dev-lead agent. Please review.
Summary by CodeRabbit
Chores
Bug Fixes
Tests