Repository navigation
Description
Summary
#1894's Gate 2 (the maintainer-comment disposition gate, #1290/#1813) is still unsatisfiable after #1911 merged. The comments that actually strand the queue are posted by bots, mostly SonarCloud's "Quality Gate passed" status comment. #1911's scripts/maintainer-resolve-comment.sh is deliberately self-scoped (mrc_authorize_self: the caller must be the comment's author), so a maintainer cannot clear a bot's comment with it. That leaves dev-lead as the only thing that can disposition a bot comment. pr-review's escalation puts needs-human-review on the PR, and dev-lead then refuses to act on it.
#1911 correctly delivers #1910 as written ("on their own comment"), but #1910 was scoped to human comments, and the live blocker is bot comments.
Evidence (2026-09-24)
PR #1913 (implements #1908) was approved by pr-review twice, at 11:45Z on e42886f9 and 12:08Z on 103d0513, with no blocking findings. Both approvals were dismissed with Dismissing approval due to a PR issue comment lacking a verified disposition (#1813). The gate log (run 35858596981):
[maintainer-gate] WARNING: 1 PR issue comment(s) lack a verified disposition (not minimized RESOLVED) — withholding approval (#1813)
That one comment is sonarqubecloud's 11:55Z "Quality Gate passed" comment. SonarCloud posts a fresh one after each push, so dispositioning the old one does not help: the next push brings a new, undispositioned comment.
The loop that follows ends in permanent deadlock:
- pr-review approves.
- A bot status comment is undispositioned, so the gate dismisses the approval.
- pr-review re-reviews, which uses up a cycle.
- At
review cycle: 3 (max: 3)it escalates (max-cycles-reached), addsneeds-human-reviewand requests@petry-projects/org-leads. - dev-lead honours the hold and never dispositions the comment.
Across the queue (17 open PRs in this repo, 0 approved):
- 6 approvals were dismissed by this gate.
sonarqubecloudhas a non-minimized comment on all 5 PRs whose approval the gate dismissed: feat: implement issue #1908 — Reviewer scorecard misses Graphite's check-run reviews (clean passes read as 'No response') and undercounts its PR reviews ~8× #1913, feat: implement issue #1905 — [qa-lead reach 3/3] persona-runner ignores surface=pull_request — the router-served qa-lead advisory loses its test-surface, budget and already-advised gates #1909, feat: implement issue #1903 — Register cubic (cubic-dev-ai) as an advisory reviewer — add it to the reviewer council and let dev-lead act on its findings #1907, feat: link dispatched feature-ideation runs in Idea discussions #1796, feat: implement issue #1754 — pr-review counts a human-escalation as a posted review — run reports "1 reviews posted" with nothing on the PR #1793.- 9 PRs carry
needs-human-review, and pr-review (donpetry-bot) applied every one.
Acceptance criteria
- A clean bot status comment never blocks approval. A SonarCloud comment reporting Quality Gate passed with no new issues is treated as addressed without dev-lead and without a human. This must be deterministic, with no LLM.
- Suggested shape: a classifier in
maintainer-comment-gate.sh, keyed off the reviewer-source registry (scripts/lib/reviewer-sources.tsv), that recognises known informational status comments by author plus a body pattern. - Alternatively, pr-review (the harness) minimizes them itself with classifier
RESOLVEDand records the reason. - The informational patterns belong in data, not hard-coded logins in the gate.
- Suggested shape: a classifier in
- Findings still block. A SonarCloud Quality Gate failed comment, any other bot comment carrying findings, and any human comment still block exactly as today. Keep fail-closed on anything unclassifiable. Tests cover passed (clears), failed (blocks) and unknown (blocks).
- Maintainers can clear a bot comment when needed. Extend
scripts/maintainer-resolve-comment.sh, or add a sibling script, so a maintainer can disposition a comment authored by a registered reviewer bot (a row inreviewer-sources.tsv), with a required--reasonthat is posted as a reply before minimizing. It must still refuse another human's comment; that restriction is the reason #1894 AC #4: give maintainers a dev-lead-independent way to disposition a blocking PR comment #1910 was self-scoped. - Document the escape hatch. Update AGENTS.md next to the feat: implement issue #1910 — #1894 AC #4: give maintainers a dev-lead-independent way to disposition a blocking PR comment #1911 entry.
- Regression test for the whole loop: a PR with an approving pr-review, a later SonarCloud "Quality Gate passed" comment, and no dev-lead run stays approved and does not burn a review cycle.
Rollout — a pr-review channel cut IS required (verified 2026-09-24)
maintainer-comment-gate.sh is executed by pr-review, and in this repo pr-review runs from the channel tag pr-review/v1-next (.github/workflows/pr-review-trigger.yml: uses: …/pr-review.yml@pr-review/v1-next, agent_ref: pr-review/v1-next). That tag is at eee2898e (2026-09-23 03:55Z) and does not yet contain #1911 (1cb74bcd). Merging this fix to main changes nothing at runtime until the channel moves. The autocut only watches the reusable-workflow blob, not scripts (#1592).
The PR description must say so and name the cut. After merge: scripts/cut-release.sh pr-review <next-version> --ref main --channel v1-next --push (run --dry-run first), then confirm with git merge-base --is-ancestor <merge-sha> pr-review/v1-next. Promote to stable separately if and when the ring policy calls for it.
Pattern precision (AC 1): the clean-status pattern must require no new issues, not just the words "Quality Gate passed". SonarCloud's passed comment carries 0 New issues and 0 Security Hotspots lines, and a gate can pass with a nonzero count, depending on its conditions. Match the headline and both zero counts. Add a test in which a "Quality Gate passed" comment with 2 New issues still blocks.
Out of scope
- The review-cycle cap and the
needs-human-reviewescalation are working as designed. Once bot status comments stop dismissing approvals, the loop stops consuming cycles. template-drift(red on 15/17 open PRs:repo-templatehas drifted fromstandards/v1-stable) is a separate non-required-check problem.
References
- 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 (Gate 2 / AC Optimize review: small-PR and incremental fast paths #4), #1894 AC #4: give maintainers a dev-lead-independent way to disposition a blocking PR comment #1910 / PR feat: implement issue #1910 — #1894 AC #4: give maintainers a dev-lead-independent way to disposition a blocking PR comment #1911 (self-scoped maintainer path, merged 2026-09-24T02:24Z), pr-review can't approve ANY open PR: maintainer-comment gate needs pushedDate (always null) and treats codeant/qodo/auto-rebase comments as maintainer findings — 18/18 PRs stranded #1813, PR comments from maintainers are mechanically inert — they neither block merge nor reach dev-lead #1290
scripts/lib/maintainer-comment-gate.sh(check_maintainer_comments),scripts/maintainer-resolve-comment.sh(mrc_authorize_self),scripts/lib/review-cycle.sh
Activity
github-actions commentedon Sep 24, 2026
Thanks for the thorough write-up and the concrete evidence from PR #1913 — the run ID and timeline make this very easy to reproduce and verify. The root cause is clear: #1911 correctly implemented the self-scoped path but the live blocker is bot-authored comments, which that scope intentionally excluded. Beyond SonarCloud, are there any other bot integrations (e.g. CodeClimate, Codecov, Dependabot, or internal bots) currently posting non-minimized comments to PRs in this repo that would need entries in the
reviewer-sources.tsvclassifier to avoid re-triggering the same deadlock once this fix lands?don-petry commentedon Sep 24, 2026
Corroborating evidence from a second PR — #1887, with every human comment cleared
Ran an independent probe on #1887 before seeing this issue, and it confirms the diagnosis from the other direction: the blocker is bot comments, and clearing every human one changes nothing.
Procedure:
scripts/maintainer-resolve-comment.sh(live indev-lead/v139.28.0) to minimize all five unmarkeddon-petrycomments on feat: implement issue #1881 — auto-rebase still merges main into every open PR on every push, though the ruleset no longer requires up-to-date branches — the treadmill's driver outlived the strict fix #1887RESOLVED. Verified afterwards that the only unminimized, unmarked comment remaining was a singlesonarqubecloudone — which the tool refuses, correctly, on self-scope.pr-review-triggerqueue to settle, then fired oneforce_review=truedispatch (an earlier attempt was evicted by the concurrency group and returnedcancelled, which is not a withhold and proves nothing — worth knowing when reading run outcomes here).35949861458completedsuccess.Result:
So a completed pr-review run, on a PR whose only remaining undispositioned comment is SonarCloud's, still issues no approval. That is the same conclusion #1913 reached via dismissal, reproduced on a PR that never got as far as an approval to dismiss. The
sonarqubecloudcomment alone is sufficient to strand a PR.One extra datum for the "it regenerates" point: because SonarCloud re-posts on every push, any fix that clears existing comments without addressing re-posting will strand the same PR again on its next commit — and on this repo every merge to
maintriggers anauto-rebasepush to every open PR, so "next commit" is not hypothetical.Relationship to #1919 — please solve these together
#1919 is a third instance of the same shape, and it would be easy to fix one and leave the other standing:
needs-human-reviewstops dev-lead.don-petry. Five on feat: implement issue #1881 — auto-rebase still merges main into every open PR on every push, though the ruleset no longer requires up-to-date branches — the treadmill's driver outlived the strict fix #1887 — the ones I cleared by hand above.Both reduce to: the gate's only satisfying signal is a
RESOLVEDminimize, and the set of actors that can produce one is smaller than the set of actors that can post a blocking comment. Whatever lands here should make that relationship explicit rather than special-casing SonarCloud, or the next reviewer added to the council reopens it.Worth stating plainly: do not widen
maintainer-resolve-comment.shto accept arbitrary comments. Its self-scope is the guardrail that stops a maintainer waving away someone else's finding, and #1910 chose it deliberately. A bot status comment carrying no finding is a different category from a bot review comment carrying one, and only the former should ever be auto-dispositionable — that distinction is the safe place to draw the line.don-petry commentedon Sep 24, 2026
Dev-Lead Implementation Plan
Issue: #1918 — Approval gate can never clear bot status comments (SonarCloud re-posts 'Quality Gate passed'; #1911's resolve script is self-scoped)
Scope
Make the maintainer-comment gate deterministically clear known-clean bot status comments (SonarCloud "Quality Gate passed") via a data-driven pattern in the reviewer-source registry, keep findings/unknowns fail-closed, and extend the maintainer resolve script to disposition a registered reviewer bot's comment (with a required
--reasonreply) while still refusing another human's comment.Implementation Checklist
scripts/lib/reviewer-sources.tsv— bump schema_version 2→3; addinfo_status_patterncolumn; setQuality Gate passedforsonarqubecloud,-elsewherescripts/lib/reviewer-sources.sh— addreviewer_sources_info_status_patternshelper (reads new column)scripts/lib/maintainer-comment-gate.sh— data-driven classifier: a comment whose author is a registered source and whose body matches that source's info-status pattern is treated as addressed (never blocks); everything else (failed / unknown / human) still blocks fail-closed. Addmaintainer-resolveto the agent-marker exclusion so the escape-hatch reply is not itself a new blockerscripts/maintainer-resolve-comment.sh— add--reason; allow dispositioning a comment authored by a registered reviewer bot (post--reasonas a marked reply, then minimize RESOLVED); still refuse another human's comment; keep self-scope path intactAGENTS.md— extend the #1894 AC #4: give maintainers a dev-lead-independent way to disposition a blocking PR comment #1910/feat: implement issue #1910 — #1894 AC #4: give maintainers a dev-lead-independent way to disposition a blocking PR comment #1911 entry with the bot-status classifier + maintainer bot-comment escape hatchTests to Write
maintainer-resolvemarked reply is ignored (→0)info_status_patternhelper emitssonarqubecloud<TAB>Quality Gate passed; schema_version is 3--reasonrequired for the bot path; self path unchangedTest Command
bats tests/test_reviewer_sources.bats tests/dev-lead/unit/test_maintainer_comment_gate.bats tests/dev-lead/unit/test_maintainer_resolve_comment.batsandbash .dev-lead/scripts/dev-lead-lint.shdon-petry commentedon Sep 24, 2026
Dev-Lead: Progress (in progress — not yet durable)
Plan Execution (intended)
info_status_patterncolumn toscripts/lib/reviewer-sources.tsv(schema_version 2→3) withsonarqubecloud→Quality Gate passed, and areviewer_sources_info_status_patternsreader.scripts/lib/maintainer-comment-gate.sha deterministic (no-LLM) classifier keyed off that registry: a comment from a registered source whose body matches the source pattern is treated as addressed;Quality Gate failed, unknown bodies, no-pattern bots, and humans still block (fail closed; unreadable registry →{}, clears nothing).scripts/maintainer-resolve-comment.shwith a registered-reviewer-bot path requiring--reason, posted as amaintainer-resolve-marked reply before the RESOLVED minimize; another human's comment is still refused. Added that marker to the gate's own-automation exclusion so the reply is not a fresh blocker.Local check output (provisional — not the pushed run)
Files touched (this workspace, not yet pushed)
scripts/lib/reviewer-sources.tsv,scripts/lib/reviewer-sources.shscripts/lib/maintainer-comment-gate.shscripts/maintainer-resolve-comment.shAGENTS.mdtests/test_reviewer_sources.bats,tests/dev-lead/unit/test_maintainer_comment_gate.bats,tests/dev-lead/unit/test_maintainer_resolve_comment.batsNotes
don-petry commentedon Sep 24, 2026
Dev-Lead: Implementation Complete — PR #1920
The implementation for issue #1918 is durable: commits are pushed and a pull request is open. This record is backed by verifiable artifacts you can confirm in one click.
5ab8a4133359d7228ea306b5f9307024acefd441main: 8 file(s), +463/-37 linesReview 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.
fix(gate): SonarCloud clean-pass pattern must pin zero counts; bot pa…
docs: list scripts/lib/*.tsv wherever surface_sources values are desc…
fix(resolve): match the exact node id when de-duplicating audit replies
feat: implement issue #1918 — Approval gate can never clear bot statu…
Merge branch 'main' into dev-lead/issue-1903-20260923-0247
fix(maintainer-gate): bind info-status exemptions to the Bot author a…