Skip to content

ARIA: allowlist important no-reply domains in promo filter#346

Open
holoduke wants to merge 1 commit into
aria/filter-promo-senders-active-threadsfrom
aria/allowlist-noreply-important-domains
Open

ARIA: allowlist important no-reply domains in promo filter#346
holoduke wants to merge 1 commit into
aria/filter-promo-senders-active-threadsfrom
aria/allowlist-noreply-important-domains

Conversation

@holoduke

Copy link
Copy Markdown
Owner

What

Adds IMPORTANT_NOREPLY_DOMAINS allowlist to backend/brain-prompt.ts (seeded with mijn.overheid.nl) and reorders isPromoSender() so the allowlist is consulted first. If the sender's domain matches (or is a subdomain of) an allowlisted entry, the function short-circuits and returns false — overriding both the /no-?reply@/i local-part regex and the PROMO_DOMAIN_KEYWORDS substring check.

Also removes 'mijn.overheid' from PROMO_DOMAIN_KEYWORDS since the allowlist now covers that case.

Why

Drift audit on 2026-05-20 flagged this false-positive:

'mijn.overheid in particular can carry real government correspondence'

MijnOverheid notifications cover BRP, tax, RDW, voorbehoud-bevestigingen, gemeente — exactly the kind of thread Gillis would want surfaced in active-threads, not filtered as noise.

Simply removing 'mijn.overheid' from the keyword list would have been insufficient: noreply@mijn.overheid.nl still matches the /no-?reply@/i local-part regex. An explicit allowlist that runs before both checks generalises the rule:

no-reply is a delivery mechanism, not a signal of unimportance.

Risk

Very low. The allowlist starts with a single conservative entry. Worst case: one government thread appears in active-threads instead of being filtered.

Stacking

This PR is based on aria/filter-promo-senders-active-threads (PR #345). It should merge after that one lands; rebase onto main will be a no-op once #345 is merged.

Verification

  • npx tsc --noEmit — clean (no errors).

🤖 Generated with Claude Code

…filter

Adds IMPORTANT_NOREPLY_DOMAINS allowlist to backend/brain-prompt.ts seeded with
mijn.overheid.nl. isPromoSender() now checks the allowlist first and returns
false when the sender domain matches (or is a subdomain of) an allowlisted
entry — short-circuiting both the /no-?reply@/i local-part regex and the
PROMO_DOMAIN_KEYWORDS check. Also removes 'mijn.overheid' from
PROMO_DOMAIN_KEYWORDS since the allowlist now handles it.

Drift audit 2026-05-20 flagged this: MijnOverheid notifications carry real
government correspondence (BRP, tax, RDW, gemeente) that belongs in the
active-threads surface. Simply removing the keyword was insufficient because
the no-reply@ pattern would still match noreply@mijn.overheid.nl. The
allowlist generalises the rule: no-reply is a delivery mechanism, not a
signal of unimportance.

Intent-summary: Active-threads promo filter suppresses important no-reply senders (e.g. MijnOverheid government mail) because no-reply@ and a 'mijn.overheid' keyword both match, hiding real correspondence Gillis cares about.
Intent-tokens: noreply, allowlist, false-positive, government, mijnoverheid, promo-filter, active-threads

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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