Batch Comparison: Consider extra batches shared across contests#2344
Draft
nikhilb4a wants to merge 4 commits into
Draft
Batch Comparison: Consider extra batches shared across contests#2344nikhilb4a wants to merge 4 commits into
nikhilb4a wants to merge 4 commits into
Conversation
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>
4f1e8f3 to
f508998
Compare
…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>
f508998 to
42c8681
Compare
This was referenced Jun 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2324
Draft PR: