Skip to content

Lower the advisory quorum to 5: drop the three reviewers that produce no countable signal (re-file of #1894 AC #3) #1997

Closed

Description

@don-petry

Story

As the fleet operator,
I want the advisory quorum to count only reviewers that actually produce a countable signal,
so that pr-review stops reaching approval through a timeout fallback on every single PR.

This is a re-file of #1894 AC #3 as a standalone, single-purpose change. PR #1902 has carried it for eight days across five dispatch attempts and never once got a running attempt at it — see "Why this is a fresh issue" below. #1902 keeps its diagnostic work (AC #1/#2); this issue owns the registry change alone.

The change

In scripts/lib/reviewer-sources.tsv, set advisory_gate to no for exactly these three rows:

  • copilot-pull-request-reviewer
  • chatgpt-codex-connector
  • qodo-code-review

Record in each row's rationale: dropped from the approval-wait set because zero reviews were observed across eight consecutive PRs (#1888, #1887, #1873, #1799, #1796, #1794, #1793, #1770), measured 2026-09-23.

Leave graphite-app and cubic-dev-ai at advisory_gate=yes. Graphite's zero-review count is a measurement artefact — it reports via the Graphite / AI Reviews check run, so a clean pass posts no PR review and is invisible to the reviews API. Its 2026-08-21 silence was a lapsed 30-day trial; the org moved to the paid plan on 2026-09-22. Record that in its rationale so the next reader does not "re-drop" it.

Resulting count: 5 (gemini-code-assist, sonarqubecloud, codeant-ai, graphite-app, cubic-dev-ai). It was 4 when this was first decided; cubic-dev-ai has since been registered by #1903.

Four copies must move together

The advisory set is duplicated. All four must agree or the denominator silently diverges from the recorded policy:

  1. scripts/lib/reviewer-sources.tsv — the source of truth
  2. _advisory_gate_load_fallback_bots in scripts/lib/advisory-review-gate.sh
  3. the json='[…]' fallback in scripts/lib/approval-diagnostic.sh (only if that file is on main by then — it currently lives on PR feat(#1894): answer "why isn't this PR approved?" from the real pr-review gate chain (+ why-not-approved agent) #1902's branch; skip it if absent and say so)
  4. the _adv_bots literal in scripts/review-one-pr.sh

Acceptance Criteria

  1. The three rows are flipped; graphite-app and cubic-dev-ai untouched; every rationale records the reason.
  2. Every present copy above agrees with the registry, with a consistency test for each that is not already covered (tests/test_reviewer_sources.bats already covers copies 1–2).
  3. tests/dev-lead/unit/test_advisory_review_gate.bats asserts BOTS=7 for the unreadable-registry path and must be updated in the same change. It runs in CI via test-dev-lead.yml, so the PR goes red otherwise. Verified previously with REVIEWER_SOURCES_MANIFEST=/nonexistent/reviewer-sources.tsv.
  4. Nothing hardcodes the count. Derive from reviewer_sources_advisory_gate_logins; a literal breaks the next time a reviewer is registered, exactly as it just did when cubic-dev-ai took the count from 4 to 5.
  5. creates_threads and dev_lead_trusted are unchanged on every row. The [Phase 4] A review bot that can create blocking threads but is not in dev-lead's TRUSTED_BOTS creates an unclearable merge block (graphite-app; root cause of the 2026-08-02 deadlock) #1425 invariant is unrelated to advisory_gate; all three dropped bots stay dev-lead-trusted and on the 🔎 Third-Party Reviewer Scorecard — Weekly Report #1220 scorecard. They leave the approval-wait set only.
  6. Do not add a closing keyword for 10 of 11 open PRs have never received an approving review: the advisory quorum is unmeetable, the disposition gate revokes what does issue, and nothing reports why #1894 — that issue stays open for its remaining ACs. Note also that a conventional-commit scope like fix(#1894): is parsed by GitHub as a closing reference; use a non-issue scope.

Known limitation to record, not fix here

graphite-app stays in the quorum but the gate counts only reviews and comments, so its check-run signal remains uncountable and the quorum still cannot be satisfied on its own terms. That is not a regression (the denominator shrinks from 8 to 5 against the same countable sources) and is out of scope. Note it in the rationale; gate-side check-run counting needs its own issue.

Why this is a fresh issue rather than another nudge on PR #1902

Five attempts, none of which reached a running agent:

# Outcome Cause
1–2 never seen instruction posted as a PR review body, which creates no review thread for fix-reviews to walk
3 failure reviews-retry dispatch mis-routed to fix-bot-comment
4 cancelled evicted by the per-PR concurrency lane (dev-lead ran at a 45% cancel rate that day, cf. #1741)
5 targeted other PRs the successful reviews-retry runs in that window were for #1920 and #1794

So there is still no evidence about whether dev-lead can make this change — it has never been given a running attempt. A fresh issue gets a clean branch, a clean concurrency lane, and the instruction in the issue body, which dev-lead reads reliably, rather than in threads on a contested eight-day-old PR that also carries two unresolved bot findings.

References

Activity

  1. github-actions commented on Oct 1, 2026

    @github-actions
    Contributor

    Thanks for filing this as a focused, well-scoped re-file, and for laying out the four registry copies and the acceptance criteria so clearly. One clarifying question: should scripts/lib/approval-diagnostic.sh be skipped, with that noted in the PR, if it still lives only on PR #1902's branch when this change is made? Or do you want this change to wait until that file lands on main?

  2. don-petry commented on Oct 1, 2026

    @don-petry
    CollaboratorAuthor

    Dev-Lead Implementation Plan

    Issue: #1997 — Lower the advisory quorum to 5: drop the three reviewers that produce no countable signal (re-file of #1894 AC #3)

    Scope

    Flip advisory_gate to no for copilot-pull-request-reviewer, chatgpt-codex-connector, and qodo-code-review in the reviewer-source registry, keep graphite-app/cubic-dev-ai at yes (quorum → 5), and bring the two present advisory-set copies and all affected tests into agreement — deriving from reviewer_sources_advisory_gate_logins, never a hardcoded count.

    Implementation Checklist

    Tests to Write / Update

    Test Command

    bats tests/test_reviewer_sources.bats tests/dev-lead/unit/test_advisory_review_gate.bats (full suite + bash .dev-lead/scripts/dev-lead-lint.sh in Phase 4)

  3. don-petry commented on Oct 1, 2026

    @don-petry
    CollaboratorAuthor

    dev-lead progress note — in progress (not final)

    Implementation for #1997 is drafted and passing local verification. Posting this as an interim status; the change still needs CI + reviewer sign-off before it should be considered done.

    What the change does

    Lowers the advisory review quorum to 5 by dropping three reviewer bots that produced no countable signal, while recording why in each row's rationale.

    The copies of the set are kept in agreement

    • Copy Go-live improvements for PR review agent #2 — _advisory_gate_load_fallback_bots in scripts/lib/advisory-review-gate.sh: reduced to the same 5 (its unreadable-registry fallback).
    • Copy Add @claude delegation, auto-merge, and rebase handling #3 — approval-diagnostic.sh: absent on main, so there was nothing to update (as the issue anticipated).
    • Copy Optimize review: small-PR and incremental fast paths #4 — _adv_bots literal in scripts/review-one-pr.sh: updated to the same 5. (The prior literal had already drifted to a stale 4-bot list; a new consistency test now guards it.)
    • The RATE_LIMIT_NOTICE_BOTS superset (all registered sources) is unchanged.
    • At runtime all three present copies project to the identical 5-bot set; nothing hardcodes the count — the consistency tests derive it from reviewer_sources_advisory_gate_logins.

    Tests (written before the implementation, red → green)

    • tests/test_reviewer_sources.bats: added a copy-Optimize review: small-PR and incremental fast paths #4 consistency test (review-one-pr.sh _adv_bots literal == registry advisory-gate projection). The existing tests already cover copies test issue from agent #1–Go-live improvements for PR review agent #2.
    • tests/dev-lead/unit/test_advisory_review_gate.bats: corrected the unreadable-registry assertion (BOTS=8 → BOTS=5, NOTICE=9 kept); repointed runtime examples that had used the now-dropped bots onto still-advisory bots; and converted the two Qodo cases into regression tests asserting a dropped bot is no longer gated.
    • #1425 invariant preserved: creates_threads / dev_lead_trusted unchanged on every row.

    Local verification so far

    • All affected bats suites pass (advisory gate, reviewer-sources, intent, scorecard, maintainer gates, fix-reviews) with zero failures.
    • shellcheck clean on the changed scripts; dev-lead lint passes.

    Leaving CI and reviewer verification to run before this is marked complete.

  4. don-petry commented on Oct 1, 2026

    @don-petry
    CollaboratorAuthor

    Dev-Lead: Implementation Complete — PR #2003

    The implementation for issue #1997 is durable: commits are pushed and a pull request is open. This record is backed by verifiable artifacts you can confirm in one click.

    Review happens on the PR. Acceptance criteria and test results are evidenced by the PR's diff and CI checks — not asserted here. If a later stage fails, this claim is retracted in place.

  5. added a commit that references this issue on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug reportsdev-leadFor dev-lead agent pickup

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions