Skip to content

[AI-FSSDK] [FSSDK-12369] Add local holdouts support to JavaScript SDK#1151

Open
Mat001 wants to merge 2 commits into
masterfrom
ai/mat001/FSSDK-12369-local-holdouts
Open

[AI-FSSDK] [FSSDK-12369] Add local holdouts support to JavaScript SDK#1151
Mat001 wants to merge 2 commits into
masterfrom
ai/mat001/FSSDK-12369-local-holdouts

Conversation

@Mat001
Copy link
Copy Markdown
Contributor

@Mat001 Mat001 commented May 14, 2026

Summary

Adds Local Holdouts support to the JavaScript SDK. Local holdouts allow targeting specific experiment or delivery rules within a flag, while global holdouts (the existing behavior) apply to all rules across all flags. This introduces a new rule-level targeting system using an includedRules field on the holdout data model.

Changes

  • Added includedRules and isGlobal fields to the Holdout interface in shared_types.ts
  • Added HoldoutConfig interface and getGlobalHoldouts / getHoldoutsForRule helper functions to project_config.ts; parseHoldoutsConfig now builds and stores these lookups during config initialization
  • Updated decision_service/index.ts to evaluate global holdouts via getGlobalHoldouts() at flag level and check local holdouts per-rule (after forced decisions, before regular rule evaluation) for both experiment rules and delivery rules
  • Added Level 1 unit tests for config/parsing (isGlobal classification, backward compat, edge cases) and Level 2 decision service tests (one per branch of the local holdout pseudocode)

Jira Ticket

FSSDK-12369

@coveralls
Copy link
Copy Markdown

coveralls commented May 14, 2026

Coverage Status

coverage: 77.761% (-0.1%) from 77.906% — ai/mat001/FSSDK-12369-local-holdouts into master

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