Skip to content

Conversation

@eventualbuddha
Copy link
Contributor

Overview

Fixes #7769

When bubble ballot interpretation produces errors that definitively identify the ballot as a bubble ballot (wrong election hash, wrong precinct, wrong test mode, vertical streaks, invalid scale), skip the slow summary ballot fallback interpretation since it cannot produce a better result.

Demo Video or Screenshot

n/a

Testing Plan

Automated tests.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Improves ballot interpretation performance by avoiding the slow summary-ballot (BMD) fallback when the initial bubble-ballot (HMPB) interpretation returns certain definitive bubble-ballot errors (per #7769).

Changes:

  • Added shouldSkipSummaryBallotInterpretation to classify “definitive” bubble-ballot errors where BMD fallback is unnecessary.
  • Updated interpretSheet to return early (skipping BMD interpretation) when those definitive errors occur.
  • Added unit tests covering the skip-decision logic for several page types and unreadable reasons.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
libs/ballot-interpreter/src/interpret.ts Adds skip-decision helper + early return in interpretSheet to avoid expensive fallback work.
libs/ballot-interpreter/src/should_skip_summary_ballot_interpretation.test.ts New tests validating which bubble-ballot error outcomes should bypass summary fallback.

@eventualbuddha eventualbuddha force-pushed the vxsuite-7769-ballot-interpreter-fallback branch 2 times, most recently from 0a4b35a to b876165 Compare February 12, 2026 01:07
Fixes #7769

When bubble ballot interpretation produces errors that definitively identify the ballot as a bubble ballot (wrong election hash, wrong precinct, wrong test mode, vertical streaks, invalid scale), skip the slow summary ballot fallback interpretation since it cannot produce a better result.
@eventualbuddha eventualbuddha force-pushed the vxsuite-7769-ballot-interpreter-fallback branch from b876165 to 7c0f37b Compare February 12, 2026 17:20
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.

Summary ballot interpretation fallback after failed bubble ballot interpretation results in slow surfacing of errors

1 participant