IPC Audit

March 29, 2026 ยท View on GitHub

This audit classifies every protocol item in crates/protocol/src/types.rs using the four-bucket model:

  • core-mail
  • mxr-platform
  • admin-maintenance
  • client-specific

Current conclusion:

  • core-mail is the largest and most stable bucket.
  • mxr-platform holds reusable mxr runtime features that are not timeless mail concepts.
  • admin-maintenance remains in IPC, but is conceptually fenced off.
  • No current Request, ResponseData, or DaemonEvent variants should live in client-specific.
  • Client-specific shaping already lives in crates/tui and crates/web.

Requests

ItemKindCategoryCurrent ownerCorrect ownerActionRationaleFollow-up notes
ListEnvelopesRequestcore-mailhandler::mailboxhandler::mailboxkeepReusable mailbox listing.Stable mail read surface.
ListEnvelopesByIdsRequestcore-mailhandler::mailboxhandler::mailboxkeepReusable fetch-by-id primitive.Used by web to shape views client-side.
GetEnvelopeRequestcore-mailhandler::mailboxhandler::mailboxkeepCanonical envelope read.Stable.
GetBodyRequestcore-mailhandler::mailboxhandler::mailboxkeepCanonical body read.Stable.
GetHtmlImageAssetsRequestcore-mailhandler::mailboxhandler::mailboxkeepMail rendering asset resolution, not screen layout.Reusable by multiple clients.
DownloadAttachmentRequestcore-mailhandler::mailboxhandler::mailboxkeepAttachment materialization is a reusable mail workflow.Stable.
OpenAttachmentRequestcore-mailhandler::mailboxhandler::mailboxkeepAttachment open/materialize workflow.CLI/web/TUI can all use it.
ListBodiesRequestcore-mailhandler::mailboxhandler::mailboxkeepBatch body fetch is reusable mail data access.Used by web thread shaping.
GetThreadRequestcore-mailhandler::mailboxhandler::mailboxkeepCore mail thread read.Stable.
ListLabelsRequestcore-mailhandler::mailboxhandler::mailboxkeepInternal label/folder model exposure.Shared by clients.
CreateLabelRequestcore-mailhandler::mailboxhandler::mailboxkeepMail label mutation.Not a screen concern.
DeleteLabelRequestcore-mailhandler::mailboxhandler::mailboxkeepMail label mutation.Stable.
RenameLabelRequestcore-mailhandler::mailboxhandler::mailboxkeepMail label mutation.Stable.
ListAccountsRequestmxr-platformhandler::accountshandler::accountskeepRuntime account inventory is an mxr product capability.Shared across CLI/TUI/web.
ListAccountsConfigRequestmxr-platformhandler::accountshandler::accountskeepConfig-backed account definitions are mxr runtime config.Not timeless mail protocol.
AuthorizeAccountConfigRequestmxr-platformhandler::accountshandler::accountskeepAccount authorization flow is mxr platform/runtime.Stable platform surface.
UpsertAccountConfigRequestmxr-platformhandler::accountshandler::accountskeepAccount config mutation is mxr platform/runtime.Shared across clients.
SetDefaultAccountRequestmxr-platformhandler::accountshandler::accountskeepDefault sender/runtime account is mxr-level behavior.Platform setting.
TestAccountConfigRequestmxr-platformhandler::accountshandler::accountskeepAccount test flow is product/runtime capability.Keep in daemon IPC.
ListRulesRequestmxr-platformhandler::ruleshandler::ruleskeepRules are mxr product logic, not raw mail semantics.Shared capability.
GetRuleRequestmxr-platformhandler::ruleshandler::ruleskeepRule inspection is product/runtime.Stable platform surface.
GetRuleFormRequestmxr-platformhandler::ruleshandler::ruleskeepEditable rule form is product/runtime, not screen state.Keep but document as platform-specific.
UpsertRuleRequestmxr-platformhandler::ruleshandler::ruleskeepRules management belongs to mxr platform.Stable.
UpsertRuleFormRequestmxr-platformhandler::ruleshandler::ruleskeepForm-oriented rule upsert is product/runtime convenience shared by clients.Keep, do not treat as TUI-only.
DeleteRuleRequestmxr-platformhandler::ruleshandler::ruleskeepRules management belongs to mxr platform.Stable.
DryRunRulesRequestmxr-platformhandler::ruleshandler::ruleskeepDeterministic preview is a core mxr rules capability.Platform, not admin.
ListSavedSearchesRequestmxr-platformhandler::diagnosticshandler::platformmoveSaved searches are mxr product primitives.Rehomed from diagnostics bucket.
ListSubscriptionsRequestmxr-platformhandler::diagnosticshandler::platformmoveSubscription summaries are reusable mxr product views over mail data.Shared by web/TUI/CLI.
GetSemanticStatusRequestmxr-platformhandler::diagnosticshandler::platformmoveSemantic runtime state is mxr product/runtime capability.Not mere maintenance.
EnableSemanticRequestmxr-platformhandler::diagnosticshandler::platformmoveSemantic enablement is mxr runtime config.Platform-owned.
InstallSemanticProfileRequestmxr-platformhandler::diagnosticshandler::platformmoveProfile install is mxr runtime feature work.Platform-owned.
UseSemanticProfileRequestmxr-platformhandler::diagnosticshandler::platformmoveActive profile selection is mxr runtime config.Platform-owned.
ReindexSemanticRequestmxr-platformhandler::diagnosticshandler::platformmoveReindex here is tied to semantic runtime feature, not generic daemon health.Still operationally heavy; documented as platform/runtime.
CreateSavedSearchRequestmxr-platformhandler::diagnosticshandler::platformmoveSaved search creation is a product primitive.Rehomed from diagnostics.
DeleteSavedSearchRequestmxr-platformhandler::diagnosticshandler::platformmoveSaved search management is product/runtime.Rehomed from diagnostics.
RunSavedSearchRequestmxr-platformhandler::diagnosticshandler::platformmoveRunning a saved search is a product/runtime capability.Returns core mail search results.
ListEventsRequestadmin-maintenancehandler::diagnosticshandler::adminmoveOperational event inspection.Keep in IPC, fence conceptually.
GetLogsRequestadmin-maintenancehandler::diagnosticshandler::adminmoveOperational log inspection.Not core mail API.
GetDoctorReportRequestadmin-maintenancehandler::diagnosticshandler::adminmoveRuntime health/repair inspection.Keep in IPC.
GenerateBugReportRequestadmin-maintenancehandler::diagnosticshandler::adminmoveOperational support/diagnostic workflow.Keep in IPC.
SearchRequestcore-mailhandler::diagnosticshandler::runtimemoveSearch is core mail navigation/data access.Should not live in diagnostics.
SyncNowRequestcore-mailhandler::diagnosticshandler::runtimemoveMail sync is a core runtime workflow.Stable mail/runtime surface.
GetSyncStatusRequestcore-mailhandler::diagnosticshandler::runtimemovePer-account sync state supports mail runtime workflows.Not admin-only.
SetFlagsRequestcore-mailhandler::mutationshandler::mutationskeepMail mutation.Stable.
CountRequestcore-mailhandler::diagnosticshandler::runtimemoveSearch count is core mail navigation.Should not live in diagnostics.
GetHeadersRequestcore-mailhandler::diagnosticshandler::runtimemoveRaw headers are reusable mail data.Stable read surface.
ListRuleHistoryRequestcore-mailhandler::ruleshandler::ruleskeepHistorical executions are mail-affecting workflow history.Kept in rules module; conceptually adjacent to mail ops.
MutationRequestcore-mailhandler::mutationshandler::mutationskeepBulk/single message mutations are durable mail verbs.Nested commands stay mail bucket.
UnsubscribeRequestcore-mailhandler::mutationshandler::mutationskeepMail action based on message metadata.Stable workflow.
SnoozeRequestcore-mailhandler::mutationshandler::mutationskeepMail lifecycle workflow.Stable.
UnsnoozeRequestcore-mailhandler::mutationshandler::mutationskeepMail lifecycle workflow.Stable.
ListSnoozedRequestcore-mailhandler::mutationshandler::mutationskeepMail state listing.Stable.
PrepareReplyRequestcore-mailhandler::mutationshandler::mutationskeepReusable compose workflow.Stable mail/runtime.
PrepareForwardRequestcore-mailhandler::mutationshandler::mutationskeepReusable compose workflow.Stable mail/runtime.
SendDraftRequestcore-mailhandler::mutationshandler::mutationskeepCore send workflow.Stable.
SaveDraftToServerRequestcore-mailhandler::mutationshandler::mutationskeepCore draft workflow.Stable.
ListDraftsRequestcore-mailhandler::mutationshandler::mutationskeepCore draft listing.Stable.
ExportThreadRequestcore-mailhandler::diagnosticshandler::runtimemoveExport is reusable mail data workflow.Not admin.
ExportSearchRequestcore-mailhandler::diagnosticshandler::runtimemoveExport is reusable mail data workflow.Not admin.
GetStatusRequestadmin-maintenancehandler::diagnosticshandler::adminmoveDaemon status is operational inspection, not mail domain.Kept in IPC, fenced off.
PingRequestadmin-maintenanceprotocol utilityhandler::admindocumentTransport/daemon liveness probe.Operational utility.
ShutdownRequestadmin-maintenanceserver controlhandler::admindocumentDaemon lifecycle control.High-friction admin surface.

