Repository navigation
Conversation
🧙 Wizard CIRun the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands: Test all apps:
Test all apps in a directory:
Test an individual app:
Show more apps
Test against a wizard branch:
Add Results will be posted here when complete. |
The rewrite files pointed at a coarse-name list that only the Resend mapping has. Step 7 now lists the ten names, and each rewrite file points there. Each rewrite file now says whether reply-to takes one address, a list, or both, as the SDK heads do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A client with the secret key loads flag definitions from its host with it: Go and Ruby when they start, Python and .NET when the app evaluates a flag. Reusing the app's client behind a reverse proxy handed the key to the proxy. Step 7 now gives email its own client on PostHog's host behind a proxy, for every SDK, in place of the Go and Ruby special cases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The step 7 proxy test matched only the separate-client wording, so dropping "leave the secret key off the app's existing client" still passed. Assert that clause too; it fails without it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resend's answers carry response headers: headers in Node.js, http_headers in Python, headers and rate-limit fields on Ruby, Go, .NET and Rust errors. PostHog's answer carries none, and its error carries only the retry delay. A site that reads any other header value now stays on Resend, and a read of the retry delay moves to the PostHog error's, with each SDK's name and unit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each PostHog SDK's error shape lives in its rewrite file under "The answer", so the retry delay's name and unit move there, and Resend's mapping keeps only where Resend carries the value. A site that keeps its own deadline sends with no retries, so its own wait and retry stay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resend sends no text part when text is an empty string, on a send or a template, and makes one from the HTML when text is left out. PostHog makes the text part from the HTML whenever a send has none, so a send or template with an empty text now stays on Resend, and one without text moves as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…plate rule per provider Resend also drops the text part for an empty text next to react, and for a text the code builds that can be empty. The shared template rule now keeps any template whose provider sent its emails with no text part, as that provider's mapping says. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pty Text as left out Step 3 reads only the Check part of the template file, so the rule that keeps a template whose provider sent no text part moves there. Resend's Go SDK leaves an empty Text out of the request, so Resend made that text part from the HTML, and such a site moves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ain text off A dashboard copy shows no plain text both for a template without one and for one whose plain text is an empty string. Ask which, or read the template from the API; when nobody can tell, the site stays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tion and keep the answer A dashboard copy has no key to read the template from the API, so the question offers to make one. The answer goes into the template's plan note, so a copy made again in Step 7 asks nothing new. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nly in Step 3 The template's note records its plain text however the template was read, so Step 7 never asks again, and the key is offered only in Step 3, before Step 5 asks the person to delete it. A site stays whenever neither the answer nor the API read settles it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PostHog's bulk add takes only bounce, complaint or manual, and writes its own reason text, such as "Imported (bounced)". The removal guard now keys on that prefix, and the import maps each Resend origin to the reason value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…them PostHog's list records no source an app could check before a removal, a bulk add skips an address removed earlier, and an app can't call the import tool. PostHog blocks a transactional send only to an address that hard-bounced, and records that itself. So each such call becomes a "Before cutover" item. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PostHog blocks a transactional send only to an address that hard-bounced, so the weekly re-import limits mail to bounced addresses, not complaints. A call that removes an address becomes an "After cutover" item the person acts on when a moved send fails with recipient_suppressed. A call that adds one names the action before the deploy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Re-import only now names bounces alone, and an app call that adds an address also records it where the moved sends can skip it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A moved send reaches every address an app's add call put on the provider's list, and an app-side flag misses past adds and survives a reactivation. So Step 3 asks once which sites rely on the call, and keeps them on the provider. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Step 3 asks which sites rely on the provider's list for addresses added by hand or by the app, and a non-answer keeps every site when the app adds addresses itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the list The suppression-list question gets its own Step 3 section, asks only about sites that would move otherwise, keeps them on a non-answer, and says what would let them move. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e work The question now comes right after the field checks, so a site it keeps needs no template copy or PostHog template, and the plan note carries what would let the site move. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
posthog-rs's async email send waits between retries with tokio::time::sleep and sends through reqwest, so a site on async-std or smol stays on Resend. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o feat/migrate-email-mandrill
…t rules Map each Rejection Denylist entry to PostHog's reason, drop the "which adds count" text Step 5 no longer reads, and name the Rejection Denylist and its custom and unsubscribe entries for Step 3's new question. PostHog now makes a text part whenever a send has none, so an HTML send that Mailchimp Transactional sent with no text part stays, and the Sending Defaults' plain-text box joins the account questions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the core does Step 3's Mandrill note said its two entry kinds were the ones a moved send would reach; spam complaints reach it too. Name custom and unsubscribe entries as the ones someone adds, and say complaints go to the report, as Step 5 and Step 9 say for every provider. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without onError, mandrill-api passed every error to its onerror method, which throws outside the call. A moved send's error reaches the code around it instead, so the site stays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Silthus
marked this pull request as draft
November 14, 2026 17:47
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.
Problem
A person who sends with Mailchimp Transactional, formerly Mandrill, and asks to move those sends to PostHog gets no help:
migrate-emailhas no Mailchimp Transactional variant.With this PR,
migrate-email-mandrillmoves Mailchimp Transactional sends to PostHog's email send in each language where PostHog has one, whether the app uses the official SDKs, the oldermandrillclients, a community client or the HTTP API, andwizard migrate mandrillruns it.Important
Stacked on #472, the core
migrate-emailskill. The base staysfeat/migrate-email-all-sdksuntil #472 merges. Each provider PR adds its own provider and lands in any order. The lists they all touch,config.yaml,AGENTS.mdand the skill test, conflict in one line each as they land.It adds one provider folder, one config variant, one
AGENTS.mdrow and the provider in the bundle test. The shared steps it uses come from #472.It waits for the PostHog SDK releases with the code-form email send: nothing in this stack merges until code sends are live and usable for customers.
Impact
Sends that arrive with
migratedFrom: 'mandrill'show whether people use this skill to move off Mailchimp Transactional. Read it 14 days after the Wizard runsmigrateas a family.Merge risk
Caution
🔴 Merge risk: high · two-way door until the next context-mill release ships the skill; one-way once agents run it, because a migration's changes persist in each app's code and PostHog account
wizard migrate mandrillgets an agent that rewrites their Mailchimp Transactional send code, where the base offers no such migration. A wrong instruction silently changes how the agent rewrites sends: a refused recipient that used to pass quietly now fails the send, a site moves that Mailchimp Transactional sent differently, or a denylisted address gets mail. The account-level branches have no run either: a Sending Defaults setting the person names or can't tell, such as the BCC address that copies every send without its ownbcc_address, open tracking, or inline CSS, and the account's rules. A wrong answer there moves a site that then silently loses its BCC copy or its tracking. That row has no live run (gap below), so its residual risk is silent harm once the person deploys the rewrite.mandrillvariant fromconfig.yamlto stop new runs.Rollout
Summary
references/mandrill/holds the three files each variant has:sdk-reference.md: the official packages in Node.js, Python, Ruby and PHP, the oldermandrillclients, community clients in Go, .NET and Elixir, the HTTP API, SMTP and framework mailers. It covers how each reports an error: the Node.js and PHP SDKs answer the error in place of the list, the others raise, and a PHP connection error follows the Guzzle version incomposer.lock(answered with Guzzle 6, thrown with Guzzle 7). Every SDK answers a refused recipient asrejectedorinvalidin a successful answer. It also covers the send fields, stored templates and merge languages, status reads, signed webhooks, and the APIs that are not sends.mapping.md:toentry or none,ccandbccentries,bcc_address, headers other thanReply-To,tags,metadata,attachments,images,subaccount,send_at,ip_pool, custom signing and return-path domains,important,send-raw, SMTP and framework mailers.inline_csskeeps a site only when its HTML has a<style>element, or the code doesn't show that it has none. Atracking_domainis dropped, and the plan row notes that PostHog counts no clicks. A send through the older PHP clientmandrill/mandrill, or a copy of it kept in the app's code under other names, stays: its source is no longer published, so how it failed can't be read.account tracking not checked,account inline CSS not checked,account HTML part not checked,plain-text part not checked,merge language not checked, orsending rule not checked. Since feat(migrate-email): move Resend sends in every PostHog SDK's language #472, PostHog makes a text part whenever a send has none, so an HTML send that Mailchimp Transactional sent with no text part, withauto_text: falseor the plain-text box off, stays:turns the plain-text part off.captureEngagement: PostHog adds its open pixel to every email and counts no clicks for a send in the code form, as Step 7 says. Opens untracked, fromtrack_opens: false, the Sending Defaults or a rule, or in a send with nohtmlandauto_htmloff, which had no HTML part for the pixel, go to Step 3's "Opens the provider didn't track", which moves them only with the person's yes; opens nobody can tell stay (open tracking not checked). Opens tracked moves, and the plan row notes that PostHog counts no clicks when Mailchimp Transactional tracked them and the site moves in the code form.send-mc-templatetemplate, and merge tags in a send's own content move by bringing the email into the code, as the core'stemplate-to-code.mdsays: the code renders the Mailchimp merge language or Handlebars, fillsmc:editregions fromtemplate_content, and sends the rendered subject, HTML, text and from, read from a Mailchimp template's ownsubjectand sender fields forsend-mc-template. Tags and helpers whose output the docs don't define, such as*|UNSUB:…|*,title, partials, or a{{#with}}over a value that can be missing, keep the site. A template in PostHog is made only when the person asks for one, with the Liquid conversions the mapping lists.rejectedrecipient runs only forrecipient_suppressed, handled the way the site handled it, and a branch on onereject_reasonmoves only when the site treatshard-bounce,spamandcustomthe same. A branch onValidationErrorreadsvalidation_error, afterrecipient_suppressed; a branch on aninvalidrecipient alone, or a site that went on for one, becomes a check of the address before the send. Python and Ruby raisenetwork_erroragain, which the old catch never saw. A caller or retry policy that took the HTTP library's base network error also takesnetwork_error; one that took only some network failures, or that the app doesn't own, keeps the site. Atrythat also holds a Mailchimp Transactional call that stays keeps the provider's handler and gets PostHog's next to it. Amandrill-apicall withoutonErrorkeeps the site: the old client threw its errors outside the call, where nocatchsaw them, and a moved send's error reaches the code around it. A replacedonerrorkeeps the site too.$workflows_email_*event. A click maps only for a template made in PostHog that is not marked sensitive: a send in the code form counts no clicks. A handler that matches events by the send's_id, a site that setsmetadata, a click handler on a site that doesn't move to such a template, or a handler of a message event with no PostHog event, such assoft_bounce,deferral,unsuborreject, keeps its sites on Mailchimp Transactional.rejects.add,rejects.deleteandallowlists.addon the main account stay on Mailchimp Transactional, and Step 3 and Step 5 say what to do with each. Step 3's question names the Rejection Denylist and asks about its custom and unsubscribe entries, which PostHog doesn't block for a moved send; a site that relies on them stays (relies on Mailchimp Transactional's suppression list). The bounces that sites still on Mailchimp Transactional add come in through the report's weekly re-import, as Step 5's "Re-import only" says.account.md: Mailchimp Transactional's DKIM, verification and DMARC records next to PostHog's, a read-only key limited totemplates/info,templates/list,mctemplates/infoandrejects/list, the Sending Defaults and rules to ask for, and a template's published version. An account that adds an unsubscribe footer, or can't tell, keeps every site, since PostHog's send adds none. The BCC address in the Sending Defaults keeps every site that sets nobcc_address.sdk-reference.mdhas Step 6 ask which places set a Mailchimp Transactional test key, which delivered nothing, so the report warns that a PostHog key there delivers real email. The suppression import takes the main account's unexpired hard bounces, spam complaints and custom entries from the Rejection Denylist, with PostHog'sreasonbounce,complaintandmanual, and the report tells the person that PostHog keeps an imported hard bounce until removed, where Mailchimp Transactional let it expire after seven days. It leaves out subaccount entries (their sends stay), soft bounces, expired entries and unsubscribes, with the reason why.smtp.mandrillapp.comstay: PostHog has no SMTP relay, as Resend's row says on this base.Evidence
6a28c92, after main merged feat(migrate-email): move Resend sends in every PostHog SDK's language #472:vitest run scriptspasses 344 tests in 30 files, andnode scripts/build.jsbuilds every skill,migrate-email-mandrillincluded, with a clean tree after.fleet proof gateon6a28c92:6a28c92againstmainat8cd7381: only the Mailchimp Transactional bundle and its manifest and skill-menu entries change.main,build.ymlruns, andbuildpasses on6a28c92, with every other check. The CI gap recorded before feat(migrate-email): move Resend sends in every PostHog SDK's language #472 merged no longer applies.migrate-email-skill.test.js): the Mailchimp Transactional bundle resolves every reference, holds its three files and the eight rewrite files and no other provider's folder, never maps open or click tracking onto engagement capture, brings its templates into the code with a template in PostHog only on request, and is amigratesubcommand.f8bc637(2026-11-05), and a prod-shape survey of real codebases' send shapes shaped the rules at733e0e3. They predate bringing templates into the code (32f01fce), the tracking rules (0709579,ac1ef09) and this round's Sending Defaults, rules, inline CSS, merge-language and deadline rules, so they prove none of those.mc:edit, and Handlebars),send-mc-template, merge tags in a send's own content, unknown Sending Defaults (open tracking, inline CSS, HTML part, merge language), the account's rules, PHP, Go, .NET, Elixir, HTTP calls, the older Node.jsmandrill-apicallbacks, community clients, a branch onValidationError, onereject_reasonor a429retry, subaccount sends, request deadlines and cancellable sends, network-error handlers outside the send, atryshared with a call that stays, a replacedmandrill-apionerror, text-only sends without an HTML part, the account's BCC address and unsubscribe footer, test keys,rejects.addandrejects.delete, the Guzzle 6 and 7 split, and the suppression import.Decisions
captureEngagement: opens untracked follow Step 3's "Opens the provider didn't track", moving only with the person's yes; opens nobody can tell stay (open tracking not checked); opens tracked moves, with a plan-row note that PostHog counts no clicks when clicks were tracked. Replaced moving neither tracked withcaptureEngagement: falseand keeping mixed, then keeping every untracked sitetemplate-to-code.mdsays; a template in PostHog only on request. Replaced keeping inline merge tags and moving templates only to a PostHog templateinline_css<style>element or the code can't show it has none. Replaced keeping everyinline_csssiterejectedrecipient_suppressed, handled the way the site handled the rejected recipient. A branch on it runs only forrecipient_suppressed, never for API or network errorsinvalidreject_reasonhard-bounce,spamandcustomthe same, since PostHog answers all three asrecipient_suppressedValidationErrorbecomes a check of PostHog'svalidation_error, a status such as429a check of PostHog's status code, other error names keep the site, never a wider catchnetwork_erroragain, which their old catch never saw; PHP follows the Guzzle version; a catch of every error stays as it is. A caller's handler of the HTTP library's network error follows Step 7's rule on network failures; one in code the app doesn't own keeps the sitesoft_bounce,deferral,unsuborrejectstays (its <event> events feed a webhook handler), as Resend's mapping does on #472mandrill/mandrilltags,metadataaccount adds an unsubscribe footer,account unsubscribe footer not checked): PostHog's send adds none, and recipients would lose their way to stop these emails, as with*|UNSUB:…|*. Replaces the earlier note in the reporttrythat also holds a call that staysmandrill-apionerrorthe client's onerror handler takes its errors)mandrill-apicall withoutonErrorthe old client threw its errors outside the call): the defaultonerrorthrew outside the call, where nocatchsaw it, and a moved send's error reaches the code around it; replaces "moves, since both throw", after the proof gate's quality judgeauto_htmlofftrack_openssays: Mailchimp Transactional's pixel needs an HTML partaccount.mdasks for the Sending Defaults' BCC address. A site that sets nobcc_addresstakes it and stays, as a site that sets one does; when the person can't tell, it stays withaccount BCC address not checkedmigrate-email-smtpfollows once that skill landsrejects.addon an allowlisted addressadded, so an allowlisted address stays off both listsallowlists.addturns the plain-text part off), orplain-text part not checkedwhen the person can't tell the Sending Defaults' plain-text box, matching #472's rule that PostHog always makes a text partInvolvement: qa-swarm on 2026-11-12, 2 panel rounds (round 1: fresh-eyes, correctness, risk, design, anti-overengineering, sweep and the author's ReviewHog perspective; round 2 on the fixes: the same without sweep) and 17 final reads, the last at
339ea45; reads 7 to 17 ran past the cap of six under Michael's standing review rule, to read the ReviewHog fixes and the reconciles after the second, third and fourth core merges. Read 12 read the fifth core merge and its reconcile at0e14a82clean; the proof judge then found the account's BCC address missing, fixed inc01ddcc, which read 13 read clean. ReviewHog then raised five findings over four runs (atryshared with a call that stays, text-only open tracking, a replacedmandrill-apionerror, test keys, and the account's unsubscribe footer), fixed inadd7a56,5eb68e7,e997aeaand339ea45; reads 14 to 16 were clean, and read 17's one finding, an outside-in trial of the last two rules, was rejected as the accepted live-run gap. Earlier swarms on this PR ran before the forward merges. ReviewHog: 9 runs, which raised 10 should-fix findings and 1 must-fix, all fixed; the last run, on339ea45, found nothing. After #472 merged, main was merged in (9f3dcff) and the bundle adapted to #472's shared steps in93bba69: Rejection Denylist entries map to PostHog'sreason, Step 3's suppression question names the Rejection Denylist, and an HTML send Mailchimp Transactional sent with no text part stays. Read 18 raised two findings: the Step 3 note's claim about which entries reach a moved send, fixed indb750a6with complaints left to the report as #472 decides, and a behavioural test, rejected as the accepted live-run gap; read 19 was clean. The proof gate ondb750a6then failed two judges: the merge-risk callout left out the two changes by design (complaint addresses and the hard bounces kept past seven days), now named in it, and amandrill-apicall withoutonErrormoved although its errors had thrown outside the call, fixed in6a28c92. Read 20 on6a28c92was clean. Proof captured: shadow diff at6a28c92againstmain(only the Mailchimp Transactional bundle and its manifest and menu entries change), CI green onmain's workflows; live run and prod-shape recorded as gaps.🤖 Agent context
Agent: Claude Code, Claude Opus 5.5 (
claude-opus-5-5, high), as the migration-skills slice of Silthus/posthog#461. Reviews on GPT-6.1 Sol (high), the fresh-eyes lens on Opus 5.5; fixes on Opus 5.5 (high).🤖 Generated with Claude Code