Skip to content

ARIA: extend promo/automated sender heuristic in observer.ts#357

Open
holoduke wants to merge 2 commits into
mainfrom
aria/promo-sender-heuristic-leakers
Open

ARIA: extend promo/automated sender heuristic in observer.ts#357
holoduke wants to merge 2 commits into
mainfrom
aria/promo-sender-heuristic-leakers

Conversation

@holoduke

Copy link
Copy Markdown
Owner

Summary

Plug observed gaps in the isPromoOrAutomatedSender leaf classifier in backend/observer.ts that 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 existing info entry 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.comnoreply-promo already matched the noreply prefix; adobe.com is belt-and-braces.
  • info@sitly.nlinfo prefix 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 --noEmit passes
  • Observe next think tick: bundled active thread containing awards@mp1.tripadvisor.com no longer survives every-participant-promo

🤖 Generated with Claude Code

ARIA and others added 2 commits June 8, 2026 10:08
…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>
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