Repository navigation
docs(compliance): weekly SDK compliance matrix - #82
Merged
Merged
Conversation
…xpanded flag specs Weekly bounded SDK compliance audit for 2026-09-28. sdk-specs advanced 27 commits across 23 capability specs since the last run, dominated by server-side feature-flag semantics (local-feature-flag-evaluator +929 lines, evaluate-flags +209, the three get-feature-flag-* payload contracts, flag-definition-loader +73), plus a new client-only Session Replay Debug Properties capability. Selection followed priority rule 1 (affected by spec changes): posthog-php and posthog-ruby are the server SDKs with local-evaluation engines that this delta lands on most directly, and both were confirmed code-drifted and past the ~4-week window. Both files grow from 59 to 63 rows (Capture AI, Evaluate Flags, Exception Event Metadata, Session Replay Debug Properties audited for the first time). Two cross-cutting findings: - Experiment holdouts are unimplemented in both evaluators, a silent correctness divergence from the backend for any flag configured with a holdout. - The new malformed-payload rule is a real gap: php returns the correct sentinel but logs nothing; ruby returns the raw serialized string on three public paths. One row improved on a real code change (ruby's before-send hook now drops the event when a hook raises). Six rows were downgraded on new spec requirements rather than regressions. Scope: compliance/ documentation only. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Generated-By: PostHog Desktop Task-Id: e5d845ad-60cf-4b6d-a294-f997f51b0845
posthog
Bot
force-pushed
the
posthog-code/weekly-sdk-compliance-matrix
branch
from
October 5, 2026 06:21
c5af5b5 to
773261c
Compare
…ainst the MCP analytics spec Weekly bounded re-audit, 2026-10-05. sdk-specs main advanced 1d5fe42 -> 75c8f5d: a new MCP Analytics capability (#87), the Evaluate Flags runtime filter reshape (#77), the browser replay network body-scrubber replacement (#79), and the 1us log timestamp floor (#91). Contract count is now 64 per SDK. Selected posthog-go, posthog-dotnet, and posthog-js on priority rule 1 (all three are named or directly implicated by this cycle's spec changes) plus the oldest staleness cohort, using the full three-SDK cap for the first time. All five previously-missing contract rows were audited from scratch on each. Notable: experiment holdouts and Evaluate Flags negative-knowledge retention are now unimplemented in four for four of the server SDKs checked since those requirements landed; posthog-js has the most complete exception-metadata producer envelope in the matrix but misreports unknown MCP tools as failed tool calls; and one unguarded JsonDocument.Parse explains four posthog-dotnet rows at once. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Generated-By: PostHog Desktop Task-Id: a3ec4da7-040c-499d-9222-23e683e09387
… the merged #96 spec
Contributor
Pushed a few corrections on top of the bot's run, mostly rows that main had already moved past:
The other SDK files still carry that same top-level exception gap (android and node at ❌), so their next audit should pick it up. |
ioannisj
marked this pull request as ready for review
October 7, 2026 08:46
dustinbyrne
approved these changes
Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Living SDK compliance matrix in
compliance/, maintained by a bounded weekly audit: ≤3 SDKs are deeply re-verified per run (spec-affected → code-changed → pending-initial-audit → staleness-backstop), so every SDK is re-checked roughly every 4 weeks rather than all at once.This is the accumulating baseline for the loop. Each run pushes onto this branch; it is not merged until a human reviews it.
Why
The repo's root
README.mdhas carried a> Conformance matrix (per-SDK parity against each spec) — TODOplaceholder since the specs were written. Spec changes land here continuously while the SDKs that must satisfy them live in 12 other repositories, so there was no record of which SDK satisfies which contract, where they diverge, or whether closing a gap needs a breaking change. This PR is that record, built incrementally so each run can be reviewed on its own.Audited so far
64 contracts tracked per SDK: the 64 capabilities in the root
README.mdtable, includingbootstrap(added to the table by #97).6538babc08549f42ae4d019c5451f4e0185060ab95c7f6e0fbdb6c7bc02183868659a7b48659a7b405b53dce1efa57Pending initial audit: none — all 12 in-scope SDKs have at least one full audit on file.
Queued for next run (9): posthog-python and posthog-node first (both named by the new MCP Analytics spec and both reference implementations for Capture AI), then posthog-react-native and posthog-flutter (stalest; Flutter holds the matrix's entire ❓ backlog), then posthog-android with posthog-java, then posthog-ios, then posthog-php and posthog-ruby (one ➖ row each).
This run (2026-10-05) — posthog-go, posthog-dotnet, posthog-js
sdk-specs
mainadvanced1d5fe42→75c8f5d: a brand-new MCP Analytics capability (#87), the Evaluate Flags runtime-filter reshape (#77), the browser Session Replay Privacy body-scrubber replacement (#79), and the Logs 1 µs timestamp floor (#91). All three SDKs were selected on priority rule 1 — MCP Analytics names posthog-js's and posthog-go's packages explicitly, #79 can only land on the browser, and both server SDKs carry the flags delta — and all three were also in the oldest staleness cohort. The three-SDK cap was used in full for the first time.Gaps discovered this run
$exceptionside-car omits the required$exception_source: "mcp.tool_call", andmechanism.syntheticis hardcodedtrueon a path only ever reached for a thrown error — the one case the spec says is not synthetic. Also noclient_metadataintent source; the manual API rejects the value outright.exception_id/parent_idlinkage, no$exception_source, no$exception_levelon the core capture path.GetFlagPayloadreturns a malformed serialized payload unvalidated and unlogged.mechanismobject is a fixed literal (source: "",synthetic: false,handled: true) emitted identically for every entry — two forbidden unknown-placeholders,handledcopied onto every nested entry, no linkage fields.JsonDocument.Parsein bothFeatureFlagfactories makes a malformed payload throw during flag construction, discarding the flag's correctly evaluated local value on one path and the entire remote response on the other. Fixing that one call pair moves Evaluate Flags, Get Feature Flag Payload, Get Feature Flag Result, and Get Feature Flags And Payloads together.PostHog.AIships real$ai_*support but routes it through ordinaryCapture(...), with no isolated AI route. Thecapture-aispec's applicability list does not name .NET at all, which is worth correcting upstream.@posthog/mcpis the richest implementation in the matrix, but an unknown tool is misreported as a failed$mcp_tool_callon both instrumentation paths — inflating the server's own tool error rate with names it never registered — and neither$mcp_unknown_toolnor$mcp_input_requiredis emitted.$exception_sourceand a capture category on thewindow.onerror/unhandledrejectionhandlers, which fall back togeneric.$-prefix gate, and the 30 s throttle on the optional bundle all conform. The one gap is that afterstopSessionRecording()on a loaded recorder, events keepactive/bufferinginstead of$recording_status: disabled.Gaps resolved this run
FlagDefinitionCacheProviderwith fail-safe fallback in both directions.Flush()/FlushWithContext()now exists and drains pending uploads (the retry-exhaustion drop issue persists, so the row stays 🟡).Needs human attention
#103 made
$exception_list[0]canonical for Capture Exception. posthog-php and posthog-ruby are re-scored ✅ here and posthog-go drops that gap, but the other seven SDK files still mark Capture Exception down for missing top-level$exception_type/$exception_message(posthog-android and posthog-node at ❌). Their next audit should re-score them.Two upstream items: the
capture-aispec's applicability list should name posthog-dotnet among the SDKs with AI support, and the long-standingApplicability: clientprose versus@bothacceptance tags on the four Set/Reset Person/Group Properties For Flags specs still needs reconciling — it is the most consistent gap in the entire matrix (7 of 7 server SDKs) and the right remediation depends on which way that is resolved.Scope
Documentation only — every file is under
compliance/. No spec content, no SDK code, nothing outside that directory.Created with PostHog Desktop
🤖 Generated with Claude Code