-
Notifications
You must be signed in to change notification settings - Fork 19
[FSSDK-11552] Add holdout support and refactor decision logic #422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Mat001
wants to merge
6
commits into
master
Choose a base branch
from
mpirnovar-holdout-decision-logic-fssdk11552
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prisma Cloud has found errors in this PR ⬇️
…ecision-logic-fssdk11552
- Changed loop from 'for _, holdout := range holdouts' to 'for i := range holdouts' - Created proper pointer 'holdout := &holdouts[i]' to avoid address-of-iteration-variable issue - This fixes the security warning where all iterations would point to the same memory location - All tests passing Resolves Prisma Cloud security scan: Incorrect access of indexable resource
- Implemented holdout parsing from datafile with global/specific/exclusion logic - Added MapHoldouts() to process holdout relationships with feature flags - Implemented GetHoldoutsForFlag() to retrieve applicable holdouts per flag - Fixed bucketer initialization to use pointer (interface value) - Created comprehensive unit tests for HoldoutService (11 test cases) - Added integration test with real bucketer and evaluator - Added GetHoldoutsForFlag() mock method to helpers_test.go All tests passing (decision and config packages) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Added 3 unit tests for GetHoldoutsForFlag() in config_test.go - Created holdout_test.go with 7 comprehensive mapper tests: - Empty holdouts - Global holdouts with exclusions - Specific holdouts with inclusions - Non-running holdouts filtering - Mixed global and specific holdouts - Audience conditions mapping - Variations and traffic allocation mapping - Fixed govet shadow linting error in holdout_service.go line 105 All tests passing. Improves code coverage for new holdout functionality. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
junaed-optimizely
requested changes
Nov 18, 2025
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.
Per jira ticket:
Changes:
Jira ticket:
https://optimizely-ext.atlassian.net/browse/FSSDK-11552