[gmail-detection-and-category-scanning] #03: Gmail Smart Label Extraction and Scan Deduplication #14

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

Feature: gmail-detection-and-category-scanning | Source: .scratch/gmail-detection-and-category-scanning/issues/03-gmail-label-extraction-and-deduplicated-scan.md

03: Gmail Smart Label Extraction and Scan Deduplication

What to build: Add support in MailboxGateway for fetching and parsing Gmail's X-GM-LABELS and X-GM-MSGID attributes when is_gmail is active, deduplicating messages across views and feeding Gmail smart labels (e.g. ^smartlabel_promo, ^smartlabel_social) into classification heuristics.

Blocked by: 02: Gmail Category Mailbox Discovery in Folder Listing

Status: completed

  • MailboxGateway requests X-GM-LABELS and X-GM-MSGID during header fetch when is_gmail is True.
  • Email headers encapsulate parsed Gmail smart labels (e.g. promotional, social) and unique message identifiers.
  • Scanning deduplicates emails across multiple folder views by message identifier without duplicating count in ScanResult.
  • ClassificationEngine leverages smart labels as high-confidence heuristic signals alongside existing 13-language rule patterns.
  • Full regression suite passes across all tests in test_mailsweep.py.
**Feature**: `gmail-detection-and-category-scanning` | **Source**: `.scratch/gmail-detection-and-category-scanning/issues/03-gmail-label-extraction-and-deduplicated-scan.md` # 03: Gmail Smart Label Extraction and Scan Deduplication **What to build:** Add support in `MailboxGateway` for fetching and parsing Gmail's `X-GM-LABELS` and `X-GM-MSGID` attributes when `is_gmail` is active, deduplicating messages across views and feeding Gmail smart labels (e.g. `^smartlabel_promo`, `^smartlabel_social`) into classification heuristics. **Blocked by:** 02: Gmail Category Mailbox Discovery in Folder Listing **Status:** `completed` - [x] `MailboxGateway` requests `X-GM-LABELS` and `X-GM-MSGID` during header fetch when `is_gmail` is `True`. - [x] Email headers encapsulate parsed Gmail smart labels (e.g. promotional, social) and unique message identifiers. - [x] Scanning deduplicates emails across multiple folder views by message identifier without duplicating count in `ScanResult`. - [x] `ClassificationEngine` leverages smart labels as high-confidence heuristic signals alongside existing 13-language rule patterns. - [x] Full regression suite passes across all tests in `test_mailsweep.py`.
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#14
No description provided.