Skip to content

Conversation

@jose-sequeira
Copy link

@jose-sequeira jose-sequeira commented Jan 23, 2026

Integrate the SDK Test Harness to validate SDK compliance against the shared capture API contract.

This adds:

  • An SDK adapter that wraps this SDK and exposes the standard REST interface for the test harness
  • A CI workflow that runs compliance tests on every PR and push to the default branch
  • A Dockerfile for running the adapter in the test harness environment

The test harness runs a mock PostHog server, exercises the SDK through the adapter, and verifies behavior matches the contract defined in CONTRACT.yaml (event format, retries, compression, deduplication, etc.).

@github-actions
Copy link

github-actions bot commented Jan 23, 2026

posthog-elixir Compliance Report

Date: 2026-01-28 13:53:10 UTC
Duration: 105839ms

⚠️ Some Tests Failed

15/29 tests passed, 14 failed


Capture Tests

⚠️ 15/29 tests passed, 14 failed

View Details
Test Status Duration
Format Validation.Event Has Required Fields 609ms
Format Validation.Event Has Uuid 609ms
Format Validation.Event Has Lib Properties 609ms
Format Validation.Distinct Id Is String 609ms
Format Validation.Token Is Present 609ms
Format Validation.Custom Properties Preserved 609ms
Format Validation.Event Has Timestamp 609ms
Retry Behavior.Retries On 503 5614ms
Retry Behavior.Does Not Retry On 400 2611ms
Retry Behavior.Does Not Retry On 401 2612ms
Retry Behavior.Respects Retry After Header 5609ms
Retry Behavior.Implements Backoff 15616ms
Retry Behavior.Retries On 500 5615ms
Retry Behavior.Retries On 502 5615ms
Retry Behavior.Retries On 504 5615ms
Retry Behavior.Max Retries Respected 15624ms
Deduplication.Generates Unique Uuids 620ms
Deduplication.Preserves Uuid On Retry 5615ms
Deduplication.Preserves Uuid And Timestamp On Retry 10620ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry 5614ms
Deduplication.No Duplicate Events In Batch 615ms
Deduplication.Different Events Have Different Uuids 612ms
Compression.Sends Gzip When Enabled 609ms
Batch Format.Uses Proper Batch Structure 609ms
Batch Format.Flush With No Events Sends Nothing 606ms
Batch Format.Multiple Events Batched Together 613ms
Error Handling.Does Not Retry On 403 2611ms
Error Handling.Does Not Retry On 413 2611ms
Error Handling.Retries On 408 5614ms

Failures

format_validation.event_has_uuid

Event missing 'uuid' field

retry_behavior.retries_on_503

Expected at least 3 requests, got 1

retry_behavior.respects_retry_after_header

Expected at least 2 requests, got 1

retry_behavior.implements_backoff

Expected at least 3 requests, got 1

retry_behavior.retries_on_500

Expected at least 2 requests, got 1

retry_behavior.retries_on_502

Expected at least 2 requests, got 1

retry_behavior.retries_on_504

Expected at least 2 requests, got 1

retry_behavior.max_retries_respected

Expected 4 requests, got 1

deduplication.preserves_uuid_on_retry

Need at least 2 requests to check retry

deduplication.preserves_uuid_and_timestamp_on_retry

Expected at least 3 requests, got 1

deduplication.preserves_uuid_and_timestamp_on_batch_retry

Expected at least 2 requests, got 1

deduplication.different_events_have_different_uuids

Need at least 2 events

compression.sends_gzip_when_enabled

Header 'Content-Encoding' with value 'gzip' not found in requests

error_handling.retries_on_408

Expected at least 2 requests, got 1

@jose-sequeira jose-sequeira marked this pull request as ready for review January 28, 2026 13:53
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