Skip to content

chore: require a strict majority to pass a gitvote vote - #279

Merged
fcanovai merged 1 commit into
mainfrom
dev/gitvote-majority-threshold
Sep 15, 2026
Merged

fcanovai merged 1 commit into
mainfrom
dev/gitvote-majority-threshold

Conversation

@gbartolini

Copy link
Copy Markdown
Contributor

What

Raises this repository's gitvote thresholds from 50 / 66 to 50.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 flat 50, 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.

Electorate In favor % >= 50 Correct?
7 4 57.1 pass yes
7 3 42.9 fail yes
10 5 50.0 pass no, that is a 5-5 tie
10 6 60.0 pass yes

Odd-sized electorates were never affected: the percentage cannot land on exactly 50, so >= 50 and > 50 agree.

Why 50.01 — the smallest possible majority of N voters is 50 + 100/N percent, 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 66 sat fractionally under its own bar (33 of 50 is 66.0 and would have passed). Rounding up to 66.67 would 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_threshold is an f64 in gitvote's config (src/cfg_repo.rs) with no integer constraint, so fractional values parse fine.

Scope

This file is generated from cnpg-infra's gitvote-policy.yaml via scripts/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, including governance's hand-maintained copy.

@gbartolini
gbartolini requested review from a team and jlong49 as code owners September 15, 2026 07:54
@fcanovai
fcanovai force-pushed the dev/gitvote-majority-threshold branch from d65b8f2 to 389daed Compare September 15, 2026 09:03
@fcanovai fcanovai changed the title fix: require a strict majority to pass a gitvote vote chore: require a strict majority to pass a gitvote vote Sep 15, 2026
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
fcanovai force-pushed the dev/gitvote-majority-threshold branch from 389daed to 01179be Compare September 15, 2026 09:07
@fcanovai
fcanovai merged commit cc63c44 into main Sep 15, 2026
16 checks passed
@fcanovai
fcanovai deleted the dev/gitvote-majority-threshold branch September 15, 2026 09:27
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.

3 participants