Skip to content

Make reviews decide and close PRs by age - #817

Merged
Vilin97 merged 4 commits into
mainfrom
vasil/no-deferral-stale-prs
Nov 14, 2026
Merged

Vilin97 merged 4 commits into
mainfrom
vasil/no-deferral-stale-prs

Conversation

@Vilin97

@Vilin97 Vilin97 commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

Two policy changes the maintainer asked for (2026-11-14).

Reviews always decide. There is no third verdict any more.

  • Blocking rubrics (faithfulness, novelty, significance, sources) return pass or block. An unreadable or retired verdict fails closed as block.
  • Code quality stays advisory: pass or flag (⚠️), never a veto.
  • Overall verdict: any block, or an elided diff, gives request_changes; otherwise approve. needs_discussion is gone, from refactor reviews too.
  • Each rubric's borderline guidance now says which way to decide: for example, suspected prior art without a named declaration is not a block, and an arguable disclosure is a block naming the honest card wording.
  • Unresolved portion-review obligations become block/request_changes instead of discuss.

Stale PRs by age, not inactivity. actions/stale never fired on PRs because the review bots comment on every one. New python/lean_pool/stale_pull_requests.py (run every 6 h by stale.yml):

  • labels a PR stale once it has been open 7 days;
  • closes it once it has been open 21 days and has carried the label for at least 7 days, so PRs that are already old get a week's warning;
  • pinned exempts a PR. Issues keep the existing inactivity policy.

A live dry run labels 17 open PRs now. #506/#507/#512/#639 already carry stale and would close 7 days after their label date.

The permanent reviewer's prompt gains matching rules: never defer, merge ready PRs, oldest first. That ships in the automation repo, along with this PR's merge authorization.

Flaky-on-26.04 test fix. test_watch_stops_a_lean_process_past_the_limit faked lean as a symlink to sleep. The ubuntu-26.04 runners ship multicall uutils coreutils, so that binary invoked as lean exits immediately. The test failed Python CI on every non-content PR, and it is what dequeued #758. It now fakes lean with Python, like the neighbouring tests.

Testing: ruff check clean. Updated review/portion tests and new stale-policy tests pass. The full suite passes except test_repository_notice_is_current (stale NOTICE, fixed by #758) and three test_proof_profile cases that fail identically on main.

🤖 Generated with Claude Code

Remove the `discuss` rubric verdict and the `needs_discussion` overall
verdict: blocking rubrics decide pass or block (unreadable verdicts fail
closed), advisory code quality decides pass or flag and never vetoes, and
refactor reviews decide approve or request_changes.

Replace the inactivity-based PR staling, which never fired because review
bots comment on every PR, with an age-based policy: label `stale` at 7 days
open, close at 21 days once labelled for at least 7. Issues keep the
existing inactivity policy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Proof profile (new / modified Lean files)

No added or modified Lean files under LeanPool/ in this PR. No compile-cost measurements are needed.

Advisory only — never blocks merge.

@greptile-apps

greptile-apps Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Advisory cross-file review against Lean Pool's supervisory rubric. This is not by itself a significance, source-verification, or merge verdict.

RetriggerView in Greptile

[Medium impact] The PR appears safe to merge; no new actionable issues were found.

Summary

This PR replaces deferred review verdicts with clear decisions and introduces age-based PR closure.

  • Reviews now decide whether a change passes or needs changes.
  • Open pull requests get a stale warning before age-based closure.
  • The timeout test keeps its fake Lean process running on multicall runners.
  • The project guide links readers to source profiles and refreshes its pool details.

Reviews (3) · Last reviewed commit: "Preserve stale PR warning periods and is..." · Reviewed by Greptile

Comment thread python/lean_pool/stale_pull_requests.py Resolved
Vilin97 and others added 2 commits November 14, 2026 11:44
ubuntu-26.04 runners ship multicall uutils coreutils, so a symlink to sleep
invoked as `lean` exits immediately and the watch never trips. This failed
Python CI on every non-content PR (and dequeued #758).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Vilin97
Vilin97 enabled auto-merge November 14, 2026 19:49
@Vilin97
Vilin97 disabled auto-merge November 14, 2026 20:05
Require a known stale-label timestamp before closing a PR, preserve the author's fixed-age reopening advice, and stop the issue-only stale action from clearing PR labels. Grant the PR checkout job contents:read explicitly. Add a missing-history regression.

Validated six policy cases, label-history/dry-run behavior, Ruff check/format and the actual watchdog timeout fixture; hosted required checks remain independent.
@Vilin97
Vilin97 enabled auto-merge November 14, 2026 20:07

@Vilin97 Vilin97 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve — reviewed exact head d8a014094a3808a65bdb23a4bc45e3eb348797b8.

The review-tool changes preserve fail-closed core verdicts, advisory quality flags and blocking unresolved integration obligations. The age policy retains the intended 7-day warning, 21-day age threshold, minimum 7 days labelled, and pinned exemption.

I fixed the remaining policy bugs in the three-file commit:

  • Missing label history no longer counts as a completed warning period; a regression covers it.
  • The issue-only stale action explicitly leaves PR stale labels intact. Its pinned implementation otherwise removes labels on activity before checking the disabled PR-close setting, resetting the new age policy's warning clock.
  • The checkout job receives explicit read permission while retaining the needed issue/PR permissions. The issue job's 90/30-day policy is unchanged.

The author's newer reopening advice is preserved. The fake-Lean watchdog test retains its timeout assertions and passed against the unchanged current-main watchdog.

Validation: six policy tests, pagination/dry-run boundary checks, the actual watchdog fixture, Ruff lint/format, and twelve independently assessed review/portion cases passed. This is focused validation; the new head's required hosted checks must still pass before protected queue admission.

@Vilin97
Vilin97 added this pull request to the merge queue Nov 14, 2026
Merged via the queue into main with commit 9a853f8 Nov 14, 2026
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant