Draft
Conversation
Implement an OpenFeature provider for the Mixpanel Node SDK as a separate package in openfeature-server-provider/. Wraps either LocalFeatureFlagsProvider or RemoteFeatureFlagsProvider via the shared getVariant() API. Key design decisions: - Uses Symbol sentinel for fallback detection (flag-not-found) - Context set globally via initialize(), per-evaluation context ignored - targetingKey has no special meaning - Handles both sync (local) and async (remote) providers via await - Reason codes: STATIC for success, ERROR for failures - Error codes: PROVIDER_NOT_READY, FLAG_NOT_FOUND, TYPE_MISMATCH - onClose() is a no-op - Returns default value on all errors Includes 32 tests covering all flag types, error cases, async providers, context handling, and edge cases. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds PROVIDER_NOT_READY tests for string, number, and object types (boolean was already covered), and SDK exception handling tests verifying that getVariant failures return defaults with error codes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Merge per-evaluation context on top of init context so callers can override or extend context at each flag evaluation, matching the OpenFeature specification. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- shutdown() now delegates to underlying flags provider - Add areFlagsReady() to LocalFlagsProvider, check before evaluation - Return ErrorCode.GENERAL (not PROVIDER_NOT_READY) for exceptions - Add context value unwrapping with whole-number float→int conversion - Update tests for new error codes and add shutdown/readiness tests 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
Design
🤖 Generated with Claude Code