Put IMAP sync and writes behind a MailSource seam #53

Closed
opened 2026-10-31 14:05:08 +00:00 by svc-agent-writer · 0 comments

Parent: #51 (Phase 6). Decision: ADR 0006. §1, §2, §3.

Make AccountSync and ActionRunner the IMAP implementation of a MailSource protocol: run_pass, wait, apply, check, close. SyncWorker builds one source per account from the config. The account config becomes a union discriminated by source, default imap.

No change in behaviour. No new source in this issue.

Acceptance

  • Every existing config loads unchanged; a config with source = "imap" loads the same.
  • make check and make test-integration green with no test changed except imports.
  • server.py imports nothing from the sources.
  • CLAUDE.md says "never add a mail-server call to server.py".

Blocked by

Parent: #51 (Phase 6). Decision: ADR 0006. §1, §2, §3. Make `AccountSync` and `ActionRunner` the IMAP implementation of a `MailSource` protocol: `run_pass`, `wait`, `apply`, `check`, `close`. `SyncWorker` builds one source per account from the config. The account config becomes a union discriminated by `source`, default `imap`. No change in behaviour. No new source in this issue. ## Acceptance - Every existing config loads unchanged; a config with `source = "imap"` loads the same. - `make check` and `make test-integration` green with no test changed except imports. - `server.py` imports nothing from the sources. - `CLAUDE.md` says "never add a mail-server call to `server.py`". ## Blocked by - #52
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dev/mail-mind-mcp#53
No description provided.