Every so often, we need to make a change in AbuseFilter code that could potentially affect the meaning of existing filters. For instance:
- In T191715 we learned that some system variable names were not properly reserved by AbuseFilter, and before we fix it we need to identify all filters on WMF wikis that use a homonym local variable and change their code to use a different name for that local variable.
- In T181024 we found out that arrays may be improperly cast to strings, and before fixing the code we want to fix the filters that use this incorrect approach.
- A similar issue was also observed in T190639 about the way string() function is used by filters to cast lists into strings. Again, we would like to fix the filters that use that function before updating the code.
- In T187973 we want to find all filters that use deprecated variables and replace the variable names with their non-deprecated alternatives.
For each of these we would like to run a query against production databases (for all WMF wikis, possibly one wiki at a time) to identify filters that need to be modified, and then use a global sysop account to go into each and every one of these filters and apply a fix.
To that end, we need to have a very clear process for the following:
- To decide when each of those steps is worth doing. The alternative is to not find/modify the affected filters, and let the local admins do it. Each approach has cons and pros, and we need to devise a guideline to decide which approach to use when.
- To request for the queries to be run (who asks it, who runs it, does it need legal approval each time, is there a Phabricator tag to use, etc)
- To request for the affected filters to be edited (who does that, do we ask one of the existing global sysops or do we temporarily promote one of the developers to a global sysop each time)
- To communicate and document the filter modifications (the last thing we want is for the local sysops to see a random person come and change something with their filters and freak out)
Since Brian and Aeryn were (briefly) engaged with some of the tasks enumerated above, I have copied them here as well.