Page MenuHomePhabricator

Create a maintenance script to evaluate a content policy text against arbitary content
Closed, ResolvedPublic

Description

Summary

To aid in debugging and testing we should add a maintenance script to MediaWiki-extensions-WikimediaAntiAbuse that allows evaluating arbitary content against an arbitrary content policy text.

Acceptance criteria

  • The maintenance specified above script exists

Event Timeline

Dreamy_Jazz renamed this task from Create a maintnenance script to evaluate a content policy text against an arbitary edit to Create a maintenance script to evaluate a content policy text against an arbitary edit.Jul 15 2026, 11:52 AM
Dreamy_Jazz renamed this task from Create a maintenance script to evaluate a content policy text against an arbitary edit to Create a maintenance script to evaluate a content policy text against an arbitrary edit.Jul 15 2026, 11:55 AM

Change #1311129 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/WikimediaAntiAbuse@master] Create EvaluateContentPolicy.php maintenance script

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

Dreamy_Jazz renamed this task from Create a maintenance script to evaluate a content policy text against an arbitrary edit to Create a maintenance script to evaluate a content policy text against arbitary content.Jul 15 2026, 11:38 PM
Dreamy_Jazz claimed this task.
Dreamy_Jazz updated the task description. (Show Details)

Evaluating an edit will need T431291: Implement mechanism for deciding which edits are checked for a given policy to happen, because the content is likely to be different for each policy text (as the policy text will usually have a structure that is specified and the content being evaluated will need to follow it). Therefore, for now the maintenance script will just evaluate a provided content policy text and content for that policy to evaluate.

In future it could be updated to evaluate a given revision ID for a pre-defined content policy text (making use of the same flow that T431286: Call CoPE models for edits that are made adds but for a specific historical revision)

Change #1311129 merged by jenkins-bot:

[mediawiki/extensions/WikimediaAntiAbuse@master] Create EvaluateContentPolicy.php maintenance script

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

The maintenance script exists, likely does not need QA. If we want to update it to support checking any revision against the defined models for a wiki, then we can do that in a new ticket