MediaWiki should emit PageUpdatedEvents whenever the content of a page changes. Besides the obvious case of page edits edit, the following actions change page content:
- undeleting pages/revisions (see the UndeletePage class)
- changing the content model (see ContentModelChange class) [currently implicit, through WikiPage::doUserEditContent]
- rollbacks (see RollbackPage and McrUndoAction classes) [currently implicit, through PageUpdater::saveRevision]
- moving/renaming pages (see the MovePage class) - or should they? We are not changing page content, just the title of the page. But anything that associates derived data with that title needs to re-generate, so this is probably needed. On the other hand, the event doesn't contain the previous title, so ther ewould not be sufficient information to remove the old derived data...
- importing pages/revisions (see the ImportableOldrevisionImporter class) - unless importing only old revisions of an existing page.
- uploading media files (see the LocalFile class) - at least when first creating the file page. Uploads of new versions of the file only create dummy revisions. [currently implicit, through WikiPage::doUserEditContent]
- MAYBE purges (see ApiPurge and maybe also PurgeAction) - they currently don't trigger all updtes, but perhaps they should?!
- MAYBE restriction changes, per WikiPage::doUpdateRestrictions which fires RevisionFromEditComplete
- Probably not, though. The fact that RevisionfromEditComplete is called there goes back to at least 2011, see https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/1ddc07f845718df6411a32e7e27320b7ab23cf84/includes/Article.php#2547. There doesn't seem to be a particularly good reason, other than that a revision is being created. We now create dummy revisions in a number of places where we don't trigger that hook.
There are further cases where we perform programmatic edits, e.g. DoubleRedirectJob, various maintenance scripts, and numerous extensions. They will already be emitting PageUpdated events, but could set additional flags to better signal to listeners how the edit should be handled. Survey callers of WikiPage::doUserEditContent and PageUpdater::saverevision to identify them.
Consolidating how we create dummy revisions would help: T198297: Use PageUpdater to create dummy revisions