TrustTheVote-Project / NIST-1500-100-103-examples

Other
3 stars 5 forks source link

How does the ballot markup application know which ballot style to use? #36

Closed mattbeattie closed 2 years ago

mattbeattie commented 2 years ago

In the ballot markup application, we parse an EDF into a list of contests that is displayed to the voter. In order to derive the list of contests, we need to know what ballot style to use.

What we have: the voter's precinct! Is it safe to parse the array of ballot styles and simply return the first BallotStyle whose GpUnitIds array includes the voter's precinct?

What we don't have: the BallotStyles don't include any kind of unique identifier. So if the answer to the above question is "no", then I'm at a loss, given that there's no way for anything to tell the ballot markup application "display BallotStyle X".

trustthevote commented 2 years ago

Each ballot style object contains an identifier for the precinct it is for. Our voter files contain the name (or IRL identifier) for the precinct that each voter is in. We need a mapping from voter to precinct to ballot style. That will be established by (a) voter files containing IRL precinct name/IDs (b) the EDF using those same name/IDs as part of the election definition of precincts and ballot styles (c) provisioner validating consistency of EDF and voter file, rejecting mismatches so that they never get to an app.

@cwulfman is the keeper of test case EDFs at present and Anne of the voter files. They need to work together RSN to make sure that voter files and EDFs are in synch with precinct IDs.

mattbeattie commented 2 years ago

Okay, excellent. So for example, the precinct in this example is precinct_1_downtown. So if I'm a voter and I show up to my precinct downtown, I'll get the single ballot that corresponds to my precinct. That's very simple to code.

John, I remember you said that there may be multiple ballot styles for a single precinct (e.g., primaries where there's a ballot style for each party). Is it safe to simply not worry about that case for now?

mattbeattie commented 2 years ago

I have a solution in place for this and am satisfied with it. If we need to make revisions later on I can raise a new issue accordingly. Thanks again for the guidance here!