Sashiko email policy precedence
Hi Roman,
We just enabled nova-gpu with the reply_all email policy and I noticed that sashiko does not actually send any such replies.
I did dig a bit and it seems that the logic here is that if there is another mailing list Cc'd that is in the sashiko email policy, but does not have reply_all set, reply_all is removed (while reply_to_author is always honored regardless).
In contrast, if another list that does not have an email policy at all is Cc'd, reply_all is not removed.
For nova-gpu that means that the only way currently to get the reply_all policy would be to never Cc the rust-for-linux list (which only sets reply_to_author) in the first place.
In fact, it seems to boil down to any subsystem list that handles Rust code is stuck with reply_to_author, regardless whether it wants more (e.g. reply_all) or less (no reply_to_author).
Given that the rust-for-linux list is like the lkml, I think we should special case it, so it does not mess with the policy from other subsystems too much.
One low-hanging fruit to improve this a bit would of course be to add cc=nova-gpu, but I'd still prefer to be able to get reply_all without dropping the rust-for-linux list.
Maybe adding a separate flag to be set by "catch all" mailing lists could be an option?
E.g. when 'passive=true' is set and a passive list is matched with a non-passive one the passive one won't impose its restrictive defaults (e.g. reply_all=false) on the non-passive one.
- Danilo
Quoted 4 lines · Danilo Krummrich
E.g. when 'passive=true' is set and a passive list is matched with a non-passive one the passive one won't impose its restrictive defaults (e.g. reply_all=false) on the non-passive one.
The configuration I added didn't explicitly ask for reply_all = false (just reply_to_author = true), i.e. perhaps the fact that something is not set could be used as a "don't care" (e.g. latter lists could override that).
Special casing "wide lists" sounds also fine.
Roman: on my side, the intention with reply_to_author was to make people aware of Sashiko and hopefully be a good middle-ground default, not to force something on everyone else.
We could also consider setting reply_all = true for rust-for-linux -- IIUC, from what Danilo says, the current algorithm's conservative approach would remove that setting as soon as the patch is sent to any list where that isn't the case, right? Some people would find that useful (a few even reply directly to the LLM's feedback), but of course it could be seen as too annoying for others (e.g. readers subscribing the mailing list that do not want to get bombarded with even more emails), so that is why I took the other option, but if it is too complex to implement other logic, I guess it is an option.
Cheers,
Miguel
Quoted 4 lines · Miguel Ojeda
On Mon, Jun 1, 2026 at 1:17 AM Danilo Krummrich <[email protected]> wrote:
IIUC, from what Danilo says, the current algorithm's conservative approach would remove that setting as soon as the patch is sent to any list where that isn't the case, right?
Only if the other list has a sashiko email policy entry in the first place, otherwise it is not part of the matching loop and no further logic is applied.
I'd assume that this is intentional, and can be read as "no entry, no expressed preference".
Quoted 1 line
if it is too complex to implement other logic, I guess it is an option.
Flagging something as wide list seems rather simple [1], the tristate [2] would work as well, but seems a bit more complicated and potentially requires adjusting the existing policies.
(Test adjustments stripped from [2]; code is LLM generated.)
[1]
src/email_policy.rs +4 -0
@@ -43,6 +43,10 @@ pub struct SubsystemPolicy { pub embargo_hours: Option<u32>,#[serde( default )] pub send_positive_review: bool, +/// When true and co-matched with a non-wide list, only `cc` is +/// contributed. All boolean flags are deferred to the non-wide lists. +#[serde( default )] + pub wide_list: bool, }impl EmailPolicyConfig {
src/email_router.rs +12 -1
@@ -93,7 +93,18 @@ impl EmailRouter {let mut send_positive_review =false ;let mut cc =Vec ::new (); -for pin active_policies { +let has_non_wide = active_policies.iter ().any (|p| !p.wide_list); + +for pin &active_policies { +let deferred = p.wide_list && has_non_wide; + +if deferred { +for crin &p.cc { + cc.push (cr.clone ()); + } +continue ; + } +if p.mute_all { mute_all =true ; }
[2]
src/email_policy.rs +6 -5
@@ -23,14 +23,15 @@ pub struct EmailPolicyConfig {pub struct SubsystemPolicy {#[serde( default )] pub lists:Vec <String >, +/// None = no preference, Some(false) = private, Some(true) = public. #[serde( default )] -pub reply_all:bool , +pub reply_all:Option <bool >,#[serde( default )] -pub reply_to_author:bool , +pub reply_to_author:Option <bool >,#[serde( default )] -pub cc_individuals:bool , +pub cc_individuals:Option <bool >,#[serde( default )] -pub mute_all:bool , +pub mute_all:Option <bool >,#[serde( default )] pub cc:Vec <String >, #[serde(default)]
@@ -42,7 +43,7 @@ pub struct SubsystemPolicy {#[serde( default )] pub embargo_hours: Option<u32>,#[serde( default )] - pub send_positive_review: bool, + pub send_positive_review: Option<bool>, }impl EmailPolicyConfig {
src/email_router.rs +29 -20
69 lines not on this page · raw message
Quoted 3 lines · Danilo Krummrich
Flagging something as wide list seems rather simple [1], the tristate [2] would work as well, but seems a bit more complicated and potentially requires adjusting the existing policies.
Roman, any preference on either of those or something else?
Thanks,
Danilo
Quoted 6 lines · Danilo Krummrich
Quoted 3 lines · Danilo Krummrich
Flagging something as wide list seems rather simple [1], the tristate [2] would work as well, but seems a bit more complicated and potentially requires adjusting the existing policies.
Roman, any preference on either of those or something else?
Sorry for being late to the party.
Yeah, the tricky balance here is that there are people who want more sashiko reviews and there are people who are quite vocal against it.
And I don't want to over-complicate the setup, I'm afraid it will be just a constant source of disagreement.
One option, is to switch from mailing list granularity to the MAINTAINERS-entry granularity. Wdyt?
I don't think I have a perfect model in my head which will cover all edge cases, tbh. I personally think that reply_to_author + cc the main mailing list should work pretty much everywhere, but it looks like there are other opinions as well.
Thanks
Quoted 3 lines · Roman Gushchin
One option, is to switch from mailing list granularity to the MAINTAINERS-entry granularity. Wdyt?
Hmm... What does this mean / how would it work?
Cheers,
Miguel
Quoted 10 lines · Roman Gushchin
Quoted 6 lines · Danilo Krummrich
Quoted 3 lines · Danilo Krummrich
Flagging something as wide list seems rather simple [1], the tristate [2] would work as well, but seems a bit more complicated and potentially requires adjusting the existing policies.
Roman, any preference on either of those or something else?
Sorry for being late to the party.
No worries, and thanks for catching up.
Quoted 5 lines
Yeah, the tricky balance here is that there are people who want more sashiko reviews and there are people who are quite vocal against it.
And I don't want to over-complicate the setup, I'm afraid it will be just a constant source of disagreement.
I think it usually works out well as is if multiple subsystems are involved.
The only case where it falls apart is with wide lists potentially spanning all subsystems with a certain policy, which if handled like any other list, may end up taking precedence over all subsystem lists regardless of their preference.
Hence the proposal to just special case wide lists, so they can't take precedence over everything.
Quoted 2 lines
One option, is to switch from mailing list granularity to the MAINTAINERS-entry granularity. Wdyt?
As mentioned above, I think the main issue are wide lists, and switching to a MAINTAINERS-entry granularity wouldn't cover that (unless I am missing something).
Quoted 2 lines
I don't think I have a perfect model in my head which will cover all edge cases, tbh.
The wide list case is not an edge case.
Taking the R4L list aside, if we would set reply_to_author for the LKML, which does not seem entirely unreasonable, it would have the same effect, which is no one's reply_all setting would be honored anymore.
Quoted 2 lines
I personally think that
reply_to_author+ cc the main mailing list should work pretty much everywhere, but it looks like there are other opinions as well.
It can be quite cumbersome when people pick up a discussion based on a point made by Sashiko and some people are excluded from the discussion because only the mailing list and specific people are statically Cc'd.
People that were Cc'd explicitly on a patch series usually don't expect to have to switch to the mailing list to capture every discussion.
Quoted 6 lines · Miguel Ojeda
Quoted 3 lines · Roman Gushchin
One option, is to switch from mailing list granularity to the MAINTAINERS-entry granularity. Wdyt?
Hmm... What does this mean / how would it work?
Very vague idea at this point, but: for each patchset sashiko can determine the main MAINTAINERS entry it covers and apply it's rules. That would help with the case when large mailing lists are cc'ed. Now if e.g. a patchset is sent to e.g. bpf@ and netdev@, sashiko tries to find a combination of the rules and it's kinda tricky... Maybe the better approach is to decide which subsystem is primary here, e.g. by the subject prefix or diff stat, and go with the corresponding rules.
Thanks,
Roman
Quoted 9 lines · Roman Gushchin
Very vague idea at this point, but: for each patchset sashiko can determine the main
MAINTAINERSentry it covers and apply it's rules. That would help with the case when large mailing lists are cc'ed. Now if e.g. a patchset is sent to e.g. bpf@ and netdev@, sashiko tries to find a combination of the rules and it's kinda tricky... Maybe the better approach is to decide which subsystem is primary here, e.g. by the subject prefix or diff stat, and go with the corresponding rules.
Thanks for clarifying! Yeah, finding somehow the "main" entry would work well in most cases, though it will still be ambiguous in certain cases of course.
If you mean using an LLM to determine what is the "main" one (since you already have spent tokens reading the series into context) and then using that as input for an algorithm that decides (still taking into account wide lists etc.), then it could work fairly well. I guess -- people may prefer a "fully deterministic" approach though.
Cheers,
Miguel