Repository navigation
fix(ci): alert when one reviewer leg keeps failing behind the fallback (#1194) - #1197
Conversation
#1194) Codex failed on every pull request while Kimi covered it, so each run was green and reviewed and the health check stayed quiet. It now reads the callee's failover comments and opens an alert for a reviewer that failed for a non-quota reason on the last three, closing it on recovery. The cause: openai/codex-action's drop-sudo step fails on ubuntu-latest 26.04 (openai/codex-action#188); frankbria/glm-review#18 pins the Codex job to ubuntu-24.04. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Review follow-up: with fewer than three failover comments in the window the check cannot tell recovery from silence, so it closes nothing; the recovery test no longer negates jq's exit; a two-reviewer case joins the self-check. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Third-party review (review chain) — first commit 0020b59Review:
|
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
ReviewSmall, well-scoped change: a new Bugs / logic
Robustness
Style
|
|
…ain (#1194) Bot review: the callee posts a failover comment only when something went wrong, so a recovered Codex leaves no new failover line and the alert could never close. leg_health reads each reviewer's own '### Third Party Review' comments too: three failures in a row with no review between them is failing; a review as its newest comment is recovery, which is the only thing that closes an alert. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Bot triage: the advisory's "the alert may never auto-close" is right. The callee posts its failover comment only when something needs investigating or nothing reviewed, so a recovered Codex leaves no new failover line. Fixed in 4590afc: |
|
Review Well-scoped change. Bugs / edge cases
Robustness
Tests
Docs
🤖 Generated with Claude Code |
|
Claude finished @frankbria's task in 14m 23s —— View job Third Party Review — glm-5.2
Reviewed commit 4590afc against the checked-out script, the pinned chain contract in
Everything else already posted in the earlier rounds (three comments vs three PRs, template coupling, name word-splitting, title parsing, GNU Model: glm-5.2 |
| | def about($n): $events | map(select((.failed | index($n)) != null or (.reviewed | index($n)) != null)); | ||
| ([$events[].failed[], $events[].reviewed[]] | unique) as $names | ||
| | {failing: [$names[] | select(. as $n | about($n) | lead($n) >= 3)], | ||
| recovered: [$names[] | select(. as $n | (about($n)[0].reviewed // []) | index($n) != null)]}' |
There was a problem hiding this comment.
[major] A fallback reviewer's alert can never auto-close: recovered requires the leg's own ### Third Party Review — <name> comment as its newest event, but per the pinned chain (.github/workflows/glm-review.yml: "reviews with Codex, then Kimi, then Z.ai GLM, each only if the one before failed") Kimi and glm-5.2 only run — and only post — while the leg ahead of them is failing.
Failure scenario: Codex stays broken (today's state) and Kimi fails non-quota on three consecutive runs while glm-5.2 covers → [P2] [infra] A reviewer keeps failing over: Kimi opens. glm-review#18 merges and Codex reviews every PR from then on → Kimi never runs again, so it never posts a review; .recovered never contains Kimi and the issue is never closed — and once Kimi's events also age out of the 14-day window the name vanishes from $names entirely, which is still no close. Same for a glm-5.2 alert once Codex or Kimi is healthy. The issue body's "it closes this issue when $name posts a review again" is an action the chain structurally never takes for a healthy leg 2 or 3; only the first leg's alert (Codex, the one #1194 is about) self-closes. Consider also closing an alert older than the window whose reviewer has no events left in it, or keying recovery on the leg's own run conclusions (the callee's job logs name the leg that ran).
Reviewer failover
|
|
Review: per-reviewer failover alert (#1194) The design is sound. It closes a real gap, where a green run hides a dead first-leg reviewer. The self-check table covers the main shapes: failing, recovered, quota-only, both failing, and empty. The comments below are non-blocking. Bugs / edge cases
Robustness
Tests
Docs Security |
|
Claude finished @frankbria's task in 13m 44s —— View job Third Party Review — glm-5.2
Reviewed merge commit
Everything already posted in the earlier rounds (three comments vs three pull requests, template coupling, comment scoping to the callee, name word-splitting in the loops, close-loop title parsing, Model: glm-5.2 |
| local since health name search existing | ||
| since=$(date -u -d '14 days ago' +%FT%TZ) | ||
| health=$(gh api --paginate "repos/{owner}/{repo}/issues/comments?since=$since&per_page=100" --jq '.[]' \ | ||
| | jq -s -c '[.[] | select(.user.login == "github-actions[bot]" and (.body | startswith("### Reviewer failover") or startswith("### Third Party Review — ")))] | sort_by(.created_at) | reverse | map(.body)' \ |
There was a problem hiding this comment.
[major] check_legs's startswith("### Third Party Review — ") can never match the glm leg's completed reviews, so the last reviewer's reviews are invisible to leg_health — its alert can open (and re-verify as failing) while it is reviewing every PR, and can never close.
Failure scenario: the glm leg runs through claude-code-action, which prepends a completion banner to the comment it updates — the only live glm completion (this PR, 05:42:43Z) begins **Claude finished @frankbria's task in 14m 23s** —— [View job](…), with ### Third Party Review — glm-5.2 only after a ---. The Codex (#1182, 22:02:58Z) and Kimi (#1196, 04:38:08Z) legs post clean headers, so only the last leg — the one covering every PR in exactly the state #1194 alerts on (Codex broken → glm reviews) — loses its recovery signal. Running this PR's own leg_health on live-shaped bodies: three - glm-5.2: ⚠️ failed (failure) for a reason other than quota comments followed by three banner-prefixed glm reviews yields {"failing":["glm-5.2"],"recovered":[]} — the alert opens and stays failing on every health run, and the issue body's "it closes this issue when $name posts a review again" is structurally unreachable. (Distinct from the already-reported chain-structure gap: there the reviewer never runs again; here the review comment exists and is filtered away. The failover comment's own - glm-5.2: reviewed line — live at 05:57:21Z — is the only other recovery evidence and leg_health deliberately ignores it.)
leg_health's own reviewed scan is already line-anchored ((?m)^### Third Party Review — (\S+)), so matching the header at any line start in this select is enough — verified: the same bodies then yield {"failing":[],"recovered":["glm-5.2"]}:
| | jq -s -c '[.[] | select(.user.login == "github-actions[bot]" and (.body | startswith("### Reviewer failover") or startswith("### Third Party Review — ")))] | sort_by(.created_at) | reverse | map(.body)' \ | |
| | jq -s -c '[.[] | select(.user.login == "github-actions[bot]" and (.body | startswith("### Reviewer failover") or test("(?m)^### Third Party Review — ")))] | sort_by(.created_at) | reverse | map(.body)' \ |
Residual risk unchanged in kind: a bot comment quoting another reviewer's header at a line start would count as that reviewer's review event — that aliasing already exists for any body passing this select. Worth adding a banner-prefixed body (**Claude finished …** … ---\n### Third Party Review — glm-5.2) to the self-check table so the shape stays pinned.
Reviewer failover
|
Closes #1194.
Cause (acceptance 1)
The Codex leg dies in
openai/codex-action'sdrop-sudosafety step:ubuntu-latestis now 26.04, and that is upstream bug openai/codex-action#188 (open). The fix is in the callee: frankbria/glm-review#18 pins its Codex job toubuntu-24.04with ashortcut:note to unpin. It needs the owner's merge. After that, bump the pinned SHA in.github/workflows/glm-review.yml.The log is only reachable through
gh api repos/{owner}/{repo}/actions/jobs/<id>/logs.gh run view --logreturns nothing for a called workflow, which is why the issue said the cause was not visible.Detection (acceptance 2)
scripts/ci/review_bots_health.shgainscheck_legs. It reads the callee's "Reviewer failover" comments from the last 14 days, newest first, and opens[P2] [infra] A reviewer keeps failing over: <name>for any reviewer whose last three comments say it failed for a reason other than quota. It closes that issue once the reviewer stops failing. A window with fewer than three comments closes nothing, because silence is not recovery.glm-review.yml: Codex failed over on the last three pull requests→ would open the alert. That's correct until glm-review#18 merges; the alert then closes itself.test_review_bots_health_wiring.pypasses; root CLAUDE.md "Review bots" notes the new alert.Review
Review chain: REQUEST_CHANGES.
CASESmakes the self-check always fail": refuted. The self-check runs and printsok, and the file has exactly four terminators for four heredocs.jq -e): fixed.date): accepted as is. The script runs on the hosted runner, and the self-check fails loudly if the callee's wording changes.🤖 Generated with Claude Code