If any #mastoadmins want to test this out themselves, this is the query I used to find the messed up polls:
SELECT
polls.created_at
, polls.id
, polls.account_id
, polls.votes_count
, pv.total_votes
, polls.status_id
, ARRAY_LENGTH(polls.options, 1)
FROM polls
INNER JOIN users ON
users.account_id = polls.account_id
INNER JOIN (
SELECT
poll_id
, COUNT(*) AS total_votes
FROM poll_votes
GROUP BY poll_id
) AS pv ON
pv.poll_id = polls.id
WHERE pv.total_votes > polls.votes_count
ORDER BY polls.created_at ASC;
then this to find the polls that are not messed up within the same time period:
SELECT
polls.created_at
, polls.id
, polls.account_id
, polls.votes_count
, pv.total_votes
, polls.status_id
, ARRAY_LENGTH(polls.options, 1)
FROM polls
INNER JOIN users ON
users.account_id = polls.account_id
INNER JOIN (
SELECT
poll_id
, COUNT(*) AS total_votes
FROM poll_votes
GROUP BY poll_id
) AS pv ON
pv.poll_id = polls.id
WHERE
polls.created_at >= '2025-03-04 23:03:26'
AND pv.total_votes <= polls.votes_count
ORDER BY polls.created_at ASC;
The good ones all have options array length <= 4 and the bad ones all have options array length > 4
The way I increased the poll options was by modifying MAX_OPTIONS in app/validators/poll_options_validator.rb. This appeared to work prior to v4.3.4.