fix(openfeature): return ResolutionDetails from provider and bump openfeature-sdk to 0.6.5 - #130
Draft
jonathannorris wants to merge 2 commits into
Draft
fix(openfeature): return ResolutionDetails from provider and bump openfeature-sdk to 0.6.5#130jonathannorris wants to merge 2 commits into
jonathannorris wants to merge 2 commits into
Conversation
…nfeature-sdk to 0.6.5
jonathannorris
force-pushed
the
chore/of-sdk-bump
branch
from
August 7, 2026 15:38
20e43d5 to
93df40d
Compare
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
DevCycle::Variableinstead ofOpenFeature::SDK::Provider::ResolutionDetails, which made everyfetch_*_detailscall raiseopenfeature-sdkfrom 0.4.1 to 0.6.5required_ruby_versionfrom>= 3.2to>= 3.4The Problem
The six
fetch_*_valuemethods returned aDevCycle::Variable, which only exposesvalue.EvaluationDetails' delegators forreason/variant/error_code/flag_metadatahad nothing to call:This is pre-existing, not a 0.6.5 regression; 0.4.1's
EvaluationDetailshas the same delegator list. 0.6.5 makes it worse in one way: its type-mismatch path also assignsvariant=, whichVariablelacks, and its newbegin/rescuearoundevaluate_flagswallows that into a silent default-value return, so the failure is masked instead of raised.Implementation
The six
fetch_*_valuemethods now delegate to one privateresolvehelper returningResolutionDetailswithvalue,reason, andflag_metadata. Reason passes DevCycle's own eval reason through when present, since the vocabulary already overlaps OpenFeature's (DEFAULT,SPLIT,TARGETING_MATCH), falling back based onisDefaulted.eval[:details]andeval[:target_id]are surfaced as flag metadata. Thefetch_integer_value.to_icoercion is preserved.Verified end to end:
Contrary to what I expected going in, the provider was not on a legacy interface. Diffing the 0.4.1 and 0.6.5 gems shows the contract method names and signatures are byte-for-byte identical, and the suite passes on 0.6.5 with zero code changes. The return type was the only real non-conformance.
Notes
The Ruby version bump is forced by upstream: openfeature-sdk 0.6.0+ sets
required_ruby_version >= 3.4. Anyone on 3.2 or 3.3 cannot install the next release, and Ruby 3.3 is in maintenance until roughly March 2027, so that is a real audience. The alternative is staying on 0.4.x. I collapsed the CI matrix from['3.2.0','3.3.0','3.4.1']to['3.4.1']; you may want a second entry for real coverage.error_codeis still never populated. Mapping DevCycle'sDEFAULT_REASON_DETAILSontoErrorCodewould makefetch_*_detailsgenuinely useful, and is worth a follow-up.