Anti-Harassment Tools/SecurePoll Improvements/Test Results/math-stackexchange-com-2018-election-results

Comments
SecurePoll and OpaVote agree on elected candidates.

Election setup

 * Candidates: 5
 * Seats: 2
 * Votes: 2106

Actual results latest
SecurePoll tally page (patch 28):

Elected
Election for 2 seats with 5 candidates. Total 2,047 votes.


 * 1) "Candidate 1"
 * 2) "Candidate 3"

Eliminated

 * "Candidate 5"
 * "Candidate 2"

Rounds table
(Results from 14:51, 29 July 2021)

Actual results archive
Patch 17: Output from SecurePoll: array(3) { ["elected"]=> array(2) { [0]=>   int(1) [1]=>   int(3) } ["eliminated"]=> array(2) { [0]=>   int(5) [1]=>   int(2) } ["rounds"]=> array(5) { [0]=>   array(8) { ["round"]=> int(1) ["surplus"]=> int(0) ["rankings"]=> array(5) { [1]=>       array(3) { ["votes"]=> int(0) ["earned"]=> int(1022) ["total"]=> int(1022) }       [2]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(152) ["total"]=> int(152) }       [3]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(436) ["total"]=> int(436) }       [4]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(316) ["total"]=> int(316) }       [5]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(121) ["total"]=> int(121) }     }      ["totalVotes"]=> int(2047) ["keepFactors"]=> array(5) { [1]=>       int(1) [2]=>       int(1) [3]=>       int(1) [4]=>       int(1) [5]=>       int(1) }     ["quota"]=> int(683) ["elected"]=> array(0) { }     ["eliminated"]=> array(0) { }   }    [1]=>    array(8) { ["round"]=> int(2) ["elected"]=> array(1) { [0]=>       int(1) }     ["eliminated"]=> array(0) { }     ["surplus"]=> int(339) ["keepFactors"]=> array(5) { [1]=>       int(1) [2]=>       int(1) [3]=>       int(1) [4]=>       int(1) [5]=>       int(1) }     ["quota"]=> int(683) ["rankings"]=> array(5) { [1]=>       array(3) { ["votes"]=> int(1022) ["earned"]=> int(0) ["total"]=> int(1022) }       [2]=>        array(3) { ["votes"]=> int(152) ["earned"]=> int(0) ["total"]=> int(152) }       [3]=>        array(3) { ["votes"]=> int(436) ["earned"]=> int(0) ["total"]=> int(436) }       [4]=>        array(3) { ["votes"]=> int(316) ["earned"]=> int(0) ["total"]=> int(316) }       [5]=>        array(3) { ["votes"]=> int(121) ["earned"]=> int(0) ["total"]=> int(121) }     }      ["totalVotes"]=> int(2047) }   [2]=>    array(8) { ["round"]=> int(3) ["elected"]=> array(0) { }     ["eliminated"]=> array(1) { [0]=>       int(5) }     ["surplus"]=> float(14) ["keepFactors"]=> array(5) { [1]=>       float(0.66829745596869) [2]=>       int(1) [3]=>       int(1) [4]=>       int(1) [5]=>       int(1) }     ["quota"]=> int(669) ["rankings"]=> array(5) { [1]=>       array(3) { ["votes"]=> int(1022) ["earned"]=> float(-339) ["total"]=> float(683) }       [2]=>        array(3) { ["votes"]=> int(152) ["earned"]=> float(20.23385518591) ["total"]=> float(172.23385518591) }       [3]=>        array(3) { ["votes"]=> int(436) ["earned"]=> float(116.42759295499) ["total"]=> float(552.42759295499) }       [4]=>        array(3) { ["votes"]=> int(316) ["earned"]=> float(136.6614481409) ["total"]=> float(452.6614481409) }       [5]=>        array(3) { ["votes"]=> int(121) ["earned"]=> float(24.214285714286) ["total"]=> float(145.21428571429) }     }      ["totalVotes"]=> float(2005.5371819961) }   [3]=>    array(8) { ["round"]=> int(4) ["elected"]=> array(0) { }     ["eliminated"]=> array(1) { [0]=>       int(2) }     ["surplus"]=> float(21.055772994129) ["keepFactors"]=> array(5) { [1]=>       float(0.6545988258317) [2]=>       int(1) [3]=>       int(1) [4]=>       int(1) [5]=>       int(0) }     ["quota"]=> int(663) ["rankings"]=> array(5) { [1]=>       array(3) { ["votes"]=> float(683) ["earned"]=> float(1.0557729941292) ["total"]=> float(684.05577299413) }       [2]=>        array(3) { ["votes"]=> float(172.23385518591) ["earned"]=> float(28.016634050881) ["total"]=> float(200.25048923679) }       [3]=>        array(3) { ["votes"]=> float(552.42759295499) ["earned"]=> float(64.732876712329) ["total"]=> float(617.16046966732) }       [4]=>        array(3) { ["votes"]=> float(452.6614481409) ["earned"]=> float(33.624266144814) ["total"]=> float(486.28571428571) }       [5]=>        array(3) { ["votes"]=> float(145.21428571429) ["earned"]=> float(-145.21428571429) ["total"]=> float(0) }     }      ["totalVotes"]=> float(1987.752446184) }   [4]=>    array(8) { ["round"]=> int(5) ["elected"]=> array(1) { [1]=>       int(3) }     ["eliminated"]=> array(0) { }     ["surplus"]=> float(97.413397129186) ["keepFactors"]=> array(5) { [1]=>       float(0.63444976076555) [2]=>       int(0) [3]=>       int(1) [4]=>       int(1) [5]=>       int(0) }     ["quota"]=> int(650) ["rankings"]=> array(5) { [1]=>       array(3) { ["votes"]=> float(684.05577299413) ["earned"]=> float(0.51551887189922) ["total"]=> float(684.57129186603) }       [2]=>        array(3) { ["votes"]=> float(200.25048923679) ["earned"]=> float(-200.25048923679) ["total"]=> float(0) }       [3]=>        array(3) { ["votes"]=> float(617.16046966732) ["earned"]=> float(95.681635595839) ["total"]=> float(712.84210526316) }       [4]=>        array(3) { ["votes"]=> float(486.28571428571) ["earned"]=> float(65.232946001367) ["total"]=> float(551.51866028708) }       [5]=>        array(3) { ["votes"]=> float(0) ["earned"]=> float(0) ["total"]=> float(0) }     }      ["totalVotes"]=> float(1948.9320574163) } } }

Expected
Output from OpaVote:
 * https://www.opavote.com/results/5380598508027904
 * https://math.stackexchange.com/election/7

Files

 * blt: https://math.stackexchange.com/election/download-result/7
 * php:

Environment

 * Where you tested: local docker using phpunit
 * Latest version of SecurePoll tested:
 * commit 010a55df713367194b6772a07013cb667c333072 (patch 28 https://gerrit.wikimedia.org/r/c/mediawiki/extensions/SecurePoll/+/704454/)
 * commit dedf92f6aa5d2a1c4ffe7935f1c695623587c26d (patch 18 https://gerrit.wikimedia.org/r/c/mediawiki/extensions/SecurePoll/+/704210/)