refactor(email): give the transactional sender resolver one home - #7162
Open
viktormarinho wants to merge 1 commit into
Open
viktormarinho wants to merge 1 commit into
viktormarinho wants to merge 1 commit into
Conversation
`pr-ready-email.ts` shipped a byte-for-byte copy of `dbos-digest.ts`'s `resolveSender` — same body, same comment about reusing the invitation provider. That's my duplication from #7159; extracting it now, before a third caller copies it again. It lives next to `createEmailSender`, which is what it builds. No behavior change: both call sites resolve the same provider in the same order, so a deployment with no provider still sends nothing and stamps nothing. The workflow-source snapshot moves because `dbos-digest.ts` changed. Recovery-compatible — one call swapped for an identical one, no step added, removed or reordered — so DBOS_WORKFLOW_VERSION stays at 11.
This branch has not been 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.
Follow-up cleanup on #7159.
pr-ready-email.tsshipped a byte-for-byte copy ofdbos-digest.ts'sresolveSender— same body, same comment about reusing the invitation provider. My duplication; extracting it now, before a third caller copies it again.The resolver moves next to
createEmailSender, which is what it builds.No behavior change. Both call sites resolve the same provider in the same order (explicit
inviteEmailProviderId, else the first configured one), so a deployment with no provider still sends nothing and stamps nothing.The workflow-source snapshot moves because
dbos-digest.tschanged. Recovery-compatible — one call swapped for an identical one, no step added, removed or reordered — soDBOS_WORKFLOW_VERSIONstays at 11.Validation: workspace type checks, lint (14 pre-existing warnings, 0 errors), knip, formatting, and 8,709 unit tests all pass.
Summary by cubic
Consolidates the duplicated transactional sender resolution from
dbos-digest.tsandpr-ready-email.tsinto oneresolveTransactionalSenderinemail-providers.ts. No behavior change — deployments without a provider still send nothing and stamp nothing.Refactors
createEmailSender, which it builds.dbos-digest.tschanged; recovery-compatible, soDBOS_WORKFLOW_VERSIONstays at 11.Written for commit cfa01e6. Summary will update on new commits.