Summary
Both the legacy BlackListManager singleton and the new BlackListConfig/DefaultBlackListMatcher coexist. The plan calls for migrating to the new matcher injection model and removing the old singleton.
Current State
BlackListManager (global singleton, thread-safe with lock) is used throughout the core flow: ClientUpdateStrategy.InitBlackList(), GeneralUpdateBootstrap.InitializeFromEnvironment(), GeneralUpdateBootstrap.InitBlackList()
BlackListConfig (immutable record) and BlackListConfigBuilder are implemented and accepted via ConfigureBlackList()
DefaultBlackListMatcher implements IBlackListMatcher but is never injected into StorageManager/FileTree/Pipeline
- The plan's design is:
BlackListConfig -> IBlackListMatcher -> StorageManager / FileTree / Pipeline — injection-based, immutable
Expected
StorageManager, FileTreeEnumerator, PipelineBuilder accept IBlackListMatcher via constructor injection
GeneralUpdateBootstrap resolves IBlackListMatcher from BlackListConfig and passes it through
- Remove
BlackListManager singleton entirely
BlackListConfig.Empty serves as the default (no filtering)
Benefits
- Single source of truth for blacklist configuration
- Testable: matcher can be mocked in unit tests
- No global mutable state
Ref
Refactoring plan v2: Sub Issue 9 (BlackList)
Summary
Both the legacy
BlackListManagersingleton and the newBlackListConfig/DefaultBlackListMatchercoexist. The plan calls for migrating to the new matcher injection model and removing the old singleton.Current State
BlackListManager(global singleton, thread-safe with lock) is used throughout the core flow:ClientUpdateStrategy.InitBlackList(),GeneralUpdateBootstrap.InitializeFromEnvironment(),GeneralUpdateBootstrap.InitBlackList()BlackListConfig(immutable record) andBlackListConfigBuilderare implemented and accepted viaConfigureBlackList()DefaultBlackListMatcherimplementsIBlackListMatcherbut is never injected intoStorageManager/FileTree/PipelineBlackListConfig -> IBlackListMatcher -> StorageManager / FileTree / Pipeline— injection-based, immutableExpected
StorageManager,FileTreeEnumerator,PipelineBuilderacceptIBlackListMatchervia constructor injectionGeneralUpdateBootstrapresolvesIBlackListMatcherfromBlackListConfigand passes it throughBlackListManagersingleton entirelyBlackListConfig.Emptyserves as the default (no filtering)Benefits
Ref
Refactoring plan v2: Sub Issue 9 (BlackList)