Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: launchdarkly/openfeature-ruby-server
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.3.0
Choose a base ref
...
head repository: launchdarkly/openfeature-ruby-server
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.3.1
Choose a head ref
  • 5 commits
  • 10 files changed
  • 4 contributors

Commits on Aug 27, 2026

  1. ci: Run RuboCop serially to avoid JRuby thread-parallel failures (#34)

    Run RuboCop serially, because `--parallel` is broken under JRuby as of
    RuboCop 1.90.0.
    
    - CI's `build-linux (jruby-10.0)` job started failing on `main` with no
    code change, purely from RuboCop floating from 1.89.0 to 1.90.0
    (released 2026-08-24)
    - Parallelism buys nothing here: the repo has 15 files to inspect
    - No behavior change for the CRuby/Windows jobs beyond losing the
    (negligible) parallel speedup
    
    **Requirements**
    
    - [ ] I have added test coverage for new or changed functionality
    - [x] I have followed the repository's [pull request submission
    guidelines](../blob/main/CONTRIBUTING.md#submitting-pull-requests)
    - [x] I have validated my changes against all supported platform
    versions
    
    **Related issues**
    
    Failing run:
    https://github.com/launchdarkly/openfeature-ruby-server/actions/runs/32897505749/job/97963432418
    
    <details>
    <summary>Implementation details</summary>
    
    **Root cause**
    
    The failing step emitted 1315 internal cop errors ("An error occurred
    while `Layout/SpaceBeforeFirstArg` cop was inspecting ...") plus 12
    phantom offenses whose reported line/column did not match the source
    line printed alongside them (e.g. `Layout/DefEndAlignment` pointing at a
    comment). The offenses are not real; the AST node locations are wrong.
    
    On JRuby, the `parallel` gem cannot fork, so `Parallel.each` takes its
    `RUBY_PLATFORM.include?('java')` branch and runs work in threads rather
    than worker processes. RuboCop 1.90 began preserving cop instances
    across files (rubocop/rubocop#11119), and `RuboCop::Cop::Base` documents
    the assumption that "under `--parallel` each worker process has its own
    cop instances, so state persists only within a worker's share of the
    files". Under threads that assumption does not hold: the reused cop
    instances see concurrent `processed_source` values, which is consistent
    with the mismatched locations. The thread/instance-sharing mechanism is
    a reading of the RuboCop source, not an upstream-confirmed diagnosis.
    
    **Verification (local, Java 21)**
    
    | JRuby | RuboCop | `--parallel` | serial |
    | --- | --- | --- | --- |
    | 10.0.4.0 | 1.90.0 | fails | clean |
    | 10.0.6.0 | 1.90.0 | fails | clean |
    | 10.1.1.0 | 1.90.0 | fails | clean |
    | 10.0.4.0 | 1.89.0 | clean | clean |
    
    So no JRuby upgrade avoids this, and pinning RuboCop would only defer
    it.
    
    **Alternatives considered**
    
    - Pin `rubocop` to `~> 1.89.0` in the Gemfile: hides the problem and
    freezes lint at an old version.
    - Skip the RuboCop step entirely on JRuby: also works (the CRuby job
    covers lint), but drops JRuby-specific coverage for no benefit over
    running serially.
    - Set `AllCops: ParserEngine: parser_whitequark`: not validated, and
    does not address the thread-safety issue.
    
    </details>
    
    
    Link to Devin session:
    https://app.devin.ai/sessions/47847578334a4bd497c24e3859630cd2
    Requested by: @kinyoklion
    
    <!-- CURSOR_SUMMARY -->
    ---
    
    > [!NOTE]
    > **Overview**
    > CI’s shared RuboCop step no longer passes **`--parallel`**, so lint
    runs serially on every Ruby platform.
    > 
    > That sidesteps RuboCop 1.90’s broken parallel path on JRuby (threads
    reuse cop instances and produce bogus offenses). With only ~15 files,
    the parallel speedup was negligible anyway.
    > 
    > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
    ae9f49b. 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>
    kinyoklion and devin-ai-integration[bot] authored Aug 27, 2026
    Configuration menu
    Copy the full SHA
    ecb71d5 View commit details
    Browse the repository at this point in the history
  2. ci: Apply a Bundler cooldown to dependency resolution (#35)

    Resolve dependencies only to gem versions that have been public for at
    least seven days, using Bundler's
    [cooldown](https://blog.rubygems.org/2026/06/03/cooldown-let-new-gems-be-vetted.html).
    
    - No pinning and no lockfile: we still get the newest version matching
    each constraint, just not one published in the last week
    - `launchdarkly-server-sdk` is exempt, so a constraint bump right after
    our own release still resolves
    - Requires Bundler >= 4.0.13, so CI pins Bundler to 4.0.19 on the
    `setup-ruby` step
    - Contributors on Bundler 2.x are unaffected — the setting is silently
    ignored, so they simply resolve to the newest versions
    
    **Requirements**
    
    - [ ] I have added test coverage for new or changed functionality
    - [x] I have followed the repository's [pull request submission
    guidelines](../blob/main/CONTRIBUTING.md#submitting-pull-requests)
    - [x] I have validated my changes against all supported platform
    versions
    
    **Related issues**
    
    Follow-up to #34: the RuboCop 1.90.0 breakage that PR works around would
    have been held out of CI by this cooldown.
    
    <details>
    <summary>Implementation details</summary>
    
    **How it works**
    
    `source "https://rubygems.org", cooldown: 7` makes Bundler consult the
    per-version `created_at` timestamp in rubygems.org's v2 compact index
    during resolution and pass over any version younger than the window.
    Versions whose source does not expose `created_at` (private registries,
    pre-v2 entries) stay resolvable, so this never silently blocks a
    resolution. `--cooldown 0` / `BUNDLE_COOLDOWN=0` is the escape hatch
    when the newest release is exactly the one you want, e.g. a security
    fix.
    
    **Why the second source block**
    
    Cooldown is stored per remote URI
    (`Bundler::Source::Rubygems#remote_cooldowns`), with no per-gem option,
    and a second `source` block for the *same* URI does not get its own
    value. Naming the registry's index host gives a distinct remote that can
    carry `cooldown: 0`:
    
    ```ruby
    source "https://index.rubygems.org", cooldown: 0 do
      gem "launchdarkly-server-sdk"
    end
    ```
    
    Without this, `cooldown: 7` fails resolution outright today: our gemspec
    requires `launchdarkly-server-sdk ~> 8.15`, 8.15.0 was published
    2026-08-20, and no older version satisfies the constraint, so every
    candidate is inside the window.
    
    ```
    The source contains the following gems matching 'launchdarkly-server-sdk (~> 8.15)':
      * launchdarkly-server-sdk-8.15.0-java
      * launchdarkly-server-sdk-8.15.0
    ... version solving has failed.
    ```
    
    Exempting it is also the right policy: we publish that gem, so it is not
    the untrusted-third-party case cooldown defends against.
    
    **Verification**
    
    Ran locally in containers against this branch (no lockfile, Bundler
    4.0.19):
    
    | Runtime | Result |
    | --- | --- |
    | CRuby 3.4.10 | `rubocop 1.90.0 (available in 6 days), resolved 1.89.0
    instead`; `launchdarkly-server-sdk 8.15.0` resolved; 73 examples 0
    failures; 15 files inspected, no offenses |
    | JRuby 10.0.6.0 | same, including the `-java` platform gem through the
    exempt remote |
    
    Also confirmed Bundler 2.6.9 (Ruby 3.4's default) resolves the same
    Gemfile without error, ignoring the `cooldown:` option.
    
    **Alternatives considered**
    
    - `cooldown: 3` with no exemption: shorter window, and still breaks for
    three days after each of our own SDK releases.
    - Commit a `Gemfile.lock` and let Dependabot bump it with a cooldown:
    gives an auditable dependency history, but pins a library to specific
    versions and stops testing against the newest supported ones.
    - `bundle config set cooldown` / `BUNDLE_COOLDOWN` in the CI workflow
    only: leaves local `bundle install` unprotected, and cannot express a
    per-source exemption.
    - The `bundle-safe-update` gem (pre-dates Bundler's feature): a
    low-adoption single-maintainer dependency, which is itself supply-chain
    risk.
    
    </details>
    
    
    Link to Devin session:
    https://app.devin.ai/sessions/47847578334a4bd497c24e3859630cd2
    Requested by: @kinyoklion
    
    <!-- CURSOR_SUMMARY -->
    ---
    
    > [!NOTE]
    > **Overview**
    > CI and local installs now resolve gems from rubygems.org only if the
    version has been published for **at least seven days**, using Bundler’s
    `cooldown` on the main `Gemfile` source—without adding a lockfile or
    pinning versions beyond existing constraints.
    > 
    > **`launchdarkly-server-sdk`** is pulled through a second source
    (`index.rubygems.org` with `cooldown: 0`) so first-party releases still
    resolve immediately; the PR description notes this is required because
    the current `~> 8.15` constraint would otherwise fail resolution.
    > 
    > **GitHub Actions** pins **Bundler 4.0.19** on `ruby/setup-ruby` in the
    shared CI composite action and the Windows workflow so cooldown is
    honored in CI. **CONTRIBUTING.md** documents the behavior, the Bundler
    4.0.13+ requirement, and `--cooldown 0` for urgent updates.
    > 
    > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
    a2cca54. 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>
    kinyoklion and devin-ai-integration[bot] authored Aug 27, 2026
    Configuration menu
    Copy the full SHA
    be717ce View commit details
    Browse the repository at this point in the history

Commits on Oct 28, 2026

  1. Configuration menu
    Copy the full SHA
    4040bce View commit details
    Browse the repository at this point in the history

Commits on Oct 29, 2026

  1. fix: Require launchdarkly-server-sdk 8.19 so data source failures sta…

    …y recoverable (#42)
    
    **Requirements**
    
    - [x] I have added test coverage for new or changed functionality
    - [x] I have followed the repository's [pull request submission
    guidelines](../blob/main/CONTRIBUTING.md#submitting-pull-requests)
    
    **Describe the solution you've provided**
    
    Bumps the `launchdarkly-server-sdk` floor from `~> 8.15` to `~> 8.19`.
    
    Before 8.19, a transport error the SDK classified as unrecoverable —
    e.g. a 401, including one returned erroneously during a momentary
    service incident — permanently stopped the data source. The provider
    then correctly reported a `PROVIDER_ERROR` ("permanently shut down")
    that never cleared, and recovery required a process restart. Since
    [launchdarkly-server-sdk
    8.19.0](https://github.com/launchdarkly/ruby-server-sdk/releases/tag/8.19.0),
    every transport failure is retried indefinitely and the data source
    recovers on its own, so OFF is reachable only via `close()`. The
    provider's status surface (ERROR from a shutdown data source is
    permanent; everything else recovers to READY) is only guaranteed when
    8.19+ is underneath — this makes that the only resolvable configuration.
    
    Also adds an end-to-end test for the recovery contract that 8.19 makes
    routine: a failed initialization reports `ERROR`, and the provider
    transitions to `READY` once the data source becomes valid
    (`spec/provider_recovery_spec.rb`).
    
    **Testing:** `bundle exec rspec` (74 examples, 0 failures) and `bundle
    exec rubocop` (clean), resolving launchdarkly-server-sdk 8.19.1 and
    openfeature-sdk 0.8.1.
    
    **Related issues**
    
    SDK-2787
    
    <!-- CURSOR_SUMMARY -->
    ---
    
    > [!NOTE]
    > **Overview**
    > Raises the **minimum `launchdarkly-server-sdk`** dependency from `~>
    8.15` to **`~> 8.19`**, so installs always sit on a release where
    transport failures are retried indefinitely and the data source can
    recover without a process restart (matching the OpenFeature provider’s
    ERROR → READY behavior on recovery).
    > 
    > Adds **`spec/provider_recovery_spec.rb`**, which covers the end-to-end
    contract: failed initialization leaves the client in **ERROR**, and
    simulating a **VALID** data source status via `DataSourceStatusListener`
    moves provider status back to **READY**.
    > 
    > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
    d65c7dd. Bugbot is set up for automated
    code reviews on this repo. Configure
    [here](https://www.cursor.com/dashboard/bugbot).</sup>
    <!-- /CURSOR_SUMMARY -->
    tanderson-ld authored Oct 29, 2026
    Configuration menu
    Copy the full SHA
    53f8e8b View commit details
    Browse the repository at this point in the history
  2. chore(main): release 0.3.1 (#41)

    🤖 I have created a release *beep* *boop*
    ---
    
    
    ##
    [0.3.1](0.3.0...0.3.1)
    (2026-10-29)
    
    
    ### Bug Fixes
    
    * Allow openfeature-sdk 0.7 and 0.8
    ([#38](#38))
    ([4040bce](4040bce))
    * Require launchdarkly-server-sdk 8.19 so data source failures stay
    recoverable
    ([#42](#42))
    ([53f8e8b](53f8e8b))
    
    ---
    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** PR that publishes **0.3.1** by bumping the version
    from **0.3.0** in `.release-please-manifest.json`,
    `lib/ldclient-openfeature/version.rb`, and the `SDK_VERSION` example in
    `PROVENANCE.md`.
    > 
    > `CHANGELOG.md` gains a **0.3.1** section (2026-10-29) under **Bug
    Fixes**, documenting what ships in this release: wider compatibility
    with **openfeature-sdk** **0.7** and **0.8**, and a minimum
    **launchdarkly-server-sdk** **8.19** so data source failures remain
    recoverable.
    > 
    > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
    21bdcfc. 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>
    github-actions[bot] authored Oct 29, 2026
    Configuration menu
    Copy the full SHA
    f1ac12b View commit details
    Browse the repository at this point in the history
Loading