Repository navigation
fix(messaging): send transactional workflow email unless the address hard-bounced - #124638
Conversation
🤖 CI report
|
| First copy | Second copy | Lines | Tokens |
|---|---|---|---|
products/warehouse_sources/backend/temporal/data_imports/sources/incident_io/incident_io.py:17 |
products/warehouse_sources/backend/temporal/data_imports/sources/sendgrid/sendgrid.py:21 |
12 | 116 |
⚠️ Duplication (TypeScript) — 1 new duplicated block (worst 71 tokens)
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.
| First copy | Second copy | Lines | Tokens |
|---|---|---|---|
products/web_analytics/frontend/pageReports/pageReportDetailLogic.ts:242 |
products/web_analytics/frontend/pageReports/pageReportDetailLogic.ts:256 |
12 | 71 |
🚨 Comment density — 15% of added code lines are comments (23 of 154)
This section warns when comments are more than 3% of the code lines a PR adds, and alerts above 6%. Before agent-assisted PRs, the typical share was about 2%. Only full-line comments count. Docstrings, generated files, snapshots, migrations, and workflow files are left out.
Comments that restate the code, record how the change came about, or narrate the next line add noise for the next reader. Keep the comments that explain a reason the code cannot show, and remove the rest. See .agents/skills/writing-code-comments/SKILL.md for the house rules.
Files with the most added comment lines:
| File | Comment lines | Added lines |
|---|---|---|
nodejs/src/cdp/services/messaging/email-suppression.service.ts |
12 | 52 |
nodejs/src/cdp/services/messaging/email-tracking.service.test.ts |
5 | 29 |
nodejs/src/cdp/services/messaging/recipient-preferences.service.ts |
3 | 3 |
nodejs/src/cdp/services/messaging/recipient-preferences.service.test.ts |
2 | 13 |
nodejs/src/cdp/services/messaging/email-suppression.service.test.ts |
1 | 57 |
This check does not block merging. It updates on every push and clears when the share drops.
✅ Django migration risk — migration analysis complete
We've analyzed your migrations for potential risks.
Summary: 1 Safe | 0 Needs Review | 0 Blocked
✅ Safe
Brief or no lock, backwards compatible
messaging.0011_messagesuppression_hard_bounced_at
└─ #1 ✅ AddField
Adding nullable field requires brief lock
model: messagesuppression, field: hard_bounced_at
📚 How to Deploy These Changes Safely
AddField:
This operation acquires a brief lock but doesn't rewrite the table.
Deployment uses lock timeouts with automatic retries, so lock contention will cause retries rather than connection pile-up.
Last updated: 2026-10-29 10:26 UTC (41fed74)
There was a problem hiding this comment.
PostHog Review · Standard · reviewed 5d5a991: 2 Should fix.
This is the only automatic review while this pull request is a draft. Comment @posthog review to review new changes sooner. Otherwise, a review of the new changes runs when you mark it ready for review.
See this review and its findings in PostHog Review. Comment @posthog review --deep for a Deep review. A Deep review takes longer and looks deeper than a Standard review.
|
Risk: No findings This increment hardens the hard-bounce transactional-email rule: Customer.io bounce/invalid imports now set Sentinel reviewed |
5d5a991 to
41fed74
Compare
…hard-bounced Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
41fed74 to
2987914
Compare
|
This pull request was merged into |
…mail Reflects PostHog/posthog#124638 – transactional email (password resets, invoices, login codes) now sends through soft bounces, spam complaints, and manual suppression entries. Only a hard bounce blocks it. Marketing email is unchanged: every suppression still blocks it.
Problem
Changes
hard_bounced_aton every row, manual entries included.hard_bounced_atfirst.COALESCEand the lookup stays a real boolean.hard_bounced_atnow does.Note
An old complaint row that later hard-bounced has no marker. It lets one transactional email through, and that bounce then sets the marker.
How did you test this code?
nodejs/src/cdp/services/messaging/locally: 628 passed.Test rationale:
email-tracking.service.test.tsposts an SES envelope to the webhook route and then runs the pre-send check. It catches a hard bounce that stops marking the row, and a soft bounce or complaint that starts marking it.Release status
Docs update
None in this repo. Public docs that describe the suppression list and transactional email may need a line saying that only hard bounces block transactional email. Not checked.
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Agent: PostHog Slack app (Claude Code), Claude Opus 5.5
Created with PostHog from a Slack thread
🤖 Generated with Claude Code