Skip to content

feat: Add overrideAffected to the flag metadata - #44

Closed
kinyoklion wants to merge 1 commit into
mainfrom
devin/1794241273-ruby-override-affected
Closed

kinyoklion wants to merge 1 commit into
mainfrom
devin/1794241273-ruby-override-affected

Conversation

@kinyoklion

@kinyoklion kinyoklion commented Nov 9, 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

OpenFeature provider behavior spec (OFP) 1.1.0 added overrideAffected to the flag metadata table (Requirement 3.3.2), applying when the wrapped SDK supports flag overrides (OVERRIDE 1.6.1). Found during the weekly OpenFeature provider audit.

Describe the solution you've provided

Evaluations whose LaunchDarkly reason is marked override-affected now carry overrideAffected: true in the flag metadata. The key is omitted otherwise, the same way inExperiment is handled.

metadata['overrideAffected'] = true if reason.respond_to?(:override_affected) && reason.override_affected

No released LaunchDarkly Ruby SDK has flag overrides yet. EvaluationReason#override_affected exists on the SDK's feat/overrides branch (ruby-server-sdk #450, marked experimental). The respond_to? guard means the provider keeps working with 8.19.x, where the key is never present, and picks up the indicator once an SDK with overrides is installed. The launchdarkly-server-sdk requirement is unchanged. The README flag metadata table lists the new key and says it needs an SDK version that has overrides.

Describe alternatives you've considered

Waiting for the Ruby SDK release with overrides, then requiring that version. That would tie this provider release to the SDK release, and the guard costs one method check.

Additional context

Testing: bundle exec rspec (77 examples) and bundle exec rubocop on Ruby 3.4 against 8.19.1. Specs stub override_affected on a reason to cover true, false and absent. I also ran the converter against the feat/overrides SDK branch: EvaluationReason.fallthrough.with_override_affected(true) produced {"variationIndex" => 0, "overrideAffected" => true}.

Link to Devin session: https://app.devin.ai/sessions/afef6eb710c1429f878ab14b829c297a
Open in Devin Desktop: https://app.devin.ai/desktop/session/afef6eb710c1429f878ab14b829c297a?variant=devin


Devin Review

Co-Authored-By: Ryan Lamb <4955475+kinyoklion@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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant