Repository navigation
Conversation
posthog-python Compliance ReportDate: 2026-11-17T14:31:52.472903+00:00 ✅ All Tests Passed!271/271 tests passed Capture_V1 Tests✅ 95/95 tests passed View Details
Capture_Ai Tests✅ 5/5 tests passed View Details
Feature_Flags Tests✅ 17/17 tests passed View Details
Feature_Flags_V4 Tests✅ 150/150 tests passed View Details
Feature_Flags_Local_Evaluation Tests✅ 4/4 tests passed View Details
|
SDK performance: posthog-pythonBenchmarks 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
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 102 metric rows; 102 rows shown in all results. Omitted or shortened data remain in |
|
Closing for now. |
💡 Motivation and Context
PostHog's send API now takes an optional
headersobject on a code send (PostHog/posthog#136613): onlyList-Unsubscribewith one https URL, andList-Unsubscribe-PostwithList-Unsubscribe=One-Click.emails.sendrefuses any argument it doesn't know, so a Python caller can't send these headers for one-click unsubscribe.Now a code send takes
headersand sends it as given. The SDK checks only that it is a mapping; PostHog refuses a header it doesn't allow. A template send refusesheaderslike the other code-form arguments.Contract: PostHog/sdk-specs#227. Ticket: https://github.com/PostHog/harley-context/issues/39
Caution
🔴 Merge risk: high · one-way door: the release this changeset triggers publishes
headersas a public SDK argument, and a revert can't withdraw a published version.headersis refused with a 400EmailError, a broken send for the few callers who opt in. A send withoutheadersbuilds the same body as before, and the tests and live run cover both.git revertthe merge commit, which also drops the changeset. After release, ship a version that deprecatesheaders; the published version stays on PyPI unless yanked.💚 How did you test it?
posthog/test/test_emails.py, 202 passed. New rows intest_rendered_content_is_posted_as_is(headers in the body as given,Noneleft out) andtest_rejects_a_code_send_that_mixes_or_misses_fields(template form, not a mapping). The body rows failed before the change withsend() got arguments that the code form doesn't take: headers.ruff format --check,ruff check,mypy | mypy-baseline filter,make public_api_check,.github/scripts/check_strict_types.sh(aheaderscode send type-checks, a template send withheadersis a type error), all clean.hogli up, maildev sink), sending withEmails(key, host=<stack>):1 sends both headers, and maildev shows both on the delivered email. 2 adds
X-Extraand gets the server's 400. 3 never makes a request.📝 Checklist
If releasing new changes
sampo addto generate a changeset file🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Written by Claude Code (
claude-opus-5-5), directed by Harley as part of moving PostHog's own report emails to the email-from-code API.headersminorchangeset; the release workflow bumps the versionInvolvement: no grilling rounds, no prototypes, 2 review panel rounds (GPT correctness, anti-overengineering, systems; Claude fresh eyes), proof captured.