Open
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.09% -0.20%
==========================================
Files 12 14 +2
Lines 567 641 +74
==========================================
+ Hits 546 616 +70
- Misses 21 25 +4
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>
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