Repository navigation
Add flagd / OpenFeature flag provider - #7
Merged
Merged
Conversation
Land the last Phase 3 vendor adapter as a thin FlagProvider that translates injected OpenFeature evaluation details. Targeting and percentage rollouts stay in flagd. Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
|
You have reached your Codex usage limits for security reviews. Please try again later. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 512f03b2e2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
OpenFeature STALE is a stale provider result, not a fresh targeting match. Return STALE_CACHE so the client emits fallback telemetry. Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.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.
Problem
Phase 3 already shipped the LaunchDarkly, AWS AppConfig, and Cloudflare Flagship adapters. Nathan authorized the remaining vendor adapters to be built now. This PR lands the last one —
@pegma/flags-flagd— and no others. Phase 3 vendor adapters are complete.Behavior
createFlagdFlagProvidertakes a host-injected flagd / OpenFeature reader. The adapter translates an already-evaluated OpenFeature detail into aFlagResolutionand does not import the OpenFeature SDK or a flagd provider, own a client singleton, or evaluate targeting rules / percentage rollouts.Documented OpenFeature reason kinds only:
TARGETING_MATCH,SPLIT,DEFAULT,STATIC, andCACHED→TARGETING_MATCHSTALE→STALE_CACHE(so the flags client records the stale reason and emits fallback telemetry)DISABLED→DISABLEDFLAG_NOT_FOUND→DEFAULT_FALLBACKERRORcodes and unknown reasons (includingUNKNOWN) propagate so the flags client can recordERROROptional
flagdEvaluationContextbuilds the documented OpenFeature context (targetingKeyplus JSON-compatible attributes). Hosts that need a different context shape mapEvaluationContextthemselves inside the reader.Tests
Date.now()on the production pathSTALE→STALE_CACHEfallback-log caseDocs
Plan status is Phase 3 vendor adapters in-tree, unpublished. MIT © RetireGolden, LLC.
Do not publish or tag from this PR.