Repository navigation
Bot: describe the settle gate accurately in public comments - #51
Conversation
fb78e77 to
b9bc2e6
Compare
The ready comment the bot posts on mathlib4 said the kept tags were 'approved by >=2 reviewers (incl. a maintainer)'. The gate counts the PR author as a reviewer, treats any mathlib4 owner/member/collaborator as a maintainer, and keeps a tag on one approval, which can be the author's own or a single reaction. settle.ready_header() now states that rule and lists who reviewed (names in code font, no @-mentions); poll.py and daily_bot.py use it. Docstrings follow. No logic change.
… more than happened pr_table's default header (posted after a conflict rebuild) said the tags 'were approved in review'; it now says they are the tags kept at the last settle. push_property's 'merged by a maintainer' becomes 'approved for merge by a maintainer (bors r+ or d+)'. ready_header's docstring no longer implies the comment mentions nobody: the table below it @-mentions reviewers, as before.
b9bc2e6 to
8210b3e
Compare
|
Review status: merged in Update 2026-10-14 (re-checked at
Original review (2026-10-14)Independent adversarial review of Verdict: right fix, but the new settle header still makes two promises the code doesn't keep, to the maintainers it asks for a review. Required before merge
Decisions for the maintainer
Merge order: after #48 (merge commit), retarget to main by hand, then merge before Fixes are in progress; this comment will be updated. Posted by the WikiLean PR swarm (lead); updated 2026-10-14. |
Status review (2026-10-14): ✅ Ready (stacked on #48)This is a wording-only change that fixes a real public overclaim on mathlib4#42608. The header is deterministic, adds no @-mentions and keeps the marker. The test checks the text and that Nits / follow-ups
Order: after #48. Then retarget this PR's base to #42608 still conflicts with master, so the first working poller tick after #48's rollout should rebuild it and repost its table with 🤖 Automated status pass by Claude Code over all 18 open PRs (#46–#63), posted for the repo owner. An independent verifier re-checked each finding. All 18 heads were also merged and tested together in a scratch tree; the only test failure that comes from combining them is #47 × #55 (three other pairs had mechanical text conflicts). Reviewed head: |
…reads 'No unresolved objection' overclaimed: classify() never counts a GitHub "Request changes" review or a free-text comment as an objection. The header now says no reject/revise/flag recorded by this bot survived a maintainer's verdict, and that those two are not counted. The override clause is narrowed to what decide() does: only a per-tag verdict or thumbs reaction from jcommelin, faenuccio or a mathlib4 owner/member/collaborator overrides; a GitHub PR approval never does. ReadyHeaderTest pins the new wording and rejects any @-mention. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-to-merge export_property_seed.py's docstring and the QuickStatements header it emits said each merged tag was reviewed by >=2 humans incl. a maintainer. They now say each was merged after Mathlib review and CI, and that the rows include external (non-bot) PRs. Only the header comment line of the committed property_seed_quickstatements.csv is updated to match; the rows are not regenerated. README, daily_bot.py, poll.py and ops/poll-once.sh described a 'ready-to-merge comment'; they now describe the tag table under a ready-for-maintainer-review header. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixes pushed (2026-10-14)This addresses, from the PR swarm's review, the two What changed
Verification
Not changed / still open
Merge notes
🤖 Posted by Claude Code for the repo owner. Each fix was checked by an independent verifier before it was pushed. Head: |
Brings in #49 and #51 as merged. #58 had merged #49's branch and an earlier main separately, which left two merge bases; GitHub's test merge reported a conflict even though git merges cleanly. With main as a direct ancestor the PR's diff is again only its own three files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every file this branch touched (bot/settle.py, test_poll.py, poll.py, pr_table.py, harvest_corrections.py, README.md, scripts/ci-python.sh) is resolved to main, and bot/test_settle_gate.py is dropped, so the merge result equals main: #51's settle gate wording and behaviour stay as they are. The rework on top of this merge keeps the parts of the original draft that still apply (the maintainer list, is_maintainer(), the rebuild of every tag on the PR, the test fixtures) and carries the whole of the PR's change against main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bot: describe the settle gate accurately in public comments
Every file this branch touched (bot/settle.py, test_poll.py, poll.py, pr_table.py, harvest_corrections.py, README.md, scripts/ci-python.sh) is resolved to main, and bot/test_settle_gate.py is dropped, so the merge result equals main: #51's settle gate wording and behaviour stay as they are. The rework on top of this merge keeps the parts of the original draft that still apply (the maintainer list, is_maintainer(), the rebuild of every tag on the PR, the test fixtures) and carries the whole of the PR's change against main.
Problem
When the settle gate opens, the bot posts a "ready" comment on the upstream mathlib4 PR saying the kept tags were "approved 🟢 by ≥2 reviewers (incl. a maintainer) — ready to merge" (
bot/poll.py:82-85,bot/daily_bot.py:86-89). That is not the rulebot/settle.pyapplies:On leanprover-community/mathlib4#42608 this text went out over 9 tags, 6 of them approved only by the author.
Change
settle.ready_header(cls)builds the comment's first line from the rule as implemented:jcommelin,faenuccioor a user GitHub shows the bot as a mathlib4 owner/member/collaborator overrides the others; a GitHub PR approval never does@, so the header adds no mentions (the tag table below it @-mentions reviewers, as before)poll.py(do_settle) anddaily_bot.pyboth use it. The HTML marker the table code looks for is unchanged.pr_table.py's default header is what remains after a conflict rebuild. It said the tags "were approved 🟢 in review"; it now says they are "the tags kept at its last settle".settle.pyrule docstring now states the real gate and drops the "≥24h since it opened" condition, which was never checked. Thepush_property.pydocstring now says a merged tag "was approved for merge by a Mathlib maintainer (bors r+, or d+ delegation) after Mathlib CI".export_property_seed.py's docstring and the QuickStatements header it emits now say each merged tag was "merged after Mathlib review and CI", and that the rows include external (non-bot) PRs. Only the header comment line of the committedbot/data/property_seed_quickstatements.csvchanges; the rows are not regenerated.bot/README.md,daily_bot.py,poll.pyandops/poll-once.shnow describe the tag table under a ready-for-maintainer-review header.The draft rule change ("count real reviewers") is stacked on this PR and rewrites the same function, so this fix stands even if that one is declined.
How tested
ReadyHeaderTestinbot/test_poll.pychecks the header's statements (including the narrowed objection and override wording), that it contains no@mention, no "≥2 reviewers" and no "unresolved objection" claim, and that it keeps the marker. It also checks thatdo_settleposts exactlyready_header(cls).bot/test_poll.py,bot/test_state_branch.pyandbot/test_triage.pypass locally.Risks
What Jack must do
Nothing beyond review: no secrets, settings or operator steps.