Put IMAP sync and writes behind a MailSource seam #61
No reviewers
Labels
No labels
bug
enhancement
epic
needs-info
needs-triage
ready-for-agent
ready-for-human
svd:go
svd:hold
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/mail-mind-mcp!61
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refactor/mail-source-seam"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #53 (epic #51, ADR 0006 §1 to §3). No change in behaviour.
source.py(new) holds the protocol-neutral parts:MailSourceprotocol:account,run_pass,wait,apply,check,close;PassResult;drainandsettlefor the outbox, plussleep, which ends early when an action is queued;SyncWorkerandopen_source.ingest.pyis now the IMAP source only.AccountSyncgainsapply()andcheck().drain_actions()and_sleep()delegate to the shared functions.outbox.py(new) holds the pure outbox rules andcompose_draft. These moved out ofactions.py, so a future JMAP source can use them andserver.pyimports no IMAP module.actions.pykeeps the IMAP runner.cli checklogs in throughopen_source(...).check(). The output is the same.source = "imap", which is the default. Any other value is refused. The discriminated union comes with the JMAP account type in #55.server.py". The README config row andconfig.example.tomlnamesource.Tests:
test_source.pyfails ifserver.pyimportsingest,actions,imapclientor the blade's connection module.source;mailmind checkagainst GreenMail through the source.make checkpasses 132 tests.make test-integrationpasses 8.🤖 Generated with Claude Code