M5 review follow-ups: sync/SMTP robustness polish #233

Open
opened 2026-07-30 02:45:49 +00:00 by KofTwentyTwo · 0 comments
KofTwentyTwo commented 2026-07-30 02:45:49 +00:00 (Migrated from github.com)

Non-blocking items surfaced during the M5 adversarial reviews (#194/#195), deliberately deferred so each story stayed scoped. None are correctness/data-loss bugs (those were fixed in-story); these are robustness/honesty polish worth doing before or during M6.

From #195 (incremental sync):

  • Unbounded SELECT (same class as #183). The per-item FETCH is now timeout-bounded, but the IMAP SELECT before it is not — a server that hangs after auth but before FETCH still hangs the sync. Wrap SELECT in a bounded timeout too.
  • Empty incremental poll re-fetches the latest message body. RFC 3501 n:* returns the single highest-UID message even when nothing new arrived, so a no-op incremental poll still re-fetches the last message's full body and reports fetched:1 misleadingly. Consider fetching UIDs/headers first (or (uid_next):* semantics) to make a truly-empty poll fetch nothing.

From #194 (account lifecycle + TLS):

  • TestAccountConnection SMTP leg does not verify AUTH. It was honestly scoped to transport reachability (dial + TLS) because lettre 0.11 exposes AUTH only on the internal AsyncSmtpConnection, not AsyncSmtpTransport. A genuine SMTP AUTH probe (matching IMAP's real login) would make smtp_ok mean 'authenticated'. Revisit if lettre gains a clean auth-only probe or via a lower-level connection.
  • JMAP accounts still get an SMTP probe in test_account_connection — for a JMAP-only account the SMTP leg is not meaningful; skip or scope it per account type.
  • Timeout mismatch: IMAP connect uses a 15s bound while SMTP uses lettre's ~60s default — unify/justify.
  • Doc nit: build_transport doc mentions an unused starttls_relay.

Split into separate issues if any grows beyond a small change.

Non-blocking items surfaced during the M5 adversarial reviews (#194/#195), deliberately deferred so each story stayed scoped. None are correctness/data-loss bugs (those were fixed in-story); these are robustness/honesty polish worth doing before or during M6. **From #195 (incremental sync):** - **Unbounded SELECT (same class as #183).** The per-item FETCH is now timeout-bounded, but the IMAP `SELECT` before it is not — a server that hangs after auth but before FETCH still hangs the sync. Wrap SELECT in a bounded timeout too. - **Empty incremental poll re-fetches the latest message body.** RFC 3501 `n:*` returns the single highest-UID message even when nothing new arrived, so a no-op incremental poll still re-fetches the last message's full body and reports `fetched:1` misleadingly. Consider fetching UIDs/headers first (or `(uid_next):*` semantics) to make a truly-empty poll fetch nothing. **From #194 (account lifecycle + TLS):** - **TestAccountConnection SMTP leg does not verify AUTH.** It was honestly scoped to transport reachability (dial + TLS) because lettre 0.11 exposes AUTH only on the internal `AsyncSmtpConnection`, not `AsyncSmtpTransport`. A genuine SMTP AUTH probe (matching IMAP's real login) would make `smtp_ok` mean 'authenticated'. Revisit if lettre gains a clean auth-only probe or via a lower-level connection. - **JMAP accounts still get an SMTP probe** in test_account_connection — for a JMAP-only account the SMTP leg is not meaningful; skip or scope it per account type. - **Timeout mismatch:** IMAP connect uses a 15s bound while SMTP uses lettre's ~60s default — unify/justify. - **Doc nit:** `build_transport` doc mentions an unused `starttls_relay`. Split into separate issues if any grows beyond a small change.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KofTwentyTwo/nuncio#233