Skip to content

SLING-13321 - do not count the result email of an earlier run as a vote - #59

Draft
royteeuwen wants to merge 1 commit into
feature/SLING-13321-result-email-in-reply-tofrom
bugfix/SLING-13321-result-email-counted-as-vote
Draft

SLING-13321 - do not count the result email of an earlier run as a vote#59
royteeuwen wants to merge 1 commit into
feature/SLING-13321-result-email-in-reply-tofrom
bugfix/SLING-13321-result-email-counted-as-vote

Conversation

@royteeuwen

@royteeuwen royteeuwen commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Split out of #58 at @joerghoh's request, so the vote-counting bugfix can be reviewed separately from the threading feature. Stacked on top of #58.

This is a pre-existing bug, independent of the threading change — it is only stacked on #58 because both touch the same tally expression.

The bug

The [RESULT] email repeats the tally it announces (+1 (binding): ...), and isPositiveVote is just cleanup(body).contains("+1"). So once a [RESULT] email for a release is in the archive, the next tally-votes run counts it as a vote cast by whoever sent it — the release manager.

It is masked whenever the release manager also voted, since both resolve to the same member and the Set deduplicates. It bites when they did not.

Verified against the archive

Re-running tally-votes today against two past releases, before the fix:

Release Generated Actually sent
Resource Resolver 1.12.16 +1 (non-binding): Roy Teeuwen +1 (non-binding): none
Feature Model Analyser 2.0.16 +1 (binding): Carsten Ziegeler, Joerg Hoh, Stefan Seifert, Robert Munteanu +1 (binding): Carsten Ziegeler, Joerg Hoh, Stefan Seifert

Neither had voted; in the second case the phantom voter lands in the binding list. After the fix both match the [RESULT] emails that were actually sent, and the two releases where the tally was already correct are unchanged.

Note this only affects a re-run — the [RESULT] has to exist already — so the normal DRY_RUNAUTO flow is unaffected, and it cannot turn a failed vote into a passing one.

The fix

One predicate in the tally filter chain:

.filter(email -> !isResultEmail(email))

isResultEmail strips any leading reply/forward prefix before checking for [RESULT], so a reply to a result email is excluded too.

Testing

testAutoIgnoresResultEmailOfAnEarlierRun covers both a [RESULT] email and a Re: [RESULT] reply from a member who never voted. Full suite green at 196 tests.

@royteeuwen royteeuwen changed the title bugfix/SLING 13321 result email counted as vote SLING-13321 - do not count the result email of an earlier run as a vote Sep 6, 2026
@royteeuwen
royteeuwen requested a review from joerghoh September 6, 2026 11:26
@sonarqubecloud

sonarqubecloud Bot commented Sep 6, 2026

Copy link
Copy Markdown

@royteeuwen
royteeuwen force-pushed the bugfix/SLING-13321-result-email-counted-as-vote branch from 56978e2 to 7883471 Compare September 6, 2026 18:56
The [RESULT] email repeats the tally it announces ("+1 (binding): ..."),
which the "+1" detection counted as a vote cast by the release manager
who sent it. Re-running tally-votes for a release therefore credited the
release manager with a vote they never cast, and put them in the binding
list when they are a PMC member.

Verified against the archive: re-running tally-votes for Resource
Resolver 1.12.16 added Roy Teeuwen as a non-binding voter and for Feature
Model Analyser 2.0.16 added Robert Munteanu as a fourth binding voter,
neither of whom had voted. Both tallies now match the result emails that
were actually sent.
@royteeuwen
royteeuwen force-pushed the bugfix/SLING-13321-result-email-counted-as-vote branch from 7883471 to 89cbefe Compare September 6, 2026 18:58
@royteeuwen royteeuwen closed this Sep 6, 2026
@royteeuwen royteeuwen reopened this Sep 6, 2026
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.

1 participant