ARIA: extend promo/automated sender heuristic in observer.ts#357
Open
holoduke wants to merge 2 commits into
Open
ARIA: extend promo/automated sender heuristic in observer.ts#357holoduke wants to merge 2 commits into
holoduke wants to merge 2 commits into
Conversation
…senders All gmail observations shared senderJid=gmail:<accountId>, so the thread keying in updateConversationThreads collapsed every email into one bucket. The "Active threads" section in the brain prompt then rendered a single line with 15+ unrelated promo senders comma-joined and one truncated subject — pure noise. Changes: - observer.ts: add extractEmailAddress() + isPromoOrAutomatedSender() helpers (no-reply/notifications/alerts/marketing local-parts + known promo domains). - memory/working-memory.ts: for gmail observations, key thread by per-sender address (email:<accountId>:<addr>) and skip promo/automated senders entirely. One-time evict legacy dm:gmail:* bundled threads from working memory. - brain-prompt.ts: defense-in-depth — drop email threads whose only participants look promotional; cap rendered participant list at 3+N overflow. Real DMs like Maaike's "Julian heeft geen map" now get visually equal weight instead of being buried beside a wall of promo senders. Intent-summary: Active-threads brain-prompt block collapsed all gmail senders into one bundle so promo noise drowned real conversations. Intent-tokens: threads, email, promo, noise, prompt, bundling, signal Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…erver.ts Add prefixes (awards, transaction(s), order(s), shipping, delivery, reservation(s), updates) and domains (tripadvisor.com, sitly.nl, adobe.com, temporal.io) to plug observed leaks in isPromoOrAutomatedSender. Concrete leakers seen recently: awards@mp1.tripadvisor.com (neither prefix nor domain matched), noreply-promo@adobe.com, info@sitly.nl, transaction@* style senders. All added prefixes are unambiguously machine-origin so the "conservative on purpose" comment block remains accurate. Intent-summary: promo/automated email senders leak past observer's leaf classifier because the prefix/domain lists miss common vendor patterns (awards@, transaction@, tripadvisor.com etc), so active-thread filtering lets them through Intent-tokens: promo-filter, sender-classifier, email-noise, prefix-list, domain-list, leakage, 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.
Summary
Plug observed gaps in the
isPromoOrAutomatedSenderleaf classifier inbackend/observer.tsthat let promotional/automated senders leak into the active-threads section of every think tick.Added local-part prefixes
awards,transaction,transactions,order,orders,shipping,delivery,reservation,reservations,updates. All unambiguously machine-origin — the conservative-on-purpose comment block stays accurate. The existinginfoentry is untouched (real people can use that).Added promo domain substrings
tripadvisor.com,sitly.nl,adobe.com,temporal.io.Concrete leakers this fixes
awards@mp1.tripadvisor.com— neither prefix (awards) nor domain (tripadvisor.com) was matched before; now both gate it.noreply-promo@adobe.com—noreply-promoalready matched thenoreplyprefix;adobe.comis belt-and-braces.info@sitly.nl—infoprefix already caught; adding the domain hardens against any non-info@Sitly sender.transaction@<vendor>style senders from various vendors — now caught generically.Why this is separate from PR #bd934dc (split-per-sender)
That PR fixed structural bundling so new threads with multiple promo senders get split. This PR improves the leaf classifier so a single-promo-sender thread (or a single surviving sender in a bundled old thread) is now correctly identified as promo. Different intent.
Test plan
npx tsc --noEmitpassesawards@mp1.tripadvisor.comno longer survivesevery-participant-promo🤖 Generated with Claude Code