Do not automatically enroll experienced editors into Mentorship when they visit the Homepage
Open, Needs TriagePublic

Description

User story & summary:

As an experienced editor who visits the Newcomer Homepage, I do not want to be assigned a Mentor, because I no longer need newcomer support.

As a Mentor, I do not want experienced editors assigned to me as Mentees, because it creates confusion and reduces my ability to focus on newcomers who need help.

Background & research:

This task is important because:

  1. The current logic is confusing both for Mentors and Experienced Editors who are auto-assigned a Mentor
  2. Mentors are busy, we should work towards reducing the number of mentees they support.
  3. Mentors are Asking for this:

The homepage tab could be tweaked to say after the six months something like "Congratulations, you are now experienced enough not to need a mentor! Use the Help Desk if you need advice from now on." instead of giving a name. I'd also suggest that anyone who activates the newcomer homepage when they already have over six month's experience should get that message. (I was amused that when I activated the tab to see what it did, I was auto-assigned someone less experienced than I am.)

Acceptance Criteria:

Given I'm an editor that meets the Mentorship criteria defined in Community Configuration.
When I visit the Homepage,
Then the Mentorship module displays the current "opted out from mentorship" state
(In other words, they can still "get a mentor" if they are interested in testing out the system, but we no longer automatically assign a mentor to every experienced editor who visits the Homepage).

image.png (1×750 px, 243 KB)

Configuration Option
A checkbox is added to Community Configuration that enables communities to define thresholds for automatically opting experienced editors out of mentorship.

Threshold Application
If the checkbox is selected, all users who meet both thresholds are automatically set to the “opted out from mentorship” state.
Users in this state must opt in if they want to receive a Mentor.

Retrospective Application
The thresholds apply retrospectively, meaning existing users who meet the criteria will also be opted out.
If a user who was opted out later opts back in, they are reassigned to the same mentor they had previously.

Consistency of User Experience
The mentorship module looks the same for users who are opted out automatically (via thresholds) as it does for those who opt out manually.

Release Approach
The feature is implemented as an opt-in configuration for communities. In other words the release will not change any behavior until an admin makes a change to the related Community Configuration.
Making this behavior the default may be considered later but will require further community discussion and consensus.

Related Objects

Event Timeline

Change #1184598 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/core@master] ConditionalDefaultsLookup: Add support for CUDCOND_MIN_EDITCOUNT

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

Change #1184599 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/core@master] ConditionalDefaultsLookup: Allow extensions to modify the conditions dynamically

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

Change #1184600 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] WIP: feat: Allow communities to decide experienced users start as opted out from mentorship

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

Change #1184799 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/core@master] ConditionalDefaultsLookup: Add support for CUDCOND_REGISTERED_BEFORE

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

This is what I am thinking about adding to Community Configuration as part of this task:

image.png (722×1 px, 116 KB)

If the checkbox is selected, the thresholds defined below are applied. All users who meet both thresholds will start in "opted out from mentorship" state, requiring an opt-in to get a mentor. This applies retrospectively (as that is the easiest to implement it seems), the same mentor should be assigned if you opt back again.

There is no difference between how the mentorship module looks like when you opted out manually and when you just meet the thresholds.

after an internal discussion we landed on this copy

[ ] Opt out experienced users from mentorship
    When enabled, mentees are automatically removed from mentorship after reaching both thresholds. They can still get a mentor from their Homepage.

Number of edits
[  500 ]

Account age (in days)
[ 30 ]

image.png (576×1 px, 54 KB)

Change #1186510 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] WIP: feat: Allow communities to opt out experienced users from mentorship

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

Change #1184600 abandoned by Urbanecm:

[mediawiki/extensions/GrowthExperiments@master] feat: Allow communities to decide experienced users start as opted out from mentorship

Reason:

we used another another method

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

Change #1184599 abandoned by Urbanecm:

[mediawiki/core@master] ConditionalDefaultsLookup: Allow extensions to modify the conditions dynamically

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

Change #1184799 abandoned by Urbanecm:

[mediawiki/core@master] ConditionalDefaultsLookup: Add support for CUDCOND_REGISTERED_BEFORE

Reason:

no longer needed

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

Change #1184598 abandoned by Urbanecm:

[mediawiki/core@master] ConditionalDefaultsLookup: Add support for CUDCOND_MIN_EDITCOUNT

Reason:

no longer needed

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

Change #1187515 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] refactor: Add CreateMenteeHelpers

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

Change #1187520 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] tests: Improve test coverage for MenteeGraduation

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

Change #1187538 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] refactor: Use CreateMenteeHelpers in MentorManagerTest

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

Change #1187515 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] refactor: Add CreateMenteeHelpers

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

Change #1187538 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] refactor: Use CreateMenteeHelpers in MentorManagerTest

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

Change #1187793 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] refactor(MentorManager): Introduce MENTORSHIP_ENABLED_EXPLICITLY

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

