Repository navigation
fix!: Align evaluation reason and error mappings with OFP - #79
kinyoklion wants to merge 1 commit into
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
There was a problem hiding this comment.
Risk: medium.
Automated risk review (dry run): Medium
This PR would not be automatically approved. Human approval required.
Why: EvaluationDetailExtensions.cs is a breaking SDK behavior change: ResolutionDetails.Reason becomes DISABLED/TARGETING_MATCH instead of OFF/TARGET_MATCH, and unknown error kinds now map to GENERAL instead of throwing. Tests cover the new mappings, but this is still a user-facing evaluation-reason change, so it is not Low.
If you disagree with this review, share this PR in #feedback-agent-approvals or submit a changes-requested review explaining why.
Human review is needed and no reviewers were assigned.
Sent by Cursor Approval Agent: Dry-Run PR Approver


Requirements
Related issues
OFP reason/error mapping. Separate from the existing start-wait PR.
Describe the solution you've provided
Return the OpenFeature
DISABLEDandTARGETING_MATCHreasons for disabled and directly targeted evaluations. Map unrecognized LaunchDarkly error kinds toGENERALrather than throwing. Other evaluation details and metadata stay unchanged.Describe alternatives you've considered
Keeping the LaunchDarkly reason strings disagrees with OFP and OpenFeature's standard reason constants.
Additional context
Test with
BUILDFRAMEWORKS='net6.0;net8.0' dotnet test; CI covers the supported platform matrix. SDK-library change: no UI screenshots or staging preview apply.Original mapping and affected tests: Ryan Lamb (git blame); this fix: Devin. This intentionally changes the two nonstandard reason strings consumed by hooks/applications.
Validation: local .NET 6/8 tests pass; current stable dependencies build without warnings on all target frameworks; Windows, macOS, and Linux CI and Devin Review pass.
Release classification: breaking; intended for a major release alongside the existing start-wait change. Retain the
fix!:title when squash merging.BREAKING CHANGE: Disabled and directly targeted evaluations now return
DISABLEDandTARGETING_MATCHinResolutionDetails.Reasoninstead ofOFFandTARGET_MATCH. Applications and hooks comparing the previous strings must update their comparisons.Implemented in session Audit openfeature-dotnet-server provider this week
Review with Devin · Open in Devin Desktop
SDK-3723
Note
Overview
Aligns
ToResolutionDetailsreason strings with OpenFeature: disabled flags now emitDISABLED(wasOFF) and direct targeting emitsTARGETING_MATCH(wasTARGET_MATCH); other reason identifiers are unchanged.Error handling no longer throws on unrecognized
EvaluationErrorKindvalues—those cases fall through toErrorType.Generallike generic exceptions, with tests added for that behavior.Reviewed by Cursor Bugbot for commit 1b64890. Bugbot is set up for automated code reviews on this repo. Configure here.