feat: adding cookie (exist , not exist) conditions - #376
Merged
JosephSamirL merged 1 commit intoApr 15, 2026
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces 'exists' and 'doesNotExist' operators to the rule engine, enabling checks for the presence or absence of data keys. The changes include updates to rule validation in RuleManager, new comparison logic in the Comparisons utility, and comprehensive unit tests. Review feedback identifies a logic bug where existence checks may be unreachable when the input data object is empty and recommends including the 'not_exists' alias in both validation and processing logic for consistency.
JosephSamirL
force-pushed
the
feat/adding-exist-not-exist-cookie-condition
branch
from
April 15, 2026 13:28
9bd703d to
8cbf791
Compare
abbaseya
requested changes
Apr 15, 2026
JosephSamirL
force-pushed
the
feat/adding-exist-not-exist-cookie-condition
branch
from
April 15, 2026 13:44
8cbf791 to
ecae4f6
Compare
JosephSamirL
force-pushed
the
feat/adding-exist-not-exist-cookie-condition
branch
from
April 15, 2026 13:48
ecae4f6 to
8183b67
Compare
|
abbaseya
approved these changes
Apr 15, 2026
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.



Changes:
1- Add exists, not_exists, and doesNotExist comparison methods to evaluate cookie presence/absence without value matching
2- Update RuleManager.isValidRule() to allow existence operators without a value field
3- Update RuleManager._processRuleItem() to correctly evaluate existence operators when the key is missing or data is empty
4- Add unit tests for all new comparison methods and rule evaluation scenarios