Repository navigation
feat: add overrideAffected to flag metadata - #45
Merged
Merged
Conversation
Co-Authored-By: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com>
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 12, 2026 23:20
keelerm84
approved these changes
Nov 16, 2026
3 tasks done
This was referenced Nov 16, 2026
kinyoklion
pushed a commit
that referenced
this pull request
Nov 18, 2026
🤖 I have created a release *beep* *boop* --- ## [0.4.0](0.3.1...0.4.0) (2026-11-17) ### Features * add overrideAffected to flag metadata ([#45](#45)) ([8ae500c](8ae500c)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
kinyoklion
added a commit
that referenced
this pull request
Nov 30, 2026
**Requirements** - [x] I have added test coverage for new or changed functionality - [x] I have followed the repository's pull request submission guidelines - [x] I have validated my changes against all supported platform versions **Related issues** [Accepted OFP requirement 2.1.4.1](https://github.com/launchdarkly/sdk-specs/blob/main/specs/OFP-openfeature-provider-behavior/README.md#requirement-2141). **Describe the solution you've provided** Log an error, rather than a warning, when ignoring a non-string context kind. The existing user-kind fallback is unchanged. Extend the existing invalid-kind test to check the diagnostic. **Describe alternatives you've considered** Keeping a warning hides this required OFP diagnostic from applications with an ERROR log level. **Additional context** The original converter and invalid-kind test were written by Matthew M. Keeler; this fix is by Devin for Ryan. Updated cleanly with main after #45 merged (8ae500c). Local Ruby 3.4: 78 examples pass; RuboCop clean. CI passes on Linux Ruby 3.4, JRuby 10.0 and Windows Ruby 3.4; Devin Review found no issues. Left as a draft per Ryan's account setting. <!-- devin-bot-banner-begin --> --- <p><picture><source srcset="https://app.devin.ai/api/presigned_proxy?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjpudWxsLCJidWNrZXRfbmFtZSI6ImRldmluYXR0YWNobWVudHMiLCJidWNrZXRfa2V5IjoiYXR0YWNobWVudHNfcHJpdmF0ZS9vcmdfaGVBMWRpc2owVHVLd2VVSy9mMjlkYjhmNC0wMzFkLTRiZTktYjZhMi03ZDI3MTBmMmFiNWUiLCJpYXQiOjE3OTQ4NDYzMjksIm9yZ19pZCI6Im9yZ19oZUExZGlzajBUdUt3ZVVLIiwiZmlsZW5hbWUiOiJib3QtYmFubmVyLnBuZyJ9.7jfYTN71OcNs24NVj6QpiqlVcrPZpfvFOd37gdt-EiU"><img height="63" alt="" align="left"></picture><strong><a href="https://app.devin.ai/bots/649040a7a000452fbe03eca40165f725">OpenFeature Maintainer</a> opened this PR for Ryan</strong><br> Implemented in session <a href="https://app.devin.ai/sessions/daa39d583b2c4e35af666a1de29c81b9">Audit openfeature-ruby-server provider this week</a><br> <a href="https://app.devin.ai/review/launchdarkly/openfeature-ruby-server/pull/49">Review with Devin</a> · <a href="https://app.devin.ai/desktop/session/daa39d583b2c4e35af666a1de29c81b9?variant=devin">Open in Devin Desktop</a></p> <br clear="left"> <!-- devin-bot-banner-end --> [SDK-3721](https://launchdarkly.atlassian.net/browse/SDK-3721) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Overview** > When an OpenFeature `EvaluationContext` supplies a non-string `kind`, the converter still discards it and defaults to `user`, but the diagnostic is now emitted at **error** instead of **warn** so it meets OpenFeature provider requirement 2.1.4.1 and shows up for apps that only surface ERROR-level logs. > > The existing invalid-kind spec is extended to assert the logger output includes `ERROR` and the same message text. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit f347acf. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> [SDK-3721]: https://launchdarkly.atlassian.net/browse/SDK-3721?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
kinyoklion
added a commit
that referenced
this pull request
Nov 30, 2026
**Requirements** - [x] I have added test coverage for new or changed functionality - [x] I have followed the repository's pull request submission guidelines - [x] I have validated my changes against all supported platform versions **Related issues** [Accepted OFP requirements 2.4.4–2.4.5.1](https://github.com/launchdarkly/sdk-specs/blob/main/specs/OFP-openfeature-provider-behavior/README.md#24-attributes). **Describe the solution you've provided** Reject the whole privateAttributes reserved attribute with an error if any list entry is not a string, rather than silently retaining a valid subset. Valid/empty lists retain their existing behavior. **Describe alternatives you've considered** Filtering individual entries conflicts with OFP 2.4.5, which requires leaving the corresponding context property unset for an invalid type. **Additional context** A malformed list such as ["email", true] now sets no private attributes; applications must supply a valid all-string list to mark attributes private. The original validation/tests were written by Matthew M. Keeler; this fix is by Devin for Ryan. Updated cleanly with main after #45 merged (8ae500c). Local Ruby 3.4: 79 examples pass; RuboCop clean. CI passes on Linux Ruby 3.4, JRuby 10.0 and Windows Ruby 3.4; Devin Review found no issues. Left as a draft per Ryan's account setting. <!-- devin-bot-banner-begin --> --- <p><picture><source srcset="https://app.devin.ai/api/presigned_proxy?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjpudWxsLCJidWNrZXRfbmFtZSI6ImRldmluYXR0YWNobWVudHMiLCJidWNrZXRfa2V5IjoiYXR0YWNobWVudHNfcHJpdmF0ZS9vcmdfaGVBMWRpc2owVHVLd2VVSy8xYjYyYWMwMi1hN2ZjLTQ1YjktOGFjYi0yYTg0ZWZlMjQzNDAiLCJpYXQiOjE3OTQ4NDYzMTMsIm9yZ19pZCI6Im9yZ19oZUExZGlzajBUdUt3ZVVLIiwiZmlsZW5hbWUiOiJib3QtYmFubmVyLnBuZyJ9.TJtaidsyzDzHyKn8eOuF3oZR6SPFYb0mWTjD1-YL_Kg"><img height="63" alt="" align="left"></picture><strong><a href="https://app.devin.ai/bots/649040a7a000452fbe03eca40165f725">OpenFeature Maintainer</a> opened this PR for Ryan</strong><br> Implemented in session <a href="https://app.devin.ai/sessions/daa39d583b2c4e35af666a1de29c81b9">Audit openfeature-ruby-server provider this week</a><br> <a href="https://app.devin.ai/review/launchdarkly/openfeature-ruby-server/pull/48">Review with Devin</a> · <a href="https://app.devin.ai/desktop/session/daa39d583b2c4e35af666a1de29c81b9?variant=devin">Open in Devin Desktop</a></p> <br clear="left"> <!-- devin-bot-banner-end --> [SDK-3721](https://launchdarkly.atlassian.net/browse/SDK-3721) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Overview** > **`privateAttributes` validation is now all-or-nothing** in `EvaluationContextConverter`: if any list element is not a string, the converter logs an error and **does not** set `_meta.privateAttributes` on the LD context (previously valid strings in a mixed list were still applied). > > Behavior for all-string arrays and empty arrays is unchanged. A spec asserts that `["email", true]` yields an empty `private_attributes` and the existing error message, aligning with OFP behavior that invalid reserved attributes should be left unset rather than partially honored. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 18d0bf1. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> [SDK-3721]: https://launchdarkly.atlassian.net/browse/SDK-3721?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
kinyoklion
added a commit
that referenced
this pull request
Nov 30, 2026
**Requirements** - [x] I have added test coverage for new or changed functionality - [x] I have followed the repository's pull request submission guidelines - [x] I have validated my changes against all supported platform versions **Related issues** [Accepted OFP requirements 2.5.1–2.5.2.1](https://github.com/launchdarkly/sdk-specs/blob/main/specs/OFP-openfeature-provider-behavior/README.md#25-value-conversion). **Describe the solution you've provided** Convert Time and DateTime attributes to UTC ISO-8601 strings, preserving fractional seconds, and Date attributes to midnight UTC. Recursively convert arrays/structures, preserve JSON scalars, and replace unsupported values with null while logging an error. Applies to custom attributes in single/multi-contexts without mutating input values. **Describe alternatives you've considered** JSON serialization leaves native date/object instances in the evaluation context, so local targeting does not see the string/null values required by OFP. **Additional context** The affected converter and original tests were written by Matthew M. Keeler; this fix is by Devin for Ryan. Independent of #45 and held lifecycle work. Updated cleanly with main after #45 merged (8ae500c). Local Ruby 3.4: 82 examples pass; RuboCop clean. CI passes on Linux Ruby 3.4, JRuby 10.0 and Windows Ruby 3.4; Devin Review found no issues. Left as a draft per Ryan's account setting. <!-- devin-bot-banner-begin --> --- <p><picture><source srcset="https://app.devin.ai/api/presigned_proxy?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjpudWxsLCJidWNrZXRfbmFtZSI6ImRldmluYXR0YWNobWVudHMiLCJidWNrZXRfa2V5IjoiYXR0YWNobWVudHNfcHJpdmF0ZS9vcmdfaGVBMWRpc2owVHVLd2VVSy8xMzdmNzg0Mi1kZTk0LTQzZTUtOGJlMy0zMmVkNmVhMDdhZWMiLCJpYXQiOjE3OTQ4NDYyNTEsIm9yZ19pZCI6Im9yZ19oZUExZGlzajBUdUt3ZVVLIiwiZmlsZW5hbWUiOiJib3QtYmFubmVyLnBuZyJ9.C8niQqrw0zlKRscfmysnngx5v40pD-vpAPAeykD2TAw"><img height="63" alt="" align="left"></picture><strong><a href="https://app.devin.ai/bots/649040a7a000452fbe03eca40165f725">OpenFeature Maintainer</a> opened this PR for Ryan</strong><br> Implemented in session <a href="https://app.devin.ai/sessions/daa39d583b2c4e35af666a1de29c81b9">Audit openfeature-ruby-server provider this week</a><br> <a href="https://app.devin.ai/review/launchdarkly/openfeature-ruby-server/pull/47">Review with Devin</a> · <a href="https://app.devin.ai/desktop/session/daa39d583b2c4e35af666a1de29c81b9?variant=devin">Open in Devin Desktop</a></p> <br clear="left"> <!-- devin-bot-banner-end --> [SDK-3721](https://launchdarkly.atlassian.net/browse/SDK-3721) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Overview** > **OpenFeature evaluation contexts are now normalized** before they become `LDContext`, so custom attributes match OpenFeature provider behavior (OFP 2.5.x) instead of being passed through as Ruby objects. > > `EvaluationContextConverter` routes non-reserved attributes through a new **`convert_value`** helper: JSON scalars stay as-is; **`Time` / `DateTime`** become UTC ISO-8601 strings (with fractional seconds when present); **`Date`** becomes midnight UTC; **arrays and hashes** are converted recursively. Unsupported types are **`nil`** with an error log. Input hashes/arrays are not mutated. Conversion applies in single- and multi-kind contexts. > > Specs cover timezone conversion without mutating frozen inputs, nested structures, unsupported types, fractional seconds, and multi-context attributes. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 8a8592e. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> [SDK-3721]: https://launchdarkly.atlassian.net/browse/SDK-3721?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.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.
Requirements
Related issues
Describe the solution you've provided
ResolutionDetailsConverternow setsoverrideAffected: truein flag metadata whenEvaluationReason#override_affectedis true, and omits it otherwise (same asinExperiment, and as js-core'stranslateResult.ts). Thelaunchdarkly-server-sdkdependency moves from~> 8.19to~> 8.20, the first release withoverride_affected. The README flag-metadata table and feature matrix list the new key.Tests cover override-affected true, false, unmarked reasons and an override-affected error evaluation.
bundle exec rspec(78 examples, 0 failures) andrubocoppass locally on Ruby 3.4.7.Describe alternatives you've considered
A
respond_to?(:override_affected)guard that keeps the 8.19 floor (the approach in #44). Raising the floor is simpler, stays within the 8.x major and avoids a dead code path.Additional context
None.
OpenFeature Maintainer opened this PR for Ryan
Implemented in session Add overrideAffected metadata to Ruby provider
Review with Devin · Open in Devin Desktop
SDK-3580
Note
Overview
Adds OpenFeature flag metadata support for LaunchDarkly override evaluations by surfacing
overrideAffected: truewhenEvaluationReason#override_affectedis set, and omitting the key otherwise (same pattern asinExperiment).ResolutionDetailsConvertergains theoverrideAffectedmetadata key; thelaunchdarkly-server-sdkruntime floor moves from ~> 8.19 to ~> 8.20 sooverride_affectedis always available. README feature matrix and flag-metadata table document the new key; specs cover positive, false, absent, and error-with-override cases.Reviewed by Cursor Bugbot for commit 461bd56. Bugbot is set up for automated code reviews on this repo. Configure here.