Repository navigation
Phase 2a: Resend fallback and production binding - #1917
Merged
neuromechanist merged 4 commits intoOct 24, 2026
Merged
neuromechanist merged 4 commits into
neuromechanist merged 4 commits into
Conversation
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR1917Version: 🤖 Updated on each push. |
neuromechanist
merged commit Oct 24, 2026
c318ccc
into
feature/issue-1893-epic-email-cf
14 checks passed
This was referenced Oct 24, 2026
Merged
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sendEmailfalls back to Resend once, only when Cloudflare refuses with a code that certainly sent nothing and that Resend can answer (E_RATE_LIMIT_EXCEEDED,E_DAILY_LIMIT_EXCEEDED,E_ACCOUNT_SUSPENDED,E_SENDER_DOMAIN_NOT_AVAILABLE),EMAIL_FALLBACKisresend, and a Resend key is set. A suppressed recipient, a validation, header or delivery error, a timeout, an internal or unknown error, and a configuration error never fall back. Staging never setsEMAIL_FALLBACK, so staging still cannot reach Resend.send_emailbinding restricted to[email protected]and[email protected], but noEMAIL_PROVIDER: it keeps sending through Resend until the flip, after the Cloudflare limit increase and a clean staging soak (maintainer decision, 2026-10-23).Part of #1895, epic #1893.
Test plan
backend/test/email-provider.test.ts62 tests: each fallback code reaches the Resend stand-in exactly once with the[DEV]subject; every non-fallback case does not; gate variants; fence before either providerbun run typecheck,bun run lint🤖 Generated with Claude Code