feat: Add Config#with_wrapper_information - #421
Merged
Conversation
Co-Authored-By: rlamb@launchdarkly.com <4955475+kinyoklion@users.noreply.github.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: rlamb@launchdarkly.com <4955475+kinyoklion@users.noreply.github.com>
keelerm84
approved these changes
Aug 20, 2026
kinyoklion
pushed a commit
that referenced
this pull request
Aug 20, 2026
🤖 I have created a release *beep* *boop* --- ## [8.15.0](8.14.0...8.15.0) (2026-08-20) ### Features * Add Config#with_wrapper_information ([#421](#421)) ([2de2b75](2de2b75)) * Add environment ID support for hooks ([#414](#414)) ([257e0af](257e0af)) ### Bug Fixes * Escape attribute names reported in redactedAttributes ([#415](#415)) ([447296f](447296f)) * Send the FDv2 polling selector as the "basis" query parameter ([#418](#418)) ([1084931](1084931)) * Stop per-context private attributes from accumulating between contexts ([#416](#416)) ([2fd26ea](2fd26ea)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Overview** > Release Please bump from **8.14.0** to **8.15.0**. Updates `LaunchDarkly::VERSION`, the release-please manifest, provenance example version, and changelog. > > The 8.15.0 notes cover `Config#with_wrapper_information`, environment ID support for hooks, redacted attribute escaping, FDv2 polling `basis` query param, and a fix so per-context private attributes do not accumulate. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit c2fb4f4. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
kinyoklion
added a commit
to launchdarkly/openfeature-ruby-server
that referenced
this pull request
Aug 21, 2026
Reports the provider as the wrapper so LaunchDarkly can attribute usage
to the OpenFeature Ruby provider rather than the base Ruby SDK.
- The provider derives its client configuration with
`Config#with_wrapper_information("open-feature-ruby-server", VERSION)`,
leaving the application's configuration untouched.
- Requires `launchdarkly-server-sdk ~> 8.15`, the release that adds
`Config#with_wrapper_information` (launchdarkly/ruby-server-sdk#421).
That version is now published, so dependency resolution succeeds.
<details>
<summary>Implementation details</summary>
**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**
Part of an audit of the LaunchDarkly OpenFeature providers against the
current OpenFeature specification. The Java and .NET providers already
identify themselves via wrapper info; the Ruby provider did not, so
usage of this provider was indistinguishable from direct use of the Ruby
server SDK.
**Describe the solution you've provided**
`Config` exposes `wrapper_name`/`wrapper_version` as readers only, so
the base SDK gained a supported way to derive a configuration with
different wrapper information. The provider calls it when constructing
its client.
**Describe alternatives you've considered**
Setting the configuration's instance variables from the provider —
rejected, as the provider must not depend on SDK internals. Rebuilding
the configuration from its public readers — rejected because it would
silently drop configuration options the provider does not know about.
**Testing**
`bundle exec rake` (RSpec + RuboCop) on Ruby 3.4: 55 examples, 0
failures; 12 files inspected, no offenses. CI now resolves against the
published 8.15.0 gem.
</details>
Link to Devin session:
https://app.devin.ai/sessions/0c452d209ec54b068ba120b4c92b8f6c
Requested by: @kinyoklion
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Overview**
> The OpenFeature Ruby provider now identifies itself to LaunchDarkly as
wrapper `open-feature-ruby-server` with the gem `VERSION`, so usage is
attributed to this provider instead of the base Ruby SDK.
>
> On client construction it derives config via
`Config#with_wrapper_information` and leaves the caller’s `Config`
unchanged. Runtime dependency is bumped to `launchdarkly-server-sdk ~>
8.15` for that API. A spec asserts wrapper name/version are passed
through.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
ffac4cf. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
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.
Adds
Config#with_wrapper_informationso wrapper libraries can derive a configuration that identifies themselves without reconstructing the application's configuration.wrapper_nameandwrapper_versionreplaced; the original is unchanged.Configuration.Builder(config)) and Java (LDConfig.Builder.fromConfig) SDKs.Config.Implementation details
Requirements
Related issues
The Ruby OpenFeature provider accepts a
LaunchDarkly::Configfrom the application and needs to add wrapper identification to it.Configexposeswrapper_name/wrapper_versionas readers only, so today a wrapper would have to either mutate instance variables or rebuild the configuration option by option, which silently drops any options it does not know about.Describe the solution you've provided
with_wrapper_information(wrapper_name, wrapper_version = nil)usesdupplus protected writers for the two wrapper fields, so all other configuration — including options added in the future — carries over unchanged.Describe alternatives you've considered
Reconstructing a
Configfrom the public readers — rejected because it must be updated whenever a configuration option is added and would drop unknown options. Public writers for the wrapper fields — rejected becauseConfigis otherwise immutable after construction.Testing
bundle exec rspecon Ruby 3.4: 1027 examples, 0 failures.bundle exec rubocopon the changed files: no offenses. Theprotected attr_writerform was also verified on Ruby 3.1, the minimum supported version.@cursor review
Link to Devin session: https://app.devin.ai/sessions/0c452d209ec54b068ba120b4c92b8f6c
Requested by: @kinyoklion
Note
Overview
Lets wrapper libraries (e.g. the OpenFeature provider) stamp
wrapper_name/wrapper_versiononto an application-suppliedConfigwithout reconstructing it option-by-option.with_wrapper_informationdups the config and uses protected writers so the original stays unchanged. Other settings carry over; nested objects (store, logger, etc.) are shared. Specs cover copy, immutability of the original, and a nil default version.Reviewed by Cursor Bugbot for commit 45704b0. Bugbot is set up for automated code reviews on this repo. Configure here.