Change #1187837 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/CommunityConfiguration@master] Add CommunityConfigurationEditCompleted hook

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

Change #1187838 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] feat(Mentorship): Graduate all eligible mentees upon CC changes

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

Change #1187793 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] refactor(MentorManager): Introduce MENTORSHIP_ENABLED_EXPLICITLY

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

Change #1186510 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] feat: Allow communities to opt out experienced users from mentorship

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

Change #1188767 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@wmf/1.45.0-wmf.18] feat: Allow communities to opt out experienced users from mentorship

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

Change #1188767 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@wmf/1.45.0-wmf.18] feat: Allow communities to opt out experienced users from mentorship

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

Mentioned in SAL (#wikimedia-operations) [2025-09-16T15:26:29Z] <urbanecm@deploy1003> Started scap sync-world: Backport for [[gerrit:1188767|feat: Allow communities to opt out experienced users from mentorship (T403563)]]

Mentioned in SAL (#wikimedia-operations) [2025-09-16T16:15:39Z] <urbanecm@deploy1003> Started scap sync-world: Backport for [[gerrit:1188767|feat: Allow communities to opt out experienced users from mentorship (T403563)]]

Mentioned in SAL (#wikimedia-operations) [2025-09-16T16:58:00Z] <urbanecm@deploy1003> urbanecm: Backport for [[gerrit:1188767|feat: Allow communities to opt out experienced users from mentorship (T403563)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-09-16T18:23:23Z] <urbanecm@deploy1003> Started scap sync-world: Backport for [[gerrit:1188767|feat: Allow communities to opt out experienced users from mentorship (T403563)]]

Mentioned in SAL (#wikimedia-operations) [2025-09-16T18:44:16Z] <urbanecm@deploy1003> Finished scap sync-world: Backport for [[gerrit:1188767|feat: Allow communities to opt out experienced users from mentorship (T403563)]] (duration: 20m 52s)

I deployed this feature to all wikis (available in Community Configuration). I also enabled the opting out via CC, as discussed with @IZapico-WMF during the Ambassadors meeting.

I tried dry-running the graduation script on eswiki:

[urbanecm@deploy1003 ~]$ mwscript-k8s -f GrowthExperiments:graduateEligibleMentees.php -- --wiki=eswiki --dry-run
⏳ Starting GrowthExperiments:graduateEligibleMentees.php on Kubernetes as job mw-script.eqiad.vlmj41vw ...
🚀 Job is running.
📜 Streaming logs:
Processing mentor Oscar ....    done! Would graduate 25 mentees so far.
Processing mentor Tsaorin...    done! Would graduate 35 mentees so far.
/usr/local/bin/mwscript: line 124:     8 Killed                  ${RUNNER} ${CMD} "${@}"
Processing mentor Hard...[urbanecm@deploy1003 ~]$

Something doesn't like the job. Figuring out what:

[urbanecm@deploy1003 ~]$ kubectl get job mw-script.eqiad.vlmj41vw
NAME                       COMPLETIONS   DURATION   AGE
mw-script.eqiad.vlmj41vw   0/1           18m        18m
[urbanecm@deploy1003 ~]$ kubectl get pods -l job-name=mw-script.eqiad.vlmj41vw
NAME                             READY   STATUS      RESTARTS   AGE
mw-script.eqiad.vlmj41vw-vgcbs   0/3     OOMKilled   0          18m
[urbanecm@deploy1003 ~]$

It seems to run out of memory. For reference, those are our current resource limits:

resources:
  limits:
    cpu: "1"
    memory: 1200Mi
  requests:
    cpu: "1"
    memory: 1000Mi

Not sure what is eating all that memory... Might be related to T395893: growthexperiments-deleteoldsurveys OOMKilled during June 1st run .

I believe this is merged and should be in QA, correct?
I see the feature available via Special:CommunityConfiguration/Mentorship, and I can see it has been enabled on Spanish Wikipedia.

I believe this is merged and should be in QA, correct?
I see the feature available via Special:CommunityConfiguration/Mentorship, and I can see it has been enabled on Spanish Wikipedia.

It depends. There are several issues here yet to solve:

  • config changes are not applied immediately (but only when the experienced user makes an edit),
    • this requires some changes in CC to make this possible (basically, CC needs to tell us "hey, the config has changed!")
    • once the CC updates are done, we can implement this
  • we did not run the maintenance script to opt-out all current experienced users on Spanish Wikipedia, because we run into memory issues (T404804)

So, from eswiki perspective, this is somehow half-way through. That being said, the main feature was indeed implemented and deployed.

I went ahead and created several new tasks tracking the remaining bits:

In addition to those tasks, I also filled T405963: Consider running GrowthExperiments:graduateEligibleMentees maintenance script periodically as an improvement we can consider in the future. I'll update the subtasks accordingly. Let me know if there is anything else unclear, @KStoller-WMF!

For the record, some of those tasks are actually started (within this one), but not yet finished. I'll move them into the appropriate column in the sprint (we can revisit that, of course).