Skip to content

A node that cannot read GitHub hands every item back as "required check(s) not green", indistinguishable from N bad pull requests

Id: TD-PPagop-26081305 · Status: resolved · Filed: 2026-08-13 · Resolved: 2026-08-14 · Ref: #353

review_gate_required_checks (lib/review-gate.sh, requirement 31c) folds three different findings into one dirty verdict:

  • gh pr checks --required could not be asked at all — a 502, a transient auth failure, a primary rate limit whose reset was too far off for lib/github-limit.sh to wait out;
  • the pull request reports no required checks — the conflicting-PR-runs-no-CI trap poetic-fiddle #190 established, where silence genuinely is the hazard;
  • a required check is real and not green.

Fail-closed is right for all three: this is the last gate before a human sees the pull request, and the file’s header argues the case correctly. The debt is not the verdict, it is that the three are indistinguishable afterwards.

Why it matters: the first case is a fact about the node, and it does not arrive once. A node whose gh is degraded fails this gate on every item it reviews, and each one is recorded as a requirement 32a handback carrying unblock_condition: "Get every required check green and clear the named security-severity code-scanning alert…" — advice that names nothing to fix, against a pull request with nothing wrong with it. The Enabler then reads a queue of items each apparently blocked on its own failing CI. Nothing in the log says “this node cannot read GitHub”, which is the one fact that explains all of them and the only one that suggests a fix. The cost is paid twice: the reviews are spent, and the items are wedged until something re-examines them.

The same shape is visible in the reason text — could not read <url>'s required checks against its current head commit is written, but the caller in agent-cycle.sh records it under a handback whose unblock_condition was written for the third case only, so the actionable half is the half that gets dropped.

Where: lib/review-gate.sh (review_gate_required_checks, review_gate_verdict) and the rev_status == "ready" gate block in agent-cycle.sh.

Suggested fix: keep the handoff refused in all three cases — nothing here argues for letting a pull request through on an unread check list — but give the unreadable case its own verdict word so it can be told apart. A third state alongside clean/dirty (the unknown review_gate_security_alerts and closing_keyword_gate already report, but exiting non-zero and blocking, which is the difference) lets the caller record a node-level warning naming the node rather than an item-level handback naming the pull request, and choose an unblock_condition that matches the cause. Consider also a consecutive-failure counter, so a node failing this way N times running says so once, loudly, instead of N times quietly — the crash-loop machinery (requirement 9e) is the existing precedent for that shape.

Filed by the human reviewer of Poetic-Poems/agent-ops#327, whose Reviewer raised the dirty-versus-unknown asymmetry between closing_keyword_gate and its sibling gate. That PR resolves the asymmetry in the direction the Reviewer suggested for the closing-keyword gate — an unreadable pull request is now unknown there, since an unreadable pull request looks nothing like one missing its keyword — and deliberately leaves review_gate_required_checks fail-closed, because for it an empty answer is a real hazard. This item is the part of that concern the direction does not cover: fail-closed is fine, unattributable is not.