chore(capture): v1 compliance adapter + CI job (capture v1, 5/6)#705
Draft
eli-r-ph wants to merge 1 commit into
Draft
chore(capture): v1 compliance adapter + CI job (capture v1, 5/6)#705eli-r-ph wants to merge 1 commit into
eli-r-ph wants to merge 1 commit into
Conversation
Contributor
|
Reviews (1): Last reviewed commit: "chore(capture): add v1 compliance adapte..." | Re-trigger Greptile |
Contributor
posthog-python Compliance ReportDate: 2026-06-28 00:51:59 UTC ✅ All Tests Passed!110/110 tests passed Capture_V1 Tests✅ 94/94 tests passed View Details
Feature_Flags Tests✅ 16/16 tests passed View Details
|
4 tasks
da60117 to
3274be1
Compare
92affe0 to
6db84db
Compare
3274be1 to
5026185
Compare
6db84db to
241364f
Compare
5026185 to
d1875fc
Compare
241364f to
292e391
Compare
Teaches the SDK compliance adapter to speak capture-v1 and adds a second CI job that runs the harness capture_v1 suite against it. Bumps the harness pin from the stale main SHA (v0.5.2 contract) to 0.8.0 (be8b8d5), which carries the capture_v1 suites, and splits the workflow into v0 + v1 jobs. Also carries the /flags api_key_field="token" fix required by the 0.8.0 harness contract and adapter timing/debug settings for reliable test execution.
d1875fc to
73e034f
Compare
292e391 to
79dc48f
Compare
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.
💡 Motivation and Context
Fifth PR in the stacked Capture V1 series (stacked on #704). This is the one that proves the v1 implementation against the cross-SDK conformance harness: it teaches the compliance adapter to speak capture-v1 and adds a CI job that runs the harness
capture_v1suite against it. Mirrors the posthog-go adapter at the same harness pin.Adapter (
sdk_compliance_adapter/adapter.py):CAPTURE_MODE(baked into a newDockerfile.v1). One adapter process speaks one mode:/healthadvertisescapture_v1vscapture_v0, and/initcreates theClientwith the matchingcapture_mode. The harness uses the advertised capability to pick which suite to run./initnow acceptsdisable_geoipandhistorical_migration./capturefolds the harness's v1optionsback into the SDK's$-prefixed sentinel properties (cookieless_mode->$cookieless_mode,disable_skew_correction->$ignore_sent_at, etc.), so the SDK lifts them onto the wireoptionsobject — exercising the feat(capture): v1 wire serialization transforms (capture v1, 2/6) #702 transform end to end.post_v1records v1 attempts for/state(retry attempt read from the call, only terminal/non-retryper-event results counted as sent), mirroring the existingpatched_batch_post.CI (
.github/workflows/sdk-compliance.yml):mainSHA (a v0.5.2-era contract, predating the capture_v1 suites) to0.8.0(be8b8d5).compliance(v0,Dockerfile) andcompliance-v1(v1,Dockerfile.v1), each with its own report artifact.docker-compose.ymlgains asdk-adapter-v1service and pins the harness image to0.8.0for local runs.💚 How did you test it?
ruff format/checkclean;py_compileclean on the adapter. The v0 path is behavior-preserving —capture_mode="v0"resolves identically to the prior implicit default, anddisable_geoip/historical_migrationkeep their previous effective defaults — so the existing v0 suite should pass unchanged at the new pin.The harness integration itself is validated by the two CI jobs this PR adds (the multi-container harness orchestration is exactly what the reusable workflow runs per job). The adapter is a direct port of the posthog-go v1 adapter, which already passes the
capture_v1suite at this same pin.📝 Checklist
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Authored with Cursor (Claude Opus 4.8) per the agreed plan. The v1 suite asserts against the mock server's recorded requests rather than
/state, so the adapter's/statetracking for v1 is best-effort parity with v0 (and with posthog-go) rather than load-bearing for the v1 assertions. Local harness runs were not performed — the added CI jobs are the gate, matching how the harness is intended to be exercised.