[gmail-safety-and-standards-hardening] #01: Safety Tier Precedence Remediation #20

Closed
opened 2026-08-28 17:32:18 +03:00 by jalmari · 0 comments
Owner

Feature: gmail-safety-and-standards-hardening | Source: .scratch/gmail-safety-and-standards-hardening/issues/01-safety-tier-precedence-remediation.md

01: Safety Tier Precedence Remediation

What to build: Restore strict safety tier priority in ClassificationEngine so that legitimate receipts, invoices, PDF attachments, personal correspondence, shipping updates, and critical security notices are never classified as promotional clutter (CLUTTER_MARKETING -> TRASH) even if Google attaches ^smartlabel_promo. Remove unrequested ^smartlabel_group classification.

Blocked by: None (can start immediately)

Status: completed

  • Ensure Safety Tier 1 (Human Conversation), Tier 2 (Transactional/Invoices/PDFs/Refunds), Tier 4 (Critical/Security/Legal), and Tier 5 (Shipping) execute before and take complete precedence over is_gm_promo and is_gm_social.
  • Ensure ^smartlabel_promo only triggers CLUTTER_MARKETING (Action.TRASH) when all safety tiers evaluate to None/False.
  • Remove unrequested ^smartlabel_group handling from classifier.py.
  • Add comprehensive regression tests for receipt/invoice emails with ^smartlabel_promo verifying they remain protected (Action.KEEP).
**Feature**: `gmail-safety-and-standards-hardening` | **Source**: `.scratch/gmail-safety-and-standards-hardening/issues/01-safety-tier-precedence-remediation.md` # 01: Safety Tier Precedence Remediation **What to build:** Restore strict safety tier priority in `ClassificationEngine` so that legitimate receipts, invoices, PDF attachments, personal correspondence, shipping updates, and critical security notices are never classified as promotional clutter (`CLUTTER_MARKETING` -> `TRASH`) even if Google attaches `^smartlabel_promo`. Remove unrequested `^smartlabel_group` classification. **Blocked by:** None (can start immediately) **Status:** completed - [x] Ensure Safety Tier 1 (Human Conversation), Tier 2 (Transactional/Invoices/PDFs/Refunds), Tier 4 (Critical/Security/Legal), and Tier 5 (Shipping) execute before and take complete precedence over `is_gm_promo` and `is_gm_social`. - [x] Ensure `^smartlabel_promo` only triggers `CLUTTER_MARKETING` (`Action.TRASH`) when all safety tiers evaluate to None/False. - [x] Remove unrequested `^smartlabel_group` handling from `classifier.py`. - [x] Add comprehensive regression tests for receipt/invoice emails with `^smartlabel_promo` verifying they remain protected (`Action.KEEP`).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Lavisys/mailsweep#20
No description provided.