Part of #46288
Context
SDKs with local evaluation need to support per-condition-set aggregation and mixed person + group property filters.
Requirements
- Read
aggregation_group_type_index from each condition set (not flag-level)
- Evaluate group property filters against provided
group_properties
- Use correct hash key based on condition set's aggregation:
None / not set → hash distinct_id
0-4 → hash the corresponding group key from groups
Affected SDKs
All SDKs with local evaluation support:
N/A
Example (Python)
def evaluate_flag(flag, distinct_id, person_properties, groups, group_properties):
for condition_set in flag['filters']['groups']:
if not matches_properties(condition_set['properties'], person_properties, group_properties):
continue
agg_index = condition_set.get('aggregation_group_type_index')
if agg_index is None:
hash_key = distinct_id
else:
group_type = get_group_type_name(agg_index)
hash_key = groups.get(group_type, '')
if not hash_key:
continue # Can't evaluate without group context
if hash_value(hash_key, flag['key']) < condition_set.get('rollout_percentage', 100):
return True
return False
Notes
- SDKs already receive
groups and group_properties in evaluation calls
- Main change is reading aggregation per condition set and applying group property filters
Part of #46288
Context
SDKs with local evaluation need to support per-condition-set aggregation and mixed person + group property filters.
Requirements
aggregation_group_type_indexfrom each condition set (not flag-level)group_propertiesNone/ not set → hashdistinct_id0-4→ hash the corresponding group key fromgroupsAffected SDKs
All SDKs with local evaluation support:
N/A
Example (Python)
Notes
groupsandgroup_propertiesin evaluation calls