ResponseData

ItemKindCategoryCurrent ownerCorrect ownerActionRationaleFollow-up notes
EnvelopesResponseDatacore-mailmailbox/runtime handlersmailbox/runtime handlerskeepReusable envelope payload.Client groups it locally.
EnvelopeResponseDatacore-mailmailbox handlersmailbox handlerskeepCanonical envelope read payload.Stable.
BodyResponseDatacore-mailmailbox handlersmailbox handlerskeepCanonical body payload.Stable.
HtmlImageAssetsResponseDatacore-mailmailbox handlersmailbox handlerskeepReusable rendering asset metadata.Not a screen payload.
AttachmentFileResponseDatacore-mailmailbox/export handlersmailbox/export handlerskeepReusable attachment materialization result.Stable.
BodiesResponseDatacore-mailmailbox handlersmailbox handlerskeepBatch body payload.Shared by web/TUI.
ThreadResponseDatacore-mailmailbox handlersmailbox handlerskeepCanonical thread payload.Web shapes right rail itself.
LabelsResponseDatacore-mailmailbox handlersmailbox handlerskeepCanonical label/folder payload.Stable.
LabelResponseDatacore-mailmailbox handlersmailbox handlerskeepSingle label mutation result.Stable.
SearchResultsResponseDatacore-mailruntime/platform handlersruntime/platform handlerskeepReusable mail search result payload.Returned by both raw and saved search flows.
SyncStatusResponseDatacore-mailruntime handlersruntime handlerskeepPer-account mail runtime state.Stable.
CountResponseDatacore-mailruntime handlersruntime handlerskeepReusable search count payload.Stable.
HeadersResponseDatacore-mailruntime handlersruntime handlerskeepReusable raw mail header payload.Stable.
ReplyContextResponseDatacore-mailmutation handlersmutation handlerskeepReusable compose context.Stable.
ForwardContextResponseDatacore-mailmutation handlersmutation handlerskeepReusable compose context.Stable.
DraftsResponseDatacore-mailmutation handlersmutation handlerskeepReusable draft listing.Stable.
SnoozedMessagesResponseDatacore-mailmutation handlersmutation handlerskeepReusable snooze listing.Stable.
ExportResultResponseDatacore-mailruntime/export handlersruntime/export handlerskeepExport output is a reusable mail workflow result.Stable.
RulesResponseDatamxr-platformrules handlersrules handlerskeepRules are mxr product/runtime entities.Platform-owned.
RuleDataResponseDatamxr-platformrules handlersrules handlerskeepRule payload is product/runtime config.Platform-owned.
AccountsResponseDatamxr-platformaccounts handlersaccounts handlerskeepRuntime account inventory is platform state.Stable.
AccountsConfigResponseDatamxr-platformaccounts handlersaccounts handlerskeepConfig-backed account definitions are platform state.Stable.
AccountOperationResponseDatamxr-platformaccounts handlersaccounts handlerskeepAccount setup/test/auth result is platform workflow output.Stable.
RuleFormDataResponseDatamxr-platformrules handlersrules handlerskeepRule editing payload is product/runtime-facing.Keep but do not expand into screen state.
RuleDryRunResponseDatamxr-platformrules handlersrules handlerskeepDeterministic rule preview is platform behavior.Stable.
SavedSearchesResponseDatamxr-platformdiagnostics/runtime handlersplatform handlersmoveSaved searches are mxr product primitives.Rehomed.
SubscriptionsResponseDatamxr-platformdiagnostics/runtime handlersplatform handlersmoveSubscription summaries are mxr-level runtime capability.Rehomed.
SemanticStatusResponseDatamxr-platformdiagnostics/runtime handlersplatform handlersmoveSemantic runtime state is product/runtime capability.Rehomed.
SavedSearchDataResponseDatamxr-platformdiagnostics/runtime handlersplatform handlersmoveSaved search create/update result is platform data.Rehomed.
EventLogEntriesResponseDataadmin-maintenancediagnostics handlersadmin handlersmoveOperational event history.Fence off conceptually.
LogLinesResponseDataadmin-maintenancediagnostics handlersadmin handlersmoveOperational log payload.Fence off conceptually.
DoctorReportResponseDataadmin-maintenancediagnostics handlersadmin handlersmoveRepair/health/report payload.Fence off conceptually.
BugReportResponseDataadmin-maintenancediagnostics handlersadmin handlersmoveSupport/diagnostic output.Fence off conceptually.
RuleHistoryResponseDataadmin-maintenancerules handlersrules/admin boundarydocumentHistorical operational output about rule runs.Kept where it is for now; conceptual overlap documented.
StatusResponseDataadmin-maintenancediagnostics handlersadmin handlersmoveDaemon/runtime health snapshot.Not core mail API.
PongResponseDataadmin-maintenanceprotocol utilityadmin utilitydocumentLiveness probe response.Operational utility.
AckResponseDataadmin-maintenanceprotocol utilityprotocol utilitydocumentCross-cutting generic success marker.Transitional utility reused by multiple buckets.

