ARIA: allowlist important no-reply domains in promo filter#346
Open
holoduke wants to merge 1 commit into
Open
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
IMPORTANT_NOREPLY_DOMAINSallowlist tobackend/brain-prompt.ts(seeded withmijn.overheid.nl) and reordersisPromoSender()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 returnsfalse— overriding both the/no-?reply@/ilocal-part regex and thePROMO_DOMAIN_KEYWORDSsubstring check.Also removes
'mijn.overheid'fromPROMO_DOMAIN_KEYWORDSsince the allowlist now covers that case.Why
Drift audit on 2026-05-20 flagged this false-positive:
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.nlstill matches the/no-?reply@/ilocal-part regex. An explicit allowlist that runs before both checks generalises the rule: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 ontomainwill be a no-op once #345 is merged.Verification
npx tsc --noEmit— clean (no errors).🤖 Generated with Claude Code