From c0c79e36aa52647b325e38e2afa159a6556be904 Mon Sep 17 00:00:00 2001 From: Gabriele Bartolini Date: Tue, 15 Sep 2026 09:53:45 +0200 Subject: [PATCH] fix: require a strict majority to pass a gitvote vote 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 --- .gitvote.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitvote.yml b/.gitvote.yml index 790a75d3..da608dbc 100644 --- a/.gitvote.yml +++ b/.gitvote.yml @@ -15,6 +15,11 @@ # plus, where this repo belongs to a subproject, the same two scoped to # that subproject's maintainer committee, for the case where this repo has # too few named owners to decide for itself. +# +# The thresholds are 50.01 and 66.66, not 50 and 66, because gitvote +# passes a vote on >= rather than >: a flat 50 would let an even-sized +# electorate tie and still pass. See cnpg-infra's +# scripts/render-gitvote-config.sh for the full reasoning. automation: enabled: false rules: @@ -24,7 +29,7 @@ automation: profiles: default: duration: 1w - pass_threshold: 50 + pass_threshold: 50.01 allowed_voters: teams: - cloudnative-pg-github-io-owners @@ -34,7 +39,7 @@ profiles: component-owner: duration: 1w - pass_threshold: 66 + pass_threshold: 66.66 allowed_voters: teams: - cloudnative-pg-github-io-owners @@ -44,7 +49,7 @@ profiles: committee: duration: 1w - pass_threshold: 50 + pass_threshold: 50.01 allowed_voters: teams: - community-ecosystem-maintainers @@ -54,7 +59,7 @@ profiles: committee-component-owner: duration: 1w - pass_threshold: 66 + pass_threshold: 66.66 allowed_voters: teams: - community-ecosystem-maintainers