wurfl rtd: add none_lce enrichment type for A/B test control group#14527
wurfl rtd: add none_lce enrichment type for A/B test control group#14527lucor wants to merge 6 commits intoprebid:masterfrom
Conversation
Distinguish control-group beacons where LCE would have been used (no cache) from those where WURFL cache was present. - Add NONE_LCE enrichment type: control + no cache → 'none_lce' - Remove abExcludeLCE parameter - Simplify ABTestManager by removing LCE exclusion logic
Control group early return skipped reading wurfl_id, sampling_rate, tier and over_quota from cache, sending empty/default values in the beacon.
…data fix(wurfl-rtd): read cache metadata in control group beacon
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 394643e96f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if (cachedWurflData) { | ||
| wurflId = cachedWurflData.WURFL?.wurfl_id || ''; | ||
| samplingRate = cachedWurflData.wurfl_pbjs?.sampling_rate ?? DEFAULT_SAMPLING_RATE; | ||
| tier = cachedWurflData.wurfl_pbjs?.tier ?? ''; | ||
| overQuota = cachedWurflData.wurfl_pbjs?.over_quota ?? DEFAULT_OVER_QUOTA; |
There was a problem hiding this comment.
Reset control-group beacon metadata when cache is absent
In the control-group early return, cache-derived fields are only updated inside the if (cachedWurflData) block, so when a user had cache on a previous auction but later runs without cache, wurfl_id, sampling_rate, tier, and over_quota keep stale values from the prior run. This mislabels none_lce beacons and can apply the wrong sampling rate (including skipping beacons unexpectedly) because onAuctionEndEvent uses the persisted module-level state.
Useful? React with 👍 / 👎.
Pull Request Test Coverage Report for Build 22723213253Details
💛 - Coveralls |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 437faa8db2
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if (cachedWurflData) { | ||
| wurflId = cachedWurflData.WURFL?.wurfl_id || ''; | ||
| samplingRate = cachedWurflData.wurfl_pbjs?.sampling_rate ?? DEFAULT_SAMPLING_RATE; | ||
| tier = cachedWurflData.wurfl_pbjs?.tier ?? ''; | ||
| overQuota = cachedWurflData.wurfl_pbjs?.over_quota ?? DEFAULT_OVER_QUOTA; |
There was a problem hiding this comment.
Reset control-group beacon metadata on cache miss
When the control-group early return runs without cache, wurflId, samplingRate, tier, and overQuota are left untouched, so they can leak values from a previous auction and produce incorrect none_lce beacon metadata (including incorrect sampling decisions in onAuctionEndEvent). Fresh evidence in this commit is that abExcludeLCE was removed, so the no-cache control path now runs under default A/B config and this stale-state bug affects the normal experiment flow rather than an opt-in edge case.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
The module-level variables (wurflId, samplingRate, tier, overQuota) are reset to defaults in init() which runs once per page load. Within the same page, localStorage cache doesn't disappear between auctions — if cache is present at auction 1, it's present at auction 2. This is also the same pattern used in the treatment path (lines 1173-1250), where cache and LCE branches don't explicitly reset each other's state either.
Type of change
Description of change
Distinguish control-group beacons where LCE would have been used (no cache) from those where WURFL cache was present.