1.9 KiB
FAIL
-
crates/ely-mail-engine/src/store/folders.rs:106 — The first sync deletes an upgraded cache even when UIDVALIDITY has not changed. V2 leaves
mailboxes.uidvalidityNULL, soopen_mailboxcallswithout_mailand deletes every existing message and original before comparing their stored UIDVALIDITY with the server's. The independent probe upgraded a populated v1 database, confirmed its cached body survived opening, then called the sameopen_mailbox(INBOX, 7)used by sync: the message with UIDVALIDITY 7 disappeared and the message count became zero. For mail older than 90 days, synchronization restores only headers, losing its offline body. Reconcile existing message identities with the reported UIDVALIDITY when initializing the new column; preserve matching cached messages. Extend the migration regression through the first synchronization, including an older cached body. Evidence:.work/C12.6-r3/probes.log,probe_a_migrated_body_survives_its_first_examine. -
crates/ely-mail-engine/src/imap/parts.rs:159 — Related-root selection cannot resolve a multipart child named by
start. It usesid(child), which always returns None for multipart nodes, then falls back to the first child and marks the actual root as an omitted attachment. A valid multipart/related message with a CID image first and a multipart/alternative root second (Content-ID: <root>,start="<root>") loses both its plain and HTML bodies. The independent reconstruction probe readhellofrom the full message, but the selected sections omitted part 2 and the cached message had neither text nor HTML. Sync nevertheless stores it as body-cached, so later default syncs skip repairing it. Resolve related roots using their MIME headers when BODYSTRUCTURE cannot supply Content-ID, and cover a non-first multipart root through reconstruction and synchronization. Evidence:.work/C12.6-r3/probes.log,probe_related_multipart_start_root_is_cached.