Skip to content

feat: send email content from code with posthog.emails.send - #1171

Merged
Silthus merged 8 commits into
mainfrom
feat/emails-code-form
Nov 5, 2026
Merged

Silthus merged 8 commits into
mainfrom
feat/emails-code-form

Conversation

@Silthus

@Silthus Silthus commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

💡 Motivation and Context

A Python backend that renders its own email can't send it through PostHog today. emails.send takes only a template made in PostHog, by its ID. This PR adds the code form to emails.send, beside the template form from #1093. It matches posthog-node in PostHog/posthog-js#5509. The SDK contract is PostHog/sdk-specs openspec/specs/emails/spec.md, plus the draft change add-emails-code-form.

posthog.emails.send(
    to="[email protected]",
    distinct_id="user_123",
    template_key="password-reset",
    subject="Reset your password",
    html=rendered_html,  # React email: render it to HTML in your app first
)

Moved from Silthus#2. Part of map Silthus/posthog#461.

Caution

Merge risk: medium, one-way door once released. A release makes the new keyword names and the migrated_from client option a public contract.

Do not merge before the server deploys. The code form depends on the code arm of send/email/ in PostHog/posthog #127122 and #127123. Until both deploy, a code send gets a 400. Merge and release this after them.

Changes:

  • Two forms, one send, typed with Unpack and one @overload each, on Emails and AsyncEmails. A mix of the two forms raises TypeError before any request.
  • Rendered content posts a flat body to POST /messaging/send/email/: template_key, subject, html and/or text, and a flat distinct_id, as master's flat body (feat: send a flat body from emails.send #1155) has it.
  • Engagement capture belongs to the code form, True by default. The template form refuses it.
  • The code form also takes from_, reply_to and max_retries. migrated_from is a client option. None counts as left out.
  • Out of scope for now: local templates (template_data on a code send, the content hash, the upload by key), cc, bcc, headers, tags and attachments. A code send with any of them raises TypeError.

💚 How did you test it?

Test seams: Emails.send and AsyncEmails.send on a real client with the HTTP transport faked, and .github/scripts/check_strict_types.sh under pyright strict. The tests pin each code-form body and each refusal, including the parked fields.

Proof at b93ea5c, through fleet proof (the gate passes):

  • Live run: code sends and template sends from posthog-python against the server code send at 20fad8c, delivered into a mail catcher. At b93ea5c, a code send with reply_to=[] is accepted and delivered, and the old body with reply_to: [] gets a 400.
  • Cross-version: this head and the released SDK against master's server, a server with old CDP pods, and the PR server. Master's server answers a code send with a 400.
  • Shadow diff: request bodies and results at main and at this head, each difference classified as intended.
  • Production shape: the SDK reads no stored data; the server's sender inputs are measured on #127123.

📝 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.
  • No breaking change or entry added to the changelog.

If releasing new changes

  • Ran sampo add to generate a changeset file

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

  • Written by Claude Code, Claude Opus 5.5 (claude-opus-5-5), as lane sdk3 of map Map: send code-managed email templates with one PostHog call Silthus/posthog#461, directed by Michael.
  • e654aef merges main with the flat body. 20fad8c cuts the local-template form and the extra fields, per Michael's scope cut. 9a4dd48 adds tests for the async code-form send and migrated_from. b93ea5c leaves an empty reply_to list out of the body, because the server refuses one.
  • Reviews: on the fork, a GPT-6.1 Sol full read, then a QA swarm with GPT-6.1 Sol and Claude Opus 5.5 fresh eyes. Here, GPT-6.1 Sol reads of the cut, the last a final read at b93ea5c.
  • Decisions: from_ names from; distinct_id is flat in both forms; argument errors stay TypeError and ValueError, as 7.81.0 has them; local templates and the extra fields wait for their server slice.

🤖 Generated with Claude Code

Squash of Silthus#2 at e5fdedf, re-signed for required signatures.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

posthog-python Compliance Report

Date: 2026-11-05T11:05:05.680101+00:00
Duration: 260157ms

✅ All Tests Passed!

121/121 tests passed


Capture_V1 Tests

✅ 95/95 tests passed

