Reply from the arrival address (ADR 0014) #212
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/mail-mind-mcp#212
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Implements ADR 0014 (docs/adr/0014-reply-from-the-arrival-address.md). Read it first. A reply or forward draft goes out from the address the original arrived at, when that address is in the account's trusted own set. This keeps Fastmail masked addresses and iCloud aliases unlinked from the real address.
What to build
reply_from_arrival: bool = False, on both IMAP and JMAP accounts.config.example.tomldocuments it.https://www.fastmail.com/dev/maskedemailcapability, callMaskedEmail/getwith propertiesemailandstateonly. Record the enabled addresses for the account in the store. Without the capability, record an empty list. Never callMaskedEmail/set. Never store any other MaskedEmail field.server.py's early refusal and by both sources'_compose(actions.py,jmap.py). It builds on the #211 helper. Withreply_from_arrivalon and an original (reply or forward), it takes the first address in the original's To, then Cc, that is in the trusted own set: the identity,aliases, and the recorded masked list. Otherwise it returns the account identity. A draft edit uses the replaced action's params, so the edit keeps its From.mail_draftandmail_draft_editanswers addfrom=<address>.identity,alias,masked) only, never an address. Extend the write-path log privacy tests from #209 to cover a masked From.[[accounts]]row,mail_draftrow, a note that only aliases this account can send from belong inaliaseswhen the key is on), SECURITY.md (the Masked Email scope widens the sync credential), CLAUDE.md and GLOSSARY ("arrival address", "trusted own set").If the store needs a new table rather than a
metakey, it is schema v19 under the existing writer-only migration rules.Acceptance criteria
emailandstateis stored.tests/test_source.py).make checkpasses.Out of scope
Creating, disabling or deleting masked addresses. iCloud Hide My Email discovery (no public API). Any send path. Changing
mail_people's own-address list.Blocked by
⏸ SVD architect gate: dev/mail-mind-mcp#212 reply-from-the-arrival-address-adr-0014
Status: CLEAN after 0 rework round(s) · 0 blocking defect(s) · 0 lens(es) INCONCLUSIVE (could not run) · 0 lens(es) DEGRADED (deterministic denial) · complexity
substrate· dispatch efforthighRun:
20261113T231449Z-d132b23aHeld because: CLEAN but 5 open risk(s) (2 verification · 3 decision) — HOLD-ALL parks everything. The risks, verbatim:
Open risks:
uv run python3 -m pytest -q -m "not integration" tests/test_jmap.py tests/test_actions.py tests/test_write_tools.py tests/test_config.py tests/test_source.pyon pristinef51dbbd. After the change, assert that only new tests were added and the failure set is otherwise unchanged; thenmake checkmust pass on the host. [verification]Change: Put one pure rule, outbox.arrival_sender(identity, original, *, reply_from_arrival, aliases, masked) -> (address, origin in identity|alias|masked). It walks evidence.addresses(original.to_addrs) and then cc_addrs (evidence.py:313-325) and returns the first address in the trusted set; otherwise it returns the identity. Model the Arrived Protocol on Original/Forwarded (outbox.py:50-79). Store the masked list as a meta key, masked_addresses:{account}, holding a JSON list (no schema v19). Mirror session_sender/record_session_sender exactly (store.py:2048-2069), including the writer-only assertion. Add reply_from_arrival: bool = False to MirrorScope (config.py:310-318) so IMAP and JMAP accounts both get it. JMAP: add a MASKED_EMAIL constant and a using=() keyword on JmapClient.call (jmap.py:239-242). Add _masked_addresses() beside _session_sender (jmap.py:533-541) and call it from run_pass after _session_sender. Without the capability it records [] and makes no call. With it, it calls MaskedEmail/get with properties ["email","state"] and keeps state == enabled. A BladeError keeps the last list and the pass continues. Log the count only. Call sites, all reading the store: JmapSource._compose (jmap.py:989-1007), ActionRunner._compose (actions.py:217-238) and server._draft_sender(account, original) (server.py:1462-1468). The worker logs 'draft sender' with origin only. mail_draft and mail_draft_edit append ' from=' after _outcome. The edit tool loads the reply original via a _ref_row helper that mirrors JmapSource._row (jmap.py:757-761). Edits and undo-edits already compose from the replaced params, so they keep their From.
Files:
src/mail_mind_mcp/config.py·src/mail_mind_mcp/outbox.py·src/mail_mind_mcp/store.py·src/mail_mind_mcp/jmap.py·src/mail_mind_mcp/actions.py·src/mail_mind_mcp/server.py·config.example.toml·README.md·SECURITY.md·CLAUDE.md·GLOSSARY.md·tests/test_jmap.py·tests/test_actions.py·tests/test_write_tools.py·tests/test_config.pyDecision: accept the 5 open risk(s) above and dispatch this spec (
svd:go), or park (svd:skip) / re-spec (svd:respec)?Your call (when this issue is held at the gate via
svd:hold):svd:go— approve; Half-B dispatch accepts exactly this spec (open risks accepted)svd:firebesidesvd:go— approve AND authorise the Half-B fire from the phone; never on its ownsvd:skip— park it; dispatch refuses it and the issue stays for a humansvd:respec— discard this spec; the next Half-A run re-produces it with this record as prior-attempt contextSpec:
/Users/piers/.local/state/exhaust/groupthink/specs/2026-11-13-reply-from-the-arrival-address-adr-0014.md— next:codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-13-reply-from-the-arrival-address-adr-0014.md✅ SVD architect gate: dev/mail-mind-mcp#212 reply-from-the-arrival-address-adr-0014
Status: CLEAN after 0 rework round(s) · 0 blocking defect(s) · 0 lens(es) INCONCLUSIVE (could not run) · 0 lens(es) DEGRADED (deterministic denial) · complexity
unclassified· dispatch effortunclassifiedRun:
20261113T231449Z-d132b23aFiles:
src/mail_mind_mcp/config.py·src/mail_mind_mcp/outbox.py·src/mail_mind_mcp/store.py·src/mail_mind_mcp/jmap.py·src/mail_mind_mcp/actions.py·src/mail_mind_mcp/server.py·config.example.toml·README.md·SECURITY.md·CLAUDE.md·GLOSSARY.md·tests/test_jmap.py·tests/test_actions.py·tests/test_write_tools.py·tests/test_config.pyWrite-set divergence: present table wins. 0 sourceHashes vs 21-row table.
Decision: dispatch this spec (
svd:go)?Your call (when this issue is held at the gate via
svd:hold):svd:go— approve; Half-B dispatch accepts exactly this spec (open risks accepted)svd:firebesidesvd:go— approve AND authorise the Half-B fire from the phone; never on its ownsvd:skip— park it; dispatch refuses it and the issue stays for a humansvd:respec— discard this spec; the next Half-A run re-produces it with this record as prior-attempt contextSpec:
/Users/piers/.local/state/exhaust/groupthink/specs/2026-11-13-reply-from-the-arrival-address-adr-0014.md— next:codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-13-reply-from-the-arrival-address-adr-0014.mdspec-verify-dispatch Half B for dev/mail-mind-mcp#212 reply-from-the-arrival-address-adr-0014 completed integration verify.
e9f3668d10codex-svd ship --run-id 20261113T233108Z-2df80318 --confirm-merge)