Page MenuHomePhabricator

hCaptcha: Store risk score in global memcache key
Closed, ResolvedPublic

Description

Summary

We store the risk score in SessionManager. But the session data isn't reconstructed when a job autocreates a local account. If we set the risk score in a short-lived global memcache key (using the username as part of the key), then we should be able to try the SessionManager, and then fall back to the memcache value when retrieving the score, and be able to have access to the score in wikis where an account is autocreated via a job.

Acceptance criteria

  • The risk score is accessible in wikis where the account is autocreated

Event Timeline

Change #1199306 had a related patch set uploaded (by Mszwarc; author: Mszwarc):

[mediawiki/extensions/ConfirmEdit@master] hCaptcha: Store risk score in cache, so that jobs can use it

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

Change #1199466 had a related patch set uploaded (by Mszwarc; author: Mszwarc):

[mediawiki/extensions/ConfirmEdit@wmf/1.45.0-wmf.24] hCaptcha: Store risk score in cache, so that jobs can use it

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

Change #1199467 had a related patch set uploaded (by Mszwarc; author: Mszwarc):

[mediawiki/extensions/ConfirmEdit@wmf/1.45.0-wmf.25] hCaptcha: Store risk score in cache, so that jobs can use it

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

Change #1199306 merged by jenkins-bot:

[mediawiki/extensions/ConfirmEdit@master] hCaptcha: Store risk score in cache, so that jobs can use it

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

Change #1199466 merged by jenkins-bot:

[mediawiki/extensions/ConfirmEdit@wmf/1.45.0-wmf.24] hCaptcha: Store risk score in cache, so that jobs can use it

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

Change #1199467 merged by jenkins-bot:

[mediawiki/extensions/ConfirmEdit@wmf/1.45.0-wmf.25] hCaptcha: Store risk score in cache, so that jobs can use it

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

Mentioned in SAL (#wikimedia-operations) [2025-10-28T20:04:41Z] <mszwarc@deploy2002> Started scap sync-world: Backport for [[gerrit:1199466|hCaptcha: Store risk score in cache, so that jobs can use it (T408542)]], [[gerrit:1199467|hCaptcha: Store risk score in cache, so that jobs can use it (T408542)]]

Mentioned in SAL (#wikimedia-operations) [2025-10-28T20:06:58Z] <mszwarc@deploy2002> mszwarc: Backport for [[gerrit:1199466|hCaptcha: Store risk score in cache, so that jobs can use it (T408542)]], [[gerrit:1199467|hCaptcha: Store risk score in cache, so that jobs can use it (T408542)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-10-28T20:12:08Z] <mszwarc@deploy2002> Finished scap sync-world: Backport for [[gerrit:1199466|hCaptcha: Store risk score in cache, so that jobs can use it (T408542)]], [[gerrit:1199467|hCaptcha: Store risk score in cache, so that jobs can use it (T408542)]] (duration: 07m 27s)