Repository navigation
💡 Stuck-Tail Resolution for Agent PRs: Human-Attention Queue, Age-Out Dispositions and a WIP Admission Gate #2425
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
Turn the runaway/stalled PR monitors from daily detection into a weekly decision. For every agent PR past the p90 lead time, compute a deterministic review-burden score (ReviewDebt-style, no LLM judge). Generate a one-screen disposition brief (land / rebase-squash / split / close and re-file from the issue). Rank everything in one human-attention queue. Add a WIP admission gate: dev-lead stops opening new
implement issuePRs while the count of needs-human-review agent PRs exceeds a threshold, and spends its passes on draining the tail instead.Market Signal
Review is now the constraint in agentic delivery. A July 2026 CMU/Stanford study (cited by Semgrep) found PR volume up 3.1x against reviewers up 1.5x, and AI-authored PRs take about 20% longer from first human review to merge. eBay's ReviewDebt talk (AI Engineer World's Fair 2026) presented a deterministic 0-100 review-burden score built from 10 checks over 5 signal families, deliberately without an LLM judge. It found complexity and volume, not AI authorship, drive burden. Semgrep recommends sending only elevated-risk changes to humans. Kanban WIP limits and Little's Law are the standard tools for a queue whose service rate (one maintainer) is fixed.
User Signal
This repo's flow data: 100 dev-lead PRs merged since Aug 1, with a median lead time of 0.5 days and p90 of 7.9 days. Only 1 dev-lead PR was closed unmerged in that period. Agents never abandon work. Meanwhile 10 agent PRs are 19-52 days old (#1730, #1770, #1796, #2135, #2217, #2218, #2260, #2290, #2308, #2328). All carry needs-human-review or auto-rebase:ready; five are CONFLICTING and five fail bats. The runaway monitor listed the same 11 PRs on 2026-10-22, 10-29 and 10-30 (23 runaway reports in 30 days, 'Detection only - no PR is mutated'). #1796 has 100 commits and 240 comments; #2135 has 246 comments. Related: #2309 (44-round bot ping-pong), #2181 (repeated refused passes), #2276 (factory-fix epic).
Technical Opportunity
The inputs already exist. The runaway/stalled detectors (#948/#949) compute age, commits, comments and agent cycles. The auto-rebase health report knows conflict state. size:* labels and needs-human-review already classify burden. A pure-jq scorer (diff size and file spread, test-evidence gap, failing required checks, conflict state, comment churn, age past p90) runs in the existing daily-pr-review-health job without an LLM call. Only the top 3 tail PRs per week get a Haiku-tier disposition brief, which reuses the decision-brief stage pattern from #2369. The WIP gate is a single dev-lead dispatch guard: when issue-intent passes run while open needs-human-review agent PRs exceed WIP_MAX, log a skip reason and requeue. The existing 'Skip - log reason' step and retry sweep handle this. 'Close and re-file' is cheap because every agent PR maps 1:1 to an issue.
Assessment
Adversarial Review
Strongest objection: This is #791 (stall detector) and #1041 (health-check lifecycle) again, and the real fix is simply for the maintainer to review the PRs. A WIP gate also slows the fleet down.
Rebuttal: #791 and #1041 are about detecting stalls and reducing alert noise. The evidence shows detection already works: the same 11 PRs are flagged every day. What's missing is a decision and admission control, which neither idea proposes. 'Just review them' is the strategy that produced a 19-52-day tail, because the service rate is one human. The only levers are cutting arrival rate (WIP gate) and cost per decision (score plus brief plus a one-click disposition). A WIP gate doesn't slow throughput, since median lead time stays at 0.5 days. It stops new work piling onto a queue that is already saturated, which is what keeps the tail rotting through repeated rebases and bot cycles.
Suggested Next Step
Run a one-off, read-only tail audit: score the 10 open agent PRs with a draft jq rubric (6 signals) and post one table on this Discussion with a proposed disposition per PR. If the maintainer agrees with at least 7 of 10, ship the scorer into daily-pr-review-health. Then add the WIP_MAX dispatch guard to dev-lead behind a repo variable, defaulting to observe-only and logging what it would have skipped.
Sources: Semgrep: The End Is Nigh for Code Review · ReviewDebt talk (eBay, AI Engineer World’s Fair 2026) · repo PR lead-time data via
gh pr list(2026-08-01 → 2026-10-30)Proposed by the weekly feature-ideation run (Mary, BMAD analyst) on 2026-10-30.
All reactions