Skip to content

[AI-FSSDK] [FSSDK-12368] Cleanup flag base setup (local holdouts)#507

Open
Mat001 wants to merge 1 commit intomasterfrom
ai/mat001/FSSDK-12368-legacy-holdout-cleanup
Open

[AI-FSSDK] [FSSDK-12368] Cleanup flag base setup (local holdouts)#507
Mat001 wants to merge 1 commit intomasterfrom
ai/mat001/FSSDK-12368-legacy-holdout-cleanup

Conversation

@Mat001
Copy link
Copy Markdown
Contributor

@Mat001 Mat001 commented Apr 20, 2026

Summary

Removes legacy flag-level holdout fields from the SDK as cleanup after local holdouts (FSSDK-12369) implementation.

Jira Ticket: FSSDK-12368

Changes

Step 1: Remove Legacy Fields ✅

  • Removed includedFlags and excludedFlags from Holdout.__init__()
  • Removed from HoldoutDict type definition

Step 2: Remove Legacy Methods ✅

  • Removed get_holdouts_for_flag() method from ProjectConfig
  • Removed entire flag-level targeting infrastructure:
    • global_holdouts list
    • included_holdouts dict
    • excluded_holdouts dict
    • flag_holdouts_map dict
    • Flag-level population logic in __init__
  • Removed flag-level holdout checking from DecisionService.get_variation_for_feature()

Step 3: Update Tests ✅

  • Removed 10 test methods testing removed functionality:
    • 7 from test_config.py
    • 3 from test_decision_service_holdout.py
  • Removed includedFlags and excludedFlags from all test fixtures
  • Cleaned up all test files

Verification

grep -r "includedFlags\|excludedFlags" --include="*.py" returns zero results
grep -r "getHoldoutsForFlag\|get_holdouts_for_flag" --include="*.py" returns zero results
grep -r "global_holdouts\|included_holdouts\|excluded_holdouts\|flag_holdouts_map" --include="*.py" returns zero results
✅ All deprecated fields/methods completely removed from codebase

Impact

  • 7 files modified
  • 310 lines removed, 5 lines added
  • Net: -305 lines of legacy code eliminated

Test Plan

  • All existing tests pass
  • No references to deprecated fields/methods remain
  • Holdout functionality works using new local holdouts API

🤖 Generated with Claude Code

Remove deprecated flag-level holdout functionality as cleanup after
local holdouts (FSSDK-12369) implementation.

Changes:
- Removed includedFlags and excludedFlags from Holdout entity
- Removed includedFlags and excludedFlags from HoldoutDict type
- Removed get_holdouts_for_flag() method from ProjectConfig
- Removed flag-level holdout infrastructure:
  - global_holdouts list
  - included_holdouts dict
  - excluded_holdouts dict
  - flag_holdouts_map dict
  - Flag-level population logic in ProjectConfig.__init__
- Removed flag-level holdout checking from DecisionService.get_variation_for_feature()
- Removed 10 test methods testing removed functionality
- Removed includedFlags/excludedFlags from all test fixtures

Impact: 7 files modified, 310 lines deleted, 5 lines added (net: -305 lines)

Verification:
- grep for "includedFlags", "excludedFlags", "getHoldoutsForFlag" returns zero results
- grep for "global_holdouts", "included_holdouts", "excluded_holdouts", "flag_holdouts_map" returns zero results

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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