Skip to content

fix: Treat a repeated override file path in a different case as a repeat on Windows - #2134

Merged
kinyoklion merged 1 commit into
mainfrom
rlamb/overrides-node-repeated-paths-case
Oct 30, 2026
Merged

kinyoklion merged 1 commit into
mainfrom
rlamb/overrides-node-repeated-paths-case

Conversation

@kinyoklion

@kinyoklion kinyoklion commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Summary

The file-based override source drops a path that is listed more than once, so that the file's entries do not collide with themselves. The comparison was exact. On Windows, where file names ignore case, a path repeated in a different case (C:\overrides\a.json and c:\Overrides\A.JSON) survived, and every key in that file then failed as its own duplicate under the default fail handling, so the reload failed and no overrides from it applied.

On Windows the comparison now ignores case. Elsewhere it stays exact, because a case-sensitive file system can hold both names as different files. The platform is read from the platform data the SDK already reports (os.name of Windows), so the shared package does not depend on Node's process.

This is the gap that Bugbot found in the .NET port (launchdarkly/dotnet-core#367).

Tests

Two tests in createOverrideSource.test.ts set the platform's OS name. On Windows, a path repeated in a different case is dropped with the existing warning; this test fails without the change and fails again with it reverted. On Linux, paths that differ only in case are both kept. The sdk-server suite passes (1561 passed, 7 skipped), and lint and formatting are clean.

Opened from termag

SDK-3419


Note

Overview
File override path deduplication now treats paths that differ only by case as the same file when platformData().os.name is Windows, dropping repeats with the existing warning. On other platforms, deduplication stays case-sensitive so two paths can still refer to distinct files.

Implementation replaces indexOf-based filtering with a Set keyed by the path or its lowercase form on Windows. Tests add makeContextOn to mock OS name and cover Windows (drop + warn) vs Linux (keep both, no warn).

Reviewed by Cursor Bugbot for commit db5a4ab. Bugbot is set up for automated code reviews on this repo. Configure here.

…eat on Windows

The file-based override source drops a path listed more than once, so
that the file's entries are not duplicates of themselves. The comparison
was exact, so on Windows, where file names ignore case, a path repeated
in a different case survived and every key of that file failed as its
own duplicate under the default fail handling. On Windows the comparison
now ignores case; elsewhere it stays exact.
@kinyoklion

Copy link
Copy Markdown
Member Author

bugbot review

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 25998 bytes
Compressed size limit: 44000
Uncompressed size: 167978 bytes

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 32220 bytes
Compressed size limit: 32500
Uncompressed size: 152548 bytes

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 34386 bytes
Compressed size limit: 35000
Uncompressed size: 122562 bytes

@kinyoklion

Copy link
Copy Markdown
Member Author

bugbot review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit db5a4ab. Configure here.

@kinyoklion
kinyoklion marked this pull request as ready for review October 29, 2026 21:26
@kinyoklion
kinyoklion requested a review from a team as a code owner October 29, 2026 21:26
@kinyoklion
kinyoklion merged commit d331546 into main Oct 30, 2026
69 checks passed
@kinyoklion
kinyoklion deleted the rlamb/overrides-node-repeated-paths-case branch October 30, 2026 20:48
@github-actions github-actions Bot mentioned this pull request Oct 30, 2026
joker23 pushed a commit that referenced this pull request Nov 2, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>akamai-edgeworker-sdk-common: 2.0.46</summary>

##
[2.0.46](akamai-edgeworker-sdk-common-v2.0.45...akamai-edgeworker-sdk-common-v2.0.46)
(2026-11-02)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-server-sdk-common bumped from ^2.26.0 to ^2.26.1
</details>

<details><summary>akamai-server-base-sdk: 3.0.47</summary>

##
[3.0.47](akamai-server-base-sdk-v3.0.46...akamai-server-base-sdk-v3.0.47)
(2026-11-02)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
* @launchdarkly/akamai-edgeworker-sdk-common bumped from ^2.0.45 to
^2.0.46
</details>

<details><summary>akamai-server-edgekv-sdk: 1.4.49</summary>

##
[1.4.49](akamai-server-edgekv-sdk-v1.4.48...akamai-server-edgekv-sdk-v1.4.49)
(2026-11-02)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
* @launchdarkly/akamai-edgeworker-sdk-common bumped from ^2.0.45 to
^2.0.46
    * @launchdarkly/js-server-sdk-common bumped from ^2.26.0 to ^2.26.1
</details>

<details><summary>client-testing-plugin: 1.0.28</summary>

##
[1.0.28](client-testing-plugin-v1.0.27...client-testing-plugin-v1.0.28)
(2026-11-02)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-client-sdk-common bumped from 1.34.1 to 1.35.0
  * devDependencies
    * @launchdarkly/js-client-sdk bumped from 4.13.1 to 4.14.0
    * @launchdarkly/react-sdk bumped from 4.1.29 to 4.1.30
  * peerDependencies
    * @launchdarkly/js-client-sdk bumped from ^4.9.1 to ^4.14.0
    * @launchdarkly/react-sdk bumped from ^4.1.4 to ^4.1.30
</details>

<details><summary>cloudflare-server-sdk: 2.7.48</summary>

##
[2.7.48](cloudflare-server-sdk-v2.7.47...cloudflare-server-sdk-v2.7.48)
(2026-11-02)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
* @launchdarkly/js-server-sdk-common-edge bumped from 2.6.43 to 2.6.44
</details>

<details><summary>fastly-server-sdk: 0.2.38</summary>

##
[0.2.38](fastly-server-sdk-v0.2.37...fastly-server-sdk-v0.2.38)
(2026-11-02)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-server-sdk-common bumped from 2.26.0 to 2.26.1
</details>

<details><summary>jest: 1.0.39</summary>

##
[1.0.39](jest-v1.0.38...jest-v1.0.39)
(2026-11-02)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
* @launchdarkly/react-native-client-sdk bumped from ~10.23.1 to ~10.23.2
</details>

<details><summary>js-client-sdk: 4.14.0</summary>

##
[4.14.0](js-client-sdk-v4.13.1...js-client-sdk-v4.14.0)
(2026-11-02)


### Features

* Add a shared WebSocket base to the contract test utils and use it in
the browser contract tests
([#2136](#2136))
([af2f096](af2f096))
* Add an opt-in fetch-based EventSource entry to the browser SDK
([#2033](#2033))
([7a21f6f](7a21f6f))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-client-sdk-common bumped from 1.34.1 to 1.35.0
</details>

<details><summary>js-client-sdk-common: 1.35.0</summary>

##
[1.35.0](js-client-sdk-common-v1.34.1...js-client-sdk-common-v1.35.0)
(2026-11-02)


### Features

* Add an opt-in fetch-based EventSource entry to the browser SDK
([#2033](#2033))
([7a21f6f](7a21f6f))
</details>

<details><summary>js-server-sdk-common: 2.26.1</summary>

##
[2.26.1](js-server-sdk-common-v2.26.0...js-server-sdk-common-v2.26.1)
(2026-11-02)


### Bug Fixes

* Treat a repeated override file path in a different case as a repeat on
Windows ([#2134](#2134))
([d331546](d331546))
* Warn when offline mode skips the override source, and ignore snapshots
after close
([#2133](#2133))
([612918c](612918c))
</details>

<details><summary>js-server-sdk-common-edge: 2.6.44</summary>

##
[2.6.44](js-server-sdk-common-edge-v2.6.43...js-server-sdk-common-edge-v2.6.44)
(2026-11-02)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-server-sdk-common bumped from 2.26.0 to 2.26.1
</details>

<details><summary>node-client-sdk: 4.4.1</summary>

##
[4.4.1](node-client-sdk-v4.4.0...node-client-sdk-v4.4.1)
(2026-11-02)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-client-sdk-common bumped from 1.34.1 to 1.35.0
</details>

<details><summary>node-server-sdk: 9.16.1</summary>

##
[9.16.1](node-server-sdk-v9.16.0...node-server-sdk-v9.16.1)
(2026-11-02)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-server-sdk-common bumped from 2.26.0 to 2.26.1
</details>

<details><summary>node-server-sdk-dynamodb: 6.4.4</summary>

##
[6.4.4](node-server-sdk-dynamodb-v6.4.3...node-server-sdk-dynamodb-v6.4.4)
(2026-11-02)


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @launchdarkly/node-server-sdk bumped from 9.16.0 to 9.16.1
  * peerDependencies
    * @launchdarkly/node-server-sdk bumped from >=9.14.1 to >=9.16.1
</details>

<details><summary>node-server-sdk-otel: 1.3.40</summary>

##
[1.3.40](node-server-sdk-otel-v1.3.39...node-server-sdk-otel-v1.3.40)
(2026-11-02)


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @launchdarkly/node-server-sdk bumped from 9.16.0 to 9.16.1
  * peerDependencies
    * @launchdarkly/node-server-sdk bumped from >=9.11.3 to >=9.16.1
</details>

<details><summary>node-server-sdk-redis: 4.4.4</summary>

##
[4.4.4](node-server-sdk-redis-v4.4.3...node-server-sdk-redis-v4.4.4)
(2026-11-02)


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @launchdarkly/node-server-sdk bumped from 9.16.0 to 9.16.1
  * peerDependencies
    * @launchdarkly/node-server-sdk bumped from >=9.14.1 to >=9.16.1
</details>

<details><summary>openfeature-cloudflare-server: 1.1.1</summary>

##
[1.1.1](openfeature-cloudflare-server-v1.1.0...openfeature-cloudflare-server-v1.1.1)
(2026-11-02)


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @launchdarkly/cloudflare-server-sdk bumped from 2.7.47 to 2.7.48
  * peerDependencies
    * @launchdarkly/cloudflare-server-sdk bumped from ^2.7.0 to ^2.7.48
</details>

<details><summary>openfeature-node-server: 2.1.4</summary>

##
[2.1.4](openfeature-node-server-v2.1.3...openfeature-node-server-v2.1.4)
(2026-11-02)


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @launchdarkly/node-server-sdk bumped from 9.16.0 to 9.16.1
  * peerDependencies
    * @launchdarkly/node-server-sdk bumped from ^9.0.0 to ^9.16.1
</details>

<details><summary>react-native-client-sdk: 10.23.2</summary>

##
[10.23.2](react-native-client-sdk-v10.23.1...react-native-client-sdk-v10.23.2)
(2026-11-02)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-client-sdk-common bumped from 1.34.1 to 1.35.0
</details>

<details><summary>react-sdk: 4.1.30</summary>

##
[4.1.30](react-sdk-v4.1.29...react-sdk-v4.1.30)
(2026-11-02)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-client-sdk bumped from ^4.13.1 to ^4.14.0
    * @launchdarkly/js-server-sdk-common bumped from ^2.26.0 to ^2.26.1
</details>

<details><summary>server-sdk-ai: 2.0.17</summary>

##
[2.0.17](server-sdk-ai-v2.0.16...server-sdk-ai-v2.0.17)
(2026-11-02)


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @launchdarkly/js-server-sdk-common bumped from 2.26.0 to 2.26.1
  * peerDependencies
    * @launchdarkly/js-server-sdk-common bumped from ^2.0.0 to ^2.26.1
</details>

<details><summary>server-sdk-ai-langchain: 0.8.28</summary>

##
[0.8.28](server-sdk-ai-langchain-v0.8.27...server-sdk-ai-langchain-v0.8.28)
(2026-11-02)


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @launchdarkly/server-sdk-ai bumped from ^2.0.16 to ^2.0.17
  * peerDependencies
* @launchdarkly/server-sdk-ai bumped from ^1.1.1 || ^2.0.0 to ^2.0.17
</details>

<details><summary>server-sdk-ai-openai: 0.7.28</summary>

##
[0.7.28](server-sdk-ai-openai-v0.7.27...server-sdk-ai-openai-v0.7.28)
(2026-11-02)


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @launchdarkly/js-server-sdk-common bumped from 2.26.0 to 2.26.1
    * @launchdarkly/server-sdk-ai bumped from ^2.0.16 to ^2.0.17
  * peerDependencies
* @launchdarkly/server-sdk-ai bumped from ^1.1.1 || ^2.0.0 to ^2.0.17
</details>

<details><summary>server-sdk-ai-vercel: 0.7.28</summary>

##
[0.7.28](server-sdk-ai-vercel-v0.7.27...server-sdk-ai-vercel-v0.7.28)
(2026-11-02)


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @launchdarkly/server-sdk-ai bumped from ^2.0.16 to ^2.0.17
  * peerDependencies
* @launchdarkly/server-sdk-ai bumped from ^1.1.1 || ^2.0.0 to ^2.0.17
</details>

<details><summary>shopify-oxygen-sdk: 0.2.3</summary>

##
[0.2.3](shopify-oxygen-sdk-v0.2.2...shopify-oxygen-sdk-v0.2.3)
(2026-11-02)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-server-sdk-common bumped from 2.26.0 to 2.26.1
</details>

<details><summary>vercel-server-sdk: 1.3.71</summary>

##
[1.3.71](vercel-server-sdk-v1.3.70...vercel-server-sdk-v1.3.71)
(2026-11-02)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
* @launchdarkly/js-server-sdk-common-edge bumped from 2.6.43 to 2.6.44
</details>

<details><summary>vue-client-sdk: 3.0.9</summary>

##
[3.0.9](vue-client-sdk-v3.0.8...vue-client-sdk-v3.0.9)
(2026-11-02)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-client-sdk bumped from 4.13.1 to 4.14.0
</details>

---
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 **version bump** across the monorepo (manifest,
changelogs, `package.json`, and `x-release-please-version` strings). No
new application logic in this diff—the release carries work already
merged on `main`.
> 
> **Client (1.35.0 / 4.14.0):** `@launchdarkly/js-client-sdk-common`
adds an **opt-in fetch-based EventSource** path; the browser SDK
**4.14.0** picks that up and also notes shared WebSocket contract-test
infrastructure.
> 
> **Server common (2.26.1):** `@launchdarkly/js-server-sdk-common` fixes
**override file deduplication on Windows** (same path, different casing)
and improves **offline + override** behavior (warn when overrides are
skipped; ignore snapshots after close).
> 
> **Cascade:** Node server/client, React/Vue/React Native, edge SDKs
(Cloudflare, Vercel, Akamai, Fastly, Shopify Oxygen), AI SDK +
providers, OpenFeature wrappers, stores, OTEL, and tooling get
**patch/minor bumps** that realign workspace dependencies on those
commons releases.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
d620eaf. 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/go-server-sdk that referenced this pull request Nov 3, 2026
…eat on Windows (#494)

<!-- TERMAG_PR_BODY_BEGIN -->
## Summary

The file-based override source drops a path that is listed more than
once (#477, released in 7.21.0), so that the file's entries do not
collide with themselves. The comparison was exact. On Windows, where
file names ignore case, a path repeated in a different case
(`C:\overrides\a.json` and `c:\Overrides\A.JSON`) survived, and every
key in that file then failed as its own duplicate under the default fail
handling, so the reload failed and no overrides from it applied.

On Windows the comparison now ignores case. Elsewhere it stays exact,
because a case-sensitive file system can hold both names as different
files. The deduplication moves into `uniqueFilePaths`, so both behaviors
are tested on every platform.

This is the gap that Bugbot found in the .NET port
(launchdarkly/dotnet-core#367). The Node change is
launchdarkly/js-core#2134.

## Tests

- `TestUniqueFilePathsIgnoresCaseOnlyWhenFileNamesIgnoreCase` checks
both modes directly. It fails with case folding disabled.
-
`TestFileSourceTreatsAPathRepeatedInDifferentCaseAsARepeatOnlyOnWindows`
builds a source from two paths that differ in case: one path on Windows,
both elsewhere.

`go test -race ./...` passes and `make lint` reports no issues.
<!-- TERMAG_PR_BODY_END -->

<!-- termag: box=i-0575d1c54853058d7 project=go-server-sdk -->
<sub>Opened from termag</sub>

[SDK-3419](https://launchdarkly.atlassian.net/browse/SDK-3419)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Overview**
> Fixes file-based override sources on **Windows** where listing the
same path twice with different casing (e.g. `C:\overrides\a.json` and
`c:\Overrides\A.JSON`) was not treated as a duplicate. That let the file
load twice and triggered **duplicate-key failures** under default
handling, so overrides could fail to apply.
> 
> Path deduplication is moved into **`uniqueFilePaths`**, which compares
paths case-insensitively when `ignoreCase` is true (enabled on Windows
via `runtime.GOOS`). On case-sensitive systems, comparison stays exact
so two paths that differ only by case can still refer to different
files.
> 
> Tests cover both modes of `uniqueFilePaths` and assert build-time
behavior on Windows vs other platforms.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
ebaff4f. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

[SDK-3419]:
https://launchdarkly.atlassian.net/browse/SDK-3419?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
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.

2 participants