Skip to content

fix: satisfy SDK compliance harness 0.8.0#248

Draft
marandaneto wants to merge 2 commits into
mainfrom
sdk-harness-audit-20260627-posthog-dotnet
Draft

fix: satisfy SDK compliance harness 0.8.0#248
marandaneto wants to merge 2 commits into
mainfrom
sdk-harness-audit-20260627-posthog-dotnet

Conversation

@marandaneto

@marandaneto marandaneto commented Jun 27, 2026

Copy link
Copy Markdown
Member

Problem

The SDK compliance workflow and local harness need to use SDK test harness release 0.8.0, with reusable GitHub workflow calls pinned to the release commit SHA instead of a mutable tag/branch. Running the updated harness exposed SDK/adapter compliance gaps in this repository.

Changes

  • Pins the reusable SDK compliance workflow to PostHog/posthog-sdk-test-harness commit be8b8d5a3f94a249659844e94832e874f049c1e4.\n- Uses ghcr.io/posthog/sdk-test-harness:0.8.0 for local Docker harness runs / workflow harness version inputs.\n- Updates SDK compliance adapter and/or SDK behavior needed to pass the 0.8.0 compliance contract.

Tests

  • SDK compliance Docker harness passed locally with project posthog_dotnet_compliance; unit tests passed.

@github-actions

github-actions Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

posthog-dotnet Compliance Report

Date: 2026-06-27 12:49:11 UTC
Duration: 2330ms

✅ All Tests Passed!

16/16 tests passed


Feature_Flags Tests

16/16 tests passed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id 245ms
Request Payload.Flags Request Uses V2 Query Param 124ms
Request Payload.Flags Request Hits Flags Path Not Decide 114ms
Request Payload.Flags Request Omits Authorization Header 109ms
Request Payload.Token In Flags Body Matches Init 110ms
Request Payload.Groups Round Trip 111ms
Request Payload.Groups Default To Empty Object 110ms
Request Payload.Person Properties Distinct Id Auto Populated When Caller Omits It 111ms
Request Payload.Disable Geoip False Propagates As Geoip Disable False 109ms
Request Payload.Disable Geoip Omitted Defaults To False 110ms
Request Payload.Flag Keys To Evaluate Contains Only Requested Key 109ms
Request Lifecycle.No Flags Request On Init Alone 4ms
Request Lifecycle.No Flags Request On Normal Capture 114ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests 214ms
Request Lifecycle.Mock Response Value Is Returned To Caller 112ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event 212ms

@marandaneto marandaneto changed the title chore: add SDK compliance harness 0.8.0 fix: satisfy SDK compliance harness 0.8.0 Jun 27, 2026
@greptile-apps

greptile-apps Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Comments Outside Diff (1)

  1. tests/UnitTests/Features/FeatureFlagsTests.cs, line 2374-2404 (link)

    P2 Missing test for DisableGeoIp = true

    The new DisableGeoIp property on AllFeatureFlagsOptions is only exercised indirectly by the existing CallsDecideWithFlagKeyToEvaluate fact (which validates the default geoip_disable: false value). There is no test verifying that passing DisableGeoIp = true results in "geoip_disable": true in the /flags request body. Given the team's preference for parameterised tests, this case is worth adding alongside the existing assertion — a [Theory] with both false and true inputs would cover the full contract.

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Reviews (1): Last reviewed commit: "chore: add SDK compliance harness 0.8.0" | Re-trigger Greptile

Comment thread sdk_compliance_adapter/Program.cs Outdated
@marandaneto

Copy link
Copy Markdown
Member Author

Addressed Greptile feedback about DisableGeoIp = true coverage in ed6c8e7: CallsDecideWithFlagKeyToEvaluate is now parameterized for both false and true and asserts the serialized geoip_disable request value.

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.

1 participant