It would be really useful to have predictions for a proposed revision **before** the revision is saved. One could use this score, for example, in AbuseFilter in combination with other heuristics to decide whether to deny an edit for a certain type of user (0 edits thus far; or creating temp account) or to show a CAPTCHA, etc.## Context
Looking at https://meta.wikimedia.org/wiki/Machine_learning_models/Proposed/Multilingual_revert_risk#Model it seems like we could provide some of these things in a pre-save context -- we can get the wikitextIt would be really useful to have predictions for a proposed revision **before** the revision is saved. One could use this score, for example, a diff against parent revision,in AbuseFilter in combination with other heuristics to decide whether to deny an edit for a certain type of user (0 edits thus far; the texts that were added/removed/changedor creating temp account) or to show a CAPTCHA, etc.
**Proposal**
- Add a POST endpoint to accept metadata that is currently retrieved by querying MediaWiki with a revision IDLooking at https://meta.wikimedia.org/wiki/Machine_learning_models/Proposed/Multilingual_revert_risk#Model and https://gitlab.wikimedia.org/repos/research/knowledge_integrity/-/blob/main/knowledge_integrity/mediawiki.py?ref_type=heads, we should be able to provide this metadata in a **pre-save** context -- we can get the wikitext, a diff against parent revision, the texts that were added/removed/changed, etc.
It would be great to know 1) if #Research / #machine-learning-team think this is feasible and 2) what the timeline or process might be for implementing something along those lines.
The idea would be to use this with other signals to perform an action. See [this document](https://docs.google.com/document/d/1_KF2q9tZyJyhaazMOYITj-stxEkmSYKfgfAh5qiLWwI/edit) for why preventing edits based on revert risk score alone is problematic.
Related:
- {T299436}
- {T344537}
- {T123178}
## Proposal
1. Add a POST endpoint to Multilingual revert risk and revert-risk language agnostic endpoints to accept metadata that is currently retrieved by querying MediaWiki with a revision ID
## Consequences
1. Clients can receive revert risk results for an edit before it is saved to MediaWiki