Skip to content

fix!: Align evaluation reason and error mappings with OFP - #79

Open
kinyoklion wants to merge 1 commit into
mainfrom
devin/1794846185-dotnet-evaluation-reasons
Open

kinyoklion wants to merge 1 commit into
mainfrom
devin/1794846185-dotnet-evaluation-reasons

Conversation

@kinyoklion

@kinyoklion kinyoklion commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

OFP reason/error mapping. Separate from the existing start-wait PR.

Describe the solution you've provided

Return the OpenFeature DISABLED and TARGETING_MATCH reasons for disabled and directly targeted evaluations. Map unrecognized LaunchDarkly error kinds to GENERAL rather 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 DISABLED and TARGETING_MATCH in ResolutionDetails.Reason instead of OFF and TARGET_MATCH. Applications and hooks comparing the previous strings must update their comparisons.


OpenFeature Maintainer opened this PR for Ryan
Implemented in session Audit openfeature-dotnet-server provider this week
Review with Devin · Open in Devin Desktop


SDK-3723


Note

Overview
Aligns ToResolutionDetails reason strings with OpenFeature: disabled flags now emit DISABLED (was OFF) and direct targeting emits TARGETING_MATCH (was TARGET_MATCH); other reason identifiers are unchanged.

Error handling no longer throws on unrecognized EvaluationErrorKind values—those cases fall through to ErrorType.General like 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.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@devin-ai-integration devin-ai-integration Bot changed the title fix: Align evaluation reason and error mappings with OFP fix!: Align evaluation reason and error mappings with OFP Nov 16, 2026
@kinyoklion
kinyoklion marked this pull request as ready for review November 16, 2026 22:31
@kinyoklion
kinyoklion requested a review from a team as a code owner November 16, 2026 22:31
@cursor cursor Bot added the risk:medium label Nov 16, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Open in Web View Automation 

Sent by Cursor Approval Agent: Dry-Run PR Approver

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant