Skip to content

[AI-FSSDK] [FSSDK-12735] Add holdout exclusion logic for Targeted Delivery rules - #654

Open
esrakartalOpt wants to merge 5 commits into
masterfrom
ai/esrakartalOpt/FSSDK-12735-exclude-targeted-delivery
Open

[AI-FSSDK] [FSSDK-12735] Add holdout exclusion logic for Targeted Delivery rules#654
esrakartalOpt wants to merge 5 commits into
masterfrom
ai/esrakartalOpt/FSSDK-12735-exclude-targeted-delivery

Conversation

@esrakartalOpt

@esrakartalOpt esrakartalOpt commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements the exclude_targeted_deliveries field on Holdout objects so that users bucketed into a holdout can still be served Targeted Delivery rules normally when the flag is set to true. A/B Test and Multi-Armed Bandit rules continue to respect the holdout regardless of this flag.

Changes

  • Added excludeTargetedDeliveries property to the Holdout model with backward-compatible decoding (defaults to false when missing)
  • Updated global, local experiment, and local delivery holdout evaluation paths in DefaultDecisionService to skip holdout application for Targeted Delivery rules when the flag is enabled
  • Added decision reason logging for when a Targeted Delivery rule is excluded from holdout logic

Jira Ticket

FSSDK-12735

@muzahidul-opti

Copy link
Copy Markdown
Contributor

@esrakartalOpt HO related test cases failing, could you please have a look.

…al holdouts

- Refactor getDecisionForFlag: skip experiment rules when global holdout has
  excludeTargetedDeliveries=true, always evaluate rollout (delivery) rules
- Attach holdoutDecision to rollout result so holdout impression fires
  alongside the rollout impression; attach to empty decision when no rollout
  matches so the holdout impression still fires
- Add HoldoutDecision struct replacing the anonymous holdoutToSend tuple;
  failable init?(from:) absorbs the unwrapping logic previously spread
  across call sites and the holdoutTuple helper
- Add userBucketedIntoRollout / userNotBucketedIntoRollout log messages
  matching Java SDK parity
- Refactor getDecisionForFlag and extract getTargetedDeliveryExperiments
  on ProjectConfig
- Fix DecisionServiceTests_ExcludeTargetedDeliveries: correct test setup
  ordering (project mutations before holdoutConfig assignment to prevent
  didSet from wiping the custom holdout), update assertions to match correct
  spec (experiments skipped, delivery/rollout rules always evaluated)

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@muzahidul-opti
muzahidul-opti requested a review from jaeopt July 28, 2026 14:31

@muzahidul-opti muzahidul-opti left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@coveralls

coveralls commented Jul 28, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 93.929% (+0.02%) from 93.909% — ai/esrakartalOpt/FSSDK-12735-exclude-targeted-delivery into master

@jaeopt jaeopt closed this Aug 6, 2026
@jaeopt jaeopt reopened this Aug 6, 2026
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.

4 participants