chore: Fix segment key in FileData example (includes → included)#406
Merged
jsonbailey merged 1 commit intoJul 10, 2026
Merged
Conversation
The FileData docstring example used "includes" for the segment's list of context keys, but the segment model deserializes "included" (and "excluded"). A key under "includes" is silently ignored, so the context is never actually added to the segment. Correct the example so it works as written. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
jsonbailey
approved these changes
Jul 10, 2026
Contributor
|
Thanks @dyozie-ld |
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.
What
Fixes a functional error in the
FileDatadocstring example. Thesegmentsobject uses"includes"for the list of context keys:Why
The segment model (
LaunchDarkly::Impl::Model::Segment) deserializesincluded/excluded, neverincludes:An unknown
"includes"key is silently dropped andincludeddefaults to an empty array, so a context listed underincludesis never actually added to the segment. The example doesn't work as written.Change
"includes"→"included"in theFileDatadocstring (lib/ldclient-rb/integrations/file_data.rb). Docstring-only; no code behavior change.Note
The same example is shared across LaunchDarkly's SDK docs; a companion fix to the canonical snippet source is in launchdarkly/sdk-meta#541.
🤖 Generated with Claude Code
Note
Low Risk
Documentation-only change in a comment example; no production code paths are modified.
Overview
Corrects the FileData integration docstring JSON example so segment membership uses
"included"instead of"includes".That matches how
LaunchDarkly::Impl::Model::Segmentreads segment data (data[:included]); copying the old example would leaveincludedempty and segment targeting would not work as documented. Docstring-only—no runtime behavior change.Reviewed by Cursor Bugbot for commit bf1ab30. Bugbot is set up for automated code reviews on this repo. Configure here.