M6.5 [P0]: Remove fake/dead protocol code (orphaned dup CardDAV; credential-less fake-data mail paths) #253

Closed
opened 2026-07-31 14:42:47 +00:00 by KofTwentyTwo · 1 comment
KofTwentyTwo commented 2026-07-31 14:42:47 +00:00 (Migrated from github.com)

Fabrication landmines (dead in current wiring but pub and reachable by any future caller):

  • nuncio-cal/src/carddav.rs (whole file, re-exported at nuncio-cal/src/lib.rs:8,17) is an orphaned non-functional DUPLICATE CardDavClient/Contact: no network call, implements no backend trait, unused (the real one is nuncio-contacts/src/carddav.rs). DELETE it.
  • nuncio-mail ImapEngine/JmapEngine credential-less sync_folders/sync_messages (imap.rs:905-918,737-764; jmap.rs:429-448,469-486) return hardcoded folders/emails instead of erroring; ImapEngine::send_email (imap.rs:929-931) and JmapEngine::send_email (jmap.rs:489-496) are no-op fabricated successes that discard the email. Make these return an honest AuthError/Unsupported, or move genuinely-needed test fixtures behind cfg(test). No pub path may return canned data or fake success.

Goal: zero fabricated-data / fake-success paths remain in the protocol crates.

Source: full-tree audit 2026-07-30 (scratchpad/audit/AUDIT-SUMMARY.md). Follow docs/STORY-WORKFLOW.md: engine+proto(if surface)+CLI+offline E2E, mock-only tests, no fabricated data, comment convention, PR to dev, PO reviews before close.

Fabrication landmines (dead in current wiring but pub and reachable by any future caller): - nuncio-cal/src/carddav.rs (whole file, re-exported at nuncio-cal/src/lib.rs:8,17) is an orphaned non-functional DUPLICATE CardDavClient/Contact: no network call, implements no backend trait, unused (the real one is nuncio-contacts/src/carddav.rs). DELETE it. - nuncio-mail ImapEngine/JmapEngine credential-less sync_folders/sync_messages (imap.rs:905-918,737-764; jmap.rs:429-448,469-486) return hardcoded folders/emails instead of erroring; ImapEngine::send_email (imap.rs:929-931) and JmapEngine::send_email (jmap.rs:489-496) are no-op fabricated successes that discard the email. Make these return an honest AuthError/Unsupported, or move genuinely-needed test fixtures behind cfg(test). No pub path may return canned data or fake success. Goal: zero fabricated-data / fake-success paths remain in the protocol crates. Source: full-tree audit 2026-07-30 (scratchpad/audit/AUDIT-SUMMARY.md). Follow docs/STORY-WORKFLOW.md: engine+proto(if surface)+CLI+offline E2E, mock-only tests, no fabricated data, comment convention, PR to dev, PO reviews before close.
KofTwentyTwo commented 2026-07-31 15:05:52 +00:00 (Migrated from github.com)

Delivered via PR #262 (squash-merged to dev). Deleted the orphaned duplicate nuncio-cal CardDavClient; credential-less ImapEngine/JmapEngine sync_folders/sync_messages now return an honest MailError::AuthError instead of hardcoded folders/emails (and fixed a bonus bug: sync_folders fabricated canned folders even with credentials on an empty server list); removed the no-op send_email from the MailBackend trait entirely (zero production callers — real sends go via MessageSender/SmtpTransportEngine). Tests migrated to scripted-loopback/credential-less-error assertions, offline. No pub production path in the protocol crates returns canned data or fake success anymore.

Delivered via PR #262 (squash-merged to dev). Deleted the orphaned duplicate nuncio-cal CardDavClient; credential-less ImapEngine/JmapEngine sync_folders/sync_messages now return an honest MailError::AuthError instead of hardcoded folders/emails (and fixed a bonus bug: sync_folders fabricated canned folders even with credentials on an empty server list); removed the no-op send_email from the MailBackend trait entirely (zero production callers — real sends go via MessageSender/SmtpTransportEngine). Tests migrated to scripted-loopback/credential-less-error assertions, offline. No pub production path in the protocol crates returns canned data or fake success anymore.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KofTwentyTwo/nuncio#253