[AI-FSSDK] [FSSDK-12337] Add Feature Rollout support#392
Open
FarhanAnjum-opti wants to merge 11 commits intomasterfrom
Open
[AI-FSSDK] [FSSDK-12337] Add Feature Rollout support#392FarhanAnjum-opti wants to merge 11 commits intomasterfrom
FarhanAnjum-opti wants to merge 11 commits intomasterfrom
Conversation
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).
Contributor
muzahidul-opti
left a comment
There was a problem hiding this comment.
Changes look good to me. Would love to approve by Owner.
…dation - Define EXPERIMENT_TYPES constant with valid experiment type values (ab, mab, cmab, td, fr) in Constants module - Use enum constraint in JSON schema to validate the type field - Reference constant in injection check instead of raw string literal - Add flag_variation_map assertion to variation maps test
Remove 3 tests not in updated Jira ticket test requirements: - LAST rollout rule selection - featureEnabled preservation - Variables propagation
Update EXPERIMENT_TYPES to use actual backend values: 'multi_armed_bandit' and 'contextual_multi_armed_bandit' instead of shorthand 'mab' and 'cmab'. Restore accidentally removed else branch in spec_params deep_clone.
Remove redundant else clause in deep_clone that was accidentally restored in a previous commit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
get_everyone_else_variationhelper method to extract the last rollout rule's first variationJira Ticket
FSSDK-12337