Page MenuHomePhabricator

Add afl_rc_id column to abuse_filter_log
Open, Stalled, Needs TriagePublic

Description

Currently, there's no reliable way to remap abuse log entries to MW log entries because the abuse_filter_log table does not store any reference to the associated MW log action.
For edit actions, remapping can be done via the afl_rev_id column, but since AbuseFilter supports non-edit actions like delete and createaccount, there should be a way to reverse-search these actions from abuse logs.

As a solution, I'd like to propose adding an afl_rc_id column, which corresponds to rc_id in the recentchanges table.
Once we have this, it will be possible to reverse-search any information this table holds, for example the oldid of an edit, logid of a log action, and even block IDs stored in rc_params.

See also:

Event Timeline

rc_id foreign keys are effectively useful only for 30 days. This doesn't seem like a proper mitigation.

Currently, there's no reliable way to remap abuse log entries to MW log entries because the abuse_filter_log table does not store any reference to the associated MW log action.

Reminds me of T214592. Perhaps what you describe should have been the field's intended use, but it was never done.

At the moment it's almost impossible to filter out abuse log entries whose associated actions have already been reverted, because we don't know the associated MW log IDs.

Can you outline how knowing the rc_id would aid in this?

Dragoniez changed the task status from Open to Stalled.Feb 6 2026, 11:04 AM

Thanks, I wasn't aware that afl_log_id had once existed but was later dropped. My intention was to make it possible to remap abuse log entries associated with saved changes to MW logs, but now that I think about it more carefully I'm not sure how that can be achieved under the current AbuseFilter architecture which doesn't listen to MW log entry insertions. Let me mark this ticket as stalled to make a more concrete plan.