Skip to content

fix: respect rule type for sub-rules in segment evaluation#266

Open
Zaimwa9 wants to merge 1 commit intomainfrom
feat/apply-top-rules-with-any-type
Open

fix: respect rule type for sub-rules in segment evaluation#266
Zaimwa9 wants to merge 1 commit intomainfrom
feat/apply-top-rules-with-any-type

Conversation

@Zaimwa9
Copy link
Copy Markdown
Contributor

@Zaimwa9 Zaimwa9 commented May 7, 2026

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

  • Bumped engine-test-data submodule from v3.5.0 to v3.7.0
  • Fixed segment evaluation: sub-rules now respect the parent rule's type (ANY/ALL/NONE) instead of hardcoding ALL

Equivalent fix to flagsmith-engine#313.

How did you test this code?

  • engine-test-data v3.7.0 includes 3 new test cases for sub-rule type handling
  • All existing + new tests pass (380/380)

Sub-rules were always evaluated with ALL logic, ignoring the parent
rule's type field (ANY/ALL/NONE). Now uses evaluateRuleConditions for
sub-rules, matching the existing conditions behavior.

Bumps engine-test-data from v3.5.0 to v3.7.0 which includes test cases
for this fix.

Equivalent fix to flagsmith-engine#313.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Zaimwa9 Zaimwa9 requested a review from a team as a code owner May 7, 2026 08:16
@Zaimwa9 Zaimwa9 requested review from gagantrivedi and removed request for a team May 7, 2026 08:16
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.

1 participant