v2.0.0
Major version bump: the full-mailbox backfill mechanism was broken through v1.19.5 and is fixed here, then validated live against a real account with 57,000+ indexed messages across 62 folders/labels — including a from-scratch, UID-window-by-window backfill of a 22,836-message Archive folder to completion, with zero data loss across restarts, transient IMAP disconnects, and request timeouts. This is the first release where sync_emails({full:true}) on a large pre-existing folder actually works end-to-end rather than silently looping on the newest window or deleting older mail.
Fixed
- Full sync could never backfill folder history, and silently deleted it.
full:truealways fetched the newest N UIDs from scratch on every call, ignoring any previous progress — and expunge-detection compared each freshly-fetched window against every stored message in the folder, so each new backfill window deleted everything outside itself. Repeatedfull:truecalls converged to only the last-fetched window, making a large pre-existing folder (tens of thousands of messages) permanently unindexable beyond its newest slice. Now tracks abackfilledToUidcheckpoint and walks the mailbox backward one window at a time, restarting cleanly ifUIDVALIDITYchanges, with expunge-detection scoped strictly to the UID range just re-scanned. backfilledToUidread back from SQLite asNULLbroke the very first backfill call after a restart.NULLmapped to JavaScriptnullinstead ofundefined, andnull <= 1evaluates totrue— so the very first post-restart backfill call looked like backfill was already complete and fetched nothing.get_index_statusreportedstoredMessageCount/dedupedMessageCountcapped at 5000 regardless of actual index size — it read off the thread-builder snapshot (deliberately capped for performance) instead of a realCOUNT(*). A 45,000-message index reported exactly 5000 stored messages.sync_emailssilently ignored its ownfolder/full/limitPerFolder/includeAttachmentTextarguments and always ran whatever the background auto-sync was already configured for — callingsync_emails({folder:"Archive", full:true})had no effect at all.bulk_update_labels(and other bulk operations) failed completely on a single transient IMAP/IDLE disconnect thatbulk_deleterecovered from automatically — the UID-matching search path insideresolveUidsForBulkOphad no reconnect-and-retry, unlike every other mutation.