View Details
Test Status Duration
Endpoint And Method.Targets V1 Endpoint ✅ 517ms
Endpoint And Method.Does Not Use Legacy Endpoints ✅ 512ms
Required Headers.Has Authorization Bearer Header ✅ 513ms
Required Headers.Has Content Type Json ✅ 512ms
Required Headers.Has Posthog Sdk Info Format ✅ 512ms
Required Headers.Has Posthog Attempt Header ✅ 512ms
Required Headers.Has Posthog Request Id ✅ 511ms
Required Headers.Has Posthog Request Timestamp ✅ 512ms
Required Headers.Has User Agent ✅ 512ms
Body Format.Body Has Created At And Batch ✅ 512ms
Body Format.No Api Key In Body ✅ 511ms
Body Format.No Sent At In Body ✅ 512ms
Event Format.Event Has Required Root Fields ✅ 512ms
Event Format.Event Uuid Is Valid ✅ 512ms
Event Format.Event Timestamp Is Rfc3339 ✅ 513ms
Event Format.Non Utc Event Timestamp Is Converted To Utc ✅ 527ms
Event Format.Distinct Id Is String ✅ 512ms
Event Format.Distinct Id At Root Not Properties ✅ 512ms
Event Format.Custom Properties Preserved ✅ 512ms
Event Format.Set Properties Preserved ✅ 511ms
Event Format.Set Once Properties Preserved ✅ 513ms
Event Format.Groups Properties Preserved ✅ 512ms
Event Format.Sdk Generates Uuid If Not Provided ✅ 512ms
Event Format.Event Has Required Root Fields Batch ✅ 515ms
Event Format.Event Uuid Is Valid Batch ✅ 515ms
Event Format.Event Timestamp Is Rfc3339 Batch ✅ 516ms
Event Format.Distinct Id Is String Batch ✅ 514ms
Event Format.Distinct Id At Root Not Properties Batch ✅ 515ms
Event Format.Custom Properties Preserved Batch ✅ 516ms
Event Format.Set Properties Preserved Batch ✅ 515ms
Event Format.Set Once Properties Preserved Batch ✅ 516ms
Event Format.Groups Properties Preserved Batch ✅ 515ms
Event Format.Sdk Generates Uuid If Not Provided Batch ✅ 515ms
Batch Behavior.Multiple Events In Single Batch ✅ 519ms
Batch Behavior.Batch Envelope Smoke ✅ 518ms
Batch Behavior.Flush With No Events Sends Nothing ✅ 509ms
Batch Behavior.Flush At Triggers Batch ✅ 1013ms
Batch Behavior.Created At Reflects Batch Creation Time ✅ 512ms
Deduplication.Generates Unique Uuids ✅ 519ms
Deduplication.Different Events Same Content Different Uuids ✅ 513ms
Deduplication.Preserves Uuid On Retry ✅ 6521ms
Deduplication.Preserves Timestamp On Retry ✅ 6522ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry ✅ 6525ms
Deduplication.No Duplicate Events In Batch ✅ 521ms
Header Behavior On Retry.Attempt Header Starts At One ✅ 512ms
Header Behavior On Retry.Attempt Header Increments On Retry ✅ 13522ms
Header Behavior On Retry.Request Id Preserved On Retry ✅ 6519ms
Header Behavior On Retry.Different Requests Have Different Request Ids ✅ 3022ms
Header Behavior On Retry.Request Timestamp Changes On Retry ✅ 6521ms
Response Format Validation.Success Response Has Uuid Keyed Results ✅ 512ms
Response Format Validation.Success Response Has Ok For Each Event ✅ 516ms
Response Format Validation.Success No Retry After When All Ok ✅ 513ms
Response Format Validation.Success Retry After Present When Retry Events ✅ 1518ms
Response Format Validation.Success No Retry After When Drop Only ✅ 514ms
Response Format Validation.Response Echoes Request Id ✅ 512ms
Retry Behavior.Retries On 408 ✅ 6519ms
Retry Behavior.Retries On 500 ✅ 6517ms
Retry Behavior.Retries On 503 ✅ 8525ms
Retry Behavior.Retries On 504 ✅ 6521ms
Retry Behavior.Retryable Errors Have Retry After ✅ 3517ms
Retry Behavior.Respects Retry After On Retryable Error ✅ 11523ms
Retry Behavior.Does Not Retry On 400 ✅ 2515ms
Retry Behavior.Does Not Retry On 401 ✅ 2515ms
Retry Behavior.Does Not Retry On 402 ✅ 2515ms
Retry Behavior.Does Not Retry On 413 ✅ 2514ms
Retry Behavior.Does Not Retry On 415 ✅ 2515ms
Retry Behavior.Non Retryable Errors Have No Retry After ✅ 2515ms
Retry Behavior.Implements Backoff ✅ 22536ms
Retry Behavior.Max Retries Respected ✅ 22539ms
Partial Batch Handling.Handles 200 Full Success ✅ 2514ms
Partial Batch Handling.Handles 200 With All Ok ✅ 3518ms
Partial Batch Handling.Does Not Retry Dropped Events ✅ 3518ms
Partial Batch Handling.Does Not Retry Limited Events ✅ 3517ms
Partial Batch Handling.Prunes Ok Events On Partial Retry ✅ 6521ms
Partial Batch Handling.Prunes Dropped Events On Partial Retry ✅ 6523ms
Partial Batch Handling.Retries Only Retry Events From Partial ✅ 6520ms
Partial Batch Handling.Partial Retry Preserves Uuids ✅ 6522ms
Partial Batch Handling.Partial Retry Attempt Header Increments ✅ 6520ms
Partial Batch Handling.Partial Retry Request Id Preserved ✅ 6522ms
Partial Batch Handling.Respects Retry After On Partial ✅ 8523ms
Partial Batch Handling.Unknown Result Treated As Terminal ✅ 3517ms
Partial Batch Handling.Mixed Ok Drop Limited No Retry ✅ 3520ms
Compression.Sends Gzip Content Encoding ✅ 512ms
Compression.No Content Encoding When Disabled ✅ 512ms
Compression.Compressed Body Is Decompressible ✅ 511ms
Error Handling.Does Not Retry On Unknown 4Xx ✅ 2513ms
Event Options.Cookieless Mode Override ✅ 512ms
Event Options.Disable Skew Correction Override ✅ 511ms
Event Options.Process Person Profile Override ✅ 511ms
Event Options.Product Tour Id Override ✅ 512ms
Event Options.Unset Options Omitted ✅ 511ms
Event Options.Options Override In Batch ✅ 514ms
Geoip And Historical Migration.Geoip Disable Injected Into Properties ✅ 512ms
Geoip And Historical Migration.Historical Migration Set In Body ✅ 512ms
Geoip And Historical Migration.Historical Migration Absent By Default ✅ 512ms

