Dana is on the platform team and works from the London office, so she is on platform and on london-office, and all-staff holds both. People on overlapping lists get every message once per list that reaches them, and the confirmation counts them more than once.
Duplicate notices read as two incidents, and the count overstates who will hear. The more the company’s lists overlap, the worse both get.
Reproduce
Send "Outage" to all-staff[platform[dana@, eli@], london-office[dana@, gus@]]. Dana should get one copy and the count should be 3. Today she gets two and the count is 4.
Acceptance criteria
- Each address receives one copy per send, however many lists lead to it, in the place where the send first reaches it.
- The count is the number of people the send will reach, each counted once, and always matches the lines the send produces.
- Every send starts fresh: sending the same message twice delivers it twice, once per send.
- Nesting, order, single addresses and empty lists behave as before.
Notes
- Each case prints the send’s lines joined by “ | ” (or “(nobody)”), then “(count N)”; a case that sends twice joins the two results with “ || ”.
- Keep the names and signatures of Address, MailingList, send and recipientCount (Go: Send, RecipientCount; Rust: send, recipient_count). You may change the Recipient interface.