Repository navigation
Settle rule: recognise all 28 Mathlib maintainers; keep every tag in a conflict rebuild - #57
Conversation
fb78e77 to
b9bc2e6
Compare
986df26 to
88e4586
Compare
The gate counted the PR author (the operator's own account) as one of its >=2 reviewers and treated any OWNER/MEMBER/COLLABORATOR association as a maintainer, so batch 7 opened on the author plus a Mathlib reviewer. - the author never counts toward the gate (their per-tag verdicts still do) - 'maintainer' is only the explicit MAINTAINERS list (the Mathlib maintainers team, 28 logins); the association and org probe are gone - a maintainer's reaction no longer overrides the author's written objection - the ready comment (settle.ready_header) states the rule applied and how many green tags rest on the author's approval alone Tests: bot/test_settle_gate.py.
… login case - track each login's latest written verdict apart from reactions, so a same-meaning reaction cannot cancel the author's written objection or a maintainer's written approve - a conflict rebuild re-applies every tag on the PR, not the green set: with the gate closed nothing triages a recycled tag, so it must not vanish in a force-push - a PR with no author login fails closed instead of counting the author - maintainer logins match case-insensitively (settle.is_maintainer), also in pr_table and harvest_corrections; drop harvest's unused set
b9bc2e6 to
8210b3e
Compare
88e4586 to
2d1e67f
Compare
|
Ready after the maintainer's rule choice and three small fixes; still a draft (re-reviewed at Posted by the WikiLean PR swarm (lead); updated 2026-10-17. |
Status review (2026-10-14): ⏸ Hold (draft); one confirmed regressionThe author exclusion, the explicit maintainer list, the rebuild-all-tags change and the header all hold up. The exception this PR adds has a bug, which needs fixing before the six policy decisions in the body matter. Fix
Nits
Order: #48, then #51, then this PR; retarget the base as each lands. It conflicts with #61 in 🤖 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: |
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>
Main's per-tag rule let any "maintainer" verdict trump, whenever given, and "maintainer" included every mathlib4 owner/member/collaborator. On mathlib4#42608 a Mathlib reviewer's 👍 (association COLLABORATOR), older than the PR author's written reject, kept Set (Q36161) and PartialOrder (Q474715) green. Maintainers whose org membership is private (16 of the 28) read as CONTRIBUTOR and 404 on the members probe; of those, only faenuccio was recognised, through the old two-login list. - MAINTAINERS is now the 28 logins of the Mathlib maintainers team (teams.yaml at 5b8381a4), added to the association and org-probe check rather than replacing it. is_maintainer() matches them case-insensitively, in settle, pr_table's maintainer mark and harvest_corrections. - decide(): if the PR author's latest verdict on a tag is a reject/revise/flag, only a listed maintainer whose latest verdict on the tag is one they wrote after it can trump. An earlier verdict, a reaction alone or an association-only maintainer no longer overrides it, so the objection recycles the tag. - ready_header names "a Mathlib maintainer listed in the bot" instead of jcommelin and faenuccio, and says only a listed maintainer's later written verdict overrides the author's reject/revise/flag. - resolve_conflicts re-applies every tag on the PR, not the green set: with the gate closed nothing triages a recycled tag, so a rebuild must not drop it. Trimming stays with the settle. The stale "green tags" wording in poll.py and the README follows. The gate is unchanged. The list, is_maintainer() and the rebuild of every tag come from this branch's earlier draft. The tests in bot/test_settle_gate.py are adapted from its fixtures: the draft's regression (a maintainer's written approve, the author's reject, then the maintainer's 👎 went green), a replay of #42608's verdicts, and the cases that tell main and this rule apart. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The previous commit replaced the maintainer verdicts on a tag with only the listed maintainers who wrote after the author's objection. That also threw away every other maintainer's live objection: a listed maintainer's 👎, a reject written before the author's, or a collaborator's 👎. With the author's reject added, such a tag could go green where it recycles without it, the same kind of lost 👎 that sank the earlier draft. Only the approvals that may override the author are narrowed now; every maintainer's objection still counts, the author's own included when GitHub shows them an org role. With the same maintainers, the exception can no longer green a tag that main's rule recycles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since the rebuild re-applies every tag on the PR, green_qids and green no longer hold the green set. Rename them to pr_qids and carried (and green_files to carried_files) so the code reads like its comments. The reapply_green.json state file keeps its name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Recommendation: merge; take it out of draft first (at Posted by the WikiLean PR swarm (lead); updated 2026-10-17. |
… their later written verdict A listed maintainer writes reject after the author's reject, then reacts thumbs-up. Their latest verdict is the thumbs-up, but no written approve backs it, so it must not override the author's objection. With the w[0] == real[u] check in wrote_later removed, this input turned green and all 17 existing tests still passed; this test fails then.
|
Updated verdict at
Earlier verdict at f4f1b63 (carve-out design)Verdict: the code is sound, and the decision is yours.
|
The PR author's reject no longer stands against maintainers. As on main, a maintainer's verdict beats it whenever and however it was given: a reaction or a written verdict, earlier or later, from a listed maintainer or one recognised by association. The carve-out goes, and with it the written-verdict bookkeeping it used, the ready header's sentence and the README line. The gate is unchanged: the author still counts as one of the two reviewers. Kept: the 28-login MAINTAINERS list (case-insensitive) and the conflict rebuild that keeps every tag on the PR. The carve-out tests now assert the opposite: a collaborator's earlier thumbs-up, a listed maintainer's later thumbs-up, a listed maintainer's earlier written approve and a collaborator's later written approve each beat the author's reject. The guard test goes with the guard. The mathlib4#42608 replay keeps all nine tags green. Also corrects pr_table.sync_body_count's docstring: the rebuild no longer shrinks the diff.
Settle rule: recognise all 28 Mathlib maintainers; keep every tag in a conflict rebuild
|
Re-review on main ( The merged code implements the owner's policy exactly. No author lookup remains in
|
Problem
On main, two defects in
bot/settle.pyandbot/poll.py:jcommelinandfaenuccio, so faenuccio is the only one of those 16 that counts. A private maintainer's reject loses to a collaborator's 👍.resolve_conflictsrebuilt fromclassify().green. A tag that recycles while the gate is closed was dropped in the force-push, with no triage and no trim comment.Change
MAINTAINERSis now the Mathlib maintainers team.data/teams.yamlin leanprover-community/leanprover-community.github.io at 5b8381a4, each checked withgh api users/<login>.settle.is_maintainer()matches logins case-insensitively.settle.py,pr_table.py's maintainer mark andharvest_corrections.py'sis_maintainerflag all use it.set(cls["tags"])), and trimming stays with the settle. The "green tags" wording inpoll.pyandbot/README.md, and the rebuild's variable names, now match.settle.ready_header, posted on mathlib4) names "a Mathlib maintainer listed in the bot" instead of`jcommelin`, `faenuccio`. It still @-mentions no one.bot/README.md's gate description points to the list instead of naming two logins.Unchanged:
Effect on mathlib4#42608
Checked read-only with this branch's
settle.py: the gate reads open (Deicyde and SnirBroshi), 9 of 9 tags are green and nothing recycles, the same as main. #40682, the batch Mathlib merged, reads 19 of 19 green.#42608 is already settled and still conflicting. The first acting tick once the poller is back is therefore a conflict rebuild, on main and on this branch alike:
resolve_conflictsforce-pushes all 9 tags onto fresh master.--header(bot/poll.py:198), sopr_table.py's default first line replaces the ready header.Nothing deploys on merge. The change takes effect on the first poller tick once the poller is back, which needs #48's
bootstrap_statedispatch and the token rotation.How tested
bot/test_settle_gate.py(11 tests, stubbed gh, fixtures shared withbot/test_poll.py) is wired intoscripts/ci-python.sh:bot/test_poll.py:FakeGhserves reactions. The header and rebuild-log assertions follow the new wording.python3 bot/settle.py 42608andpython3 bot/settle.py 40682(read-only) give the results under "Effect on mathlib4#42608".bot/test_settle_gate.pyran 11 tests andbot/test_poll.py43, all passing, andrequiredis green. They were not run locally because of machine load.Risks
MAINTAINERSwhen the team changes. An unlisted maintainer still counts if GitHub shows them as a mathlib4 owner, member or collaborator.History
MAINTAINERScounted as maintainer, and the association check and org probe were removed. Declined.The commits before 32c4436 describe those earlier rules, so squash-merge this PR or rewrite the merge message. The maintainer list,
is_maintainer(), the rebuild of every tag and the test fixtures carry over from the earlier versions.🤖 Generated with Claude Code