Context
We conducted a cross-SDK comparison of all MultiProvider implementations using the js-sdk as the reference. The Kotlin MultiProvider is functional for basic use cases, but we identified several gaps relative to the reference implementation. Hook support is already tracked in #171.
Gaps
1. Tracking event forwarding (High)
The MultiProvider inherits the default no-op track() from FeatureProvider. Tracking events are not forwarded to child providers.
Expected behavior:
- Iterate over child providers and forward
track() calls
- Skip providers that are not in a ready/active state
- Errors from individual
track() calls should be caught and logged, not propagated
Reference: js-sdk multi-provider.ts track(), dotnet-sdk MultiProvider.cs Track()
2. Strategy should be able to skip NOT_READY/FATAL providers (Medium)
The Strategy.evaluate() method receives a List<FeatureProvider> with no status information. Strategies cannot preemptively skip providers that are NOT_READY or FATAL -- they must attempt evaluation and handle the resulting error reactively. The childProviderStatuses map is private to MultiProvider and not exposed.
Expected behavior:
- The strategy should receive per-provider status alongside each provider (e.g. via a wrapper type or extended context)
- The default behavior should skip providers in
NOT_READY or FATAL status before attempting evaluation
- This avoids unnecessary evaluation attempts and cleaner error handling
Reference: js-sdk BaseEvaluationStrategy.shouldEvaluateThisProvider(), dotnet-sdk BaseEvaluationStrategy.ShouldEvaluateThisProvider()
3. ComparisonStrategy (Medium)
Only FirstMatchStrategy and FirstSuccessfulStrategy exist. There is no ComparisonStrategy for evaluating all providers and comparing results (useful for migration validation and consistency checks).
Expected behavior:
- Evaluate all providers (ideally in parallel)
- If all providers agree on the value, return it
- If providers disagree, call an optional
onMismatch callback and return the designated fallback provider's result
- If any provider errors, collect and report all errors
- Constructor accepts a
fallbackProvider and optional onMismatch callback
Reference: js-sdk comparison-strategy.ts, go-sdk comparison_strategy.go, dotnet-sdk ComparisonStrategy.cs
Related Issues
Spec Reference
https://openfeature.dev/specification/appendix-a/#multi-provider
Context
We conducted a cross-SDK comparison of all MultiProvider implementations using the js-sdk as the reference. The Kotlin MultiProvider is functional for basic use cases, but we identified several gaps relative to the reference implementation. Hook support is already tracked in #171.
Gaps
1. Tracking event forwarding (High)
The MultiProvider inherits the default no-op
track()fromFeatureProvider. Tracking events are not forwarded to child providers.Expected behavior:
track()callstrack()calls should be caught and logged, not propagatedReference: js-sdk
multi-provider.tstrack(), dotnet-sdkMultiProvider.csTrack()2. Strategy should be able to skip NOT_READY/FATAL providers (Medium)
The
Strategy.evaluate()method receives aList<FeatureProvider>with no status information. Strategies cannot preemptively skip providers that areNOT_READYorFATAL-- they must attempt evaluation and handle the resulting error reactively. ThechildProviderStatusesmap is private to MultiProvider and not exposed.Expected behavior:
NOT_READYorFATALstatus before attempting evaluationReference: js-sdk
BaseEvaluationStrategy.shouldEvaluateThisProvider(), dotnet-sdkBaseEvaluationStrategy.ShouldEvaluateThisProvider()3. ComparisonStrategy (Medium)
Only
FirstMatchStrategyandFirstSuccessfulStrategyexist. There is noComparisonStrategyfor evaluating all providers and comparing results (useful for migration validation and consistency checks).Expected behavior:
onMismatchcallback and return the designated fallback provider's resultfallbackProviderand optionalonMismatchcallbackReference: js-sdk
comparison-strategy.ts, go-sdkcomparison_strategy.go, dotnet-sdkComparisonStrategy.csRelated Issues
Spec Reference
https://openfeature.dev/specification/appendix-a/#multi-provider