brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.94k stars 2.35k forks source link

Follow up to #42321 - [ads] Add SmartNTT numerical condition matcher defaults #42374

Closed btlechowski closed 2 days ago

btlechowski commented 2 days ago

Description

Default value for explicit matcher fails.

matcher:

                    "conditionMatchers": [{
                            "prefPath": "tab_stats.window_count_maxFAIL",
                            "condition": "0"
                        }
                    ],

Steps to reproduce

  1. Clean profile
  2. Run Brave
  3. Make sure NTT component is downloaded
  4. Use matcher:
                    "conditionMatchers": [{
                            "prefPath": "tab_stats.window_count_maxFAIL",
                            "condition": "0"
                        }
                    ],
  5. Trigger NTT ad

Actual result

Ad is not served.

Expected result

Ad is served.

Reproduces how often

Easily reproduced

Brave version (brave://version info)

Brave 1.75.32 Chromium: 131.0.6778.69 (Official Build) nightly (64-bit)
Revision 3ef3853f2179ab519d1c7ed5ec64df16d5b6ceb1
OS Linux

cc @tmancey @aseren @iambrianfung

tmancey commented 2 days ago

@btlechowski the condition matcher is incorrect, it should be [R=]:0 to match against zero.

tmancey commented 2 days ago

@btlechowski @iambrianfung default value for explicit matcher is not supported, as above, and if we added it could make debugging matchers more difficult. Great idea @btlechowski but closing as wont fix for now due to the debugging.