chore: require a strict majority to pass a gitvote vote - #279
Merged
Merged
Conversation
gabriele-wolfox
approved these changes
Sep 15, 2026
fcanovai
approved these changes
Sep 15, 2026
fcanovai
force-pushed
the
dev/gitvote-majority-threshold
branch
from
September 15, 2026 09:03
d65b8f2 to
389daed
Compare
GitVote decides a vote with `in_favor_percentage >= pass_threshold`, so a flat 50 let an even-sized electorate pass its own tie: 2-2 on a four-owner repo cleared the bar. A simple majority is strictly more than half, and a percentage cannot express "half plus one vote", so the threshold moves to 50.01 -- above any exact tie, below the smallest real majority, which is 50 + 100/N percent for N voters and stays above 50.01 up to N = 10000. The two-thirds profiles move from 66 to 66.66 for the same reason: two thirds is 66.666..., so a flat 66 sat just under its own bar (33 of 50 is 66.0 and would have passed). Not 66.67 -- for an electorate divisible by three the exact two-thirds computes to 66.6666..., which falls under 66.67 and would break a legitimate 2-of-3. This file is rendered from cnpg-infra's gitvote-policy.yaml; the change is made there and regenerated here. Assisted-by: Claude Opus 5 Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
fcanovai
force-pushed
the
dev/gitvote-majority-threshold
branch
from
September 15, 2026 09:07
389daed to
01179be
Compare
35 tasks
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.
What
Raises this repository's gitvote thresholds from
50/66to50.01/66.66.Why
gitvote decides a vote with
in_favor_percentage >= pass_threshold(src/results.rs), where the denominator is the whole electorate rather than the votes cast.The
>=is the problem. At a flat50, an even-sized electorate splitting exactly down the middle clears the bar, so a 2-2 tie on a four-owner repository passed the motion. A simple majority is strictly more than half, and a percentage cannot express "half plus one vote", so the bar has to sit just above 50 instead.>= 50Odd-sized electorates were never affected: the percentage cannot land on exactly 50, so
>= 50and> 50agree.Why 50.01 — the smallest possible majority of N voters is
50 + 100/Npercent, which stays above 50.01 for any N up to 10000. It rejects an exact tie and accepts every real majority.Why 66.66 and not 66.67 — two-thirds is 66.666…, so a flat
66sat fractionally under its own bar (33 of 50 is 66.0 and would have passed). Rounding up to66.67would overshoot: for an electorate divisible by three the exact two-thirds computes to 66.6666…, which falls under 66.67 and would break a legitimate 2-of-3. 66.66 sits in the gap.pass_thresholdis anf64in gitvote's config (src/cfg_repo.rs) with no integer constraint, so fractional values parse fine.Scope
This file is generated from
cnpg-infra'sgitvote-policy.yamlviascripts/render-gitvote-config.sh. The change was made there first and regenerated here, so a later sync will not revert it. The same two values are being applied across every repository in the organisation in one pass, includinggovernance's hand-maintained copy.