Skip to content

[AI-FSSDK] [FSSDK-12369] Add local holdouts support to Java SDK#627

Closed
Mat001 wants to merge 3 commits into
masterfrom
ai/jaeopt/FSSDK-12369-local-holdouts
Closed

[AI-FSSDK] [FSSDK-12369] Add local holdouts support to Java SDK#627
Mat001 wants to merge 3 commits into
masterfrom
ai/jaeopt/FSSDK-12369-local-holdouts

Conversation

@Mat001
Copy link
Copy Markdown
Contributor

@Mat001 Mat001 commented May 14, 2026

Summary

Adds local holdouts support to the Java SDK. A holdout is now either global (applies to all rules across all flags, existing behavior) or local (applies only to specific rule IDs listed in an optional `includedRules` field). This enables scoping holdout experiments to individual flag rules rather than the entire flag set.

Changes

  • Added optional `includedRules` field to the `Holdout` model; `null` means global, a non-null list (including empty) means local
  • Added `isGlobal()`, `getGlobalHoldouts()`, and `getHoldoutsForRule(ruleId)` to `Holdout` and `HoldoutConfig`
  • Exposed `getHoldoutConfig()` on `ProjectConfig` interface and implemented in `DatafileProjectConfig`
  • Updated all four JSON parsers (GSON, Jackson, org.json, json-simple) to parse the optional `includedRules` field
  • Integrated per-rule local holdout evaluation in `DecisionService` for both experiment rules and rollout delivery rules

Jira Ticket

FSSDK-12369

Mat001 and others added 2 commits May 15, 2026 10:31
…, not before

Move local holdout checks inside getVariationFromExperimentRule() and
getVariationFromDeliveryRule(), directly after the forced decision block.

Previously the checks were in the outer rule loop, before calling those
methods, which caused local holdouts to run before forced decisions —
violating the mandatory order: forced decision → local holdout → regular.

Add enforcement test: forced decision beats a 100%-traffic local holdout.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Mat001
Copy link
Copy Markdown
Contributor Author

Mat001 commented May 15, 2026

Closing. Forced decision logic order was incorrect by incomplete Jora description or ai-fssdk. Only java specific. Will update and create a new PR.

@Mat001 Mat001 closed this May 15, 2026
@Mat001 Mat001 deleted the ai/jaeopt/FSSDK-12369-local-holdouts branch May 15, 2026 17:45
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