Skip to content

[AI-FSSDK] [FSSDK-12337] Add Feature Rollout support#392

Open
FarhanAnjum-opti wants to merge 6 commits intomasterfrom
ai/FarhanAnjum-opti/FSSDK-12337-feature-rollouts
Open

[AI-FSSDK] [FSSDK-12337] Add Feature Rollout support#392
FarhanAnjum-opti wants to merge 6 commits intomasterfrom
ai/FarhanAnjum-opti/FSSDK-12337-feature-rollouts

Conversation

@FarhanAnjum-opti
Copy link
Contributor

@FarhanAnjum-opti FarhanAnjum-opti commented Mar 5, 2026

Summary

Adds Feature Rollout support to the Ruby SDK. Feature Rollouts are a new experiment rule type that combines Targeted Delivery simplicity with A/B test measurement capabilities. During project config parsing, the "everyone else" variation from the flag's rollout is injected into any experiment with type "feature_rollout", enabling correct evaluation without changes to decision logic.

Changes

  • Added config parsing logic to inject the "everyone else" rollout variation into feature_rollout experiments
  • Added traffic allocation entry (endOfRange=10000) for the injected variation
  • Added get_everyone_else_variation helper method to extract the last rollout rule's first variation
  • Updated all variation lookup maps (variation_key_map, variation_id_map, variation_id_map_by_experiment_id, variation_key_map_by_experiment_id) with injected variation
  • Added 6 unit tests covering feature rollout injection, edge cases, and backward compatibility

Jira Ticket

FSSDK-12337

Add Feature Rollout support to the Ruby SDK. During project config
parsing, inject the "everyone else" variation from the flag's rollout
into any experiment with type "feature_rollout", enabling correct
evaluation without changes to decision logic.

- Added config parsing logic to inject the everyone else rollout
  variation into feature_rollout experiments
- Added traffic allocation entry (endOfRange=10000) for injected variation
- Added get_everyone_else_variation helper to extract the last rollout
  rule's first variation
- Added 6 unit tests covering injection, variation maps, edge cases,
  and backward compatibility
Add optional 'type' string field to the experiment properties in the
datafile JSON schema validation constants.
Verify that the type field from the datafile is correctly preserved
on experiment hashes after config parsing.
Move @flag_variation_map generation to after the feature rollout
injection block so the everyone-else variation is included in
get_variation_from_flag lookups used by forced decisions.
…ropagation

Add tests verifying:
- Injected everyone-else variation preserves featureEnabled=false
- Variables from the rollout variation carry through to the injected
  variation and populate variation_id_to_variable_usage_map
…n spec_params

Remove redundant else clause in deep_clone that referenced a variable
in void context (Lint/Void: Variable new_obj used in void context).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant