Repository navigation
fix: Reject mixed-type private attribute lists - #48
Open
kinyoklion wants to merge 2 commits into
Open
kinyoklion wants to merge 2 commits into
kinyoklion wants to merge 2 commits into
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
…-private-attribute-validation
kinyoklion
marked this pull request as ready for review
November 16, 2026 22:20
There was a problem hiding this comment.
Automated risk review (dry run): Medium
This PR would not be automatically approved. Human approval required.
Why: context_converter.rb changes existing privateAttributes handling so mixed-type lists unset all private markings instead of keeping valid strings; that is a privacy-related SDK behavior change, even with the new test in context_converter_spec.rb.
If you disagree with this review, share this PR in #feedback-agent-approvals or submit a changes-requested review explaining why.
Sent by Cursor Approval Agent: Dry-Run PR Approver
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.


Requirements
Related issues
Accepted OFP requirements 2.4.4–2.4.5.1.
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.
Implemented in session Audit openfeature-ruby-server provider this week
Review with Devin · Open in Devin Desktop
SDK-3721
Note
Overview
privateAttributesvalidation is now all-or-nothing inEvaluationContextConverter: if any list element is not a string, the converter logs an error and does not set_meta.privateAttributeson 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 emptyprivate_attributesand the existing error message, aligning with OFP behavior that invalid reserved attributes should be left unset rather than partially honored.Reviewed by Cursor Bugbot for commit 18d0bf1. Bugbot is set up for automated code reviews on this repo. Configure here.