Skip to content

fix(cdp): pass reply-to to the local maildev transport - #121872

Merged
trunk-io[bot] merged 1 commit into
masterfrom
posthog/maildev-reply-to
Oct 22, 2026
Merged

trunk-io[bot] merged 1 commit into
masterfrom
posthog/maildev-reply-to

Conversation

@mayteio

@mayteio mayteio commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Problem

  • On a local dev stack, an email step's reply-to never reaches MailDev, so a reply-to can't be checked before shipping.
  • Production SES already sets ReplyToAddresses. Only the dev-only MailDev transport dropped it.

Changes

  • The MailDev transport passes the parsed reply-to addresses to nodemailer, the same way it passes cc and bcc. No production behavior changes.

How did you test this code?

Sent a transactional email with a reply-to on a local stack. MailDev received Reply-To: security@posthog.com, which was missing before.

Test rationale: No new test. The change is a dev-only transport that unit tests don't exercise, and the manual send above covers it.

Release status

  • No feature flag controls this change

Docs update

None.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Agent: PostHog Desktop with Claude Code, Claude Opus 5.5 (claude-opus-5-5)


Created with PostHog Desktop

🤖 Generated with Claude Code

The SES path already sets ReplyToAddresses. The local MailDev path dropped reply-to, so a reply-to never showed up when testing emails on a dev stack.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Generated-By: PostHog Desktop
Task-Id: 90d9a51d-beba-47ba-8f50-b351327676f9
@mayteio mayteio self-assigned this Oct 22, 2026
@trunk-io

trunk-io Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

😎 Merged successfully - details.

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

🤖 CI report

✅ Trunk lane — non-backend lane

This PR is assigned to the non-backend lane. It does not run backend Python tests and may merge in parallel with PRs in other lanes.

✅ Duplication (Python) — clean

New Python code duplication introduced by this branch. Fails at 70+ tokens in app code, or 150+ tokens when both copies live in test files. Advisory while the gate proves itself: extract a shared helper instead of copying.

✅ Duplication (TypeScript) — clean

New TypeScript code duplication introduced by this branch. Fails at 70+ tokens in app code, or 150+ tokens when both copies live in test files. Advisory while the gate proves itself: extract a shared helper instead of copying.

@trunk-io

trunk-io Bot commented Oct 22, 2026

Copy link
Copy Markdown

Static Badge   Static Badge   Static Badge

Failed Test Failure Summary Logs
EmailService native email sending with maildev should include tracking code in the email with distinct_id The test expected one email to be sent but received two. Logs ↗︎

View Full Report ↗︎ ⋅ Docs

@mayteio
mayteio marked this pull request as ready for review October 22, 2026 08:20
@mayteio mayteio added the stamphog Request AI approval (no full review) label Oct 22, 2026 — with PostHog
@parameterai

parameterai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Risk: No findings

Dev-only change: the local MailDev email transport now forwards the parsed reply-to addresses to nodemailer, matching what the production SES path already does. The transport only exists in dev/test environments and reuses the same parseAddressList value the SES path already accepts, so no new attack surface is introduced.

Sentinel reviewed ab097e4 · Review settings

@pr-assigner-resolver-posthog
pr-assigner-resolver-posthog Bot requested a review from a team October 22, 2026 08:21

@stamphog stamphog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

Contained development/test transport fix with no production delivery changes or open substantive review concerns. The reported duplicate-email test failure is not explained by this diff, which adds no additional send operation.

Gate mechanics and policy version
Gate Result
prerequisites ✓ all clear
deny-list ✓ no deny categories matched
size ✓ 4L, 1F substantive — within ceiling
tier ✓ T1-agent / T1a-trivial (4L, 1F, single-area, fix)
stamphog 2.6.0 .stamphog/policy.yml @ ab097e4 · reviewed head ab097e4

mayteio commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

/trunk merge

@trunk-io
trunk-io Bot merged commit 8fed973 into master Oct 22, 2026
341 checks passed
@trunk-io
trunk-io Bot deleted the posthog/maildev-reply-to branch October 22, 2026 09:43
@deployment-status-posthog

deployment-status-posthog Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-10-22 10:06 UTC Run
prod-us ✅ Deployed 2026-10-22 10:20 UTC Run
prod-eu ✅ Deployed 2026-10-22 10:22 UTC Run

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

Labels

stamphog Request AI approval (no full review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant