Flag evaluations accept default value; payload decoding unified
posthog-v7.38.0
1 feature2 fixesThis release1 featureNew capabilities2 fixesBug fixesAI-tallied from the release notes
From the original release noteView original ↗
Minor changes
- 77821ce feat:
FeatureFlagEvaluations.is_enabled()accepts adefault_valuereturned when the flag has no value in the evaluation — the key was not part of the evaluated set, or the evaluation came back empty (failed/flagsrequest, quota limit, no resolvabledistinct_id). A flag that has a value still wins, so a disabled flag returnsFalseeven withdefault_value=True. The default isFalse, so existing calls behave exactly as before. — Thanks @posthog[bot]!
Patch changes
- 7b6a8d8
evaluate_flags()now JSON-decodes payloads for locally-evaluated flags, the same way it already did for flags resolved remotely. Previouslyget_flag_payload()returned a parsed value ({"copy": "new"}) when the flag came back from/flagsbut the raw JSON string ('{"copy": "new"}') when the poller evaluated it locally, so the payload's type depended on where the flag happened to resolve. The$feature_flag_payloadproperty on$feature_flag_calledevents is decoded for locally-evaluated flags too. Payload strings that aren't valid JSON are still passed through unchanged. — Thanks @posthog[bot]! - 92625cf The
$feature_flag_calleddedupe tracker now evicts its oldest entry when it reaches capacity instead of clearing every entry. Previously, each time a client accumulated 50,000 distinct IDs the whole tracker was wiped, so the next flag read for every previously seen distinct ID re-emitted a$feature_flag_calledevent it had already deduped. — Thanks @posthog[bot]!
Fetched August 5, 2026
