Skip to content

fix(cdp): record why a test email to a recipient without an address was skipped - #626

Draft
Silthus wants to merge 2 commits into
masterfrom
fix/workflows-test-send-skip-node
Draft

Silthus wants to merge 2 commits into
masterfrom
fix/workflows-test-send-skip-node

Conversation

@Silthus

@Silthus Silthus commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Problem

A test email to a recipient with no email address reports success, so the sender waits for mail that never arrives.
PostHog#123846 shows the worker's skip reason on the test-send surfaces, reading emailSendResult.
The worker sets emailSendResult on every skip path except this one, so PostHog#123846 still shows "Success" here.

Refs Silthus/personal#204. Replaces the Node half of #591. Its frontend half (#627) is closed in favor of PostHog#123846.

Merge Danger

Note

🔵 Merge risk: low · two-way door (merge-risk rubric)

  • email.service.ts runs for real sends too. Here it only adds emailSendResult to the missing-recipient skip, which already skips and already counts email_missing_recipient. Sending, metrics and the run status do not change.
  • Worst case: a test result shows a reason where it showed none. A revert fully undoes it.

Changes

Changed production lines: 6 (git diff --numstat, tests excluded).

How did you test this code?

  • Email worker (email.service.test.ts): extends the missing-recipient case to expect a skipped emailSendResult with its reason. Red on master: Received: undefined. Green on d4632808423, whose nodejs/src/cdp/services/messaging/ files are byte-identical to this head.
  • The head commit only restores cdp-api.ts and cdp-api.serial.test.ts to their master versions.
  • hogli ci:preflight --strict passed on push. Fork CI cannot run (missing GitHub App secret), recorded as a gap.

Test rationale: the test catches a skip reason that fails to reach the user. It extends the nearest existing case.

Release status

  • No feature flag controls this change

Docs update

None.

🤖 Agent context

Autonomy: Fully autonomous

Agent: Claude Code, Opus 5.5 (claude-opus-5-5). Design pass and review by GPT-6.1 Sol through T3 Code.

Built test-first as a slice of a re-slice plan (Silthus/personal#204), split out of #591 by lane, then trimmed to complement PostHog#123846. All test data is invented.

Question Answer Who Where
Overlap with PostHog#123846 PostHog#123846 owns the frontend; this PR keeps only the missing-recipient reason 👤 Michael Conductor thread, 2026-10-27
Test endpoint status Unchanged; the skip travels in emailSendResult 👤 Michael Conductor thread, 2026-10-27
Merge risk 🔵 low: one field on an existing skip path 🤖 Agent checklist
Flag None: the fix applies to every sender 🤖 Agent plan

🤖 Generated with Claude Code

A test send that the email worker declined, for example to a suppressed
recipient or from a paused workflow, came back from the test invocation
endpoint as a success.

The endpoint now reports `skipped` when the email step was skipped, and
keeps the next step for step-through. A recipient without an email
address now records its reason in `emailSendResult` like the other skips.

Refs Silthus/personal#204

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
@Silthus Silthus changed the title fix(cdp): report a skipped test email send as skipped fix(cdp): record why a test email to a recipient without an address was skipped Oct 27, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant