feature/cp-11715-add-exist-and-does-not-exist-logic-to-attributes-android#354
Conversation
…roid Added a new Attribute condition type in Targeting for `AppBanner`: Exists/NotExists
There was a problem hiding this comment.
1 issue found across 2 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e7de6d4. Configure here.
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="cleverpush/src/main/java/com/cleverpush/banner/AppBannerModule.java">
<violation number="1" location="cleverpush/src/main/java/com/cleverpush/banner/AppBannerModule.java:757">
P1: NotExists parse-error handling contradicts documented asymmetric error handling. The PR description specifies that on corrupted JSON: Exists fails (false) and NotExists passes (true). But this change flips NotExists to also fail (currentMatch = false), making the error handling symmetric instead of asymmetric. This means users with corrupted subscription attributes data will never match NotExists targeting rules, which directly contradicts the stated test spec 'Corrupted SUBSCRIPTION_ATTRIBUTES JSON: Exists fails; NotExists passes.' Additionally, the rationale is sound: if attributes can't be parsed, we can't confirm the key exists, so NotExists should treat the attribute as absent and match.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic

Added a new Attribute condition type in Targeting for
AppBanner: Exists/NotExistsNote
Low Risk
Small, localized change to banner attribute filter evaluation with no auth or network impact; wrong key presence logic could only mis-target banners.
Overview
App banner attribute targeting can now use Exists and NotExists relations (
exists/notExistsonCheckFilterRelation), so campaigns can target subscribers by whether a given attribute key is present, not only by value comparisons.In
isBannerAttributeTargetingAllowed, those relations readSUBSCRIPTION_ATTRIBUTESfrom shared preferences and set a match fromJSONObject.has(attributeId); NotExists inverts that. Parse failures leavecurrentMatchfalse (same as other relations on error). Existing value-based relations are unchanged.Reviewed by Cursor Bugbot for commit 73eaaa7. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Adds Exists/NotExists attribute targeting for
AppBanneron Android so campaigns can match when a subscription attribute key is present or absent. Satisfies Linear CP-11715.ExistsandNotExiststoCheckFilterRelationwith string keysexistsandnotExists.isBannerAttributeTargetingAllowed, readSUBSCRIPTION_ATTRIBUTESand checkJSONObject.has(attributeId); on JSON parse error neither relation matches.Written for commit 73eaaa7. Summary will update on new commits.