Skip to content

feat(skills): move Brevo sends to PostHog - #465

Draft
Silthus wants to merge 601 commits into
mainfrom
feat/migrate-email-brevo
Draft

Silthus wants to merge 601 commits into
mainfrom
feat/migrate-email-brevo

Conversation

@Silthus

@Silthus Silthus commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Parked until after 2026-11-25. Michael chose SendGrid as the first migrate-email provider on 2026-11-14; this PR stays a draft and resumes after that date, with the slim pass from research/2026-11-14-review-bloat-retro before its next review round.

Problem

A person who sends with Brevo and asks to move those sends to PostHog gets no help: migrate-email has no Brevo variant.

With this PR, migrate-email-brevo moves Brevo sends to PostHog's email send in each language where both Brevo and PostHog have an SDK, and wizard migrate brevo runs it.

Important

Stacked on #472, the core migrate-email skill. The base stays on feat/migrate-email-all-sdks until #472 merges; then this PR lands on top. Each provider PR adds only its own provider and lands in any order: the lists they all touch, config.yaml, AGENTS.md and the skill test's provider list, conflict in one line each as they land.
It adds one provider folder, one config variant, one AGENTS.md row and the provider in the bundle test. The shared steps it uses come from #472.

Impact

Sends that arrive with migratedFrom: 'brevo' show whether people use this skill to move off Brevo. Read it 14 days after the Wizard runs migrate as a family.

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

  • A wrong instruction in this skill silently changes how an agent rewrites someone's Brevo sends: a refusal swallowed, opens counted that Brevo left untracked or anonymized, a template that renders differently, or an address blocked or unblocked in PostHog that Brevo treated otherwise. It shows up only in the person's app, once they deploy the rewrite.
  • Once merged, the skill ships with the next context-mill release to everyone who runs wizard migrate brevo, in every region. Nobody else changes: the shadow diff shows only the new Brevo bundle and its two index entries.
  • Uncovered: the live run, an agent run of the migration on a real app.
  • Blocks PostHog's list can't hold (brevo/account.md "What Step 3 asks about", "Map each entry" and "Blocked domains"): Brevo skips an unsubscribed or admin-blocked address for one sender, and every address on a blocked domain. Since feat(migrate-email): move Resend sends in every PostHog SDK's language #472, PostHog blocks a moved send only to an address that hard-bounced, and its list takes no domains. Every entry is imported with PostHog's reason; a sender-scoped admin block or unsubscribe becomes manual, which stops PostHog's marketing email to that address from every sender, and the report counts those addresses. feat(migrate-email): move Resend sends in every PostHog SDK's language #472's Step 3 question is the guard: Brevo's notes have it name the recipients' own unsubscribes and the blocked domains, read before the question from the API or the dashboard. Each site the person relies on Brevo's list for stays on Brevo; a site they don't name moves, and its sends reach those addresses and domains.
  • Tier: critical: it grades high, and its door turns one-way once agents run it.
  • Switch-off: none. A revert only stops new runs: a migration an agent already ran stays in that app's code and PostHog account (its sender, imported suppressions, key, and the templates it brought into the code).

Rollout

  • Stages: after feat(migrate-email): move Resend sends in every PostHog SDK's language #472 merges, with the other provider PRs; not before the PostHog SDK releases with the code-form email send are live.
  • Decided: we land the provider PRs ourselves once the core skill lands.
  • Watch: sends with migratedFrom: 'brevo' and their error codes in Workflows; no alert pages on a wrong rewrite, since it shows up only in the person's app.

Summary

