Skip to content

Remove the dead mixed-status check on ranking ballots - #678

Open
lgelauff wants to merge 1 commit into
masterfrom
fix/ranking-dead-mixed-check
Open

lgelauff wants to merge 1 commit into
masterfrom
fix/ranking-dead-mixed-check

Conversation

@lgelauff

Copy link
Copy Markdown
Collaborator

Fixes #676.

The check meant to refuse ranking ballots that mix completed and open tasks compared with 'complete' instead of 'completed', so it never ran. Mixed ballots are legitimate (an entry requalified after the juror ranked gets its task reopened), and apply_ranking() completes every task. Fixing the typo would answer 400 to those ballots, so this removes the check and keeps the current behaviour.

Tests

  • New test_ranking_ballot_with_completed_and_open_tasks: rank, requalify the last entry, resubmit the same ballot, and check that no open tasks are left. It passes on master and with this change; with the typo fixed instead (the check switched on) it fails with a 400.
  • Full suite: 172 passed, 3 xfailed.

Written by Claude (Claude Code) on behalf of @lgelauff.

🤖 Generated with Claude Code

submit_ratings() for ranking rounds refused ballots that mix completed and
open tasks, but compared the status with 'complete' instead of 'completed',
so the check has never run (since 2017). Such ballots are legitimate: an
entry that is requalified after the juror ranked gets its task reopened,
and apply_ranking() completes every task of the ballot. Fixing the typo
instead would answer 400 to that juror's ballot, so remove the check and
keep the behaviour production has always had.

Adds a test: rank, requalify the last entry, resubmit the same ballot. It
passes on master and with this change; with the check switched on it fails
with a 400.

Fixes #676.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dead check on ranking ballots ('complete' vs 'completed'); fixing the typo would block requalified entries

1 participant