3.8 KiB
FAIL
-
crates/ely-mail-engine/src/imap.rs:139 — Missing
EXISTSsilently becomes an empty mailbox. IfEXAMINEreturns UIDVALIDITY and tagged OK but omits the required message count,sync::onedeletes every cached message and records a successful sync. The independent probe returnedOk(Report { removed: 1, .. }), zero cached messages and a new last-sync time. Keep the count optional until validated and return a protocol error before changing local data when it is absent. Add a regression asserting both failure and cache preservation. Evidence:.work/C12.6-r1-probes.log,an_examine_without_exists_does_not_delete_mail; RFC 3501 §6.3.1–6.3.2. -
crates/ely-mail-engine/src/imap.rs:285 — A concurrent flag notification makes a valid header/body fetch fail. Another client can change an asked UID's flags while it is being downloaded; a valid body response followed by
* 1 FETCH (UID 1 FLAGS (\Seen))is rejected asUID 1 came without a body, aborting synchronization and discarding the fetched batch. Unsolicited FETCH responses can include UID. Accumulate attributes by UID, process flag updates separately, and validate the requested section after the command completes rather than requiring it in every response. Evidence:.work/C12.6-r1-probes.log,concurrent_flags_do_not_make_a_body_fetch_fail; RFC 3501 §7. -
crates/ely-mail-engine/src/store/folders.rs:43 — Folder reconciliation treats INBOX's case variants as different identities. After caching
INBOX, a subsequent LIST spelling itinboxdeletes its messages and originals even with unchanged UIDVALIDITY and UIDs. Messages older than 90 days then return only as headers, losing their offline bodies. The probe's previously cached MessageId became absent after this case change. Normalize INBOX consistently for reconciliation and mailbox lookup while preserving other mailbox names' case distinctions, and test retention of the original bytes. Evidence:.work/C12.6-r1-probes.log,inbox_casing_does_not_destroy_cached_mail; RFC 3501 §5.1. -
crates/ely-mail-engine/src/imap.rs:123 — Special-use discovery relies entirely on optional attributes in ordinary LIST responses. A server may advertise
LIST-EXTENDED SPECIAL-USEand return its Sent/Drafts/Trash roles only when requested withRETURN (SPECIAL-USE). This implementation never discovers capabilities or requests those attributes, so such folders are stored withrole = None; the probe returned no Sent role despite the advertised capability. Discover the supported capabilities and request special-use attributes when available, retaining ordinary LIST for servers without the extension. Add coverage for a server that omits roles from ordinary LIST. Evidence:.work/C12.6-r1-probes.log,roles_are_discovered_when_only_extended_list_carries_them; RFC 6154 §2. -
crates/ely-mail-engine/src/imap.rs:186 — Default body synchronization downloads attachments without a request.
BODY.PEEK[]retrieves the entire MIME message, andsync.rs:148persists it asFetched::Whole. With the existing multipart sample classified as recent, the independent sync probe cachedreport.pdfand all nine attachment bytes automatically. Larger attachments are likewise transferred and stored, contrary to PRD §12.3's attachment-on-demand default. Fetch and cache the message's body sections separately from attachment payloads; retrieve attachment bytes only on request or explicit complete offline retention, and test that default synchronization leaves those payloads uncached. Evidence:.work/C12.6-r1-probes.log,a_default_recent_body_sync_does_not_fetch_attachments.