Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

162 reaudit step not working #169

Merged
merged 6 commits into from
Aug 9, 2024
Merged

162 reaudit step not working #169

merged 6 commits into from
Aug 9, 2024

Conversation

vteague
Copy link
Member

@vteague vteague commented Aug 3, 2024

This fixes two bugs in the reaudit phase, both of which caused nullpointer exceptions. It also adds some tests for proper functioning of various IRV reaudit attempts.

@vteague vteague linked an issue Aug 3, 2024 that may be closed by this pull request
Persistence.getByID(cvr.id(), CVRAuditInfo.class);
final CastVoteRecord oldAcvr = cai.acvr();
if (null == oldAcvr) {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could perhaps use DD or Democracy Developers rather than individual initials?

* 6. a vote that doesn't properly correspond to the IDs it should have, and
* 7. an unparseable vote (typos in json data).
* 6. a vote that doesn't properly correspond to the IDs it should have,
* 7. an unparseable vote (typos in json data),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: "market" -> "marked"


// Seventh test: upload a vote that has typos preventing json deserialization. This should
// cause an error.
testErrorResponse(240515L, IRVJsonDeserializationFail, malformedACVRMsg);
testErrorResponseAndNoMatchingCvr(240515L, IRVJsonDeserializationFail, malformedACVRMsg);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reaudited ballot

testSuccessResponse(240509L, "1-1-1", validIRVReauditAsJson, List.of("Alice","Chuan"), 3);
// Test that the previous upload, with a vote for Bob and Chuan (validIRVAsJson) is now tagged as REAUDITED.
testPreviousAreReaudited(240509L, "1-1-1", List.of("Bob","Chuan"), 1, 1);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"same ballot being reaudited" ?

assertTrue(acvrs.stream().allMatch(cvr -> cvr.imprintedID().equals(expectedImprintedId)));

// Find the maximum revision; check that it matches the expected maximum revision (this should match the number of
// reaudits).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor point: can maxRevision or maxRevisionAcvrs be final?

@vteague vteague merged commit 02a6c19 into main Aug 9, 2024
1 check passed
@vteague vteague deleted the 162-reaudit-step-not-working branch August 9, 2024 23:09
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.

Reaudit step not working
2 participants