From 8b575cb0e984975d5b35128402b8dd2118620b79 Mon Sep 17 00:00:00 2001 From: Phil Leggetter Date: Fri, 6 Nov 2026 17:06:34 +0000 Subject: [PATCH] Correct who an issue trigger email channel reaches #116 and #118 said the email channel has no recipients of its own. The live API now accepts channels.email.member_emails: omitted or null means every eligible member, an empty array means nobody. The default triggers carry email: {}, so the conclusion stands, but the claim did not. Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 9 ++++++--- packages/hookdeck/src/project-source.ts | 11 ++++++----- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 52531a5..138f2d4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1289,9 +1289,12 @@ all. In CI it is worse, because each fresh checkout takes a new snapshot and so adopts whatever the last job left. **Those defaults email the whole team, so reset mutes them.** Each default -trigger carries an `email` channel, and the email channel has no recipients of -its own: it goes to every member of the organization who has not turned alerts -off, whenever the project's notification methods include email. Scenarios fail deliveries, +trigger carries `email: {}`, which names no recipients, and an email channel +without `member_emails` goes to every member of the organization who has not +turned alerts off, whenever the project's notification methods include email. +`member_emails` can narrow it, and an empty list sends to nobody, but that is a +recipient list a scorer has to read rather than an absent channel (see the +`alerting-001` scorer). Scenarios fail deliveries, requests and transformations on purpose, so from at least 21 August every run emailed the people on `evals-ci` about failures we had caused, and it surfaced on 6 November only because they said so. The declared defaults carry diff --git a/packages/hookdeck/src/project-source.ts b/packages/hookdeck/src/project-source.ts index efd9c79..896b8c6 100644 --- a/packages/hookdeck/src/project-source.ts +++ b/packages/hookdeck/src/project-source.ts @@ -50,11 +50,12 @@ export interface ProjectSource { /** * Clear the notification channels on every issue trigger in the project. * - * A new project's default issue triggers carry an `email` channel, and the email - * channel has no recipients of its own: it goes to every member of the - * organization who has not turned alerts off (admins, owners and project members - * only, if the project is private), whenever the project's notification methods - * include email. That project setting would be the cleaner switch, because it + * A new project's default issue triggers carry `email: {}`, which names no + * recipients, and an email channel without `member_emails` goes to every member + * of the organization who has not turned alerts off (admins, owners and project + * members only, if the project is private), whenever the project's notification + * methods include email. `member_emails: []` would also notify nobody, but + * `channels: {}` is the unambiguous form. The project setting would be the cleaner switch, because it * leaves the triggers looking like a customer's, but it is only writable with a * dashboard session, not a project API key — so the triggers are the lever the * harness can reach.