This ticket is to document the anomaly that caused T223828
Sometime in early May 2019, Revision::getPrevious() started returning null within the onNewRevisionFromEditComplete, even if a previous revision exists. This broke functionality in PageTriage. I have not confirmed this behaviour elsewhere in MediaWiki, but we were able to deduce nothing in PageTriage was the culprit.
Outside this context, Revision::getPrevious() works as expected. It seems to only be within onNewRevisionFromEditComplete. Changing the Core code to use READ_LATEST still does not resolve this issue, so I don't believe it is any sort of race condition.
A search shows the onNewRevisionFromEditComplete hook is not used many places and, for deployed WMF extensions, none are also using Revision::getPrevious(). Instead some (e.g. Wikibase) are using Revision::newFromId( $parentId ) to get the previous revision. Using this tactic worked for PageTriage, so we went with that.
The suspect patch I found was https://gerrit.wikimedia.org/r/c/mediawiki/core/+/507028 but even reverting it did not resolve the problem for me. I reverted back MediaWiki, and PageTriage, as far as I could (until I hit db changes), and I was still getting null for Revision::getPrevious(). So, the issue is truly a mystery!