Repository navigation
Decide a list's order only where its votes are at least 1% of the list - #1444
Merged
Merged
Conversation
Parser.suggest decided name_order on at least two names and more than two thirds of the names casting an order vote, so in a long list where almost no name votes, two stray votes decided the order for every name: Russian inventors with patronymics, written family first under a family-first base, kept that order in 87% of groups of 1,000 and 2,000 names. The names voting for the winning end must now also be at least 1% of the whole list (_MIN_ORDER_GROUP_SHARE); where that alone holds the order back, the order evidence's note says so. At 200 names or fewer the floor asks no more than the two names _MIN_VOTES does. Measured over 2 to 2,000 names, 300 groups a size, it moves two order rows and nothing else: the Russian row reads 100% from 500 names, and the same names under a given-first base lose the 10 to 15% they reached by the same accident. 0.5%, 2% and 5% were measured and declined (decisions/group-suggestion, 2026-11-16 ORDER FLOOR). The docstring, docs/suggest.rst and root AGENTS.md are re-taken from the extended table, which also corrects the byline figures: the bare initials list reads 94.7% and 93.3% at 50 and 100 names, ORCID's bylines 95.3% at 100. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The floor's note was added to every order evidence the floor touched, including one a decided East Slavic rule then decided given-first, so it called an order decided "too few to decide". It now speaks where the floor alone leaves the order undecided, and where the votes it holds back are for family-first against the rule's given-first order, the one case the floor moves an outcome; it says nothing of held-back votes for the order the rule sets. The floor's denominator leaves out the names a comma left out: they state their own order and the order decided reads none of them. The full table and every parliament suggestion are unchanged, re-run. docs/suggest.rst scopes "not read worse for being long" to the order's own votes and the lists measured, and says a handful of names can still decide the other three settings in a long list. The decisions entry records the rule case the floor changes, the denominator, and every cell of the bare-initials byline row, whose 200-name cell is 97.3%. Two docstring lines reflowed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1442.
What changes
Parser.suggestdecidedname_orderon at least two names and more than two thirds of the names casting an order vote. Names with no vote were outside that share, so in a long list where almost no name votes, two stray votes decided the order for the whole list.Now the names voting for the winning end must also be at least 1% of the list's names, voting or not (
_suggest._MIN_ORDER_GROUP_SHARE = 0.01, read in_Tally.winner). Names a comma leaves out don't count: they state their own order, and the decided order reads none of them.The order evidence's note mentions the floor in two cases: where the floor alone leaves the order undecided, and where the votes it holds back are for family-first against the given-first order a decided East Slavic rule sets. Where they agree with the rule's order it says nothing, since they decided nothing. The first case reads:
One rule, not two. At 200 names or fewer, 1% asks for at most two names, which
_MIN_VOTESasks already. So every size measured before reads as it did, and the floor only acts on lists long enough for stray votes to pile up. A second rule switching it on above some size would add a boundary that nothing in the measurements calls for.The one case where the floor moves an outcome towards an order rather than towards the base. Take ten names written given, patronymic, family, plus two stray family-first votes, among 1,000 silent names. Under a given-first or
FAMILY_FIRSTbase, master decided family-first, under which the rule reorders no name. Now the rule's given-first order stands. The same holds underFAMILY_FIRST_GIVEN_LASTwith the patronymic written last, where master kept that order, which reads the patronymic as the given name. Tests pin each case._keeps_family_firstreads the samewinner(). Under aFAMILY_FIRSTbase, a stray order the floor holds back therefore falls to #1356's branch: the base keeps its order and gets the East Slavic rule alone.Measurement
Command:
uv run python tools/differential/suggest_measure.py --sizes 2,3,4,5,10,20,50,100,200,500,1000,2000 --trials 300(seed 20261110). The base is an export of master06e90204. Each candidate was run with--set _MIN_ORDER_GROUP_SHARE=<share>.What was compared: the 120 order rows, the 12 capitals rows, the TURKIC table and 22 parliament lists under 3 bases. The run on the final code is identical to the 1% candidate run.
Rows that moved (1%):
pv-RU-patronymic, written FF, FF base (same order; #1442)pv-RU-patronymic, written FF, GF base (against; reaches 95% at no size either way)The second row's 10–15% came from the same accident the first row lost to. Stray right votes (about 1 name in 1,000) sometimes outnumbered stray wrong ones (about 3 in 1,000) by more than two to one. Neither kind decides now.
Rows that did not move:
orcid-bylineGF-written/FF-base: 2,000orcid-byline-joinedFF/GF: 200orcid-famcaps-short,psc-Indian,pv-RU: 20–50orcid-famcaps-ea: 10initials_as_familyand the East Slavic rule, the per-name votes, the TURKIC table and every parliament list's suggestion are unchanged.mn_parliamenthas 2 votes among 126 names (1.6%) and stays decided.Candidates declined:
orcid-bylineGF/FF falls 53 / 60 / 72 → 47 / 50 / 65% at 200 / 500 / 1,000;orcid-byline-joinedGF/FF 39 / 28 → 35 / 26%;mn_parliamentis no longer decidedorcid-bylineGF/FF never reaches 95% (98% at 2,000 → 0);orcid-byline-joinedFF/GF needs 500 names instead of 200;pv-RUFF/GF 99 → 98 at 50;mn_parliamentundecided#1442's made-up list (FF base):
GIVEN_FIRSTwith the rule, as master does. The two votes are 15% of that group.GIVEN_FIRSTwith the rule. Every floor suggests the rule alone and keeps family-first, soZzyvov Qqsanreads familyZzyvov.The other three settings have the same hole (not fixed here)
Each of them counts its share among the names that have evidence on it, never among all the names in the group. Shown with made-up names:
Qqsan Petrovich Zzyvovaamong 1,000 or 100,000 silent names decide the East Slavic rule. Under a FF base they also bring the given-first order with it.Qqsan Zzyvov B Kdecideinitials_as_family.Qqsan ZZYVOVAin a list written wholly in one case decidecapitals_as_family.No measured population moves on any of these. The patronymic case reaches the order through the rule, which this floor does not touch. Each needs its own measurement, so they are recorded in the decisions file's Open paragraph. No issue is filed.
Docs
Parser.suggest's docstring,docs/suggest.rstanddocs/design/decisions/group-suggestion.mdare re-taken from the extended table. The decisions file gets the 2026-11-16 ORDER FLOOR entry, with the full 12-size table, the candidates and the commands, plus updated Standing and Open lines.AM Hoy) reads 94.7% at 50 and 93.3% at 100 (the docs said only 50);Parser.suggestmoves a family-first base to given-first) #1442's own entry came from a run of 200 trials.docs/suggest.rstkeeps its advice to give a sample of a few hundred names (it is quicker, and more names rarely help). It now says the order's own votes are not read worse in a long list, scoped to the lists measured. It also says plainly that a handful of names can still decidepatronymic_rules,initials_as_familyorcapitals_as_familyin a long list. The patronymic case brings a given-first order with it.AGENTS.md's suggester paragraph now says a threshold change should be measured out to 2,000 names. Should two stray votes decide a list's order when 100,000 names cast none? (Parser.suggestmoves a family-first base to given-first) #1442 went unseen because the default sizes stop at 200.Parser.suggest()release-log bullet gains:issue:1442. 3.1 is unreleased, and the bullet's limits are unchanged.Checks
Full suite: 49,875 passed. Serial suite: 38 passed.
mypyandruffare clean.sphinx-build -b doctesthas 0 failures, andpython -m doctest README.rstpasses.test_suggest.pypasses on 3.15.tools/differential/snapshot.jsonlis unchanged.The new tests cover:
Parser.suggestmoves a family-first base to given-first) #1442's list at 13 and 1,003 names;_UNGUARDED_EFFECTrow.Twelve of them fail with the floor set to 0. The short-list rows and the agree-with-the-rule rows pass either way, by design; the latter fail on 66c827d's note.
Review round (250c2f3, after the review of 66c827d): the note fix, the comma denominator, the scoped docs, and every cell of the bare-initials byline row in the decisions entry. That row's 200-name cell is 97.3% on this run, while two other runs read 96%; the entry says so. The full table was re-run after the denominator change and is identical.
Not yet run: the PR review toolkit. The coordinating session is reviewing independently.
🤖 Generated with Claude Code