Repository navigation
Conversation
…opens_and_clicks Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…_and_clicks PostHog never tracks clicks on a code send, so click tracking that is off needs nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace track_opens_and_clicks with tracking in the rewrite step and every SDK's rewrite file. A provider's open tracking that is off turns off the opens switch only, so engagement events stay on. The skill never turns on click tracking, because a link can carry a token, and it notes sites whose provider tracked clicks for the report. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ates Use the Go, Rust and .NET names for tracking. A site that moves to a template made in PostHog sends no tracking, because the template uses its own setting, so the report asks the person to check it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o sensitive A code send takes an optional sensitive flag, and its clicks follow it unless tracking sets them. The skill marks a send sensitive when the old call turned off click tracking for that email or marked it sensitive. It never marks a send as not sensitive, and drops the claim that clicks are always off by default for code sends. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A code send that leaves sensitive out takes the setting of a PostHog template with the same key. The skill can't see the project's templates or tell whether a link carries a token, so a key that matched a template without protection would start rewriting a reset link. Pin the flag on every code send, and say so in the report. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ack-opens-and-clicks Keeps the base's error-handling rules, setup and write-down additions, and Elixir's named-instance send, with this branch's tracking and sensitive rules on top. Step 7 now turns opens off from the plan note instead of waiting for the person's yes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A site whose emails had no open pixel, or whose provider's open tracking nobody can confirm, now moves with the opens switch off instead of staying or waiting for the person's yes. The plan notes it as opens off with its reason, and the report lists those sites, the clicks PostHog no longer counts, and that every code send is marked sensitive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resend's attachments map to the send's attachments in posthog-node: filename, content, content type and inline content ID. A file with a path, no filename, a refused extension, or more than 10 files keeps the site on Resend, as do sites outside JavaScript and TypeScript. Step 8 sends an email with files when a moved site has them, and puts those sites back when PostHog doesn't take files from the project yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Step 3 decides when a site with files stays, whatever the provider, and lists every extension PostHog refuses. Resend's mapping keeps only its own file fields. The report says what would let a staying site move. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o feat/migrate-email-resend-attachments
…nd-clicks' into feat/migrate-email-resend-attachments # Conflicts: # context/skills/migrate-email/references/9-report.md # context/skills/migrate-email/references/resend/mapping.md
Step 7 says what every SDK's code send does with files: the 10-file and 40 MB limits, the upload before the send, and its errors. Each rewrite file names its SDK's field and the form its content takes, since some take only bytes and some read any text string as Base64. The bundled api.md may still call attachments unavailable, so the steps win for files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… list A provider with no suppression list of its own, such as a mailbox provider behind an SMTP host, has no list that grows while sites stay. Step 5 writes that into the plan, and the report then leaves out the weekly re-import ask. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o feat/migrate-email-resend-attachments
A run of migrate-email-resend on an app with a calendar invite showed where the steps fell short. They now cover: - preflight when the MCP sees another project, or the app already sends code emails - a PostHog key under the app's own name, or in the hosting platform's environment - code and docs around the sends: provider-key switches, counts and limits, promises in legal docs and specs, and the app's own PostHog sends, whose engagement setting moved sends follow - a send moved into a runtime the SDK runs in, such as a Convex "use node" action - a deadline that now limits each request of a send with files - an idempotency key built from a hash of the request body - tests of sends with files: the upload requests, and hashing under a faked clock Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- preflight: an app that already sends code emails wins over an MCP that can't see the project; suppressions never import into another project - Step 3 reads the rewrite file's send for the files check, and counts the release Step 7 would install - the email client splits a shared config function, and goes in the file of the runtime the send runs in - one template key for a site that sends several kinds of email - a used-up quota that the old code retried as a 429 is noted - tests: answer at once under a faked clock, answer the app's own PostHog capture, assert on the added fields, and keep the Node digest stub in a setup file outside Convex's folder - the report's notes placeholder closes where it should Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pp's own distinct ID helper Also reads Step 5's MCP check from what Step 2 found, not what it recorded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… a legal text Run 4 worked around both by hand within Step 8. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ce PostHog takes them The real send on prod-eu refused `text/calendar; charset=utf-8; method=REQUEST` with `not_mime_type`: PostHog takes a bare type only. Taking `method` out makes a mail app show a calendar invite as a file. Step 3 marks such a site, Step 8's check email decides, and a refusal puts the site back on the provider rather than stripping the parameters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nt ID in Step 3 A filename takes at most 255 characters and no path separator or control character (unsafe_filename), a content type at most 78 characters, and a content ID at most 78 characters and no angle bracket or control character (unsafe_content_id), as code_send_fields.py on PostHog's master refuses them. A site whose value breaks one stays on its provider with a reason, so each provider's attachments follow-up points here instead of restating them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… content cell Run 5 (Steps 1 to 3 on a fixture with three Resend sends with files) held a user-built filename and passed a fixed one, as the header rules mean, but also held `contentId: "<logo>"`, which Resend's mapping already turns into the bare `logo` the HTML shows. The rules now hold for the value the send passes after the mapping. The re-run moved that site and still held the user-built filename. Each file of a moving site now goes in the plan row's content cell, where both runs had to guess. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ailjet-attachments Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Attachments and InlinedAttachments (v3: Attachments, Inline_attachments) become PostHog's attachments: Filename, ContentType and the Base64 content as they are, and an inline file's ContentID, or its Filename where it has none, as the content ID. Step 3's Files rules decide what stays; a template made in PostHog takes no files. Sources: Mailjet's Send API v3.1 and v3 reference pages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…read the installed client The Mailjet references carried error, timeout, version and turn-off rules that rested on SDK source read past Fleet's Git allowlist and on one npm read. Each now cites dev.mailjet.com, is softened to what Mailjet's pages say, or tells the migrating agent to read the SDK client installed in the person's app and name the file it read. A site the installed client doesn't settle stays with the reason `mailjet client not checked`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🧙 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. |
… file's fields Mailjet's v3 reference names a file's content `Content`, while its v3 guide's samples use `content`, Ruby's `Content-Type` and `inline-attachments`, and Go's struct `ContentType` and `Content`. The mapping now treats each spelling as the same field. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
The Mailjet variant of
migrate-email(#466) keeps every send that setsAttachmentsorInlinedAttachmentson Mailjet, because PostHog's send didn't take files. The PostHog SDKs now send files from code, and #510 teaches the shared steps how. This PR maps Mailjet's own file fields onto them, so a send with an invoice, a receipt or an inline logo can move too. It also rechecks #466's claims about how each Mailjet SDK reports errors, sets timeouts, picks its Send API version and turns off its request. Those claims rested on SDK source read past Fleet's Git allowlist and one npm read, not on Mailjet's own pages.Important
Stacked on #510 (Resend attachments), which is stacked on #486. The base is
feat/migrate-email-mailjet(#466), so the diff includes #486 and #510 until its ancestors land and it is retargeted tomain. Onlyreferences/mailjet/is this PR's change; it merges #510's head41e37f1. Merge order: #472, the providers, #486, #510, then this one.Impact
Moved sends that carry files and arrive with
migratedFrom: 'mailjet'show whether sites with files now move off Mailjet. Read it 14 days after the Wizard runsmigrateas a family with this variant.Warning
🔴 Merge risk: high · two-way door until the next context-mill release ships the skill; one-way for each app once an agent runs it, because a migration's changes persist in that app's code
references/mailjet/mapping.mdandsdk-reference.md. Until the skill ships, nobody runs it, so it changes no running code.Filename. Step 8's check email sends one email with files before cutover, and afield_not_acceptedputs those sites back.Changes
mailjet/mapping.md, "Fields": theAttachmentsandInlinedAttachmentsrows move both lists into PostHog'sattachments, pointing to Step 3 "Files".mailjet/mapping.md, new "Attachments", each field with how it maps:Filenamebecomes the filename, as it is. Mailjet requires one.ContentType(v3Content-type, orContent-Typein Ruby's sample) becomes the content type, as it is; a type with parameters follows feat(migrate-email): move a Resend send's attachments to posthog-node #510's rule and is never stripped.Base64Content(v3Contentin the reference,contentin the v3 guide's samples) becomes the content, as the same Base64 string where the SDK reads one, or decoded where the SDK takes bytes only.ContentIDof an inline file becomes the content ID, the bare ID the HTML shows withcid:.ContentID, and every v3 inline file, takes itsFilenameas the content ID, since the HTML shows it withcid:<Filename>; it must keep PostHog's content ID rules from Step 3.Attachmentscarries no content ID, and an inline file stays inline.Globalsare added to each message's.a template in PostHog takes no files).mailjet/mapping.md, "The fields":AttachmentsandInlinedAttachments, withGlobals' files, become oneattachmentslist.763e989). What Mailjet's pages say stays, re-cited; the rest is softened or becomes an installed-client rule. A site the installed client doesn't settle stays with the new reasonmailjet client not checked, which replacesmailjet-rest version not checkedandmailjet client version not checked.sdk-reference.md:laravel-mailjetenv names are softened to "framework packages use their own names, such as …".MessageswithStatus: "error"is softened: a refused message comes back inMessageswithErrors[].StatusCode, a request-level error has noMessages, and the docs don't give the HTTP status of the whole call.node_modules, the virtualenv,vendor, the bundle, the Go module cache, NuGet) and name the file in the plan row..request()answering{ body, response }, throwing on 400 or more and on network errors, and the error's attributes are softened toresult.bodyand the samples'err.statusCode; the rest is installed-client. The constructor is corrected tonew ClientandapiConnect;confighostandversion, the per-call config winning, v3 as the default and.request(…, false)are re-cited. The 3.xconnectoptions andperform_api_callare installed-client.options.timeoutreaching axios is re-cited to the Node.js page (30000 ms by default since v7);maxRetriesandretryDelayare dropped.MailjetApiErrorand its subclasses, the three retries andApiRateLimitErrorare dropped. They're replaced by the Python page's text: an HTTP error such as400answers arequests.Response,TimeoutErrorandCriticalApiErrorfor network errors, retries on429and5xx.versiondefaulting to v3,timeout=on the client or per call anddry_runare re-cited, without versions.api_urlbecomes a search hint.attributes[:messages]are re-cited.end_point, per-callversion:,CommunicationError,Unauthorized,BadRequestwithcode, the v3.1 invalid-address case andperform_api_callare installed-client.getCountadded,getBodydropped), and so is the PSR-18 transport since 2.0. "Lets Guzzle's exceptions through", the'call'option and the'url'host option are installed-client.(*ResultsV31, error),APIFeedbackErrorsV31,ErrorInfoV31, the result's message-id path,AdvanceErrorHandlingand theReplyTo/Sendertypes are installed-client; only what the samples show stays, includingSandboxMode.SendMailandSetClientare re-cited;SendMailSMTPand the thirdNewMailjetClientargument become search hints.TransactionalEmailResponse,MailjetServerExceptionwithHttpCode,isSandboxMode,SendTransactionalEmailsAsyncand the builder's otherWith…names are installed-client.SendV31.Resourceis re-cited asSend.ResourcewithApiVersion.V3_1;MailjetResponse's members (withGetErrorInfo()), the 5 documentedWith…methods and theHttpClientHandlerargument are re-cited.hostis re-cited; every other client's host option becomes a search hint in the installed client.mapping.md:perform_api_call, PHP's'call'and .NET's sandbox argument are installed-client, and a PHPfalseclient stays unless the installed client shows thepost's options send it.version:,SendV31.ResourceandSendTransactionalEmailsAsyncare removed, and v3 as the default is re-cited. A version the installed client decides but doesn't settle stays ascan't tell which Mailjet Send API it calls.timeout=is re-cited without "from 1.7.0"; PHPsetTimeoutandaddRequestOption, GoWithContextand the gem'sread_timeoutandopen_timeoutare installed-client; the axios claim is re-cited to the Node.js page; the Python 60 s and PHP 15 s and 2 s defaults are dropped, and node-mailjet's 30 s is re-cited; Python's retries are re-cited without the count.PostAsync, .NETSendTransactionalEmailAsync, Go, ".NET, every client" and "A site that read no result" become conditional on what the installed client does. Python'scatches ApiRateLimitErrorbecomescatches a Mailjet error its client never raised. "As Mailjet's Node.js SDK does" is dropped from the raw-HTTP bullet.Live-run fixtures: files
The live run sends each of these through the migrated app and checks the received email, since no wording test can show that bytes and content IDs arrive intact:
Attachmentsfile: the same bytes, filename and content type arrive.InlinedAttachmentsimage and aContentIDthat the HTML shows withcid:: the image renders inline.ContentID, whose HTML showscid:<Filename>: the image renders inline.Globalsand in the message: every file arrives.AttachmentsandInline_attachments, in the spelling the app's SDK sample uses.text/calendar; method=REQUEST: the site stays until PostHog takes it, as feat(migrate-email): move a Resend send's attachments to posthog-node #510 says.Live-run fixtures: installed-client rules
Only a live run tests the agent's read of an installed client. Each rule says what to read and what decides the site; when the client isn't there or doesn't settle it, the site stays as
mailjet client not checked.node-mailjet: which statuses and network errors reject.request().connect(key, secret, options): whether the options set.post's version.perform_api_call.timeoutis taken, and whether it reaches axios.mailjet_rest: which statuses raise, with which class.timeout=limits, and whether a(connect, read)pair reachesrequestsas it is.Send.createtakesversion:.perform_api_call.read_timeoutandopen_timeouton a connection the code builds, and whether the installed version reads them.vendorandcomposer.lock: what a network failure lets through, Guzzle or PSR-18.postoptions such as'call'override afalseclient.setTimeoutandsetConnectionTimeout.WithContext.Mailjet.Api: whetherSendTransactionalEmailAsyncreturns, throws, or splits byMessages.MailjetClientletsHttpRequestExceptionandTaskCanceledExceptionthrough or wraps them.With…names beyond the 5 documented.How did you test this code?
2eb48c6:vitest run scriptspasses 344 tests, andnode scripts/build.jsbuilds every skill,migrate-email-mailjetincluded.AttachmentsandInlinedAttachmentsof{ ContentType, Filename, Base64Content }, optional uniqueContentID,Globals, a 15 MB request), the v3 reference (postsendv3:AttachmentsandInline_attachmentsof{ Content-type, Filename, Content }), the v3.1 guide "Send attached files" (cid:images), and the template content reference (text part, HTML part, MJML and headers, no files).mailjetGitHub org isn't on Fleet's Git allowlist, so the claims rest on the pages above only. No package from a registry is cited.api.us.mailjet.comhost (no live page names it; the rule reads whatever host the app names), theMonitoringCategoryrow (always keeps the site), and the framework packages andin.mailjet.com, which aren't SDK source.Decisions
mailjetorg isn't on Fleet's allowlistmailjet client not checkedContentID, and v3 inline filesFilename, as Mailjet'scid:rule says, held to PostHog's content ID rules400and404answer a response; the version bands are gone and the installed client decides the restInvolvement: the attachments mapping and the recheck of #466's claims were written by agents (Claude Opus 5.5) against Mailjet's docs pages. Cross-family review (GPT-6.1 Sol) with
fleet proof review --scope fixesfrom the merge of #510: round 1 raised two findings, the v3 file content's other spelling (fixed in2eb48c6) and an outside-in trial of sends with files (answered as the owed live run, with the file fixtures above). Owed proofs recorded: live run, prod shape and shadow diff, for the gate after the retarget.🤖 Generated with Claude Code