Repository navigation
Conversation
…il route A code send carries the content Django accepted: the rendered email, the sender and the capture choice. cdp-api now takes it on /hog_flows/:id/transactional_email/send and lays it over the email step. The template route ignores a `send` field, so a stored template send never picks up content meant for another route. A cdp-api without this route answers 404, so Django can refuse the send instead of delivering the stored template or nothing. A send's capture_engagement can now turn capture off, never on: a team that turned engagement capture off captures nothing. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The hogflow worker now hydrates a job's workflow with the same primary fallback the transactional routes use, so an email accepted with a 202 is not dropped when the replica misses its new workflow. The fingerprint branches on the parsed send instead of a route argument. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Silthus
force-pushed
the
email-v2/06-template-editor
branch
from
October 25, 2026 11:38
b7e93f2 to
bb9ed7b
Compare
Silthus
force-pushed
the
email-v2/07-send-policy
branch
from
October 25, 2026 11:39
4c04d3c to
5e57bdf
Compare
Silthus
changed the base branch from
email-v2/06-template-editor
to
email-v2/01-cdp-code-send
October 25, 2026 11:49
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Silthus
force-pushed
the
email-v2/01-cdp-code-send
branch
2 times, most recently
from
October 31, 2026 08:38
4182790 to
969011f
Compare
Owner
Author
|
Closing: superseded by the refusal and recipient checks Harley merged upstream (PostHog#123878, PostHog#125908 and the transactional suppression path). The Node chain now runs #565 → #580 → #584. Branch kept for reference. |
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.
Part of the code-first rebuild of the email send stack; replaces parts of PostHog#121083 (one send policy for the email send checks).
Problem
202, using the same checks the email worker runs. Today those checks sit inside the worker's send method, so cdp-api can't reuse them.Impact
Enabler for Grow Workflows: it lets the send API refuse what it can't deliver, instead of a
202that never sends. In scope: CDP email sends. Nothing a person sees changes.Merge Danger
Note
🟡 Merge risk: medium · two-way door: a revert puts the checks back in the send method
Changes
nodejs/src/cdp/services/messaging/email-send-policy.ts: team suspension, workflow pause, sender, recipient and suppression.EmailSuppressionService.findSuppressed. Both the send policy and the recipient preferences check call it; the two runtime checks remain.Mechanical: the whole PR is a refactor. No contract or payload changes. One log line changes, named under Merge Danger.
How did you test this code?
Test seams: the policy through its public check (
email-send-policy.test.ts) and the email service through its send (email.service.test.ts).Test rationale:
email-send-policy.test.ts: a check that moves out of order, or a skip reason that changes.isSuppressedto true, so a suppression check that moves ahead of the missing-recipient check fails.Proofs:
24644bcand at this head over the same 15 invocations: both suspension causes, both pause kinds, each sender failure, a missingto, a suppressedtoorcc, and a suppressedtowith an off-domain From override. Compared: outcome, run log, server log, metrics,skipped, provider calls. One difference, intended: the dropped custom-sender warning above.email_suppressed,email_suspendedandemail_pausedper day hold their level.CI: the fork has no Depot runners, so those jobs never start, and no secret for the project-board app, so
flags-project-boardfails; the other GitHub-hosted checks pass. The lane check passes: against master the PR changes onlynodejs/.Release status
Docs update
None.
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Agent: Claude Code, Claude Opus 5.5 (claude-opus-5-5)
srv2of map Map: send code-managed email templates with one PostHog call #461 from the reviewed fork refactor(cdp): move the email send checks into one send policy #551, with its comments removed.recipientsUnlessToIsMissing, so its name carries what a comment said.tdd,writing-tests,pr-description,writing-pr-descriptions.Involvement: one brief from Michael with decisions; review round 1 (GPT-6.1 Sol team review, Opus fresh eyes) fixed; shadow diff captured.
🤖 Generated with Claude Code