Skip to content

Batch Comparison: Consider extra batches shared across contests#2344

Draft
nikhilb4a wants to merge 4 commits into
mainfrom
nikhil/2324-multi-contest-extra-batches
Draft

Batch Comparison: Consider extra batches shared across contests#2344
nikhilb4a wants to merge 4 commits into
mainfrom
nikhil/2324-multi-contest-extra-batches

Conversation

@nikhilb4a

@nikhilb4a nikhilb4a commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Closes #2324

Draft PR:

  • Creates a new model for extra batches since they do not have a ticket_number nor contest_id
  • Separates extra batch selection into its own function
  • Account for extra batches when querying for batches

Replace the EXTRA_TICKET_NUMBER ticket sentinel with a dedicated
ExtraBatchDraw table keyed by (batch_id, round_id), plus a
Batch.extra_draws relationship. Extra batches are audited to meet state
requirements but don't count toward risk measurement, so modeling them
separately from SampledBatchDraw keeps them out of risk queries by
default rather than relying on a magic ticket number.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nikhilb4a nikhilb4a force-pushed the nikhil/2324-multi-contest-extra-batches branch 2 times, most recently from 4f1e8f3 to f508998 Compare June 16, 2026 02:06
nikhilb4a and others added 3 commits June 16, 2026 02:31
…rement

Compute extra batches once per round across all jurisdictions, decoupled
from individual contests, and persist them as ExtraBatchDraw rows
alongside the RLA sample.

Extra batches are audited but must not count toward the risk
calculation. Because they're no longer SampledBatchDraw rows, the risk
and result reads (count_audited_votes, sampled_batch_results, round
reports) only look at SampledBatchDraw and therefore exclude them; they
are pulled in only where non-RLA batches are explicitly requested.
Update combined-batch representative selection and the round-completion
check to use ExtraBatchDraw.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Include extra batches alongside RLA sampled batches in the jurisdiction
batch list, retrieval list, progress counts, cross-round dedup, and the
finalization guard, so they're pulled, audited, and required to have
results like any sampled batch. Also surface discrepancies found in
extra batches in the discrepancy report.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

Batch comparison: Handle interaction between extra batch selection and multi-contest batch audits

1 participant