Flag stale current-head reviews in queue health#727
Conversation
Constraint: ramimbo#679 requests read-only queue-health reporting for review commit freshness under live ramimbo#647 scope. Rejected: auto-labeling or subjective review scoring | outside the accepted advisory reporting scope. Confidence: high. Scope-risk: narrow. Directive: Keep this signal advisory and human-review focused; bot reviews must not satisfy current-head freshness. Tested: PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 python -m pytest tests/test_pr_queue_health.py -q; python -m ruff check scripts/pr_queue_health.py tests/test_pr_queue_health.py; python -m ruff format --check scripts/pr_queue_health.py tests/test_pr_queue_health.py; python scripts/docs_smoke.py; python -m py_compile scripts/pr_queue_health.py; git diff --check; python scripts/pr_queue_health.py --repo ramimbo/mergework --format json. Not-tested: full pytest suite.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR adds detection and reporting of PRs whose latest non-author human review is stale relative to the PR's current head commit. The implementation queries GitHub for review metadata, identifies the newest useful human review (excluding bot authors), compares its target commit against the current head, and exposes any freshness gaps in the queue health report via new summary counts and detail sections. ChangesStale Current-Head Review Detection
Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
Difficult-Burger
left a comment
There was a problem hiding this comment.
Reviewed the stale current-head review freshness signal.
I checked the implementation against #679's acceptance criteria. The new queue-health category stays read-only, compares the latest useful non-author human review commit against the current PR head, ignores author/bot reviews for that human freshness signal, and exposes the finding consistently in JSON, text, Markdown, and --fail-on-issues paths.
Verification run locally from the PR head caad880e4a8e41ecfa928ae78957ce9ca4223d9f in an isolated checkout with the dollar-hunt-mergework conda env:
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 python -m pytest tests/test_pr_queue_health.py -q-> 21 passedpython -m ruff check scripts/pr_queue_health.py tests/test_pr_queue_health.py-> All checks passedpython -m ruff format --check scripts/pr_queue_health.py tests/test_pr_queue_health.py-> 2 files already formattedpython scripts/docs_smoke.py-> docs smoke okpython -m py_compile scripts/pr_queue_health.py-> passedpython scripts/pr_queue_health.py --repo ramimbo/mergework --format json-> completed successfully against the live queue; output includedstale_current_head_reviewsin the summary and top-level payload
No blocking issues found.
JONASXZB
left a comment
There was a problem hiding this comment.
Reviewed current head caad880e4a8e41ecfa928ae78957ce9ca4223d9f as a non-author.
No blocker found in the stale current-head review queue-health signal. Evidence checked:
- inspected
scripts/pr_queue_health.pyand confirmed the new category is read-only reporting only; - verified it compares the latest useful non-author human review commit to
headRefOid/head oid and reports reviewer, state, current head, and latest review commit; - checked bot handling, including explicit bot metadata,
[bot]suffixes, and known bot logins, so bot reviews do not mask stale human review freshness; - inspected tests covering current-head human reviews, stale human review commits, and current-head bot reviews that should not mask stale human reviews;
- ran
python -m pytest tests/test_pr_queue_health.py -q-> 21 passed; - ran
python -m ruff check scripts/pr_queue_health.py tests/test_pr_queue_health.py,python -m ruff format --check ...,python scripts/docs_smoke.py,python -m py_compile scripts/pr_queue_health.py,python -m mypy scripts/pr_queue_health.py, andgit diff --check origin/main...HEAD; - checked a merge-tree against current
origin/main; no conflict markers or both-modified conflict diagnostics were present.
Hosted commit status for this head is green (CodeRabbit: success / Review skipped).
Jorel97
left a comment
There was a problem hiding this comment.
Reviewed current head caad880e4a8e41ecfa928ae78957ce9ca4223d9f as a non-author.
Requesting changes for one bot-classification edge case in the stale current-head review signal.
Evidence checked:
- Inspected
scripts/pr_queue_health.py,tests/test_pr_queue_health.py, anddocs/admin-runbook.md. - Confirmed the new category is read-only reporting and is wired into JSON/text/Markdown summaries plus
--fail-on-issues. - Confirmed the intended behavior is to ignore bot reviews, including CodeRabbit, so a current-head bot review does not mask a stale human review.
- Found a concrete gap in
_is_bot_author(): whenauthorincludes a false boolean bot flag together with a known bot login such ascoderabbitai, the function returnsFalseimmediately and never checksKNOWN_BOT_LOGINS. - Reproduced the impact with
analyze_queue()using a stale human review on commitaaaaaaaaaaaa...followed by a current-headcoderabbitaireview withis_bot: False; the report producedstale_current_head_reviews == 0, so the stale human review was hidden. - The existing regression test covers
{"login": "coderabbitai"}without anis_botkey, but not the false-flag + known-login shape.
Validation run locally on the PR head:
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 python -m pytest tests/test_pr_queue_health.py -q-> 21 passed.python scripts/docs_smoke.py-> docs smoke ok.python -m ruff check scripts/pr_queue_health.py tests/test_pr_queue_health.py-> passed.python -m ruff format --check scripts/pr_queue_health.py tests/test_pr_queue_health.py-> 2 files already formatted.git diff --check origin/main...HEAD-> clean.git merge-tree --write-tree origin/main HEAD-> clean tree9030c41071773044fe6796f826695aa2f7ee4a41.
Suggested fix: keep explicit is_bot: True as bot, but do not return early on is_bot: False; still check __typename, [bot] suffixes, and KNOWN_BOT_LOGINS, with a regression test for {"login": "coderabbitai", "is_bot": False}.
No private data, credentials, wallet material, production mutation, payout/proof/ledger execution, exchange, bridge, cash-out, price behavior, or fabricated payout claims were used or changed.
|
Reviewed current head Requesting changes for one bot-classification edge case in the stale current-head review signal. Evidence checked:
Suggested fix: keep No private data, credentials, wallet material, production mutation, payout/proof/ledger execution, exchange, bridge, cash-out, live trading, local code mutation, git command, or worktree change was used. |
|
Maintainer queue pass 2026-06-02: holding only as a possible future #777 queue-clarity candidate after that bounty finalizes. #647 is exhausted and the latest current-head review requests changes for a bot-classification edge case, so this is not mergeable or payable now. If #777 opens, fix the requested-changes item, retarget to |
Bounty #647
Source issue: #679
Summary:
Verification:
No auto-labeling, auto-closing, payout, treasury, wallet, ledger, proof, private data, price, bridge, exchange, or cash-out behavior changed.
Summary by CodeRabbit
New Features
Documentation
Tests