Repository navigation
🐞 Eligible voters: count each election's voters once, and only enabled voters on its dashboard (9.0) - #3924
Conversation
… dashboard The election dashboard's Eligible voters came from count_users without an enabled filter, so disabled voters were counted. Send enabled: true, as release/10.0 and release/10.1 already do. Parent issue: sequentech/meta#14272 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PkzuNwsArCPLjD5zVvWYc7
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
Status of the meta#14272 fix family. FELIX4-DIRECT-20261016 acknowledged. This comment is edited in place; last update: final, CI terminal. Meta issue: https://github.com/sequentech/meta/issues/14272. Assigned to Findeton, type Bug. The project iteration is not set because the token has no project scope. The meta body carries the full decisions and the coverage matrix. What is fixed. Every fix is census-only. Ballot selection, cast votes, vote totals, country/session scope and historical snapshots are unchanged.
Final heads and executed tests. Synthetic data only; all compiled, ran and passed.
* 9.0's tests ran on 2ace9f0. 06860e6 changes one test comment only. Every branch passes its import test: an exported row goes through Independent review. Every round was rechecked on the committed heads, and no blocking issue remains. Its last points are applied: the 9.0 wording, and documentation of the fail-loud and deleted-area import edges. CI on final heads: terminal, all PR checks green.
harvest coverage — no decrease on #3925: failed on attempt 1, passed on its single re-run.
Pre-existing, not repaired: the release/9.0 push workflow Java Test fails on the final head (run 38971050964). Unresolved limitations, documented:
Beyond gitlinks are unchanged (ovcs |
…ults An election's eligible voters was the sum of its areas' census, which counts a voter in more than one of its areas once per area and leaves out voters authorized by the election's id when it has no alias. When the session first dumps its ballots, count each election's enabled voters once each across its tally rows' areas, naming it as Keycloak's mapper does, and record them on the session. Contest and area figures, cast votes and the ballots tallied are unchanged, and sessions dumped before keep their census. Parent issue: sequentech/meta#14272 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PkzuNwsArCPLjD5zVvWYc7
Importing a tally session replaces its election and area ids but copied its annotations as they were, so its recorded census would name the exporting event's elections. Replace the election ids of the recorded electorates through the import's id map, refusing an id it does not have as for the session's own. A recorded map that names elections other than the session's is now an error rather than being counted or dropped. Parent issue: sequentech/meta#14272 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PkzuNwsArCPLjD5zVvWYc7
Parent issue: sequentech/meta#14272 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PkzuNwsArCPLjD5zVvWYc7
Parent issue: https://github.com/sequentech/meta/issues/14272
Two fixes to an election's Eligible Voters.
1. Election dashboard: disabled voters were counted.
count_userswith noenabledargument.enabled: true, asrelease/10.0andrelease/10.1already do. The generatedgql.ts/graphql.tsdocuments are updated to match.2. Tally results: the election's eligible voters (
results_election.elegible_census, and the reports' election census and turnout).area-idvalue among the election's areas is counted once for each of those areas;AuthorizedElectionsUserAttributeMapper: key = alias, or the ID without one), are left out.election_electorates, a JSON string, as this branch's transmission-package readers expect), and the election census is that figure.Unchanged:
tally_ceremony.rs:204), andis_acclaimedis only a stored column here. So the areas are the same as before, and the areas-with-nothing-to-tally defect of the other branches does not occur.insert_ballots.rsis not changed.Known limitation. Voters authorized by the election's ID are now in the election census, but their ballots stay out of the tally, as before. Their area census is also unchanged. So the election total can be larger than its areas' sum. Including their ballots changes which ballots are tallied; that is out of scope here (
ovcs0ef8fa2).Imported sessions:
import_tallyreplaces the recorded electorates' election IDs through the import's ID map, as it does for the session's own elections and areas, so an imported session keeps its recorded census. An unknown ID fails the import, and a recorded map naming elections other than the session's is an error rather than being dropped. A session only records maps for its own elections, and nothing edits a session's elections afterwards, so that error means corrupted data. It surfaces as a tally session error on every run until the annotation is corrected, rather than silently changing the census.Validation (synthetic data only; no environment accessed)
GetElectionStats, as written and as generated, was schema-validated and executed with acount_usersresolver over three synthetic voters, one of them disabled. Before: 3 eligible, noenabledargument. After: 2, withenabled: true. A Jest test was added; this branch's CI has no Admin Portal Jest job, so CI doesn't run it.cargo test -p windmill --lib, filtered toelection_electorates,execute_tally_sessionandusers. They cover:ValidateAnnotationson a session carrying the electorates;the_voters_of_areas_are_the_enabled_ones_each_counted_once, run against a throwaway PostgreSQL with temporary Keycloak tables. It covers enabled vs disabled, an area whose voters are all disabled, service account, other realm, other election, a voter in two areas, and a voter authorized by election ID (counted under the ID, not under an empty alias).rustfmt --checkandprettier --checkpass.map_plaintext_dataend to end, and a full tally on a running stack.No Beyond gitlink on this branch; no submodule change.
🤖 Generated with Claude Code
https://claude.ai/code/session_01PkzuNwsArCPLjD5zVvWYc7