Page MenuHomePhabricator

UserInfoCard: Update GrowthExperiments Impact code to support temporary accounts and accounts without homepage enabled
Closed, ResolvedPublic

Description

Summary

For T384725: [Epic] WE4.2.18 UserInfoCard experiment for assisting patrollers and moderators, we want to be able to show the user info card for temporary accounts and accounts that don't have Special:Homepage preference enabled. The data store we propose to use in T386435: UserInfoCard: Create service to return user info card data for an account is the GrowthExperiments Impact store. This backend currently only supports generating data for permanent accounts. In this task, we need to determine the best way to support temporary accounts and permanent accounts without Special:Homepage enabled.

Background

User story

As a consumer of the service in T386435: UserInfoCard: Create service to return user info card data for an account, I want to be able to fetch data to populate a user info card for a temporary account or a permanent account without the Special:Homepage preference enabled.

Technical notes

  • rEGREa84453219d73: IP Masking: Replace isRegistered/isAnon calls with isNamed() updated ComputedUserImpactLookup's getUserImpact and getExpensiveUserImpact to check for a named user. We need to confirm with Growth and DBA (due to potential growth in rows to growthexperiments_user_impact) that it is OK to store data for temporary accounts as well. (Status quo: 36k rows in the impact table on enwiki.)
    • GrowthExperimentsUserImpactUpdater#userIsInCohort checks for a named account in addition to a few other things (does user have Special:Homepage enabled). This would also need modification to support temporary accounts and permanent accounts without Special:Homepage enabled.

Acceptance criteria

Event Timeline

kostajh renamed this task from UserInfoCard: Update GrowthExperiments Impact service to support temporary accounts to UserInfoCard: Update GrowthExperiments Impact code to support temporary accounts.Mar 20 2025, 12:23 PM
kostajh updated the task description. (Show Details)
kostajh renamed this task from UserInfoCard: Update GrowthExperiments Impact code to support temporary accounts to UserInfoCard: Update GrowthExperiments Impact code to support temporary accounts and accounts without homepage enabled.Mar 25 2025, 12:39 PM
kostajh updated the task description. (Show Details)

I wonder if, similar to the App's T388455: [Spike] Full-year editing stats for Year in Review , this task would also be better served by T341649: Provide an easy way for MediaWiki to fetch aggregate data from the data lake instead of building on top of GrowthExperiments' implementation with "brittle data pipelines".

Though maybe it might be feasible to make something work here in GrowthExperiments for the short term, while still aiming for a more reliable solution in the medium term.

I wonder if, similar to the App's T388455: [Spike] Full-year editing stats for Year in Review , this task would also be better served by T341649: Provide an easy way for MediaWiki to fetch aggregate data from the data lake instead of building on top of GrowthExperiments' implementation with "brittle data pipelines".

Though maybe it might be feasible to make something work here in GrowthExperiments for the short term, while still aiming for a more reliable solution in the medium term.

Once such a feature exists, certainly.

I think we could use cuci_user for identifying accounts that we should be pre-emptively generating and caching user impact data for. If we look for accounts active in the last 7 days or so:

select count(DISTINCT(ciu_central_id)) from cuci_user where ciu_timestamp > 20250426000000;
+---------------------------------+
| count(DISTINCT(ciu_central_id)) |
+---------------------------------+
|                          225183 |
+---------------------------------+
1 row in set (1.555 sec)

So we'd have 225,183 rows of data spread out across growthexperiments_user_impact in various wikis (external storage). That's compared to 32,062 rows currently on enwiki. DBA, does this sound OK?

Change #1148292 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] ComputedUserImpactLookup: Support temporary accounts

https://gerrit.wikimedia.org/r/1148292

Change #1148294 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] refreshUserImpactData: Allow refreshing data for temp accounts

https://gerrit.wikimedia.org/r/1148294

Change #1148295 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] GrowthExperimentsUserImpactUpdater: Support temporary and non-special-homepage accounts

https://gerrit.wikimedia.org/r/1148295

Change #1148292 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] ComputedUserImpactLookup: Support temporary accounts

https://gerrit.wikimedia.org/r/1148292

Change #1148294 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] refreshUserImpactData: Allow refreshing data for temp accounts

https://gerrit.wikimedia.org/r/1148294

Change #1148295 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] GrowthExperimentsUserImpactUpdater: Support temporary and non-special-homepage accounts

https://gerrit.wikimedia.org/r/1148295

Djackson-ctr subscribed.

The new code has been implemented and is working as expected per the Acceptance Criteria.
QA was completed for this ticket using Test wiki 1.45.0-wmf.9 (a9e4ca5)