Repository navigation
Conversation
Contributor
posthog-elixir Compliance ReportDate: 2026-11-13T20:57:06.242395+00:00
|
| Test | Status | Duration |
|---|---|---|
| Format Validation.Event Has Required Fields | ✅ | 606ms |
| Format Validation.Event Has Uuid | ✅ | 608ms |
| Format Validation.Event Has Lib Properties | ✅ | 607ms |
| Format Validation.Distinct Id Is String | ✅ | 606ms |
| Format Validation.Token Is Present | ✅ | 607ms |
| Format Validation.Custom Properties Preserved | ✅ | 607ms |
| Format Validation.Event Has Timestamp | ✅ | 607ms |
| Format Validation.Non Utc Event Timestamp Is Converted To Utc | ❌ | 607ms |
| Retry Behavior.Retries On 503 | ✅ | 5613ms |
| Retry Behavior.Does Not Retry On 400 | ✅ | 2611ms |
| Retry Behavior.Does Not Retry On 401 | ✅ | 2610ms |
| Retry Behavior.Respects Retry After Header | ✅ | 5612ms |
| Retry Behavior.Implements Backoff | ✅ | 15615ms |
| Retry Behavior.Retries On 500 | ✅ | 5614ms |
| Retry Behavior.Retries On 502 | ✅ | 5614ms |
| Retry Behavior.Retries On 504 | ✅ | 5614ms |
| Retry Behavior.Max Retries Respected | ✅ | 15623ms |
| Deduplication.Generates Unique Uuids | ✅ | 616ms |
| Deduplication.Preserves Uuid On Retry | ✅ | 5615ms |
| Deduplication.Preserves Uuid And Timestamp On Retry | ✅ | 10617ms |
| Deduplication.Preserves Uuid And Timestamp On Batch Retry | ✅ | 5614ms |
| Deduplication.No Duplicate Events In Batch | ✅ | 611ms |
| Deduplication.Different Events Have Different Uuids | ✅ | 609ms |
| Compression.Sends Gzip When Enabled | ✅ | 607ms |
| Batch Format.Uses Proper Batch Structure | ✅ | 608ms |
| Batch Format.Flush With No Events Sends Nothing | ✅ | 605ms |
| Batch Format.Multiple Events Batched Together | ✅ | 611ms |
| Error Handling.Does Not Retry On 403 | ✅ | 2609ms |
| Error Handling.Does Not Retry On 413 | ✅ | 2609ms |
| Error Handling.Retries On 408 | ✅ | 5612ms |
Failures
format_validation.non_utc_event_timestamp_is_converted_to_utc
Event 0 field 'timestamp' instant '2026-11-13T20:55:22.266799Z' != expected '2025-01-02T03:04:05Z'
Feature_Flags Tests
View Details
| Test | Status | Duration |
|---|---|---|
| Request Payload.Request With Person Properties Device Id | ✅ | 6ms |
| Request Payload.Flags Request Uses V2 Query Param | ✅ | 4ms |
| Request Payload.Flags Request Hits Flags Path Not Decide | ✅ | 5ms |
| Request Payload.Flags Request Omits Authorization Header | ✅ | 4ms |
| Request Payload.Token In Flags Body Matches Init | ✅ | 5ms |
| Request Payload.Groups Round Trip | ✅ | 4ms |
| Request Payload.Groups Default To Empty Object | ❌ | 5ms |
| Request Payload.Disable Geoip False Propagates As Geoip Disable False | ✅ | 4ms |
| Request Payload.Disable Geoip Omitted Defaults To False | ❌ | 4ms |
| Request Payload.Flag Keys To Evaluate Contains Only Requested Key | ✅ | 4ms |
| Request Lifecycle.No Flags Request On Init Alone | ✅ | 2ms |
| Request Lifecycle.No Flags Request On Normal Capture | ✅ | 610ms |
| Request Lifecycle.Two Flag Calls Produce Two Remote Requests | ✅ | 17ms |
| Request Lifecycle.Mock Response Value Is Returned To Caller | ❌ | 4ms |
| Retry Behavior.Retries Flags On 502 | ❌ | 308ms |
| Retry Behavior.Retries Flags On 504 | ❌ | 308ms |
| Side Effect Events.Get Feature Flag Captures Feature Flag Called Event | ❌ | 607ms |
Failures
request_payload.groups_default_to_empty_object
Field 'groups' not found in /flags request body at path 'groups'. Available keys: ['distinct_id', 'api_key', 'flag_keys_to_evaluate']
request_payload.disable_geoip_omitted_defaults_to_false
Field 'geoip_disable' not found in /flags request body at path 'geoip_disable'. Available keys: ['distinct_id', 'api_key', 'flag_keys_to_evaluate']
request_lifecycle.mock_response_value_is_returned_to_caller
Last action result missing field 'value'. Keys: ['error', 'success']
retry_behavior.retries_flags_on_502
Last action result missing field 'value'. Keys: ['error', 'success']
retry_behavior.retries_flags_on_504
Last action result missing field 'value'. Keys: ['error', 'success']
side_effect_events.get_feature_flag_captures_feature_flag_called_event
Expected 1 events with name '$feature_flag_called', got 0
PostHog Review · Deep · reviewed
|
| Step | Status | Result |
|---|---|---|
| Prepare the diff | done | 4 files, 1 chunk |
| Pick perspectives | done | 3 perspectives |
| Run review passes | done | 6 issues (+1 blind-spot) |
| Merge overlapping findings | done | 7 → 5 |
| Validate findings | done | 3 kept, 2 dismissed |
| Publish | done | 3 posted (view review) |
ioannisj
marked this pull request as ready for review
November 13, 2026 14:23
This branch has not been deployed
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
Part of PostHog/posthog-android#577
The SDK can't read the payload of a remote config feature flag. This adds a public function,
PostHog.FeatureFlags.get_remote_config_payload/2, which fetches it fromGET /api/projects/@current/feature_flags/{key}/remote_configwith the existingsecret_keyoption.{:ok, payload}with the decoded JSON value. The endpoint sends the payload as a JSON string, so a string result is parsed a second time and stays a string if that parse fails.{:ok, nil}when the flag has no payload. PostHog answers that with a 200 and an empty body, so an empty or whitespace-only 2xx body isn't an error.{:ok, nil}without a request when the instance is disabled.{:error, exception}whensecret_keyis missing, the flag key is"",., or.., the status isn't 2xx, the body isn't JSON, or the request fails./,?, or#can't change the request.$feature_flag_calledevent.Three things differ from posthog-node:
{:ok, nil}. posthog-node throws aSyntaxErroron that response today, fromawait response.json()atpackages/node/src/client.ts:2272(480395c4).With the default client, the request turns off Req's body decoding and the SDK parses the body itself. With Req's decoding, a 200 with a non-JSON content type (an HTML page from a proxy, for example) comes back as a plain string, and that looks the same as a decoded JSON string payload.
A custom
api_client_modulereturns a decoded body, so the SDK doesn't decode the response again there and only parses the stored payload string. Both clients give the same result for the same payload, but with a custom client the SDK can't tell that a body wasn't JSON.A Finch pool checkout timeout, which Finch raises, comes back as
{:error, exception}like any other failed request.💚 How did you test it?
Unit tests in
test/posthog/feature_flags/remote_config_payload_test.exsandtest/posthog/api/client_test.exscover the request (path, encoded key, token param, bearer header, one request on a 503), the payload parsing, the empty and whitespace-only 200 bodies, and each error case (a 404 with an empty body and a pool checkout timeout included). The payload cases run against both the default client and a custom client that decodes the body.mix test,mix format --check-formatted,mix credo --strict, andmix posthog.public_api --checkpass. I didn't test against a live PostHog project.📝 Checklist
If releasing new changes
sampo addto generate a changeset file🤖 Agent context
DRI: @ioannisj
Autonomy: Human-driven (agent-assisted)