Repository navigation
feat: Populate OpenFeature flag metadata from the LaunchDarkly evaluation reason - #33
Open
kinyoklion wants to merge 2 commits into
Open
kinyoklion wants to merge 2 commits into
kinyoklion wants to merge 2 commits into
Conversation
…tion reason Co-Authored-By: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com>
Contributor
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
kinyoklion
marked this pull request as ready for review
November 4, 2026 20:51
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit aca7cff. Configure here.
Co-Authored-By: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com>
This branch has not been deployed
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.

OpenFeature PHP SDK 2.4.0 (released 2026-11-04) added flag metadata to
ResolutionDetails/EvaluationDetails. This populates it with the OFP-defined keys so LaunchDarkly reason details (experiment membership, matched rule, failed prerequisite, Big Segments status) are visible through OpenFeature.ResolutionDetailsConverternow always sets metadata, containing only the OFP 3.3.1 keys (variationIndex,inExperiment,ruleIndex,ruleId,prerequisiteKey,bigSegmentsStatus); each key is omitted when not applicable (OFP 3.3.2), and no other keys are added (OFP 3.3.3). For default values the metadata is an empty array.open-feature/sdk^2.0→^2.4(ResolutionDetailsBuilder::withMetadatais new in 2.4.0) andlaunchdarkly/server-sdk^6.2→^6.4(EvaluationReason::bigSegmentsEvaluationStatus()is new in 6.4.0).Requirements
Related issues
Found by the weekly OpenFeature provider audit. Spec: OFP section 3.3 in
launchdarkly/sdk-specs.Implementation details
bigSegmentsStatususes theBigSegmentsEvaluationStatusenum's string value (HEALTHY,STALE,NOT_CONFIGURED,STORE_ERROR).inExperimentis only present whentrue.tests/ResolutionDetailsConverterTest.phpcovers fallthrough, experiment fallthrough, rule match, prerequisite failed, Big Segments status, error/default and off-without-variation cases, plus an end-to-end provider evaluation withTestDatarule matching.@phpstan-ignore-next-linebecause the LaunchDarkly SDK documentsFlagBuilder::ifMatch's variadic values asarray, though it takes individual values.make check(php-cs-fixer, phpstan level 8, phpunit: 46 tests) passes locally. Thehello-openfeature-php-serverexample run against this branch returned{"variationIndex":0,"ruleIndex":0,"ruleId":"…"}for a rule-matched flag.Link to Devin session: https://app.devin.ai/sessions/4697c1407a49413caaaf2a623231755a
Open in Devin Desktop: https://app.devin.ai/desktop/session/4697c1407a49413caaaf2a623231755a?variant=devin
Requested by: @kinyoklion