Skip to content

chore(ci): run compliance harness 1.13.1 once per codec - #1026

Open
eli-r-ph wants to merge 3 commits into
v1-capture-ai-personless-optionfrom
v1-capture-harness
Open

eli-r-ph wants to merge 3 commits into
v1-capture-ai-personless-optionfrom
v1-capture-harness

Conversation

@eli-r-ph

@eli-r-ph eli-r-ph commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

💡 Motivation and Context

  • The compliance harness skips the AI lane and event options for this SDK. The adapter does not advertise either capability, and the harness version predates both suites.
  • The adapter also folds options back into legacy $ properties. Since the options PRs earlier in this stack, the SDK takes options= directly, so this fold tests a path users no longer need.
  • The reusable harness workflow posts a PR comment, which needs pull-requests: write. That step failed on #1019 for reasons unrelated to the SDK.

This PR runs harness 1.13.1 with every capture suite the SDK supports, once per codec.

Changes

  • The adapter advertises capture_ai_v1 and event_options. Both suites now run against this SDK.
  • /capture and /capture_ai share one handler. It passes options, properties and a supplied uuid to the SDK unchanged, and returns the uuid the SDK sent.
  • The adapter reads its codec from COMPRESSION (gzip, deflate or zstd, default gzip). It advertises only that encoding_<codec> capability and uses the codec on both lanes. An unknown value stops the adapter at startup.
  • The harness has one enable_compression flag but one test per codec, so CI runs one job per codec. There is no brotli job, because the SDK has no brotli support.
  • The workflow runs the harness and adapter containers directly, in the same shape as posthog-go. The reusable workflow cannot pass COMPRESSION to the adapter.
  • The report goes to the job summary and an artifact, not a PR comment. The workflow now needs only contents: read.
  • The adapter image and the adapter unit-test job install the zstd extra. docker-compose.yml uses harness 1.13.1 and passes COMPRESSION.

No SDK code changes. A behavior change for the harness only: /capture now forwards a supplied uuid, as /capture_ai already did.

💚 How did you test it?

  • The harness 1.13.1 ran locally once per codec. Every suite ran (capture v1, AI capture v1, flags, local evaluation), and every test passed: 223 for gzip, 221 for deflate and zstd. The gzip run has two more tests because gzip has more encoding tests.
  • New adapter tests:
    • test_health_and_init_use_one_codec catches an adapter that advertises the wrong encoding_ capability, or that sets the codec on only one lane.
    • test_capture_passes_options_and_uuid_unchanged catches an adapter that rewrites options, drops the uuid, or returns a uuid other than the SDK's.
  • Break-on-purpose: each of these broke the new tests: a hard-coded encoding_gzip, options dropped, the AI lane codec left unset.
  • Not checked: the CI matrix itself. It runs on this PR.

📝 Checklist

  • 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

None needed: this changes CI and the compliance adapter only.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Written with Cursor (Claude Opus) under the direction of the assignee. Skills used: writing-pr-descriptions.

Agent calls worth review:

  • One adapter instance per codec, chosen by an env var, with the matrix in the workflow. The alternative, one job that restarts the adapter per codec, keeps one report but makes failures harder to read.
  • The default codec is gzip, so docker compose up without COMPRESSION behaves as before.

@eli-r-ph eli-r-ph self-assigned this Oct 7, 2026
@eli-r-ph eli-r-ph mentioned this pull request Oct 7, 2026
3 of 20 tasks
@eli-r-ph
eli-r-ph force-pushed the v1-capture-harness branch from f2faf4d to 743d8ca Compare October 7, 2026 17:43
@eli-r-ph
eli-r-ph force-pushed the v1-capture-ai-personless-option branch from 3f09f03 to 5e3fddc Compare October 7, 2026 17:43
@eli-r-ph

eli-r-ph commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

@greptileai review

@eli-r-ph
eli-r-ph marked this pull request as ready for review October 7, 2026 20:44
@eli-r-ph
eli-r-ph requested a review from a team as a code owner October 7, 2026 20:44

@dustinbyrne dustinbyrne 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.

The expanded compliance matrix and adapter forwarding look sound. Existing CI exercises both capture lanes across all three codecs. One small documentation follow-up: the standalone adapter-test setup needs the zstd extra.

AI-assisted review.

Comment thread sdk_compliance_adapter/test_adapter.py
@eli-r-ph
eli-r-ph force-pushed the v1-capture-harness branch from 743d8ca to ca9c26c Compare October 8, 2026 16:25
@eli-r-ph
eli-r-ph force-pushed the v1-capture-ai-personless-option branch from 5e3fddc to 09f7144 Compare October 8, 2026 16:25
@eli-r-ph
eli-r-ph force-pushed the v1-capture-harness branch from ca9c26c to e743d1e Compare October 8, 2026 18:13
@eli-r-ph
eli-r-ph force-pushed the v1-capture-ai-personless-option branch from 09f7144 to 1355d44 Compare October 8, 2026 18:13
@eli-r-ph
eli-r-ph force-pushed the v1-capture-harness branch from e743d1e to 78973e7 Compare October 8, 2026 21:12
@eli-r-ph
eli-r-ph force-pushed the v1-capture-ai-personless-option branch 2 times, most recently from 316f808 to b46dbfa Compare October 8, 2026 22:54
@eli-r-ph
eli-r-ph force-pushed the v1-capture-harness branch from 78973e7 to 9dcf4df Compare October 8, 2026 22:54
The adapter now advertises capture_ai_v1 and event_options, passes options and uuids through unchanged, and takes its codec from COMPRESSION. The workflow runs the harness containers directly in a gzip/deflate/zstd matrix, so it no longer needs pull-requests: write.
The standalone adapter-test setup installs the zstd extra, matching CI.
@eli-r-ph
eli-r-ph force-pushed the v1-capture-harness branch from 9dcf4df to d31608d Compare October 8, 2026 23:40
@eli-r-ph
eli-r-ph force-pushed the v1-capture-ai-personless-option branch from b46dbfa to 233dc8a Compare October 8, 2026 23:40

This branch has not been deployed

No deployments
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