Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
posthog-python Compliance ReportDate: 2026-11-06T00:33:02.233638+00:00 ✅ All Tests Passed!121/121 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_Local_Evaluation Tests✅ 4/4 tests passed View Details
|
There was a problem hiding this comment.
PostHog Review · Standard · reviewed d811ca2: 6 Should fix, 1 Consider.
This is the only automatic review while this pull request is a draft. Comment @posthog review to review new changes sooner. Otherwise, a review of the new changes runs when you mark it ready for review.
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.
Drops the Node renderer, its tests, the page check and the sdk-specs module. The generated pages are unchanged byte for byte. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nt matter Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replaces the 539-line renderer with griffe2md, a dev dependency. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 |
dustinbyrne
left a comment
There was a problem hiding this comment.
I independently reproduced the existing annotation-leakage and coroutine-marker findings with the locked renderer. Consider correcting both and adding focused output tests before publishing the new reference. These are reference-output issues, not SDK runtime regressions. One optional schema-completeness suggestion is inline.
AI-assisted review.
griffe2md 1.5.1's signature template gives an unannotated parameter the previous parameter's annotation, so Client(...) showed `debug: str = False`. It also drops `async`. Swap its format_signature filter for griffe's own Function.signature(), prefixed with `async` for coroutines. Also document OptionalSetArgs and CodeEmailArgs in Types, since set, set_once and Emails.send reference them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The posthog-capability lines showed in IDE hover help. The docstrings read as they do on main again, Category sections included, and the generator drops those sections from the reference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Covers the two output bugs review reproduced: unannotated parameters getting the previous parameter's annotation, and coroutines missing async. Also checks the keyword-only marker. griffe and griffe2md join the test extra so CI runs them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Client(...) listed _use_ai_lane and _enable_multimodal_capture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s name - Summary tables keep a docstring's first paragraph, not its first line. - A Returns section is one return value, even when its description wraps. - A constructor's signature reads `Client(...)`, not `__init__(...)`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The context example tags with `tag`, since `tag_context` doesn't exist. - The `capture_exception` example passes `distinct_id` by keyword, since it's keyword-only. - Two reST `Example::` blocks become Markdown, which the reference renders. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
💡 Motivation and Context
We have a wave of breaking changes with new major versions for most SDKs. References are now read mostly by bots, not humans, and the HogRef format is heavy. This generates the reference as Markdown from the doc comments.
bin/docs_scripts/generate_markdown.pyrenders each member with griffe2md, a newdevdependency, and groups them by capability. It writesreferences/posthog-python-<major>.md, andposthog-python-reference.mdfor the released major.docs/capabilities.jsonmaps each symbol to its sdk-specs capability, so the doc comments stay as they are. Generation fails on a stale entry, an unknown capability, or an unmapped client method.💚 How did you test it?
ruff, the mypy baseline andmake public_api_checkpass.pytest posthog/test: 6085 pass, and 3 fork tests fail only in the full run on macOS.📝 Checklist
If releasing new changes
sampo addto generate a changeset file🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Claude Code (Opus 5.5), directed by Vincent.
Merge order
/docs/libraries/python/referenceis livedatafield) and the SDK repos (their JSON files)🤖 Generated with Claude Code