Problem
SDK local evaluation needs to distinguish between:
- a property key that is omitted because the caller supplied an incomplete property map, and
- a property key that the caller explicitly knows is absent.
Today, omission can only be treated as unknown. For an is_set condition this means:
- a present key, including one whose value is
null, evaluates as set;
- a missing key makes local evaluation inconclusive and leaves remote evaluation eligible;
- known absence cannot be represented.
Treating every missing key as unset would be unsafe because an incomplete property map could then produce an incorrect local result.
Context: PostHog/sdk-specs#49 (comment)
Required API changes
SDK evaluation APIs
Add an optional, backward-compatible way for callers to identify keys known to be absent, for example:
personPropertyKeysKnownAbsent
groupPropertyKeysKnownAbsent
/flags API
When local evaluation is inconclusive and falls back to remote evaluation, the SDK must be able to send the same known-absence information. Otherwise the server may use stored property values and return a result inconsistent with local evaluation.
Possible optional request fields:
{
"person_property_keys_known_absent": ["plan"],
"group_property_keys_known_absent": {
"organization": ["subscription"]
}
}
Expected outcome
- Callers can explicitly represent known-absent person and group properties.
- Local and remote evaluation apply the same absence semantics.
- Existing clients that do not send the new fields retain current behavior.
- The behavior and request schema are documented so SDKs can implement it consistently.
Problem
SDK local evaluation needs to distinguish between:
Today, omission can only be treated as unknown. For an
is_setcondition this means:null, evaluates as set;Treating every missing key as unset would be unsafe because an incomplete property map could then produce an incorrect local result.
Context: PostHog/sdk-specs#49 (comment)
Required API changes
SDK evaluation APIs
Add an optional, backward-compatible way for callers to identify keys known to be absent, for example:
/flagsAPIWhen local evaluation is inconclusive and falls back to remote evaluation, the SDK must be able to send the same known-absence information. Otherwise the server may use stored property values and return a result inconsistent with local evaluation.
Possible optional request fields:
{ "person_property_keys_known_absent": ["plan"], "group_property_keys_known_absent": { "organization": ["subscription"] } }Expected outcome