Repository navigation
Durable system-email intent and classified delivery outcomes #4140
Replies: 3 comments
|
Design PR #4209 proposes |
|
Update: I am volunteering to champion this RFC Draft design PR: #4209 This proposal is intentionally RFC-level because it crosses Auth, the public I have prepared a draft design proposal limited to
I am ready to implement the accepted design. Would a Maintainer sponsor this The proposal deliberately leaves provider-specific acceptance semantics, |
Correction — tested version and current status (2026-10-19)The reproduction baseline for the statements above was EmDash/Auth 1.2.0. The latest published versions of The delivery-contract gap remains: the current hook type still models delivery as |
Uh oh!
There was an error while loading. Please reload this page.
Problem
Published EmDash/Auth 1.2.0 does not provide a durable email contract for system messages and application-owned transactional notifications.
The current API has these properties:
EmailDeliverEventcontains the message and source, and the delivery handler returnsPromise<void>.The API cannot distinguish provider acceptance from pending queue work, permanent rejection, or an unknown result. It also does not expose a stable send identity, exact expiry, durable retry state, or restart recovery.
Use case
A site uses magic-link login, invitations, account recovery, and application-owned transactional notifications through an EmDash email provider. The provider may reject a message, accept it while the response is lost, or report only that it queued the message.
The site needs to preserve the delivery obligation and make the result recoverable without resending an expired credential or marking queued work as accepted. Auth flows, application workflows, operators, and recipients are affected.
The contract must cover both system and application messages while preserving system-email hook isolation.
Current workarounds
Operators can install a provider plugin and use the admin test-email flow. A transport plugin can persist messages that reach
email:deliver, and an application can maintain its own notification outbox or provider integration.These workarounds cannot atomically preserve an Auth delivery obligation that fails before the transport receives it. They also cannot make
Promise<void>distinguish accepted, pending, rejected, and unknown outcomes. A plugin can provide transport persistence, but it cannot provide the required system-email guarantee without a host-owned durable intent and outcome contract.Your involvement
All reactions