Skip to content

Let reviewers abstain on proposals and grants - #4864

Merged
marcoacierno merged 6 commits into
mainfrom
claude/pycon-cfp-review-requirements-c4e96a
Nov 22, 2026
Merged

marcoacierno merged 6 commits into
mainfrom
claude/pycon-cfp-review-requirements-c4e96a

Conversation

@EdAbati

@EdAbati EdAbati commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

What

Reviewers can now press "Abstain and go to the next" on the proposal and grant review pages, for example when they know the speaker or applicant.

  • An abstention is a vote with an empty score (UserReview.score is now nullable). The item counts as reviewed for that reviewer and doesn't come back in their queue.
  • Picking a score later replaces the abstention. Reopening an abstained item shows "You abstained on this proposal/grant. Pick a score to vote instead."
  • "Vote and go to the next" without a score is still refused ("Invalid vote") and saves nothing. "Skip for now" is unchanged.
  • Abstentions don't count where votes or scores are used: the "fewest votes first" queue order, the grant shortlist average, "Total votes" on the review page and the shortlist vote counts. Counts are annotated in the database with Count("userreview__score"), which skips NULL scores.
  • The review page and both shortlists show "Abstained" with the reviewer's name and comment.

blank=False stays on the score field, so the generic Django admin form for a vote still requires a score. Abstaining is only possible from the review pages.

Deploy and rollback

  • Migration 0009: drops NOT NULL on reviews_userreview.score_id; no rows are rewritten. Django also drops and re-adds the score foreign key, which checks every vote row under a short lock. The table is small, so this should be quick.
  • Deploy window: migrations run in a non-essential container with no ordering against the web tasks. Until 0009 has applied, pressing Abstain on new code returns a 500. Old processes still serving during the deploy show an abstention as "voted ()" and count it in the grant average.
  • Rollback: reverting the code alone is safe (old templates don't crash on an empty score, but they count abstentions as votes again). Reversing the migration fails once any abstention exists: rows with score IS NULL would have to be deleted first, losing their comments.

Out of scope

One vote per reviewer per item (a unique constraint plus merging existing duplicates) is a separate, later change. This PR doesn't make duplicates worse: abstaining goes through the same update_or_create as voting.

Testing

  • pytest reviews custom_admin: 97 passed, on Django 6.1.3 after merging main.
  • Each new count test fails if abstentions are counted again, and the notice test fails if the user_review guard is removed from the template.
  • Checked by hand on seeded data: abstaining with a comment, the next item opening, counts and averages unchanged, "Invalid vote" with no score, and a score replacing an abstention, for both proposals and grants.

Reviewers can now press "Abstain and go to the next" on the proposal
and grant review pages, for example when they know the speaker or
applicant. An abstention is a vote with an empty score: the item counts
as reviewed for that reviewer and doesn't come back in their queue, and
picking a score later replaces it.

Abstentions don't count where votes or scores are used: the "fewest
votes first" queue order, the grant shortlist average, "Total votes" on
the review page and the shortlist vote counts. The review page and both
shortlists show "Abstained" with the reviewer's comment.

The migration only drops the NOT NULL rule on UserReview.score, so it
rewrites no rows. Reversing it fails once any abstention exists.
The review page and both shortlists read an annotated vote_count instead
of counting prefetched votes with the scored_votes filter, which is
removed. Every vote count uses Count("userreview__score"), which skips
abstentions because COUNT ignores NULLs.
@vercel

vercel Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
pycon Ready Ready Preview Nov 22, 2026 6:14pm UTC

@claude

claude Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Adds an "Abstain" option to proposal/grant reviews: UserReview.score becomes nullable, abstentions are stored with a NULL score, excluded from vote counts and averages, and shown as "Abstained" in the review and shortlist pages.

No issues found.

@codecov

codecov Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.61%. Comparing base (aeeb43b) to head (7249086).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4864      +/-   ##
==========================================
+ Coverage   92.41%   92.61%   +0.20%     
==========================================
  Files         360      360              
  Lines       10958    10960       +2     
  Branches      953      953              
==========================================
+ Hits        10127    10151      +24     
+ Misses        705      684      -21     
+ Partials      126      125       -1     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@marcoacierno
marcoacierno merged commit 0cf99ab into main Nov 22, 2026
9 checks passed
@marcoacierno
marcoacierno deleted the claude/pycon-cfp-review-requirements-c4e96a branch November 22, 2026 18:42

This branch was successfully deployed

1 active deployment
Preview — 72490864 Deployed Nov 22, 2026 by vercel[bot]
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.

2 participants