Closed Bug 2074411 Opened 2 months ago Closed 1 month ago

Day-7 continuous onboarding can be marked complete before the user's region is known, so eligible users never see the IP Protection onboarding prompt

Categories

(Firefox for Android :: Onboarding, task)

All
Android
task
Points:
3

Tracking

()

RESOLVED FIXED
159 Branch
Tracking Status
firefox159 --- fixed

People

(Reporter: towhite, Assigned: towhite)

References

Details

(Whiteboard: [fxdroid] [android-activation-trust])

Attachments

(1 external file, 2 obsolete files)

Bug 2071254 part 3 adds an onIneligible callback to IPProtectionOnboardingPrompt, fired when EligibilityStatus resolves to Ineligible or UnsupportedRegion, and ContinuousOnboardingFeature wires it to mark the day-7 stage complete. That write is one-way: once seventhDayOnboardingCompletedTimestamp is set, the day-7 stage never re-enters and the IP Protection onboarding prompt, whose only entry point is that stage, is never shown.

FenixIPProtectionEligibilityStorage computes eligibility as region?.home in nimbus.allowedRegions. At cold start BrowserState.search.region is null until RegionMiddleware finishes reading the cached region on the IO dispatcher, and a null region makes that check false. So every user with IP Protection enabled in Nimbus briefly reports UnsupportedRegion before flipping to their real status. There is an explicit test asserting the null region behaviour, so this is deliberate in the storage.

Before part 3 that transient value was harmless: IPProtectionFeature calls uninit() and re-initialises when the status changes. After part 3, if the day-7 binding starts while the region is still null, an eligible user has day 7 marked complete on the placeholder value. The onboarding.day_seven_completed event from bug 2072667 records this as completion_reason ineligible, so the telemetry would also be skewed.

The window is between HomeFragment starting ContinuousOnboardingFeature and the cached region read completing. That read starts during Application.onCreate, so the race is narrow, but the write cannot be undone and fails silently.

Options considered:

  • Have IPProtectionOnboardingPrompt wait for UnsupportedRegion to persist for a settle window before calling onIneligible, cancelled by any status change. Self-contained but heuristic.
  • Pass a BrowserStore into the prompt via IPProtectionOnboardingConfig and only treat UnsupportedRegion as final once search.region is non-null. Deterministic; touches ContinuousOnboardingFeature.
  • Have FenixIPProtectionEligibilityStorage report Unknown while the region is null. Cleanest semantically, but changes eligibility behaviour owned by the IP Protection feature.

Ineligible from the Nimbus config does not depend on region and can stay immediate in any of these.

The eligibility storage reported UnsupportedRegion until the browser store's region was set, which only happens in
HomeActivity.onResume, after the day-7 continuous onboarding binding has already started. That transient value is
indistinguishable from a genuinely unsupported region and permanently marked the day-7 stage complete for eligible
users.

Assignee: nobody → towhite
Status: NEW → ASSIGNED
Attachment #9646777 - Attachment description: Bug 2074411 - Report IP Protection eligibility as Unknown while the region is unresolved. r?#android-reviewers → Bug 2074411 - Report IP Protection eligibility as Unknown while the region is unresolved.

The eligibility storage reported UnsupportedRegion until the browser store's region was set, which only happens in
HomeActivity.onResume, after the day-7 continuous onboarding binding has already started. That transient value is
indistinguishable from a genuinely unsupported region and permanently marked the day-7 stage complete for eligible
users.

Attachment #9646802 - Attachment is obsolete: true

The eligibility storage reported UnsupportedRegion until the browser store's region was set, which only happens in
HomeActivity.onResume, after the day-7 continuous onboarding binding has already started. That transient value is
indistinguishable from a genuinely unsupported region and permanently marked the day-7 stage complete for eligible
users.

Attachment #9646891 - Attachment is obsolete: true
Points: --- → 3
Pushed by icedicedcoffee@proton.me: https://github.com/mozilla-firefox/firefox/commit/8398cba0e7df https://hg.mozilla.org/integration/autoland/rev/56c32d6a813a Report IP Protection eligibility as Unknown while the region is unresolved. r=android-reviewers,jonalmeida,gmalekpour
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 159 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: