Repository navigation
fix(email): stop falling back to customer.io for transactional emails - #125322
Conversation
|
😎 Stack merged successfully - details. |
🤖 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 — 11% of added code lines are comments (14 of 125)
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 |
|---|---|---|
posthog/email.py |
13 | 39 |
posthog/test/test_email.py |
1 | 86 |
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 12:07 UTC (a06f866)
|
Risk: Low · 1 low This delta replaces Celery's default 5/10/20s autoretry for Workflows HTTP send failures with an explicit ~19-minute countdown schedule (10s→600s, 6 retries) driven by Sentinel reviewed |
50602ed to
17dcb43
Compare
A recipient on the Workflows suppression list is now dropped, like an unreachable address. Every other Workflows refusal retries on Workflows instead of sending through Customer.io. A retry stays unpinned when Workflows certainly queued nothing, so turning the flag off still moves it to Customer.io. Generated-By: PostHog Desktop Task-Id: 120fc7fd-3cc1-484a-99ee-da0e2036ca93
Customer.io no longer covers a Workflows outage, so a worker now retries a failed HTTP send after 10s, 30s, 1m, 2m, 5m and 10m instead of 5s, 10s and 20s. The window stops at about 19 minutes because a login code or password reset that arrives later is of no use. SMTP sends keep their existing retries. Generated-By: PostHog Desktop Task-Id: 120fc7fd-3cc1-484a-99ee-da0e2036ca93
52678e3 to
a06f866
Compare
Problem
Changes
Note
Stacked on #124638, which limits transactional suppression to hard bounces. Without it, this PR would drop soft-bounced recipients.
Before:
After:
How did you test this code?
Test rationale: Routing cases expect a drop or failure, not Customer.io. New cases catch paused sending falling back, a needless pin, and a worker skipping the retry schedule.
Ran
test_email.pylocally.Release status
Docs update
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Agent: Claude Code, Opus 5.5 (claude-opus-5-5)
Skills:
/writing-tests,/writing-code-comments,/writing-pr-descriptions,/stacking-prsMore context for AI agents
cross-lane-changebecause the stack mixes Node and Python._send_one,_workflows_queued_nothingand the retry branch in_send_email_nowinposthog/email.py.🤖 Generated with Claude Code
Created with PostHog Desktop