references/brevo/ holds the three files each variant has:

  • sdk-reference.md: Brevo's SDKs in Node.js, Python, PHP, Ruby, Go, .NET and Java, including the earlier Sendinblue packages and each major version's client and error shape, and the HTTP API. It covers templates stored at Brevo, status reads, webhooks, and the APIs that are not sends.
  • mapping.md:
    • Fields. Each field maps to PostHog's or names what keeps a site on Brevo: a sender saved by id or with a name and no address, more than one to, a replyTo with a name, cc, bcc, attachments, headers other than the idempotency key, tags, scheduledAt, batchId, messageVersions, and a recipient's own tracking setting. An idempotency key moves only when it stays valid for PostHog and the code can't send it again for another email within 24 hours, since Brevo keeps a key for 15 minutes.
    • Tracking. Brevo tracks opens and clicks per recipient unless an account setting changes that, and the API doesn't show those settings, so the person is asked once. Tracking never maps to captureEngagement. Anonymous tracking, per-contact consent, or an unknown answer about them keeps the site, open tracking off included, since a yes to PostHog's pixel doesn't cover how it ties opens to a person. Open tracking off otherwise follows feat(migrate-email): move Resend sends in every PostHog SDK's language #472's Step 3 ask: the site moves only when the person agrees to PostHog's open pixel, and an unknown open-tracking answer keeps it. Opens tracked per recipient moves, with a plan-row note on clicks, which PostHog counts only for a template made in PostHog that isn't marked sensitive. Where Brevo's click tracking was off or unknown, such a template must be marked sensitive, as feat(migrate-email): move Resend sends in every PostHog SDK's language #472's Step 3 says; account.md names the setting.
    • Templates. A template site moves by bringing the template into the code, as feat(migrate-email): move Resend sends in every PostHog SDK's language #472's template-to-code.md says: the code renders Brevo's template language with the site's params and sends the rendered subject and html. A send with its own content and params is rendered the same way. Own content with {{ or {% but no params, or content the code doesn't hold in full, such as content from a database or a CMS, moves only when the person confirms from a sent email what Brevo did with it. A template made in PostHog is used only when the person asks for one, and one for an email with a login code or a reset link is marked sensitive. Every Brevo tag, filter, or placeholder whose output the docs don't pin, such as {{ contact.… }} without an app value, {{ unsubscribe }}, or HTML in a value, keeps the template on Brevo. A template Brevo lists as inactive, or whose status nobody can tell, keeps its site unless the person explicitly agrees that PostHog sends it, noted in the plan row. A Brevo template has no text part of its own, and Brevo's help center says Brevo makes a plain text version of HTML emails itself, so feat(migrate-email): move Resend sends in every PostHog SDK's language #472's check for a template sent with no text part doesn't keep it: the send has html only, and PostHog makes the text part.
    • Errors. Never widen a catch. In Node.js the rethrown error keeps the property the old catch read for each SDK. 400 and 422 or their classes read validation_error; other classes read their status code; a check of the base BrevoError or HttpError reads a fromPostHog mark. A 429 retry skips quota_limited. A branch on BrevoTimeoutError, a 4.x or 5.x BrevoError branch that goes on after the error, a legacy Python except ApiException, or a legacy PHP ApiException catch with Guzzle 7, where a status-0 failure (such as TLS) took another path than other network failures, a Ruby branch on only one of code 0 (connection failure) or no code (timeout), each of which tells one kind of network failure from another under feat(migrate-email): move Resend sends in every PostHog SDK's language #472's shared rule, a branch on Brevo's error code or message text, and code that stores or returns the message id of a send PostHog could refuse as suppressed keep the site on Brevo. So do a read of the response headers of a Brevo send other than its retry delay (x-sib-ratelimit-reset on a 429, which moves to PostHog's error), a Python or PHP send the Brevo SDK runs on a thread or a promise whose answer the code reads later, and a .NET branch on ErrorCode 0; any other branch on status 0 reads network_error. Where the old catch read err.response.statusCode, the rethrown error sets response only when PostHog answered, so a network failure still has none.
    • Deadlines. A send with its own timeout moves and keeps it, as feat(migrate-email): move Resend sends in every PostHog SDK's language #472's Step 7 says. The "HTTP" part names Brevo's options that count: a request timeout, timeoutInSeconds or an abortSignal timeout on @getbrevo/brevo, PHP's 'timeout', and a Go context deadline. The send gets no retries, as the core says. An axios or ky timeout is a limit the PostHog SDK can't keep, so those sites stay, as the core says. Legacy Python's _request_timeout (urllib3's total, or connect and read apart) and Ruby's config.timeout (Typhoeus's whole-request limit) are deadlines the PostHog SDK can't keep, so their sites stay, as the core's rules and rewrite-ruby.md say. Without a deadline, a retry count the code gives Brevo's client or send, such as maxRetries: 0, carries over. A site whose Brevo SDK retried, such as 408 and 5xx answers in the newer SDKs or failed connections through urllib3 in legacy Python, gets a plan-row and report note on the retries it loses, since PostHog's SDK retries network failures and rate limits. A send a caller can cancel stays, unless the PostHog send takes the same cancellation, as in Go and .NET.
    • Webhooks. Each Brevo event maps to a $workflows_email_* event or to none. A unique_opened handler keeps only the first $workflows_email_opened of each send. A handler that matches events by message-id, a tag or X-Mailin-custom keeps its sites on Brevo, a handler of an event PostHog has no event for, such as soft_bounce or deferred, keeps them, and a click handler keeps them unless they move to a template made in PostHog that isn't marked sensitive.
    • Calls that change the blocked list. Listed as adds (smtpBlacklistSender, blockNewDomain) and removes (the contact unblock, deleteHardbounces, the domain unblock), for feat(migrate-email): move Resend sends in every PostHog SDK's language #472's Step 3 question and Step 5's "After cutover" item. A domain unblock adds no item, since PostHog holds no domain. Names match in every SDK's casing.
  • account.md: Brevo's code, DKIM and DMARC records next to PostHog's, and a new restricted API key for this migration with only Transactional email set to Read (a full-access key when the account has no restricted keys); the person deletes it after the suppression import, and a template copy needed later comes from the dashboard. It reads template content and the account's tracking settings, and imports each blocked address once with PostHog's reason, from the dashboard file (by its reason labels) or the API: bounce when any of its entries is a hard bounce, else complaint for a spam complaint, else manual for admin blocks and unsubscribes. Brevo keeps an entry per sender and PostHog keeps an address's first reason, so the order holds within one import, and the re-import tells the person that an address imported earlier as complaint or manual that later hard-bounced stays that way. "What Step 3 asks about" names what feat(migrate-email): move Resend sends in every PostHog SDK's language #472's Step 3 question covers for Brevo. Its "For the report" section counts the addresses imported as manual for one sender's entries only and the blocked domains the moved sends reach.

Evidence

  • Lane gate on ab778d1f: vitest run scripts passes 344 tests in 30 files, the core's section-pointer check for Brevo's files included; node scripts/build.js exits 0 and leaves the tree clean.
  • Test seams (migrate-email-skill.test.js): brevo in the provider list runs the shared per-provider checks: the Brevo bundle holds its three files and the eight rewrite files, every reference resolves, no other provider's folder ships with it, and it is a migrate subcommand.
  • SDK facts checked against package sources for this head: @getbrevo/brevo 4.0.1 and 5.0.0 (BrevoTimeoutError extends Error), 6.2.0 (extends BrevoError, and BrevoError for unknown network failures), 3.0.4 (HttpError only for answers; network errors reject with the raw request error), and brevo-python 1.2.0 and sib-api-v3-sdk 1.1.4 (ApiException(status=0) on TLS failures, a PoolManager without retries, so urllib3's default retries apply, and _request_timeout as urllib3.Timeout(total=…) for one number or connect and read for a pair), the brevo Ruby gem 4.0.0 (ApiError with code 0 for libcurl failures and no code for a timeout, and config.timeout as Typhoeus's limit on the whole request), getbrevo/brevo-php 6.x (BrevoApiException for answers, BrevoException for network failures, and timeout and maxRetries options), @getbrevo/brevo 6.2.0's fetcher (it retries only 408, 429 and 5xx answers, never a request that timed out, and passes one abortSignal to every attempt), and Guzzle 6.5 and 7.9 (ConnectException under RequestException in 6; in 7 only connection errors are ConnectException, the rest such as a certificate failure stay RequestException).
  • SDK source: some error, timeout and retry rules rest on Brevo SDK packages from npm, PyPI, Packagist and RubyGems and on getbrevo source read through raw.githubusercontent.com, after Fleet refused the getbrevo org. The Brevo attachments follow-up rechecks them against Brevo's API reference, OpenAPI spec and docs.
  • Brevo docs for this head's changes: the text part, from Brevo's help center, How do I create/edit the plain text version of HTML emails?, and the template API, Create an email template, which takes no text content. The retry delay, from Rate limit headers, which documents x-sib-ratelimit-reset.
  • Live run: gap. An agent run of this provider's migration on a real app needs the released email SDKs and the production send API; the planned trial on generated codebases runs it after both land. Earlier dry runs on this branch predate the move of templates into the code and are history, not proof for this head.
  • Shadow diff: every bundle built at the base (090ac92b, feat(migrate-email): move Resend sends in every PostHog SDK's language #472's head) and at this head, unpacked and diffed. Only migrate-email-brevo is new, and its 21 shared reference files are byte-identical to migrate-email-resend's. manifest.json and skill-menu.json change only by the build timestamp and the Brevo entries. Every other bundle, Resend's included, is unchanged.
  • Prod shape: gap. The skill reads customers' own codebases, Brevo templates and blocked-contact lists, which no PostHog production store holds to measure branch shares. An earlier survey of public codebases' Brevo send shapes predates the move of templates into the code; the planned trial on generated codebases covers the shapes after the SDK releases.
  • CI: build.yml now runs, as this PR targets main, and passed on 4b89b26f. The gap accepted while the base was feat/migrate-email-all-sdks carries.
🤖 Agent context

Decisions

Question Answer Who Where
When this merges Not before code sends are live and usable for customers, for #451 and every PR on it 👤 Human this PR
Who lands the provider PRs We land them ourselves once the core skill lands, after every ReviewHog finding is addressed and the full QA swarm ran 👤 Human this PR
Which providers Mailgun, Loops, SendGrid, Postmark and SMTP, plus the providers the Wizard detects that a real codebase sends transactional email from 👤 Human Silthus/posthog#461
Brevo tracking Work out opens from the account's settings, asked once. Tracking never maps to captureEngagement: anonymous, per-contact consent or unknown stays; open tracking off moves only with the person's yes to PostHog's open pixel, as #472's Step 3 asks, and an unknown open-tracking answer stays; opens tracked per recipient moves. Replaced moving both off with captureEngagement: false 👤 Michael this PR
Stack shape One PR per provider, each on the core skill (#472) 🤖 Agent #459
Which key reads Brevo A new restricted key the person creates for this migration, Transactional email set to Read and nothing else, or a full-access key when the account offers no restricted key, deleted after the suppression import. Replaced "every Brevo key has full access", which ReviewHog showed is no longer true 🤖 Agent this PR
Which blocked contacts move Every address once, whatever sender its entries name, with PostHog's reason: bounce when any entry is a hard bounce, else complaint for a spam complaint, else manual for admin blocks and unsubscribes. Blocked domains can't be imported and are counted. Sites that rely on Brevo's list for anything but hard bounces stay, through #472's Step 3 question. Replaced asking about sender-scoped entries and domains in Step 5, which #472's reason-based import made moot 🤖 Agent this PR
Error handling PostHog can't reproduce Keep the site on Brevo: a timeout-only branch, a 4.x/5.x BrevoError branch that goes on after the error, and a legacy Python ApiException handler that goes on after an unchecked error. Replaced moving them with a plan-row note 🤖 Agent this PR
A narrow catch on one Brevo error Becomes a catch of PostHog's error that checks the same kind and raises the rest: validation_error for 400 and 422, the status code for the others 🤖 Agent this PR
A send with its own timeout Moves and keeps its deadline with no retries, as #472's shared deadline rule says; mapping.md names which Brevo options count. Without a deadline, the code's retry count carries over, and a site whose Brevo SDK retried answers notes the retries it loses. Replaced keeping it on Brevo 🤖 Agent this PR
Own content with template syntax and no params Moves only when the person confirms from a sent email what Brevo did with it 🤖 Agent this PR
cc, bcc and attachments Stay on Brevo in every language, since no PostHog SDK takes them yet (#472) 🤖 Agent this PR
Merge risk High. Two-way door until the next context-mill release ships the skill, one-way once agents run it, since a migration's changes persist in each app's code and PostHog account. No switch-off: a revert only stops new runs. A wrong instruction silently changes an agent's rewrite of someone's sends, and the live run is uncovered. Shadow diff run; prod shape owed and a gap 🤖 Agent this PR

Disputed finding: #465 (comment), can't be checked: Brevo's docs don't say which failures brevo_csharp's ApiException covers, and Fleet blocks the getbrevo org that holds its source. A .NET branch on ErrorCode 0 keeps its site instead.

Involvement: ReviewHog (2 threads fixed this pass); qa-swarm round 1 on 08d0a751 (fresh-eyes, correctness, risk, design, anti-overengineering, sweep, and Team lenses for Michael and Analytics). Round 2 on 488f076b (fresh-eyes, correctness, risk, design, anti-overengineering, team-michael), GPT-6.1 Sol final reads at 091a3dc1, 0ad04295, bf639d34 (1 finding, fixed) and a1ce8e91 (clean), and ReviewHog on 091a3dc1 (2 findings, fixed), 0ad04295 (1 finding, fixed) and a1ce8e91 (clean). After the forward merge of #472 at 8ead8e1b, a two-family final read on cb03d587 (Opus 5.5 fresh eyes, GPT-6.1 Sol correctness: 5 findings, 4 fixed, 1 rejected), then on af068f58 (3 findings, fixed) and 93767059 (3 minor findings, fixed; correctness clean), the last past the six-read ceiling under Michael's standing review rule, and ReviewHog on 93767059 (1 should-fix, fixed), and 02caea96 (2 minor findings, fixed; correctness clean). After the second forward merge of #472 at 7ccc0ee4, final reads on 415031c3 (1 finding, fixed) and 975be2ef (clean in both families). After the third forward merge of #472 at f6583549, final reads on 5995749c (1 nit, fixed) and e25eb563 (skill text clean in both families). After the fourth forward merge of #472 at 17c6ca15, a final read on 2ecce7f6 (correctness clean; fresh eyes 4 minor: 1 fixed, 1 rejected, 1 for the core's shared test, and this description), then on e3f679be (clean in both families). The judge's risk line on e3f679b found the import left Brevo's sender and domain blocks out, so moved sends could reach those addresses; fixed in 1d094244. After the fifth forward merge of #472 at 090ac92b, which runs the section-pointer check for Brevo's files (the judge's review line), 62700066 says what a re-import does with Brevo's sender and domain blocks. Final read 16 on it (Opus 5.5 fresh eyes: 1 major and 3 minor; GPT-6.1 Sol correctness: 1 major), all fixed in a022e184: per-tenant senders, an unread list, the order of the domain and sender questions, and counts instead of addresses in the report. Final read 17 on a022e184 (both families: a fixed-address site that keeps moving after a domain no skipped the sender check; fresh eyes also: the unread-list path lost the per-tenant rule), fixed in 20e1be77. Final read 18 on 20e1be77 (correctness clean; fresh eyes 1 minor: an unread-list no kept only the sites named), fixed in eb08a7e4. Final read 19 on eb08a7e4 (correctness clean; fresh eyes 2 minor on the unread-list wording and a missing no-answer outcome), fixed in be25dbbb. Final read 20 on be25dbbb (correctness clean; fresh eyes 1 minor: an unread-list "None" skipped the question for a smtpBlacklistSender call), fixed in f9d38606. Final read 21 on f9d38606: clean in both families. ReviewHog on f9d38606 (2 P2: Brevo keys can be restricted; a blockNewDomain call blocks domains after the check), fixed in fd7be30d. Final read 22 on fd7be30d (fresh eyes 3 minor: this description, the core's sync item for a domain block, the Pascal-case name; correctness 1 major: a fixed-address site kept moving with a domain-block call), fixed in 085f02f1. Final read 23 on 085f02f1 (fresh eyes 2 minor: this description, the other calls' SDK casing), fixed in a3bd7dcc; final read 24 on a3bd7dcc clean in both families. ReviewHog on a3bd7dcc (2 P2: a handler reading Retry-After from Brevo's error, .NET network failures), on 141a1e26 (2 P2: blocked contacts with no sender, legacy Python async sends) and on aae92a0c (2 P2: unique_opened handlers, deleteHardbounces), all fixed but the .NET one, disputed below. Fleet blocks the getbrevo GitHub org, so from edd3b493 on, this step cites only Brevo's API reference, OpenAPI spec and docs pages, and drops what only SDK source backed. Final reads 25 to 30 on 141a1e26, aae92a0c, 884dc501, f2ae8f37, a2ed7833 and 22c62242: correctness clean in each; fresh eyes found 2, 5, 3, 2, 2 and 1 (this description), fixed through 22c62242. ReviewHog on 22c62242 (1 P2: an inactive Brevo template would become a live send), fixed in 24c16710; final read 31 on it (correctness clean; fresh eyes: an unknown template status, and this description), fixed in 57a6b7a8. Final read 32 on 57a6b7a8: clean in both families, and ReviewHog on 57a6b7a8: 0 findings; fleet proof gate passes there. After #472 landed, main merged in at 37f22b13, and 4b89b26f adapts Brevo to its reason-based import. Final read 33 on 4b89b26f (correctness clean; fresh eyes 1 major, this description, and 3 minor and 1 nit: the sender-scoped manual entries and the domains go unreported, Step 3 asks before the domains are read, and Brevo's documented wait header is x-sib-ratelimit-reset), fixed in 496de01f. Final read 34 on 496de01f (correctness clean; fresh eyes 1 minor: Step 3 asks before any key is set, so the domains were never read; 1 nit: the dashboard file's sender column), fixed in 3f68103a. Final read 35 on 3f68103a: clean in both families, and fleet proof gate passes there. ReviewHog on 3f68103a (1 should-fix: #472's text-part check would keep every Brevo template), fixed in eca6619c. Final read 36 on eca6619c (correctness clean; fresh eyes 1 minor: this description), and fleet proof gate passes there. ReviewHog on eca6619c (2 should-fix: an address with several Brevo entries could import as manual before its hard bounce; the Node wrapper set response on network failures), fixed in 11be57f3. Final read 37 on 11be57f3 (correctness clean; fresh eyes 3 minor and 1 nit: count addresses, not entries; the order holds within one import only; this description; the Node status list), fixed in 55d01898. Final read 38 on 55d01898 (correctness clean; fresh eyes 1 minor: Step 5's counts are addresses, not Brevo entries; 1 nit: this description), fixed in ab778d1f. Earlier passes on this branch ran 2 panel rounds and 17 final reads before the core skill moved templates into the code. Proof: the shadow diff ran; the live run, prod shape, and CI are gaps.

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

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

🧙 Wizard CI

Run 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:

  • /wizard-ci all

Test all apps in a directory:

  • /wizard-ci ai-observability
  • /wizard-ci basic-integration
  • /wizard-ci feature-flags
  • /wizard-ci mcp-analytics
  • /wizard-ci replay-vision
  • /wizard-ci revenue
  • /wizard-ci self-driving
  • /wizard-ci warehouse
  • /wizard-ci warehouse-seeded

Test an individual app:

  • /wizard-ci ai-observability/anthropic
  • /wizard-ci ai-observability/google-adk
  • /wizard-ci ai-observability/groq
Show more apps
  • /wizard-ci ai-observability/manual-capture
  • /wizard-ci ai-observability/openai
  • /wizard-ci ai-observability/openai-agents
  • /wizard-ci ai-observability/opentelemetry
  • /wizard-ci ai-observability/vercel-ai
  • /wizard-ci basic-integration/android
  • /wizard-ci basic-integration/angular
  • /wizard-ci basic-integration/astro
  • /wizard-ci basic-integration/django
  • /wizard-ci basic-integration/fastapi
  • /wizard-ci basic-integration/flask
  • /wizard-ci basic-integration/flutter
  • /wizard-ci basic-integration/javascript-node
  • /wizard-ci basic-integration/javascript-web
  • /wizard-ci basic-integration/laravel
  • /wizard-ci basic-integration/next-js
  • /wizard-ci basic-integration/nuxt
  • /wizard-ci basic-integration/python
  • /wizard-ci basic-integration/rails
  • /wizard-ci basic-integration/react-native
  • /wizard-ci basic-integration/react-router
  • /wizard-ci basic-integration/sveltekit
  • /wizard-ci basic-integration/swift
  • /wizard-ci basic-integration/tanstack-router
  • /wizard-ci basic-integration/tanstack-start
  • /wizard-ci basic-integration/vue
  • /wizard-ci feature-flags/django
  • /wizard-ci feature-flags/next-js
  • /wizard-ci mcp-analytics/custom-dispatcher
  • /wizard-ci mcp-analytics/typescript-sdk
  • /wizard-ci replay-vision/javascript-node
  • /wizard-ci replay-vision/next-js
  • /wizard-ci replay-vision/react-vite
  • /wizard-ci revenue/stripe
  • /wizard-ci self-driving/astro
  • /wizard-ci self-driving/fastapi
  • /wizard-ci self-driving/nuxt
  • /wizard-ci self-driving/react-router
  • /wizard-ci self-driving/sveltekit
  • /wizard-ci warehouse/monorepo-env
  • /wizard-ci warehouse/multi-source-next
  • /wizard-ci warehouse/stripe-node
  • /wizard-ci warehouse/zero-source
  • /wizard-ci warehouse-seeded/next-stripe
  • /wizard-ci warehouse-seeded/next-stripe-declined

Test against a wizard branch:

  • /wizard-ci all wizard:my-branch

Add wizard:<branch> to any command above to pin the wizard branch. It defaults to main.

Results will be posted here when complete.

Silthus and others added 28 commits November 5, 2026 09:01
Brings #472's Elixir fix (fall back past a nil :posthog host) and each lower provider's move to the rewrite file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
…o feat/migrate-email-sendgrid

No conflicts. The Resend mapping keeps its own list of the coarse names in its stay row, which is a stay rule, not the definition.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings #472's single list of error names in Step 7 and the reply-to rule in each rewrite file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings #472's single list of error names in Step 7 and the reply-to rule in each rewrite file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings #472's single list of error names in Step 7 and the reply-to rule in each rewrite file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings #472's single list of error names in Step 7 and the reply-to rule in each rewrite file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings #472's single list of error names in Step 7 and the reply-to rule in each rewrite file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings #472's single list of error names in Step 7 and the reply-to rule in each rewrite file.

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>
…feat/migrate-email-sendgrid

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings #472's Step 7 rule: behind a reverse proxy, email gets its own client on PostHog's host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings #472's Step 7 rule: behind a reverse proxy, email gets its own client on PostHog's host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings #472's Step 7 rule: behind a reverse proxy, email gets its own client on PostHog's host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings #472's Step 7 rule: behind a reverse proxy, email gets its own client on PostHog's host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings #472's Step 7 rule: behind a reverse proxy, email gets its own client on PostHog's host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings #472's Step 7 rule: behind a reverse proxy, email gets its own client on PostHog's host.

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>
… key) into feat/migrate-email-sendgrid

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings #472's added assertion in the Step 7 proxy test. No skill text changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings #472's added assertion in the Step 7 proxy test. No skill text changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings #472's added assertion in the Step 7 proxy test. No skill text changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings #472's added assertion in the Step 7 proxy test. No skill text changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings #472's added assertion in the Step 7 proxy test. No skill text changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings #472's added assertion in the Step 7 proxy test. No skill text changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A send of a template stored at the provider now moves by bringing the
email into the code: its HTML and text become a file next to the send,
the code renders the variables with the provider's escaping, and the
site sends the code form. A template made in PostHog, sent by its ID,
is used only when the person asks for one.

- template-to-code.md: the check, where the email goes, how each
  language renders it without a new dependency, and the escaping rule.
- Steps 3, 7 and 9: the new default, the template form on request, and
  the report items for emails brought into the code.
- SendGrid: Handlebars in the code, including the helpers the template
  form couldn't take.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Silthus and others added 16 commits November 13, 2026 15:02
…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>
main equals #451's merged head a090b5b, which this branch already contains, so the tree is unchanged from f98eb3b.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Silthus
Silthus changed the base branch from feat/migrate-email-all-sdks to main November 13, 2026 16:26
Silthus and others added 5 commits November 13, 2026 16:27
Map Brevo's reason codes to PostHog's reason values, drop the
per-sender and blocked-domain questions that the new Step 3 question
replaces, strip the sync text from the blocked-list calls, and let a
site that reads only the retry delay of a 429 move.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ender-scoped imports

Read the blocked domains before Step 3's question when the key is set,
count the sender-scoped entries imported as manual and the domains the
moved sends reach, and take Brevo's documented x-sib-ratelimit-reset
as its retry delay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Step 3 asks about the suppression list before any template read, so
offer the API read or the dashboard first, and name the sender column
of the dashboard file the report counts from.

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

@posthog posthog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PostHog Review · Standard · reviewed 3f68103: 1 Should fix.

This is review round 10 on this pull request. When findings keep coming back in the same code, the approach is usually the problem. Before the next fix, check whether a different design would remove the whole class of findings.

#472's template check keeps a template the provider sent with no text
part. A Brevo template has no text part of its own to turn off, and
Brevo makes a plain text version of HTML emails itself, so the check
doesn't keep it.

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

@posthog posthog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PostHog Review · Standard · reviewed eca6619: 2 Should fix.

This is review round 11 on this pull request. When findings keep coming back in the same code, the approach is usually the problem. Before the next fix, check whether a different design would remove the whole class of findings.

Silthus and others added 3 commits November 13, 2026 17:02
… keep Node network failures without a response

Brevo keeps an entry per sender, and PostHog keeps the first reason an
address is imported with, so coalesce entries by address with bounce
taking precedence. Set the Node error's response only when PostHog
answered, so a catch that checks err.response still sees network
failures as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ept across imports

Count addresses, not entries, for the report, say that the bounce-first
order holds within one import, and list the Node status names before
the response condition.

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

@posthog posthog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PostHog Review · Standard · reviewed ab778d1: no findings.

@Silthus
Silthus marked this pull request as draft November 14, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant