Skip to content

feat(emails): send cc, bcc and attachments with a code send - #367

Merged
Silthus merged 29 commits into
mainfrom
feat/emails-attachments
Nov 13, 2026
Merged

Silthus merged 29 commits into
mainfrom
feat/emails-attachments

Conversation

@Silthus

@Silthus Silthus commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Merge gate: node-store (#77) and django-facade (#78) live in both regions, the allowlist at * in both regions, and a real send through this SDK version with a real project key, delivered and confirmed by Michael. Then the repo's normal release.

💡 Motivation and Context

An email sent from code often needs a copy to someone else, or a file such as an invoice. The .NET SDK's code send takes neither, so a .NET app falls back to hand-written HTTP for those emails, and inline Base64 capped files at 512 KB in total.

With this PR, SendCodeEmailOptions takes Cc, Bcc and Attachments: up to 10 files and 40 MB per email after Base64 encoding, about 29 MB of files. The SDK names each file by its SHA-256, uploads only the files PostHog doesn't have yet straight to PostHog's file storage, and then sends the email naming the files by hash. A file sent before isn't uploaded again.

await posthog.Emails.SendAsync(new SendCodeEmailOptions
{
    To = "user@example.com",
    TemplateKey = "invoice",
    Subject = "Your invoice",
    Html = "<p>Thanks!</p><img src=\"cid:logo\">",
    Cc = ["finance@example.com"],
    Attachments =
    [
        new EmailAttachment { Filename = "invoice.pdf", Content = await File.ReadAllBytesAsync(path), ContentType = "application/pdf" },
        new EmailAttachment { Filename = "logo.png", Content = logoBytes, ContentId = "logo" },
    ],
});

Ticket: PostHog/michaelr-context#85. Server contract: PostHog/posthog#131664 (upload route), PostHog/posthog#131763 (references on sends), PostHog/posthog#131833 and PostHog/posthog#131944 (cdp-api).

Impact

No SDK metric: the SDK emits no events. The server captures attachment counts and bytes on every send outcome and on the upload route, and that is where code sends with files show up.

Caution

🔴 Merge risk: high · one-way door once the release publishes to NuGet: Cc, Bcc, Attachments and EmailAttachment become public API that apps compile against. Merging starts the release workflow, which waits for a maintainer's approval before it publishes.

  • Worst case is a broken core action: a code send with files from a .NET app fails before it is queued (an upload or a send refused), in both regions. A send never goes out without its files, and sends without files don't change.
  • Code sends that set Cc or Bcc (new; no app can set them before the release) now carry cc and bcc, without files too. A PostHog that doesn't take them refuses with validation_error naming the field and sends nothing. The unit tests cover both against the fake; against a real server that takes them the row is uncovered until the real send (accepted cross-version gap), and a missed bug there fails or misaddresses that copy. Sends that set neither, or set empty lists, send the same body as before (shadow diff).
  • Feature flags: filter equality in LocalEvaluationApiResult reads DependencyChain's count instead of Any(), the CA1860 fix. Null and empty chains compare as before, so no flag outcome changes; the local-evaluation unit tests pass unchanged.
  • Switch-off: the cdp-api attachments allowlist. A team off it gets field_not_accepted before any upload; fix forward.
  • Tier: critical: real sends to customers, and public API that ships to NuGet.

Rollout

  • Stages: merge only after the server side is live and the allowlist is * in both regions; then the normal release.
  • Decided: the SDK checks the 10-file limit and the 40 MB estimate itself, with the server's formula, before any request.
  • Watch: the server's upload-route and send outcomes by error code, for .NET callers.

What it does

  • Options. SendCodeEmailOptions gets Cc and Bcc (bare addresses, at most 10 each) and Attachments, a list of EmailAttachment: Filename, Content as ReadOnlyMemory<byte>, optional ContentType and ContentId (inline as cid:<id>). Unchanged from the earlier version of this PR.
  • Local checks, before any request. More than 10 files throws EmailException too_many_attachments. A message over PostHog's estimate throws message_too_large: 64 KiB, plus the subject as folded encoded words (75 bytes per 42 UTF-8 bytes), plus every file and both bodies as Base64 in 76-character lines, at most 40,000,000 bytes, the server's own formula. Without Text, PostHog sends text it derives from the HTML, so the HTML counts twice: the derived text only drops tags and shortens entities and links, so it is never longer. Both carry Why, Fix, Field = attachments and Name = validation_error, as the server's refusal would. A null file, a blank Filename or an empty file throws ArgumentException.
  • Upload route. POST /api/projects/@current/messaging/attachments/uploads/ with {files: [{sha256, size}]}, once per distinct hash, with the secret key. A file PostHog answers present is skipped. A 404 from the route throws PostHog's own answer, not_found on attachments with its reason, and sends nothing: a PostHog without the route and a project that can't send email from code both answer 404, and the client can't tell them apart.
  • Upload. Each upload file is PUT to the returned URL with the returned method and exactly the returned headers. No Authorization and no X-PostHog-Migrated-From: the URL is presigned. Network errors and the storage's 429 and 5xx answers are retried with the send's retry budget. Any other refusal throws attachment_upload_failed with the storage's HTTP status, its error code and message in Why (for example HTTP 400 BadDigest: ...), and Field = attachments__<i>. No email is sent. Its Name comes from the storage's answer, service_unavailable for 429 and 5xx and application_error otherwise, so an expired URL's 401 or 403 never reads as a missing PostHog key or scope.
  • Upload safety. An http upload URL is refused before any upload with insecure_app_host on attachments__N, naming the file and holding no URL, unless AllowInsecureAppHost, the existing opt-in for local development, is set. No new option. Uploads go through an HttpClient the SDK makes for them, whatever IHttpClientFactory the app passes, whose handler never follows a redirect (AllowAutoRedirect = false): a client that follows a 307 or 308 re-sends the PUT body to the new URL and reports success. A 3xx answer fails that file with attachment_upload_failed, naming the file but never a URL, and sends nothing. That client carries none of the app's handlers or default headers, so neither credentials nor files leave for another host; it uses the system proxy, and PostHogClient owns it and disposes it only after the sends drain, so a host shutting down through AddPostHog still delivers a send whose upload is in flight.
  • Send. After every upload succeeded, the send carries attachments: [{sha256, filename, content_type?, content_id?}] in the caller's order, duplicates included.
  • Retries. The upload route's 429 upload_quota_exceeded is a daily cap, so it isn't retried; its other 429s and 503s are. PostHog's own 500s still aren't.
  • Timeout. A PUT isn't bound by EmailRequestTimeout, which sizes a JSON request; a large file runs until the app's PostHog HttpClient.Timeout (then network_error, "timed out") or the caller cancels (OperationCanceledException).

sdk-specs. openspec/specs/emails/spec.md in PostHog/sdk-specs covers only the template form, with no code form, copies or attachments. This follows the cross-SDK spec for this work in PostHog/michaelr-context#85.

💚 How did you test it?

  • Lane gate at e458830, with main merged in: dotnet restore --locked-mode, bin/fmt --check, dotnet build -c Release (0 warnings), dotnet test -c Release -f net8.0: 1795 passed and 2 skipped in UnitTests, 75 in UnitTests.AspNetCore, 29 in PostHog.AI.Tests. netcoreapp3.1 ran in CI only: this devbox lacks the OpenSSL 1.1 its test host needs.

  • CI at e458830: build, format, packaging, tests on netcoreapp3.1 and net8.0, and semgrep pass.

  • e458830 (runner image fix). GitHub's runner image 20261103 ships the .NET 11 SDK, and with no global.json the build picks it. Its analyzers raised CA1860 on an unchanged line on main (LocalEvaluationApiResult's DependencyChain?.Any()), which failed Package (PostHog.AspNetCore) on those runners only. It now reads is not { Count: > 0 }: the same result for null or empty chains. The whole solution builds with 0 errors under SDK 11.0.100, and the unit tests pass there too.

  • Main merged in at fa2aaad (a merge commit, no rebase). Main's Tracking and Sensitive on code sends sit beside Cc, Bcc and Attachments in SendCodeEmailOptions, the send body and the public API list, and the fake send route accepts sensitive and tracking. The live run and shadow diff below ran again at e458830, the shadow diff against the new merge base 9e9d963; the cross-version run is from 8786a60, before the merge.

  • Release. .changeset/emails-cc-bcc-attachments.md selects PostHog for a minor release. Merging to main starts the release workflow: it waits for a maintainer's approval in the Release environment, then bumps the version, writes the CHANGELOG, and publishes to NuGet.

  • Red, then green. The attachment tests in TheSendAsyncMethodWithAttachments fail on the inline-Base64 code (tests commit 6d18cb5) and pass at HEAD. Each review fix's tests failed on the commit before it: 13 cases on 3ea4218, 1 on 05043cb, 3 on b440ea6, 5 subject cases with the subject left out of the estimate, the empty file on 6d22616, for 698ba37 2 HTML-only cases with the derived text left out of the estimate and the AllowInsecureAppHost upload case with the opt-in ignored, a whitespace-only upload method on 698ba37, and for 0fd6634 the redirect test with the upload client following redirects (both wirings red) and with a 3xx answer quoting the storage's body (both red), and for 9898942 the app-supplied IHttpClientFactory wiring on 0fd6634 (red; the other two wirings green), a stalled upload with the app's timeout removed or replaced by EmailRequestTimeout, caller cancellation with the cancel filter removed, and an upload outlasting EmailRequestTimeout with that timeout applied (each red), and for 352e858 a host shutting down through AddPostHog while an upload is held, red on 9898942.

  • Test seam: a real PostHogClient through Emails.SendAsync against FakePostHogEmails, a stateful fake of the upload route, the file storage and the send route. The upload route answers present for stored files and presigns the rest; the storage takes a PUT only with the signed length and checksum and no other credential, refuses a body whose SHA-256 doesn't match, and stores the bytes; the send route refuses a file it doesn't store. Each route refuses keys outside the real serializers. Tests assert the delivered email (copies, file names, types, content IDs and stored bytes) and the storage's writes, not request strings. Faults the real peers can't be made to give (storage 5xx, a proxy's refusal, garbled answers, the daily cap) are injected and the tests still assert the outcome. Mutation-checked: a bearer token on the PUT, the wrong slice uploaded, a duplicate file asked for twice. The redirect rule runs over real sockets instead, because a fake transport skips the HTTP stack's redirect handling: a real PostHogClient, wired by new PostHogClient, by new PostHogClient with an app's plain services.AddHttpClient() factory, and by services.AddPostHog, against FakePostHogEmails served on loopback, whose storage answers the PUT with a 307 to a second loopback server that must receive nothing. The estimate's edges are hand-computed from the server's formula: 29,182,821 bytes fit beside a subject of up to 42 UTF-8 bytes and 29,182,875 beside an empty one; one more file, subject, HTML or text byte is refused.

  • Shadow diff. The merge base and HEAD ran the same 12 sends without files (template and code sends, refusals 400, 401, 422, 429 and 500, a 503 retry, a validation error, status reads 200 and 404) against one recording server. Requests and outcomes are identical.

  • Live run against real object storage, at e458830. This branch's PostHogClient in a console app; a stand-in for the upload and send routes that presigns PUT URLs the way the cdp-api store does (SigV4, content-length and x-amz-checksum-sha256 signed, the checksum not hoisted into the query); SeaweedFS with credentials, so it checks every signature. Its URLs are plain http, uploaded through AllowInsecureAppHost. The SDK made every request:

    Case Result
    A 1 MB PDF and a 20 KB logo, both new, with Cc and Bcc Both answered upload; both PUT; send accepted. The stored objects' SHA-256 match the bytes.
    The same two files again Both answered present; no PUT; send accepted.
    A 20 MB file Uploaded and sent; the stored object matches.
    A URL signed for another checksum Storage answers 400 BadDigest; attachment_upload_failed, Name application_error, Field attachments__0; the send route is never called.
    A URL that expired before the PUT Storage answers 403 AccessDenied: Request has expired; attachment_upload_failed, Name application_error; no send.
    11 files too_many_attachments; no request at all.
    The upload route answers PostHog's own Endpoint not found. 404 not_found, Field attachments, PostHog's reason as the message; no PUT, no send.
    One file of 29,182,876 bytes message_too_large; no request at all.
    The largest file beside this email's subject and HTML, with the HTML counted again for the derived text, 29,182,749 bytes Uploaded and sent.
    A file that fits only if the subject isn't counted, 29,182,803 bytes message_too_large; no request at all.
    10,000 bytes of HTML and no Text beside a 29,170,000-byte file message_too_large; no request at all.
    The same HTML with a one-byte Text Uploaded and sent.
    An empty file ArgumentException; no request at all.
    The storage host answers the signed PUT with a 307 to another URL attachment_upload_failed, Field attachments__0, no URL in the error; the other URL received nothing; no send.
  • Cross-version, against today's PostHog Cloud (US and EU, a dummy key, at 8786a60): a send with a file asks the upload route, which answers 404 Endpoint not found.; the SDK reports not_found on attachments with that reason and makes no upload and no send. A cc-only send reaches today's send route and stops at authentication (401 authentication_failed).

  • Gaps. No run against a PostHog that has the new routes: the server side is unmerged and runs nowhere yet. The opening stack's real send from PostHog's own team proves that path before this SDK releases.

📝 Checklist

  • All commits are signed (see Commit signing)
  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed. (XML docs on the new members. Usage docs live on posthog.com.)
  • No breaking change or entry added to the changelog.

If releasing new changes

  • Ran pnpm changeset to generate a changeset file (.changeset/emails-cc-bcc-attachments.md, minor)

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Built by Claude Opus 5.5 (claude-opus-5-5, high effort) in Claude Code, directed by Michael. It reworks this PR's inline Base64 attachments into hash, upload, then send, following the cross-SDK spec for moving email attachments to object storage.

Question Answer Who Where
Inline files, or upload then send? Hash, upload what PostHog lacks, then send references 👤 Human PostHog/michaelr-context#85
The limit 10 files and 40 MB per email after Base64 encoding, about 29 MB of files; no per-file cap 👤 Human PostHog/michaelr-context#85
Merge or release now? No: merge after the server side is live and open to every team and a real send through this SDK version is confirmed delivered 👤 Human merge gate above
How the local limits fail EmailException with the server's codes (too_many_attachments, message_too_large), so one catch handles the client's and the server's refusal; ArgumentException stays for a null file, a blank name or an empty file 🤖 Agent this PR
Estimate a send without files? No: the server doesn't, and such a send is bounded by the request cap as content_too_large 🤖 Agent this PR
PUT timeout The HttpClient's own timeout, not EmailRequestTimeout, which a large file can outlast 🤖 Agent this PR
Retry the daily upload cap? No: it lasts until midnight UTC 🤖 Agent this PR
Attachment content type ReadOnlyMemory<byte> only, as before; arrays, slices and pooled buffers fit without a copy 🤖 Agent this PR
Upload transport An HttpClient the SDK makes, owned by PostHogClient and disposed after the sends drain, never one from the app's IHttpClientFactory, that never follows a redirect and carries none of the app's handlers or default headers; the system proxy applies, the app's PostHog Timeout bounds each PUT. Replaces the shared client and its client_authorization_header refusal 👤 Human cross-SDK spec, PostHog/michaelr-context#85
Upload route 404 PostHog's own answer, not_found on attachments, never field_not_accepted: the client can't tell a missing route from email from code being off 👤 Human cross-SDK spec, PostHog/michaelr-context#85
Retry storage 5xx? Yes: a PUT of the same bytes is safe to repeat, and S3 asks clients to retry them 🤖 Agent review round 1
The subject in the estimate Counted as the server counts it, so a send that passes locally isn't refused after its uploads 👤 Human cross-SDK spec, PostHog/michaelr-context#85
Derived text in the estimate Without Text, the HTML counts twice, an upper bound of the text PostHog derives, so a send that passes locally isn't refused after its uploads 👤 Human cross-SDK spec, PostHog/michaelr-context#85
An empty file ArgumentException before any request: the upload route takes only files of at least one byte 🤖 Agent review round 4
The daily upload cap's Name rate_limit_exceeded, as the emails spec names every 429 but quota_limited; Code tells the cap apart, and it isn't retried 🤖 Agent review round 3
Refresh expired upload URLs mid-send? No: they outlast about 29 MB on any link above about 260 kbps, the failure sends nothing, and a resend gets fresh URLs 🤖 Agent PostHog Review, review round 3

Involvement: no grilling rounds, no prototypes; one design pass (GPT-6.1 Sol); review panel round 1 (six lenses, GPT-6.1 Sol and Claude Opus 5.5), round 2 and two final reads (GPT-6.1 Sol); full panels on each new head, rounds 3 to 7 and 9, round 11 over the whole diff at 352e858, and round 12 on the final head 8786a60, which only renames a test variable in place of a comment (nine lenses including the Team perspectives, GPT-6.1 Sol and Claude Opus 5.5); rounds 8 and 10 a single reviewer (GPT-6.1 Sol) where a panel failed to start; PostHog Review; round 13 on e458830 (the main merge and the CA1860 fix), a single reviewer (GPT-6.1 Sol), no findings; live-run and shadow-diff proofs at e458830, cross-version at 8786a60.

🤖 Generated with Claude Code

Silthus and others added 9 commits November 2, 2026 16:03
Add IPostHogClient.Emails, a port of posthog-node's and posthog-python's
emails API. SendAsync sends a template made in PostHog by its ID, or
content the app rendered, named by a template key, as the flat body of
POST /api/projects/@current/messaging/send/email/. GetAsync reads an
email's status. Every attempt of a send carries the same idempotency key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Serialize read-only dictionaries without recursing into the same converter,
  so ReadOnlyDictionary template data no longer overflows the stack.
- Give IPostHogClient.Emails a default implementation where the target allows
  it, as EvaluateFlagsAsync does, so custom implementers keep compiling.
- Drain email requests while the event batch flushes, instead of before it.
- ConfigureAwait(false) on every await in EmailSender, so a synchronous Dispose
  can't deadlock on a captured context.
- Name an invalid AppHost in the missing_app_host message.
- Drop the unused jitter seam, the unreachable body-read fallback and the
  inline comments; use UUID message IDs in the send fixtures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy the entries into a Dictionary and let System.Text.Json's own dictionary
converter write them, so non-string keys keep their JSON property-name format.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Write one property per entry the source enumerates, with the key type's own
JSON property-name converter, instead of copying into a Dictionary whose
default comparer could merge keys the source keeps apart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
System.Text.Json's string converter already applies DictionaryKeyPolicy, so a
custom string key converter keeps working with a naming policy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adding Emails to IPostHogClient broke custom implementers on netstandard2.0,
which has no default interface members. Emails now lives on PostHogClient, and
AddPostHog registers the client's IPostHogEmails for injection.

Dispose() runs DisposeAsync off the caller's synchronization context, so a
synchronous dispose on a single-threaded context can't deadlock while an
email request or the event flush is still running.

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Silthus Silthus self-assigned this Nov 4, 2026
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

posthog-dotnet Compliance Report

Date: 2026-11-13T06:26:54.177693+00:00
Duration: 124552ms

✅ All Tests Passed!

47/47 tests passed


Capture Tests

✅ 30/30 tests passed

View Details
Test Status Duration
Format Validation.Event Has Required Fields ✅ 197ms
Format Validation.Event Has Uuid ✅ 118ms
Format Validation.Event Has Lib Properties ✅ 107ms
Format Validation.Distinct Id Is String ✅ 109ms
Format Validation.Token Is Present ✅ 107ms
Format Validation.Custom Properties Preserved ✅ 111ms
Format Validation.Event Has Timestamp ✅ 106ms
Format Validation.Non Utc Event Timestamp Is Converted To Utc ✅ 115ms
Retry Behavior.Retries On 503 ✅ 8118ms
Retry Behavior.Does Not Retry On 400 ✅ 2113ms
Retry Behavior.Does Not Retry On 401 ✅ 2110ms
Retry Behavior.Respects Retry After Header ✅ 8116ms
Retry Behavior.Implements Backoff ✅ 22130ms
Retry Behavior.Retries On 500 ✅ 6115ms
Retry Behavior.Retries On 502 ✅ 6116ms
Retry Behavior.Retries On 504 ✅ 6117ms
Retry Behavior.Max Retries Respected ✅ 22122ms
Deduplication.Generates Unique Uuids ✅ 112ms
Deduplication.Preserves Uuid On Retry ✅ 6114ms
Deduplication.Preserves Uuid And Timestamp On Retry ✅ 13123ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry ✅ 6116ms
Deduplication.No Duplicate Events In Batch ✅ 110ms
Deduplication.Different Events Have Different Uuids ✅ 107ms
Compression.Sends Gzip When Enabled ✅ 105ms
Batch Format.Uses Proper Batch Structure ✅ 104ms
Batch Format.Flush With No Events Sends Nothing ✅ 104ms
Batch Format.Multiple Events Batched Together ✅ 108ms
Error Handling.Does Not Retry On 403 ✅ 2108ms
Error Handling.Does Not Retry On 413 ✅ 2108ms
Error Handling.Retries On 408 ✅ 6112ms

Feature_Flags Tests

✅ 17/17 tests passed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id ✅ 132ms
Request Payload.Flags Request Uses V2 Query Param ✅ 106ms
Request Payload.Flags Request Hits Flags Path Not Decide ✅ 107ms
Request Payload.Flags Request Omits Authorization Header ✅ 106ms
Request Payload.Token In Flags Body Matches Init ✅ 109ms
Request Payload.Groups Round Trip ✅ 108ms
Request Payload.Groups Default To Empty Object ✅ 105ms
Request Payload.Disable Geoip False Propagates As Geoip Disable False ✅ 107ms
Request Payload.Disable Geoip Omitted Defaults To False ✅ 108ms
Request Payload.Flag Keys To Evaluate Contains Only Requested Key ✅ 106ms
Request Lifecycle.No Flags Request On Init Alone ✅ 3ms
Request Lifecycle.No Flags Request On Normal Capture ✅ 104ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests ✅ 208ms
Request Lifecycle.Mock Response Value Is Returned To Caller ✅ 107ms
Retry Behavior.Retries Flags On 502 ✅ 1107ms
Retry Behavior.Retries Flags On 504 ✅ 1108ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event ✅ 208ms

Silthus and others added 2 commits November 4, 2026 08:04
Also move the older-server note to the SendCodeEmailOptions remarks, so it shows for Cc and Bcc too.

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

Silthus commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

@PostHog review

@posthog

posthog Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

@Silthus PostHog Review is reviewing this pull request.

@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 493972e: no findings.

@Silthus
Silthus marked this pull request as ready for review November 4, 2026 08:38
@Silthus
Silthus requested a review from a team as a code owner November 4, 2026 08:38
stamphog[bot]

This comment was marked as outdated.

@Silthus
Silthus changed the base branch from feat/emails-send to main November 5, 2026 12:09
@stamphog
stamphog Bot dismissed their stale review November 5, 2026 12:09

The PR was retargeted to a different base branch, so the approved diff is no longer what was reviewed. Stamphog re-reviews automatically.

# Conflicts:
#	src/PostHog/Config/PostHogConfigurationBuilder.cs
#	src/PostHog/Emails/EmailSender.cs
#	src/PostHog/Emails/IPostHogEmails.cs
#	src/PostHog/Emails/SendEmailOptions.cs
#	src/PostHog/Examples.cs
#	src/PostHog/PostHogClient.cs
#	src/PostHog/PublicAPI.Unshipped.txt
#	tests/UnitTests/Emails/EmailsTests.cs
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

SDK performance: posthog-dotnet

Benchmarks completed. No changes flagged for review.

Flags require at least a 5% change in the median and all six pairs agreeing on direction. This is a noise filter, not proof of a performance change or a CI gate.

View all results
Test Measurement Before PR With PR Change Assessment
Capture and deliver events (32-byte payload, burst) Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Capture and deliver events (4,096-byte payload, burst) Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Capture and deliver events (32-byte payload, steady) Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Capture and deliver events (4,096-byte payload, steady) Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Queue an event (32-byte payload) Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Queue an event (4,096-byte payload) Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Evaluate all 10 flags Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Evaluate all 100 flags Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Evaluate all 1,000 flags Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Evaluate one boolean flag Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Evaluate a cohort-filtered flag Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Evaluate a flag (early match) Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Evaluate a flag (late match) Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Evaluate a flag (no match) Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Evaluate a property-filtered flag Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Evaluate a regex-filtered flag Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Evaluate a rollout flag Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Evaluate a multivariate flag Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​; head:​ CLR byte counters do not expose exact object allocation counts; native allocations are not included.​
Capture and deliver events (32-byte payload, burst) Allocated memory per operation 5.37 KiB/op 5.37 KiB/op No observed change Not flagged
Capture and deliver events (32-byte payload, burst) Time per operation 5.67 µs/op 5.66 µs/op <0.1% less time Not flagged
Capture and deliver events (32-byte payload, burst) idle_managed_heap_bytes (estimated) 820.79 KiB 821.95 KiB 0.1% more memory Not flagged
Capture and deliver events (32-byte payload, burst) Idle process memory (RSS) 54.07 MiB 55.04 MiB 1.8% more memory Not flagged
Capture and deliver events (32-byte payload, burst) Observed peak process memory (RSS) 56.67 MiB 57.67 MiB 1.8% more memory Not flagged
Capture and deliver events (32-byte payload, burst) Managed heap after settling (estimated) 2.23 MiB 2.24 MiB <0.1% more memory Not flagged
Capture and deliver events (32-byte payload, burst) Process memory after settling (RSS) 56.76 MiB 57.76 MiB 1.8% more memory Not flagged
Capture and deliver events (32-byte payload, burst) Process CPU time per operation 5.69 µs/op 5.7 µs/op 0.2% more time Not flagged
Capture and deliver events (32-byte payload, burst) Lifetime peak process memory (RSS) 56.76 MiB 57.76 MiB 1.8% more memory Not flagged
Capture and deliver events (4,096-byte payload, burst) Allocated memory per operation 39.87 KiB/op 39.87 KiB/op <0.1% less memory Not flagged
Capture and deliver events (4,096-byte payload, burst) Time per operation 20.36 µs/op 19.96 µs/op 2% less time Not flagged
Capture and deliver events (4,096-byte payload, burst) idle_managed_heap_bytes (estimated) 2.13 MiB 2.13 MiB <0.1% less memory Not flagged
Capture and deliver events (4,096-byte payload, burst) Idle process memory (RSS) 55.89 MiB 56.83 MiB 1.7% more memory Not flagged
Capture and deliver events (4,096-byte payload, burst) Observed peak process memory (RSS) 81.08 MiB 81.95 MiB 1.1% more memory Not flagged
Capture and deliver events (4,096-byte payload, burst) Managed heap after settling (estimated) 25.63 MiB 25.63 MiB <0.1% less memory Not flagged
Capture and deliver events (4,096-byte payload, burst) Process memory after settling (RSS) 81.25 MiB 82.12 MiB 1.1% more memory Not flagged
Capture and deliver events (4,096-byte payload, burst) Process CPU time per operation 21.93 µs/op 21.61 µs/op 1.5% less time Not flagged
Capture and deliver events (4,096-byte payload, burst) Lifetime peak process memory (RSS) 81.25 MiB 82.12 MiB 1.1% more memory Not flagged
Capture and deliver events (32-byte payload, steady) Allocated memory per operation 18.15 KiB/op 18.15 KiB/op <0.1% less memory Not flagged
Capture and deliver events (32-byte payload, steady) Time per operation 10.02 µs/op 10.09 µs/op 0.8% more time Not flagged
Capture and deliver events (32-byte payload, steady) idle_managed_heap_bytes (estimated) 820.8 KiB 821.96 KiB 0.1% more memory Not flagged
Capture and deliver events (32-byte payload, steady) Idle process memory (RSS) 54.02 MiB 54.99 MiB 1.8% more memory Not flagged
Capture and deliver events (32-byte payload, steady) Observed peak process memory (RSS) 54.69 MiB 55.57 MiB 1.6% more memory Not flagged
Capture and deliver events (32-byte payload, steady) Managed heap after settling (estimated) 936.71 KiB 937.77 KiB 0.1% more memory Not flagged
Capture and deliver events (32-byte payload, steady) Process memory after settling (RSS) 54.67 MiB 55.56 MiB 1.6% more memory Not flagged
Capture and deliver events (32-byte payload, steady) Process CPU time per operation 10.11 µs/op 10.18 µs/op 0.7% more time Not flagged
Capture and deliver events (32-byte payload, steady) Lifetime peak process memory (RSS) 54.67 MiB 55.56 MiB 1.6% more memory Not flagged
Capture and deliver events (4,096-byte payload, steady) Allocated memory per operation 30.97 KiB/op 30.97 KiB/op <0.1% less memory Not flagged
Capture and deliver events (4,096-byte payload, steady) Time per operation 16.43 µs/op 15.97 µs/op 2.8% less time Not flagged
Capture and deliver events (4,096-byte payload, steady) idle_managed_heap_bytes (estimated) 2.13 MiB 2.13 MiB <0.1% more memory Not flagged
Capture and deliver events (4,096-byte payload, steady) Idle process memory (RSS) 55.95 MiB 56.85 MiB 1.6% more memory Not flagged
Capture and deliver events (4,096-byte payload, steady) Observed peak process memory (RSS) 63.3 MiB 64.24 MiB 1.5% more memory Not flagged
Capture and deliver events (4,096-byte payload, steady) Managed heap after settling (estimated) 3.12 MiB 3.12 MiB <0.1% more memory Not flagged
Capture and deliver events (4,096-byte payload, steady) Process memory after settling (RSS) 59.64 MiB 60.5 MiB 1.4% more memory Not flagged
Capture and deliver events (4,096-byte payload, steady) Process CPU time per operation 19.7 µs/op 18.93 µs/op 3.9% less time Not flagged
Capture and deliver events (4,096-byte payload, steady) Lifetime peak process memory (RSS) 63.12 MiB 64.21 MiB 1.7% more memory Not flagged
Queue an event (32-byte payload) Allocated memory per operation 1.67 KiB/op 1.67 KiB/op No observed change Not flagged
Queue an event (32-byte payload) Time per operation 1.85 µs/op 1.86 µs/op 1% more time Not flagged
Queue an event (32-byte payload) Process CPU time per operation 1.86 µs/op 1.88 µs/op 1% more time Not flagged
Queue an event (4,096-byte payload) Allocated memory per operation 1.67 KiB/op 1.67 KiB/op No observed change Not flagged
Queue an event (4,096-byte payload) Time per operation 1.75 µs/op 1.75 µs/op 0.2% more time Not flagged
Queue an event (4,096-byte payload) Process CPU time per operation 1.76 µs/op 1.76 µs/op 0.1% less time Not flagged
Evaluate all 10 flags Allocated memory per operation 23.91 KiB/op 23.91 KiB/op No observed change Not flagged
Evaluate all 10 flags Time per operation 37.73 µs/op 37.91 µs/op 0.5% more time Not flagged
Evaluate all 10 flags Process CPU time per operation 37.83 µs/op 38.1 µs/op 0.7% more time Not flagged
Evaluate all 100 flags Allocated memory per operation 237.31 KiB/op 237.31 KiB/op No observed change Not flagged
Evaluate all 100 flags Time per operation 348.97 µs/op 348.67 µs/op <0.1% less time Not flagged
Evaluate all 100 flags Process CPU time per operation 350.55 µs/op 349.43 µs/op 0.3% less time Not flagged
Evaluate all 1,000 flags Allocated memory per operation 2.32 MiB/op 2.32 MiB/op No observed change Not flagged
Evaluate all 1,000 flags Time per operation 2.87 ms/op 2.88 ms/op 0.4% more time Not flagged
Evaluate all 1,000 flags Process CPU time per operation 2.87 ms/op 2.88 ms/op 0.4% more time Not flagged
Evaluate 1,000 flags under concurrent load idle_managed_heap_bytes (estimated) 4.65 MiB 4.66 MiB <0.1% more memory Not flagged
Evaluate 1,000 flags under concurrent load Idle process memory (RSS) 107.02 MiB 107.98 MiB 0.9% more memory Not flagged
Evaluate 1,000 flags under concurrent load Observed peak process memory (RSS) 112.7 MiB 113.74 MiB 0.9% more memory Not flagged
Evaluate 1,000 flags under concurrent load Managed heap after settling (estimated) 4.7 MiB 4.7 MiB <0.1% more memory Not flagged
Evaluate 1,000 flags under concurrent load Process memory after settling (RSS) 112.76 MiB 113.79 MiB 0.9% more memory Not flagged
Evaluate 1,000 flags under concurrent load Lifetime peak process memory (RSS) 112.76 MiB 113.79 MiB 0.9% more memory Not flagged
Refresh 1,000 flag definitions idle_managed_heap_bytes (estimated) 19.44 MiB 19.44 MiB <0.1% less memory Not flagged
Refresh 1,000 flag definitions Idle process memory (RSS) 135.37 MiB 136.57 MiB 0.9% more memory Not flagged
Refresh 1,000 flag definitions Observed peak process memory (RSS) 147.75 MiB 148.76 MiB 0.7% more memory Not flagged
Refresh 1,000 flag definitions Managed heap after settling (estimated) 20.43 MiB 20.43 MiB <0.1% less memory Not flagged
Refresh 1,000 flag definitions Process memory after settling (RSS) 146.64 MiB 147.7 MiB 0.7% more memory Not flagged
Refresh 1,000 flag definitions Lifetime peak process memory (RSS) 147.22 MiB 148.2 MiB 0.7% more memory Not flagged
Evaluate one boolean flag Allocated memory per operation 1.1 KiB/op 1.1 KiB/op No observed change Not flagged
Evaluate one boolean flag Time per operation 2.11 µs/op 2.11 µs/op 0.1% more time Not flagged
Evaluate one boolean flag Process CPU time per operation 2.11 µs/op 2.12 µs/op 0.1% more time Not flagged
Evaluate a cohort-filtered flag Allocated memory per operation 1.35 KiB/op 1.35 KiB/op No observed change Not flagged
Evaluate a cohort-filtered flag Time per operation 2.1 µs/op 2.12 µs/op 1% more time Not flagged
Evaluate a cohort-filtered flag Process CPU time per operation 2.1 µs/op 2.13 µs/op 1% more time Not flagged
Evaluate a flag (early match) Allocated memory per operation 2.95 KiB/op 2.95 KiB/op No observed change Not flagged
Evaluate a flag (early match) Time per operation 3.91 µs/op 4.01 µs/op 2.5% more time Not flagged
Evaluate a flag (early match) Process CPU time per operation 3.93 µs/op 4.02 µs/op 2.5% more time Not flagged
Evaluate a flag (late match) Allocated memory per operation 4.57 KiB/op 4.57 KiB/op No observed change Not flagged
Evaluate a flag (late match) Time per operation 5.29 µs/op 5.36 µs/op 1.3% more time Not flagged
Evaluate a flag (late match) Process CPU time per operation 5.3 µs/op 5.36 µs/op 1.1% more time Not flagged
Evaluate a flag (no match) Allocated memory per operation 4.34 KiB/op 4.34 KiB/op No observed change Not flagged
Evaluate a flag (no match) Time per operation 4.63 µs/op 4.68 µs/op 1.1% more time Not flagged
Evaluate a flag (no match) Process CPU time per operation 4.65 µs/op 4.7 µs/op 1% more time Not flagged
Evaluate a property-filtered flag Allocated memory per operation 1.32 KiB/op 1.32 KiB/op No observed change Not flagged
Evaluate a property-filtered flag Time per operation 1.94 µs/op 2 µs/op 2.9% more time Not flagged
Evaluate a property-filtered flag Process CPU time per operation 1.94 µs/op 2 µs/op 2.9% more time Not flagged
Evaluate a regex-filtered flag Allocated memory per operation 5.75 KiB/op 5.75 KiB/op No observed change Not flagged
Evaluate a regex-filtered flag Time per operation 8.34 µs/op 8.34 µs/op <0.1% more time Not flagged
Evaluate a regex-filtered flag Process CPU time per operation 8.35 µs/op 8.36 µs/op <0.1% more time Not flagged
Evaluate a rollout flag Allocated memory per operation 1.2 KiB/op 1.2 KiB/op No observed change Not flagged
Evaluate a rollout flag Time per operation 2.68 µs/op 2.72 µs/op 1.4% more time Not flagged
Evaluate a rollout flag Process CPU time per operation 2.68 µs/op 2.72 µs/op 1.4% more time Not flagged
Evaluate a multivariate flag Allocated memory per operation 1.24 KiB/op 1.24 KiB/op No observed change Not flagged
Evaluate a multivariate flag Time per operation 2.3 µs/op 2.33 µs/op 1.5% more time Not flagged
Evaluate a multivariate flag Process CPU time per operation 2.3 µs/op 2.33 µs/op 1.6% more time Not flagged

Values are medians of paired measurements. Not flagged does not mean unchanged. Unavailable means a measurement could not be provided, not zero. Estimated allocation measurements retain their instrumentation uncertainty. RSS measures the whole process, not just SDK allocations; observed peaks are sampled checkpoints. Paired ranges in the diagnostics describe variability, not confidence intervals.

Compared 9e9d963275fb3e441d89e1342dcce19be13b7103 → e45883092d8d499813a72ba0eeea684d416200aa.

Full report and diagnostics

108 metric rows; 108 rows shown in all results. Omitted or shortened data remain in comparison.json, including per-runner environments, resource limits, measurement methods, samples and checkpoints.

@Silthus
Silthus marked this pull request as draft November 9, 2026 03:25
@Silthus

Silthus commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

Note

🤖 Claude Opus 5.5 responding on behalf of Michael

On hold, and back to draft. The attachments API moves to upload first, then send: the SDK hashes each file, uploads it, and sends a reference instead of Base64 content. This PR gets reworked to that shape, cc and bcc included, and nothing merges until the server side is live.

Silthus and others added 2 commits November 9, 2026 22:02
A send with files asks the upload route which files PostHog lacks, PUTs
each one to the storage URL with exactly the returned headers and no
bearer token, and sends references by SHA-256. It refuses more than 10
files or a message over the 40 MB estimate before any request.

Refs PostHog/michaelr-context#85

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An upload method of only whitespace made HttpMethod throw ArgumentException
on .NET 8, which escaped SendAsync instead of the api_error on the file that
every other unusable upload answer gets.

Refs PostHog/michaelr-context#85

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@stamphog
stamphog Bot dismissed their stale review November 10, 2026 08:26

New commits were pushed — dismissing the stamphog approval from an earlier head. Re-add the trigger label to request a fresh review.

@Silthus

Silthus commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

@PostHog review

@posthog

posthog Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

@Silthus PostHog Review is reviewing this pull request.

@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 bd447e9: 1 Should fix.

This is review round 3 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.

Comment thread src/PostHog/Emails/HashedAttachments.cs Resolved
stamphog[bot]

This comment was marked as outdated.

An HttpClient that follows a 307 or 308 re-sends the PUT body to the new URL
and reports success, so a redirect could carry a file away from the URL
PostHog signed. Uploads now go through their own HttpClient,
PostHogClient.Uploads, whose handler never follows redirects, in both the
default factory and the AddPostHog registration. A 3xx answer fails the
attachment with attachment_upload_failed, naming the file but not the URL.

The upload client carries none of the app's handlers or default headers, so
the client_authorization_header refusal is gone; uploads keep the app
client's Timeout.

The new test runs a real PostHogClient over loopback sockets, through both
wirings, against a storage that redirects the PUT to a second server.

Refs PostHog/michaelr-context#85

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@stamphog
stamphog Bot dismissed their stale review November 10, 2026 08:54

New commits were pushed — dismissing the stamphog approval from an earlier head. Re-add the trigger label to request a fresh review.

@Silthus

Silthus commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

@PostHog review

@posthog

posthog Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

@Silthus PostHog Review is reviewing this pull request.

@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 0fd6634: 1 Should fix.

This is review round 4 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.

Comment thread src/PostHog/Emails/EmailSender.cs Resolved
Uploads now always go through an HttpClient the SDK makes, with a handler
that never follows a redirect, so an app's IHttpClientFactory can no longer
hand out a redirect-following client for them. The client is disposed with
PostHogClient. Tests cover an app-supplied factory over the network, a
stalled upload against the app's HttpClient.Timeout, caller cancellation of
an upload, and an upload outlasting EmailRequestTimeout.

Context: PostHog/michaelr-context#85

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

Silthus commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

@PostHog review

@posthog

posthog Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

@Silthus PostHog Review is reviewing this pull request.

@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 9898942: 1 Should fix.

This is review round 5 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.

Comment thread src/PostHog/Emails/EmailSender.cs Resolved
…ains uploads

EmailSender was IDisposable, so a DI container that handed it out through
AddPostHog disposed it before PostHogClient drained the sends, cutting an
upload in flight. PostHogClient now owns the upload client and disposes it
after the drain; the sender only uses it. A test shuts the host down while
an upload is held and expects the email delivered.

Context: PostHog/michaelr-context#85

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

Silthus commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

@PostHog review

@posthog

posthog Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

@Silthus PostHog Review is reviewing this pull request.

@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 352e858: no findings.

…ng it

Context: PostHog/michaelr-context#85

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

Silthus commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

@PostHog review

@posthog

posthog Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

@Silthus PostHog Review is reviewing this pull request.

@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 8786a60: no findings.

stamphog[bot]

This comment was marked as outdated.

Keeps main's tracking and sensitivity on code sends beside this branch's cc, bcc and attachments: the send body, SendCodeEmailOptions, the public API list and the tests carry both, and the fake send route accepts sensitive and tracking.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@stamphog
stamphog Bot dismissed their stale review November 13, 2026 06:04

New commits were pushed — dismissing the stamphog approval from an earlier head. Re-add the trigger label to request a fresh review.

GitHub's ubuntu-26.04 runner image 20261103 ships the .NET 11 SDK, and with
no global.json the build picks it. Its analyzers raise CA1860 on this line,
which fails `dotnet pack` for PostHog.AspNetCore on those runners. Same
result for null or empty chains; no behavior change.

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

@stamphog stamphog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approved.

The disclosed changes enter risky territory, but the author's STRONG familiarity supplies the policy's assurance path and the diff includes extensive tests. No concrete unresolved reviewer concern or other policy showstopper is evidenced in the supplied context and current code.

  • Author wrote 94% of the modified lines and has 2 merged PRs in these paths (familiarity STRONG).
Gate mechanics and policy version
Gate Result
prerequisites ✓ all clear
deny-list ✓ no deny categories matched
size ✓ 595L, 7F substantive, 1688L/13F incl. docs/generated/snapshots — within ceiling
tier ✓ T1-agent / T1d-complex (1688L, 13F, cross-cutting, feat)
stamphog 2.8.0 .stamphog/policy.yml @ e458830 · reviewed head e458830

@Silthus
Silthus merged commit 43c0c1f into main Nov 13, 2026
25 checks passed
@Silthus
Silthus deleted the feat/emails-attachments branch November 13, 2026 07:01
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.

2 participants