Skip to content

Conversation

@Mat001
Copy link
Contributor

@Mat001 Mat001 commented Dec 11, 2025

Summary

Holdouts support for Agent. Most work is done in go-sdk under the hood.

pkg/optimizely/optimizelytest/config.go

  • Added GetHoldoutList() method to TestProjectConfig - returns empty slice of holdouts for test mocking
  • Added GetHoldoutsForFlag(featureKey string) method to TestProjectConfig - returns empty slice of holdouts for specific flag in test mocking

Issues

https://optimizely-ext.atlassian.net/browse/FSSDK-11559

This change adds holdout support to Agent by:

1. Updating to use local go-sdk with holdouts implementation
2. Adding GetHoldoutList and GetHoldoutsForFlag methods to TestProjectConfig mock
3. Migrating CMAB prediction endpoint config from global variable to CmabConfig struct

Changes:
- Added go.mod replace directive to use local go-sdk for development
- Implemented GetHoldoutList() and GetHoldoutsForFlag() in TestProjectConfig
- Updated CMAB endpoint configuration to use CmabConfig.PredictionEndpointTemplate
- Removed unused cmab package import

Once go-sdk is released with holdouts, the go.mod replace can be removed
and the version bumped to the new release.
Updated tests to reflect that CMAB prediction endpoint is now configured
through CmabConfig.PredictionEndpointTemplate instead of a global variable.

Removed assertions that checked cmab.CMABPredictionEndpoint since the
endpoint is now encapsulated within the CMAB client configuration and
cannot be easily verified from outside.

The tests still verify that clients are created successfully with the
configured endpoints.
@Mat001 Mat001 self-assigned this Dec 11, 2025
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.

2 participants