mail-negotiator #3

Open
cayce wants to merge 0 commits from mail-negotiator into main
Owner

IMAP classify (rules + optional LLM), conservative needs_review, reply drafts gated on human approval, SMTP sends approved-only. 29 tests green.

IMAP classify (rules + optional LLM), conservative needs_review, reply drafts gated on human approval, SMTP sends approved-only. 29 tests green.
cayce added 1 commit 2026-10-19 21:47:19 +00:00
mail-negotiator: classify merchant replies, draft gated, audited sends
ci / lint-test-leaks (pull_request) Canceled after 0s
5b259bc663
- IMAP poll (UNSEEN, stdlib imaplib) -> parse (bare address via email.utils)
- threading: In-Reply-To -> outbound sent-draft message-id -> proposal
- classify: deterministic rules; optional LLM behind provider interface;
  below-threshold confidence -> needs_review (never guessed)
- unthreadable approvals flagged needs_review (suspicious by definition)
- merchant_status recorded on proposal detail; proposal lifecycle untouched
- reply drafts generated from templates (drafted), NEVER auto-sent
- SMTP sends only draft_status=approved (human approve_draft, audited);
  sent drafts store their Message-ID for future threading
- idempotent on Message-ID; DaemonRun wrapper for monitor

tests: 9 new (classification rules, threshold->review, threading, idempotence,
blocked send without approval, approve->send->audit chain, double approve)
— 29 total passing
cayce referenced this issue from a commit 2026-10-19 21:47:31 +00:00
Some required checks failed
ci / lint-test-leaks (pull_request) Canceled after 0s
This branch is already included in the target branch. There is nothing to merge.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin mail-negotiator:mail-negotiator
git checkout mail-negotiator
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cayce/cayce-ops#3