Capture_Ai Tests

✅ 5/5 tests passed

View Details
Test Status Duration
Routing.Capture Ai Posts To Ai Endpoint ✅ 512ms
Routing.Capture Does Not Reroute Ai Named Events ✅ 511ms
Identity.Capture Ai Event Has Uuid ✅ 511ms
Identity.Capture Ai Keeps Supplied Uuid ✅ 512ms
Timestamp Format.Non Utc Event Timestamp Is Converted To Utc ✅ 511ms

Feature_Flags Tests

✅ 17/17 tests passed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id ✅ 13ms
Request Payload.Flags Request Uses V4 Query Param ✅ 9ms
Request Payload.Flags Request Hits Flags Path Not Decide ✅ 10ms
Request Payload.Flags Request Omits Authorization Header ✅ 9ms
Request Payload.Token In Flags Body Matches Init ✅ 9ms
Request Payload.Groups Round Trip ✅ 10ms
Request Payload.Groups Default To Empty Object ✅ 9ms
Request Payload.Disable Geoip False Propagates As Geoip Disable False ✅ 10ms
Request Payload.Disable Geoip Omitted Defaults To False ✅ 10ms
Request Payload.Flag Keys To Evaluate Contains Only Requested Key ✅ 9ms
Request Lifecycle.No Flags Request On Init Alone ✅ 4ms
Request Lifecycle.No Flags Request On Normal Capture ✅ 509ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests ✅ 16ms
Request Lifecycle.Mock Response Value Is Returned To Caller ✅ 10ms
Retry Behavior.Retries Flags On 502 ✅ 314ms
Retry Behavior.Retries Flags On 504 ✅ 315ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event ✅ 513ms

Feature_Flags_Local_Evaluation Tests

✅ 4/4 tests passed

View Details
Test Status Duration
Versioned Boolean Matching.Matching Version Missing ✅ 69ms
Versioned Boolean Matching.Matching Version 1 ✅ 64ms
Versioned Boolean Matching.Matching Version 2 ✅ 64ms
Versioned Boolean Matching.Version Only Reload 1 2 1 2 Missing ✅ 37ms

