PIR: Handle PIR profile reappearance on maintenance scans#9149
Open
landomen wants to merge 1 commit into
Open
Conversation
Contributor
|
Privacy Review task: https://app.asana.com/0/69071770703008/1216428909118978 |
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.
Task/Issue URL: https://app.asana.com/1/137249556945/project/72649045549333/task/1216387860516593?focus=true
Tech Design URL (if applicable): N/A
Description
Implements the missing profile reappearance handling on maintenance scans that exists on other platforms.
Steps to test this PR
m_dbp_optoutjob_reappearedin log cat - that means that the profile was marked as re-appearedUI changes
No UI changes
Note
Medium Risk
Changes opt-out job state during scheduled/maintenance scans; incorrect matching could wrongly re-queue opt-outs or miss reappearances, though guards limit reverts to scan-confirmed REMOVED records on valid job records.
Overview
Adds profile reappearance handling on successful broker scan extract results, aligning Android with other PIR platforms.
When maintenance scans return profiles that were already stored but whose opt-out job was REMOVED (no longer seen on a prior scan),
markReappearedOptOutJobRecordsdetects the overlap, reverts those records to REQUESTED, clearsoptOutRemovedDateInMillis, and only touches valid non-deprecated records still in REMOVED status.RealPirRunStateHandlerinvokes this aftermarkRemovedOptOutJobRecordsand before persisting new matches, firingm_dbp_optoutjob_reappearedonce per reverted record viareportBrokerOptOutProfileReappeared.Pixel wiring includes the new definition,
PIR_BROKER_CUSTOM_STATS_OPTOUT_PROFILE_REAPPEARED, and unit tests for the updater and handler paths.Reviewed by Cursor Bugbot for commit 35fe63d. Bugbot is set up for automated code reviews on this repo. Configure here.