DaemonEvent

ItemKindCategoryCurrent ownerCorrect ownerActionRationaleFollow-up notes
SyncCompletedDaemonEventcore-maildaemon loopsdaemon runtimekeepMail runtime event shared by clients.Stable.
SyncErrorDaemonEventcore-maildaemon loopsdaemon runtimekeepMail runtime error event shared by clients.Stable.
NewMessagesDaemonEventcore-mailprotocol/loopsdaemon runtimedeprecateLegitimate mail event, but currently unused in emitted paths and clients.Keep wire compatibility for now; do not expand until needed.
MessageUnsnoozedDaemonEventcore-maildaemon loopsdaemon runtimekeepMail lifecycle event.Stable.
LabelCountsUpdatedDaemonEventcore-maildaemon loopsdaemon runtimekeepReusable mail metadata event.TUI uses it without daemon screen shaping.

Client-specific boundary

No current protocol variants were classified as client-specific.

That is the right outcome.

Current client-owned shaping already lives in:

Examples kept out of daemon IPC:

  • TUI pane/tab/selection/sidebar state
  • Web shell/sidebar JSON
  • Web date-bucket grouping
  • Web right-rail/thread presentation payloads

Transitional compromises

  • Ack remains a cross-cutting utility response rather than being split per bucket.
  • RuleHistory still sits near rules semantics in code, even though it also has operational flavor.
  • NewMessages is kept for compatibility but should be treated as dormant until a real multi-client use appears.