Implement per-condition-set aggregation in Rust flag evaluator
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 39.9k
- Forks
- 3.4k
- Avg merge
- 6h 51m
- Merged PRs (30d)
- 232
Description
Part of #46288
Context
The Rust flag evaluation service needs to support per-condition-set aggregation and mixed person + group property filters.
Requirements
- Read
aggregation_group_type_indexfrom each condition set (not flag-level) - Allow conditions to contain both person and group property filters
- Evaluate group properties against provided
group_propertiescontext - Use correct hash key based on condition set's aggregation:
None→ hashdistinct_id0-4→ hashgroups[index]
Evaluation Logic
for condition_set in flag.conditions {
if !matches_filters(&condition_set.properties, &person_props, &group_props) {
continue;
}
let hash_key = match condition_set.aggregation_group_type_index {
None => distinct_id.clone(),
Some(idx) => groups.get(idx).cloned().unwrap_or_default(),
};
if hash_percentage(&hash_key, &flag.key) < condition_set.rollout_percentage {
return true;
}
}
return false;
Edge Cases
- If condition set has group filters but group context not provided → return
falsefor that condition set (strict mode) - If condition set aggregates on a group type but that group key not provided → skip to next condition set
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the Rust flag evaluation service and locate the condition-set evaluation path. Verify per-condition-set aggregation, mixed person and group filters, group_properties handling, and the specified missing-context edge cases; done means each requirement and edge case behaves as described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100