Repository navigation
Conversation
The email worker declines a recipient it predicts will bounce, such as a domain with no mail server, and still finishes the step. Template test sends and the email step's test panel read only the run status, so they reported a send that never happened as sent. Read the structured emailSendResult instead, in one helper shared by the template, broadcast and workflow step test sends. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
Silthus
added a commit
to Silthus/posthog
that referenced
this pull request
Oct 27, 2026
Silthus
added a commit
to Silthus/posthog
that referenced
this pull request
Oct 27, 2026
Silthus
added a commit
to Silthus/posthog
that referenced
this pull request
Oct 27, 2026
Silthus
added a commit
to Silthus/posthog
that referenced
this pull request
Oct 27, 2026
Contributor
Author
|
Note 🤖 Claude Opus 5.5 responding on behalf of Michael Decisions for this PR:
|
Silthus
added a commit
to Silthus/posthog
that referenced
this pull request
Oct 27, 2026
The frontend reads the skip from emailSendResult (PostHog#123846), so the endpoint keeps reporting success for a send the worker skipped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 27, 2026
…nd-status # Conflicts: # products/workflows/frontend/Broadcasts/broadcastTestSend.test.ts # products/workflows/frontend/Broadcasts/broadcastTestSendLogic.ts
Contributor
Author
|
Moved to #127189, a branch in PostHog/posthog, so the full CI can run on it. Closing this fork PR in favor of that one. |
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.
Problem
Send testtoasts "Test email sent" and closes the modal.example.com). It finishes the step, so the run status readssuccess.emailSendResult: { status: "skipped", reason }. Both surfaces ignore it.Note
🔵 Merge risk: low · two-way door (merge-risk rubric)
Changes
Send test: a declined recipient now shows a warning toast. The modal stays open with the worker's reason.Send test: no visible change. It already caught this case by matching log text and now reads the structured field. That field also covers an opted-out recipient, which the log match missed.findTestSendSkipReasonmoves from the broadcast logic toWorkflows/hogflows/steps/. OnetestResultBannerfunction replaces the banner ternary that both step test panels duplicated.Send testHow did you test this code?
Ran a local preview of
origin/master, then of this branch, with a Maildev email sender (DEBUG only). Each test send went tosomeone@example.com(no mail server) and to aposthog.comaddress, which Maildev catches locally.Send test, declinedSend test, declinedTemplateLibrary,Broadcasts,panel/testingand the moved helper pass.typescript:checkand oxlint pass.Test rationale:
messageTemplateTestSendLogic.test.ts: a newtest.eachrow mocks the real declined response (status: "success"plus a skippedemailSendResult). It fails on master with the success toast. The old row mocked astatus: "skipped"shape that the worker does not return for this case.testSendSkipReason.test.ts(moved frombroadcastTestSend.test.ts): reads the reason fromemailSendResult, including an opt-out reason without the old log prefix.testResultBanner.test.ts: maps delivered, declined, filter-skipped and failed runs to banner type and text. A pure function test, because the panels only render the mapping.Release status
Docs update
None.
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Agent: Claude Code, Claude Opus 5.5
emailSendResult?emailSendResult, one shared helper for template, broadcast and step/writing-tests,/writing-user-facing-copy,/writing-pr-descriptions.example.com, demo project).🤖 Generated with Claude Code