Skip to content

SLING-13321 - send the release result email as part of the vote thread - #58

Open
royteeuwen wants to merge 1 commit into
masterfrom
feature/SLING-13321-result-email-in-reply-to
Open

SLING-13321 - send the release result email as part of the vote thread#58
royteeuwen wants to merge 1 commit into
masterfrom
feature/SLING-13321-result-email-in-reply-to

Conversation

@royteeuwen

@royteeuwen royteeuwen commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

SLING-13321 asks for the release conclusion email to be part of the original vote thread rather than a standalone message. This picks up where rombert's WIP branch left off, with a different approach to finding the vote email (see below).

Bottom of a 2-PR stack. The vote-counting bugfix that used to be in this PR now lives in #59, stacked on top, per @joerghoh's review comment below.

Threading the [RESULT] email

The [RESULT] email now carries In-Reply-To and References pointing at the [VOTE] email, so a release stays one conversation in the archive and in threading mail clients. The subject keeps its [RESULT] prefix, as is conventional at the ASF.

From: Joerg Hoh <joerghoh@apache.org>
To: "Sling Developers List" <dev@sling.apache.org>
Reply-To: "Sling Developers List" <dev@sling.apache.org>
Date: Thu, 20 Aug 2026 12:47:00 +0200
In-Reply-To: <551383019.0.1787222816913.JavaMail.root@85ae3d6cc5e6>
References: <551383019.0.1787222816913.JavaMail.root@85ae3d6cc5e6>
Subject: [RESULT] [VOTE] Release Apache Sling Security 1.3.2

The Message-ID is read from the stats.lua search response, which already reports it per email, rather than parsed out of the message source.

One open question for reviewers: keeping the [RESULT] subject prefix follows ASF convention, and threading is correct at the header level. But Gmail also weighs subject similarity, so it may still show the result as a separate conversation there. If the goal is one conversation in the mail client rather than one thread in the archive, the alternative is a plain Re: [VOTE] Release … subject — happy to change it, but that drops a prefix the project has used for years, so it seemed worth asking rather than deciding.

Finding the vote email by subject

The vote email used to be identified by position (skip(1)). That is not reliable: the archive search only looks back six months, so a vote opened before the start of that window returns replies only, and the first genuine voter was then silently dropped from the tally. The vote email is now identified by its subject — only the original starts with [VOTE], since replies carry a Re:-style prefix and a result email carries [RESULT].

When no [VOTE] email is found the command warns, keeps the previous behaviour and sends the result email unthreaded rather than replying to a reply.

The thread lookup now uses the full release name, matching the subject prepare-email actually generates.

Testing

New VoteThreadFinderTest; TallyVotesCommandTest grows from 4 to 8 tests, covering a vote email without a Message-ID, a vote email outside the lookup window, a thread that cannot be found, and an unresolvable voter. Full suite green at 195 tests.

Beyond the unit tests, the command was driven end-to-end in DRY_RUN against the live archive and the live (public) Whimsy roster with only Nexus stubbed. Across five real releases — including a three-module staging repo, and one whose vote predates the lookup window — every generated tally matched the [RESULT] email that was actually sent, and every In-Reply-To matched the real [VOTE] email's Message-ID. The Mailer send path was checked separately to confirm Transport.send() preserves both headers on the wire (only Message-ID is regenerated).

@royteeuwen
royteeuwen force-pushed the feature/SLING-13321-result-email-in-reply-to branch 2 times, most recently from 027b34b to 56978e2 Compare August 31, 2026 19:49
@royteeuwen
royteeuwen requested a review from joerghoh September 1, 2026 17:43
@joerghoh

joerghoh commented Sep 4, 2026

Copy link
Copy Markdown

A bit late to the party, but can you split the actual feature implementation from the bugfix in the vote counting? Having both in the same PR makes the review harder.

@royteeuwen

royteeuwen commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Not late at all — done. Split into a two-PR stack:

No code changed in the split — the two commits were already separate, so each PR is exactly the commit that was already here, and both build and pass on their own.

The bugfix is genuinely independent of the feature; it is only stacked rather than parallel because both touch the same tally expression and would otherwise conflict.

The [RESULT] email is now sent with In-Reply-To and References headers
pointing at the [VOTE] email, so a release stays a single thread in the
archive and in threading mail clients.

The Message-ID needed for those headers is read from the archive search
response, which already reports it per email, rather than from the
message source.

The vote email is now identified by its subject instead of by its
position in the thread: the archive search only looks back six months,
so a vote opened before that window returns replies only, in which case
the first reply used to be dropped from the tally. When no [VOTE] email
is found the command warns, keeps the previous behaviour and sends the
result email standalone.

The thread lookup now uses the full release name, matching the subject
that prepare-email generates.
@royteeuwen
royteeuwen force-pushed the feature/SLING-13321-result-email-in-reply-to branch from 388fa4d to f5a18f7 Compare September 6, 2026 18:56
@sonarqubecloud

sonarqubecloud Bot commented Sep 6, 2026

Copy link
Copy Markdown

@kwin

kwin commented Sep 6, 2026

Copy link
Copy Markdown
Member

Shouldn’t we rather start adopting https://releases.apache.org/docs/?

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.

3 participants