Skip to content

[FSSDK-12394] chore: local holdout logic behind FeatureGates flag#631

Open
muzahidul-opti wants to merge 8 commits intomasterfrom
muzahidul/feature-gate-local-holdouts
Open

[FSSDK-12394] chore: local holdout logic behind FeatureGates flag#631
muzahidul-opti wants to merge 8 commits intomasterfrom
muzahidul/feature-gate-local-holdouts

Conversation

@muzahidul-opti
Copy link
Copy Markdown
Contributor

Summary

  • Added FeatureGates.localHoldouts static var (default false) to Constants.swift
  • Wrapped both local holdout evaluation blocks in DefaultDecisionService.swift behind if FeatureGates.localHoldouts
  • Added setUp/tearDown overrides in 6 holdout test classes to enable the gate during tests

Feature rollout is ready to ship, but the backend for local holdouts is not yet ready. This gates the local holdout code path so it's suppressed in production while keeping all existing tests passing. Global holdouts are unaffected.

When the backend is ready, flip FeatureGates.localHoldouts to true.

Test plan

  • Ran all 6 holdout test suites (53 tests) — 0 failures
  • Verified global holdout tests pass independently (not gated)
  • Verified build succeeds via both swift build and xcodebuild

Issues

  • FSSDK-12394 (local holdouts)

🤖 Generated with Claude Code

muzahidul-opti and others added 7 commits April 30, 2026 17:35
Default false to suppress local holdout logic until backend is ready.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Both experiment rule and delivery rule local holdout checks are now
gated. When false, these blocks are skipped entirely. Global holdout
evaluation in getDecisionForFlag() is unaffected.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
All holdout test classes set the gate to true in setUp and reset to false
in tearDown. Existing test methods are unchanged — they pass because the
gate enables the local holdout code paths during test execution.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…bility

FeatureGates.swift was not registered in the Xcode project pbxproj file,
causing build failures. Moving into Constants.swift which is already
included in all build targets.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This test class also uses local holdout data (includedRules), so it
needs the gate enabled during test execution.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Added super.tearDown() to DecisionServiceTests_Holdouts tearDown
- Removed FeatureGates override from HoldoutConfigTests since it tests
  the data model directly, not the gated decision service path

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coveralls
Copy link
Copy Markdown

coveralls commented Apr 30, 2026

Coverage Status

Coverage is 93.828%muzahidul/feature-gate-local-holdouts into master. No base build found for master.

@muzahidul-opti muzahidul-opti changed the title Gate local holdout logic behind FeatureGates flag [FSSDK-12524] chore: local holdout logic behind FeatureGates flag Apr 30, 2026
@muzahidul-opti muzahidul-opti changed the title [FSSDK-12524] chore: local holdout logic behind FeatureGates flag [FSSDK-12394] chore: local holdout logic behind FeatureGates flag Apr 30, 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.

2 participants