Merged
Conversation
Implement an OpenFeature-compatible provider as a separate gem (mixpanel-openfeature) that wraps the existing Mixpanel flags providers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #132 +/- ##
==========================================
+ Coverage 96.29% 96.64% +0.34%
==========================================
Files 12 14 +2
Lines 567 655 +88
==========================================
+ Hits 546 633 +87
- Misses 21 22 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Adds begin/rescue for SDK exceptions in provider, plus tests for exception handling and null variant key behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use camelCase 'targetingKey' instead of snake_case 'targeting_key' to match the key name Java and Go SDKs receive from their OpenFeature SDKs' built-in flattening. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- shutdown now delegates to underlying flags provider - Add shutdown to FlagsProvider (no-op) and LocalFlagsProvider (stops polling) - Explicitly pass report_exposure: true to get_variant - Add context value unwrapping with whole-number float→int conversion Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix bug where ServerError was incorrectly caught and re-raised as ConnectionError in call_flags_endpoint. Use dig for nested hash access, each_with_object for hash construction, map(&:dup), and simplified conditionals throughout. Simplify boolean type check and make number case consistent in provider. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add nil guard for typed resolutions to return TYPE_MISMATCH instead of passing nil through. Update mock signatures to capture report_exposure keyword arg. Add exposure reporting verification test. Strengthen shutdown test to verify delegation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Required by repo policy — all actions must use full-length commit SHAs instead of version tags. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Aligns with the convention used by other SDKs (e.g. mixpanel-java-openfeature-provider) where the language name is included in the package name. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Runs the openfeature-provider test suite as a separate job across all Ruby versions to ensure the provider is tested in CI. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
openfeature-sdk 0.5.1 requires Ruby >= 3.1, so Ruby 3.0 is no longer compatible. Update the gemspec and remove 3.0 from the CI matrix. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add SimpleCov with Cobertura output to the openfeature-provider test suite and upload coverage from the test-openfeature CI job. This lets Codecov merge coverage from both test suites, fixing the patch/project coverage check failures. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Provider.from_local and Provider.from_remote accept a token and config, create the Tracker internally, auto-start polling for local configs, and expose the tracker via the mixpanel attr_reader. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
efahk
approved these changes
Apr 7, 2026
| # @param selected_variant [SelectedVariant] The selected variant | ||
| # @param context [Hash] User context (must include 'distinct_id') | ||
| # @param latency_ms [Integer, nil] Optional latency in milliseconds | ||
| def shutdown; end |
Contributor
There was a problem hiding this comment.
The param comments got separated from the track_exposure_event call
efahk
reviewed
Apr 7, 2026
efahk
reviewed
Apr 7, 2026
Move shutdown method above track_exposure_event doc comments to fix separated param annotations. Revert @flag_definitions assignment to use a local variable for GIL-safe concurrent reads. Add tests for from_local/from_remote factory methods and complex context type unwrapping (floats, arrays, nested hashes) to reach 100% coverage. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…found Address review feedback: successful flag evaluations now return TARGETING_MATCH reason instead of STATIC, and FLAG_NOT_FOUND returns DEFAULT reason instead of ERROR. Also adds error_handler parameter to from_local and from_remote factory methods. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jaredmixpanel
approved these changes
Apr 9, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The OpenFeature provider depends on shutdown methods and error handling fixes added after the 3.0.0 release. Bump the main SDK version and tighten the provider's dependency constraint to ~> 3.1. Add release ordering documentation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mixpanel-openfeature) in theopenfeature-provider/directoryLocalFlagsProviderorRemoteFlagsProvidervia a singleMixpanel::OpenFeature::Providerclassfetch_boolean_value,fetch_string_value,fetch_number_value,fetch_integer_value,fetch_float_value,fetch_object_valueDesign decisions
SelectedVarianttoget_variantand usesequal?(object identity) to detect when the flag was not foundSTATICfor successful evaluations,ERRORfor all failure casesPROVIDER_NOT_READY,FLAG_NOT_FOUND,TYPE_MISMATCHvariant: result.variant_keyinResolutionDetailsevaluation_contextis converted and forwarded toget_variantrespond_to?(:are_flags_ready)so remote providers are treated as always readyTest coverage
37 RSpec tests covering all 6 flag types, type coercion, all 3 error codes, variant key passthrough, context forwarding, remote provider readiness, lifecycle, and metadata.
Test plan
bundle exec rspec spec/— 37 examples, 0 failuresGenerated with Claude Code