Skip to content

fix(Segments): Standardise regex matching in the Ruby server-side SDK - #121

Open
linear-code[bot] wants to merge 1 commit into
mainfrom
linear/sdk-26-standardise-regex-matching-in-the-ruby-server-side-sdk-dc21
Open

linear-code[bot] wants to merge 1 commit into
mainfrom
linear/sdk-26-standardise-regex-matching-in-the-ruby-server-side-sdk-dc21

Conversation

@linear-code

@linear-code linear-code Bot commented Nov 3, 2026

Copy link
Copy Markdown

Local evaluation matched REGEX segment conditions anywhere in the trait value, so prod matched nonproduction. According to the documented behaviour, patterns must match from the start of the value but don't need to cover all of it. This PR makes Ruby follow that rule, matching the other SDKs.

Changes

  • Regex conditions match from the start of the trait value, including every alternative in patterns like prod|dev.
  • Patterns still don't need to match the whole value. ^…$ still forces a full match.

Closes https://linear.app/flagsmith/issue/SDK-26/standardise-regex-matching-in-the-ruby-server-side-sdk

Review effort: 1/5

Match REGEX conditions from the start of the trait value, for every
alternative, without requiring a full-string match.

Generated with [Linear](https://linear.app/flagsmith/agent-session/33a754df-bc35-481f-ba09-6304b92fc167)

Co-authored-by: linear-code[bot] <222613912+linear-code[bot]@users.noreply.github.com>
@linear-code
linear-code Bot requested a review from a team as a code owner November 3, 2026 15:46
@linear-code
linear-code Bot requested review from khvn26 and removed request for a team November 3, 2026 15:46
@linear-code

linear-code Bot commented Nov 3, 2026

Copy link
Copy Markdown
Author

SDK-26

@coderabbitai

coderabbitai Bot commented Nov 3, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 5bda255d-f598-411d-aa31-78772427804b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@linear-code

linear-code Bot commented Nov 3, 2026

Copy link
Copy Markdown
Author

@coderabbitai review

@codspeed

codspeed Bot commented Nov 3, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 15 untouched benchmarks


Comparing linear/sdk-26-standardise-regex-matching-in-the-ruby-server-side-sdk-dc21 (00ef187) with main (e4efc8f)

Open in CodSpeed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants