Add Gmail X-GM-LABELS support + increase sync to 4x/day #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Two enhancements to support compendium's migration to using ben-email as its email source:
1. Gmail Label Population
All 22,599 emails currently have empty
labelsarrays. The IMAP fetch (BODY.PEEK[] FLAGS) doesn't request Gmail's proprietaryX-GM-LABELSextension. Thelabelscolumn exists in the schema but is never populated.Changes needed:
email_sync/imap_client.py: AddX-GM-LABELSto the IMAP FETCH command for Gmail accountsemail_sync/sync.py: Parse the Gmail extension response and populate thelabelscolumnemail-sync sync --full) to backfill labels for existing emailsLabels are used by compendium's email quality gate:
compendium/*labels → auto-pass (pre-sorted as relevant)Promotions,Social,Spam→ auto-reject2. Increase Sync Frequency to 4x/Day
Update
ben-email-sync.timerfrom daily (~02:35) to 4x/day:Reduces data freshness lag from ~24h to ~6h, which matters for confirmation detection and newsletter link scraping timeliness in compendium.
Related