Page MenuHomePhabricator

hCaptcha: Record risk score for failed edits
Open, In Progress, Needs TriagePublic

Description

Summary

In T405597: hCaptcha: Update instrumentation for risk score we added support for logging the risk score for saved edits. In this task, we should also record the score for edits that failed (e.g. blocked by AbuseFilter).

Technical notes

We can potentially use onEditPage__attemptSave_after to look at the $status object. Ideally we'd want to be able to access the AbuseFilter log ID (or other mechanism involved in blocking the edit).

We'll need to update the schema and also add some code in WikimediaEvents for this logging.

Acceptance criteria

  • Risk scores for edits that do not save are logged in a way that allows us to identify why the edit was blocked

Event Timeline

Change #1211330 had a related patch set uploaded (by Samuel (WMF); author: Samuel (WMF)):

[mediawiki/extensions/WikimediaEvents@master] hCaptcha: Record risk score for failed edits

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

The implementation in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikimediaEvents/+/1211330 is now ready for review, but CI tests seem to be failing due to a change introduced somewhere else (doing an empty commit in the WikimediaEvents repository is currently failing the CI checks: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikimediaEvents/+/1229618).

EDIT: The error was caused by a method rename that missed to update a caller, this patch https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikimediaEvents/+/1229623 fixed it and tests are now passing again: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikimediaEvents/+/1229618?tab=checks

Change #1211330 merged by jenkins-bot:

[mediawiki/extensions/WikimediaEvents@master] hCaptcha: log risk score for failed edits

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