Silthus and others added 2 commits November 2, 2026 14:50
Takes the flat send body from #1155, and sends a flat distinct_id
from the local-template form too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Parks the local-template form (template_data on a code send, the
content hash, the upload by key and its retry) and the cc, bcc,
headers, tags and attachments fields, to match posthog-node. A code
send now takes rendered html and/or text only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

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

See this review and its findings in PostHog Review. Comment @posthog review --deep for a Deep review. A Deep review takes longer and looks deeper than a Standard review.

Comment thread posthog/emails.py Resolved

@marandaneto marandaneto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The code looks good; no qualifying findings. Verdict: correct.

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

SDK performance: posthog-python

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)
Shard: capture
Managed heap after settling — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CPython has no uninstrumented total managed-heap byte counter; tracing would distort this RSS pass.​; head:​ CPython has no uninstrumented total managed-heap byte counter; tracing would distort this RSS pass.​
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Managed heap after settling — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CPython has no uninstrumented total managed-heap byte counter; tracing would distort this RSS pass.​; head:​ CPython has no uninstrumented total managed-heap byte counter; tracing would distort this RSS pass.​
Capture and deliver events (32-byte payload, steady)
Shard: capture
Managed heap after settling — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CPython has no uninstrumented total managed-heap byte counter; tracing would distort this RSS pass.​; head:​ CPython has no uninstrumented total managed-heap byte counter; tracing would distort this RSS pass.​
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Managed heap after settling — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CPython has no uninstrumented total managed-heap byte counter; tracing would distort this RSS pass.​; head:​ CPython has no uninstrumented total managed-heap byte counter; tracing would distort this RSS pass.​
Queue an event (32-byte payload)
Shard: capture
Allocated memory per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ Background preparation has no public completion boundary before flush; see capture.​drain for full-pipeline allocations.​; head:​ Background preparation has no public completion boundary before flush; see capture.​drain for full-pipeline allocations.​
Queue an event (32-byte payload)
Shard: capture
Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ Background preparation has no public completion boundary before flush; see capture.​drain for full-pipeline allocations.​; head:​ Background preparation has no public completion boundary before flush; see capture.​drain for full-pipeline allocations.​
Queue an event (4,096-byte payload)
Shard: capture
Allocated memory per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ Background preparation has no public completion boundary before flush; see capture.​drain for full-pipeline allocations.​; head:​ Background preparation has no public completion boundary before flush; see capture.​drain for full-pipeline allocations.​
Queue an event (4,096-byte payload)
Shard: capture
Allocations per operation — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ Background preparation has no public completion boundary before flush; see capture.​drain for full-pipeline allocations.​; head:​ Background preparation has no public completion boundary before flush; see capture.​drain for full-pipeline allocations.​
Evaluate 1,000 flags under concurrent load
Shard: flags-memory
Managed heap after settling — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CPython has no uninstrumented total managed-heap byte counter; tracing would distort this RSS pass.​; head:​ CPython has no uninstrumented total managed-heap byte counter; tracing would distort this RSS pass.​
Refresh 1,000 flag definitions
Shard: flags-memory
Managed heap after settling — — — unavailable; base:​ unsupported; head:​ unsupported; base:​ CPython has no uninstrumented total managed-heap byte counter; tracing would distort this RSS pass.​; head:​ CPython has no uninstrumented total managed-heap byte counter; tracing would distort this RSS pass.​
Capture and deliver events (32-byte payload, burst)
Shard: capture
Allocated memory per operation 113.54 KiB/op 113.54 KiB/op <0.1% less memory Not flagged
Capture and deliver events (32-byte payload, burst)
Shard: capture
Allocations per operation 1,096.59 count/op 1,096.57 count/op <0.1% fewer Not flagged
Capture and deliver events (32-byte payload, burst)
Shard: capture
Time per operation 50.3 µs/op 50.4 µs/op 0.2% more time Not flagged
Capture and deliver events (32-byte payload, burst)
Shard: capture
Idle process memory (RSS) 35.98 MiB 36.02 MiB 0.1% more memory Not flagged
Capture and deliver events (32-byte payload, burst)
Shard: capture
Observed peak process memory (RSS) 37.73 MiB 37.76 MiB <0.1% more memory Not flagged
Capture and deliver events (32-byte payload, burst)
Shard: capture
Process memory after settling (RSS) 37.73 MiB 37.76 MiB <0.1% more memory Not flagged
Capture and deliver events (32-byte payload, burst)
Shard: capture
Process CPU time per operation 51.56 µs/op 51.4 µs/op 0.3% less time Not flagged
Capture and deliver events (32-byte payload, burst)
Shard: capture
Lifetime peak process memory (RSS) 40.21 MiB 40.21 MiB No observed change Not flagged
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Allocated memory per operation 166.1 KiB/op 166.1 KiB/op <0.1% more memory Not flagged
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Allocations per operation 1,089.57 count/op 1,089.58 count/op <0.1% more Not flagged
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Time per operation 71.45 µs/op 70.92 µs/op 0.8% less time Not flagged
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Idle process memory (RSS) 40.77 MiB 40.81 MiB <0.1% more memory Not flagged
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Observed peak process memory (RSS) 45.87 MiB 45.91 MiB <0.1% more memory Not flagged
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Process memory after settling (RSS) 45.88 MiB 45.91 MiB <0.1% more memory Not flagged
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Process CPU time per operation 67.29 µs/op 66.1 µs/op 1.8% less time Not flagged
Capture and deliver events (4,096-byte payload, burst)
Shard: capture
Lifetime peak process memory (RSS) 50.62 MiB 50.81 MiB 0.4% more memory Not flagged
Capture and deliver events (32-byte payload, steady)
Shard: capture
Allocated memory per operation 117.68 KiB/op 117.68 KiB/op <0.1% less memory Not flagged
Capture and deliver events (32-byte payload, steady)
Shard: capture
Allocations per operation 1,136.6 count/op 1,136.58 count/op <0.1% fewer Not flagged
Capture and deliver events (32-byte payload, steady)
Shard: capture
Time per operation 60.82 µs/op 58.69 µs/op 3.5% less time Not flagged
Capture and deliver events (32-byte payload, steady)
Shard: capture
Idle process memory (RSS) 35.77 MiB 35.99 MiB 0.6% more memory Not flagged
Capture and deliver events (32-byte payload, steady)
Shard: capture
Observed peak process memory (RSS) 35.89 MiB 36.09 MiB 0.6% more memory Not flagged
Capture and deliver events (32-byte payload, steady)
Shard: capture
Process memory after settling (RSS) 35.89 MiB 36.09 MiB 0.6% more memory Not flagged
Capture and deliver events (32-byte payload, steady)
Shard: capture
Process CPU time per operation 60.91 µs/op 58.54 µs/op 3.9% less time Not flagged
Capture and deliver events (32-byte payload, steady)
Shard: capture
Lifetime peak process memory (RSS) 40.21 MiB 40.21 MiB No observed change Not flagged
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Allocated memory per operation 170.57 KiB/op 170.57 KiB/op <0.1% more memory Not flagged
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Allocations per operation 1,129.45 count/op 1,129.45 count/op <0.1% fewer Not flagged
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Time per operation 74.91 µs/op 77.53 µs/op 3.5% more time Not flagged
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Idle process memory (RSS) 40.65 MiB 40.66 MiB <0.1% more memory Not flagged
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Observed peak process memory (RSS) 40.67 MiB 40.66 MiB <0.1% less memory Not flagged
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Process memory after settling (RSS) 40.67 MiB 40.66 MiB <0.1% less memory Not flagged
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Process CPU time per operation 71.84 µs/op 75.37 µs/op 4.9% more time Not flagged
Capture and deliver events (4,096-byte payload, steady)
Shard: capture
Lifetime peak process memory (RSS) 40.93 MiB 40.93 MiB <0.1% less memory Not flagged
Queue an event (32-byte payload)
Shard: capture
Caller-thread CPU time per operation 38.17 µs/op 36.35 µs/op 4.8% less time Not flagged
Queue an event (32-byte payload)
Shard: capture
Time per operation 38.17 µs/op 36.35 µs/op 4.8% less time Not flagged
Queue an event (4,096-byte payload)
Shard: capture
Caller-thread CPU time per operation 36.39 µs/op 34.02 µs/op 6.5% less time Not flagged
Queue an event (4,096-byte payload)
Shard: capture
Time per operation 36.39 µs/op 35.6 µs/op 2.2% less time Not flagged
Evaluate all 10 flags
Shard: flags-scaling
Allocated memory per operation 200.98 KiB/op 200.98 KiB/op No observed change Not flagged
Evaluate all 10 flags
Shard: flags-scaling
Allocations per operation 2,339.33 count/op 2,339.33 count/op No observed change Not flagged
Evaluate all 10 flags
Shard: flags-scaling
Time per operation 88.11 µs/op 87.97 µs/op 0.2% less time Not flagged
Evaluate all 10 flags
Shard: flags-scaling
Process CPU time per operation 88.11 µs/op 87.97 µs/op 0.2% less time Not flagged
Evaluate all 100 flags
Shard: flags-scaling
Allocated memory per operation 1.93 MiB/op 1.93 MiB/op No observed change Not flagged
Evaluate all 100 flags
Shard: flags-scaling
Allocations per operation 23,013.56 count/op 23,013.56 count/op No observed change Not flagged
Evaluate all 100 flags
Shard: flags-scaling
Time per operation 858.78 µs/op 858.74 µs/op <0.1% less time Not flagged
Evaluate all 100 flags
Shard: flags-scaling
Process CPU time per operation 858.82 µs/op 858.77 µs/op <0.1% less time Not flagged
Evaluate all 1,000 flags
Shard: flags-scaling
Allocated memory per operation 19.24 MiB/op 19.24 MiB/op No observed change Not flagged
Evaluate all 1,000 flags
Shard: flags-scaling
Allocations per operation 229,654.94 count/op 229,654.94 count/op No observed change Not flagged
Evaluate all 1,000 flags
Shard: flags-scaling
Time per operation 8.63 ms/op 8.54 ms/op 1% less time Not flagged
Evaluate all 1,000 flags
Shard: flags-scaling
Process CPU time per operation 8.63 ms/op 8.54 ms/op 1% less time Not flagged
Evaluate 1,000 flags under concurrent load
Shard: flags-memory
Idle process memory (RSS) 42.32 MiB 41.6 MiB 1.7% less memory Not flagged
Evaluate 1,000 flags under concurrent load
Shard: flags-memory
Observed peak process memory (RSS) 42.61 MiB 41.95 MiB 1.5% less memory Not flagged
Evaluate 1,000 flags under concurrent load
Shard: flags-memory
Process memory after settling (RSS) 42.61 MiB 41.95 MiB 1.5% less memory Not flagged
Evaluate 1,000 flags under concurrent load
Shard: flags-memory
Lifetime peak process memory (RSS) 42.39 MiB 42.46 MiB 0.2% more memory Not flagged
Refresh 1,000 flag definitions
Shard: flags-memory
Idle process memory (RSS) 42.1 MiB 41.45 MiB 1.5% less memory Not flagged
Refresh 1,000 flag definitions
Shard: flags-memory
Observed peak process memory (RSS) 42.2 MiB 42.17 MiB <0.1% less memory Not flagged
Refresh 1,000 flag definitions
Shard: flags-memory
Process memory after settling (RSS) 41.89 MiB 42.1 MiB 0.5% more memory Not flagged
Refresh 1,000 flag definitions
Shard: flags-memory
Lifetime peak process memory (RSS) 42.6 MiB 42.51 MiB 0.2% less memory Not flagged
Evaluate one boolean flag
Shard: flags-single
Allocated memory per operation 15.05 KiB/op 15.05 KiB/op No observed change Not flagged
Evaluate one boolean flag
Shard: flags-single
Allocations per operation 173.76 count/op 173.76 count/op No observed change Not flagged
Evaluate one boolean flag
Shard: flags-single
Time per operation 13.89 µs/op 13.87 µs/op <0.1% less time Not flagged
Evaluate one boolean flag
Shard: flags-single
Process CPU time per operation 13.89 µs/op 13.87 µs/op <0.1% less time Not flagged
Evaluate a cohort-filtered flag
Shard: flags-single
Allocated memory per operation 23.12 KiB/op 23.12 KiB/op No observed change Not flagged
Evaluate a cohort-filtered flag
Shard: flags-single
Allocations per operation 270.27 count/op 270.27 count/op No observed change Not flagged
Evaluate a cohort-filtered flag
Shard: flags-single
Time per operation 21.79 µs/op 21.43 µs/op 1.7% less time Not flagged
Evaluate a cohort-filtered flag
Shard: flags-single
Process CPU time per operation 21.79 µs/op 21.43 µs/op 1.7% less time Not flagged
Evaluate a flag (early match)
Shard: flags-single
Allocated memory per operation 35.71 KiB/op 35.71 KiB/op No observed change Not flagged
Evaluate a flag (early match)
Shard: flags-single
Allocations per operation 387.27 count/op 387.27 count/op No observed change Not flagged
Evaluate a flag (early match)
Shard: flags-single
Time per operation 27.8 µs/op 27.61 µs/op 0.7% less time Not flagged
Evaluate a flag (early match)
Shard: flags-single
Process CPU time per operation 27.8 µs/op 27.61 µs/op 0.7% less time Not flagged
Evaluate a flag (late match)
Shard: flags-single
Allocated memory per operation 53.59 KiB/op 53.59 KiB/op No observed change Not flagged
Evaluate a flag (late match)
Shard: flags-single
Allocations per operation 576.27 count/op 576.27 count/op No observed change Not flagged
Evaluate a flag (late match)
Shard: flags-single
Time per operation 38.46 µs/op 38.1 µs/op 0.9% less time Not flagged
Evaluate a flag (late match)
Shard: flags-single
Process CPU time per operation 38.46 µs/op 38.1 µs/op 0.9% less time Not flagged
Evaluate a flag (no match)
Shard: flags-single
Allocated memory per operation 52.14 KiB/op 52.14 KiB/op No observed change Not flagged
Evaluate a flag (no match)
Shard: flags-single
Allocations per operation 556.77 count/op 556.77 count/op No observed change Not flagged
Evaluate a flag (no match)
Shard: flags-single
Time per operation 34.88 µs/op 34.71 µs/op 0.5% less time Not flagged
Evaluate a flag (no match)
Shard: flags-single
Process CPU time per operation 34.88 µs/op 34.71 µs/op 0.5% less time Not flagged
Evaluate a property-filtered flag
Shard: flags-single
Allocated memory per operation 17.84 KiB/op 17.84 KiB/op No observed change Not flagged
Evaluate a property-filtered flag
Shard: flags-single
Allocations per operation 198.27 count/op 198.27 count/op No observed change Not flagged
Evaluate a property-filtered flag
Shard: flags-single
Time per operation 16.49 µs/op 16.61 µs/op 0.7% more time Not flagged
Evaluate a property-filtered flag
Shard: flags-single
Process CPU time per operation 16.49 µs/op 16.61 µs/op 0.7% more time Not flagged
Evaluate a regex-filtered flag
Shard: flags-single
Allocated memory per operation 19.23 KiB/op 19.23 KiB/op No observed change Not flagged
Evaluate a regex-filtered flag
Shard: flags-single
Allocations per operation 210.77 count/op 210.77 count/op No observed change Not flagged
Evaluate a regex-filtered flag
Shard: flags-single
Time per operation 17.17 µs/op 17.37 µs/op 1.2% more time Not flagged
Evaluate a regex-filtered flag
Shard: flags-single
Process CPU time per operation 17.17 µs/op 17.37 µs/op 1.2% more time Not flagged
Evaluate a rollout flag
Shard: flags-single
Allocated memory per operation 14.04 KiB/op 14.04 KiB/op No observed change Not flagged
Evaluate a rollout flag
Shard: flags-single
Allocations per operation 160.76 count/op 160.76 count/op No observed change Not flagged
Evaluate a rollout flag
Shard: flags-single
Time per operation 12.93 µs/op 12.98 µs/op 0.4% more time Not flagged
Evaluate a rollout flag
Shard: flags-single
Process CPU time per operation 12.93 µs/op 12.98 µs/op 0.4% more time Not flagged
Evaluate a multivariate flag
Shard: flags-single
Allocated memory per operation 15.21 KiB/op 15.21 KiB/op No observed change Not flagged
Evaluate a multivariate flag
Shard: flags-single
Allocations per operation 177.77 count/op 177.77 count/op No observed change Not flagged
Evaluate a multivariate flag
Shard: flags-single
Time per operation 14.54 µs/op 14.52 µs/op 0.2% less time Not flagged
Evaluate a multivariate flag
Shard: flags-single
Process CPU time per operation 14.54 µs/op 14.52 µs/op 0.2% less 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.

Each shard uses its own runner; compare Before PR against With PR within a row, not across shards.

Compared db52a785f2d40f6813f25309fd2a7ea3e28aa59a → 268c59b2e2e172e1dff7115839f5c4c5f1f18b29.

Full report and diagnostics

102 metric rows; 102 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 merged commit 063f1ce into main Nov 5, 2026
50 checks passed
@Silthus
Silthus deleted the feat/emails-code-form branch November 5, 2026 12:10
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